@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.mjs
CHANGED
|
@@ -2530,289 +2530,6 @@ class CorrectUseOfColors {
|
|
|
2530
2530
|
}; }
|
|
2531
2531
|
}
|
|
2532
2532
|
|
|
2533
|
-
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}";
|
|
2534
|
-
var EdsAccordionStyle0 = edsAccordionCss;
|
|
2535
|
-
|
|
2536
|
-
/**
|
|
2537
|
-
* `EdsAccordion` is a flexible, interactive component for expanding and collapsing content sections.
|
|
2538
|
-
* It features a customizable header, optional description, and content area that can be dynamically expanded.
|
|
2539
|
-
* This component supports a range of configurations, including background toggling, minimum height adjustments,
|
|
2540
|
-
* and various styles to suit different layouts and display requirements.
|
|
2541
|
-
*
|
|
2542
|
-
* It includes an optional button or link element within the header, which can be customized for additional interactions.
|
|
2543
|
-
*
|
|
2544
|
-
* The `accordionChange` event is emitted when the accordion's expanded state changes, allowing parent components
|
|
2545
|
-
* to track its open/close status.
|
|
2546
|
-
*
|
|
2547
|
-
* Key features include:
|
|
2548
|
-
* - Header with customizable title
|
|
2549
|
-
* - Expandable/collapsible content section
|
|
2550
|
-
* - Background color switch on expand and hover
|
|
2551
|
-
* - Compact layout option with reduced header height
|
|
2552
|
-
* - Adjustable content height and text clamping
|
|
2553
|
-
* - Emitted events for tracking changes in expansion state and context
|
|
2554
|
-
*/
|
|
2555
|
-
class EdsAccordion {
|
|
2556
|
-
constructor(hostRef) {
|
|
2557
|
-
registerInstance(this, hostRef);
|
|
2558
|
-
this.accordionChange = createEvent(this, "accordionChange", 7);
|
|
2559
|
-
/**
|
|
2560
|
-
* Handles the click event on the accordion header to toggle expansion.
|
|
2561
|
-
* Toggles the `isExpanded` state and emits the `accordionChange` event.
|
|
2562
|
-
*/
|
|
2563
|
-
this.handleClick = () => {
|
|
2564
|
-
this.isExpanded = !this.isExpanded;
|
|
2565
|
-
this.accordionChange.emit(this.isExpanded);
|
|
2566
|
-
this.setPanelHeight();
|
|
2567
|
-
};
|
|
2568
|
-
/**
|
|
2569
|
-
* Calculates and sets the panel height based on the content height
|
|
2570
|
-
* and adjusts based on the `shortContent` and `isExpanded` states.
|
|
2571
|
-
*/
|
|
2572
|
-
this.setPanelHeight = () => {
|
|
2573
|
-
if (this.childContentRef) {
|
|
2574
|
-
this.shortContent =
|
|
2575
|
-
this.wrapperRef.scrollWidth > 830 && !this.description
|
|
2576
|
-
? this.childContentRef.scrollHeight <= 80
|
|
2577
|
-
: this.childContentRef.scrollHeight <= 20;
|
|
2578
|
-
this.panelHeight = this.isExpanded && !this.shortContent ? this.childContentRef.scrollHeight : 0;
|
|
2579
|
-
}
|
|
2580
|
-
};
|
|
2581
|
-
this.title = undefined;
|
|
2582
|
-
this.description = undefined;
|
|
2583
|
-
this.switchBg = true;
|
|
2584
|
-
this.expanded = false;
|
|
2585
|
-
this.clampText = true;
|
|
2586
|
-
this.minHeightContent = false;
|
|
2587
|
-
this.isExpanded = this.expanded;
|
|
2588
|
-
this.panelHeight = 0;
|
|
2589
|
-
this.shortContent = false;
|
|
2590
|
-
}
|
|
2591
|
-
/**
|
|
2592
|
-
* Lifecycle method that sets up the initial panel height and adds a resize event listener
|
|
2593
|
-
* to recalculate height on window resize.
|
|
2594
|
-
*/
|
|
2595
|
-
componentDidLoad() {
|
|
2596
|
-
this.setPanelHeight();
|
|
2597
|
-
// Emit context for each eds-link element after the component is fully loaded
|
|
2598
|
-
const btn = this.el.shadowRoot.querySelector('eds-button');
|
|
2599
|
-
this.emitContext(btn);
|
|
2600
|
-
window.addEventListener('resize', this.setPanelHeight);
|
|
2601
|
-
}
|
|
2602
|
-
/**
|
|
2603
|
-
* Emits a custom event called `parentContext` for a given link element.
|
|
2604
|
-
* This event provides context information about the breadcrumb component.
|
|
2605
|
-
*
|
|
2606
|
-
* @param linkElement - The link element to which the event will be dispatched.
|
|
2607
|
-
*/
|
|
2608
|
-
emitContext(linkElement) {
|
|
2609
|
-
const event = new CustomEvent('parentContext', {
|
|
2610
|
-
detail: {
|
|
2611
|
-
componentName: this.el.tagName.toLowerCase(),
|
|
2612
|
-
identifier: null
|
|
2613
|
-
}
|
|
2614
|
-
});
|
|
2615
|
-
linkElement.dispatchEvent(event);
|
|
2616
|
-
}
|
|
2617
|
-
/**
|
|
2618
|
-
* Lifecycle method that cleans up the resize event listener when the component is removed.
|
|
2619
|
-
*/
|
|
2620
|
-
disconnectedCallback() {
|
|
2621
|
-
window.removeEventListener('resize', this.setPanelHeight);
|
|
2622
|
-
}
|
|
2623
|
-
/**
|
|
2624
|
-
* Renders the accordion structure, including header, content, description, and any slotted content.
|
|
2625
|
-
* Adjusts styles based on `switchBg`, `tiny`, `clampText`, and other props.
|
|
2626
|
-
*/
|
|
2627
|
-
render() {
|
|
2628
|
-
const minHeightContentClass = this.minHeightContent ? 'min-h-56' : '';
|
|
2629
|
-
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
|
|
2630
|
-
${this.switchBg && this.isExpanded ? 'bg-inverse' : 'bg-default'}
|
|
2631
|
-
${this.switchBg ? 'hover:bg-inverse' : ''}
|
|
2632
|
-
${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' })))))));
|
|
2633
|
-
}
|
|
2634
|
-
get el() { return getElement(this); }
|
|
2635
|
-
static get style() { return EdsAccordionStyle0; }
|
|
2636
|
-
static get cmpMeta() { return {
|
|
2637
|
-
"$flags$": 9,
|
|
2638
|
-
"$tagName$": "eds-accordion",
|
|
2639
|
-
"$members$": {
|
|
2640
|
-
"title": [1],
|
|
2641
|
-
"description": [1],
|
|
2642
|
-
"switchBg": [4, "switch-bg"],
|
|
2643
|
-
"expanded": [4],
|
|
2644
|
-
"clampText": [4, "clamp-text"],
|
|
2645
|
-
"minHeightContent": [4, "min-height-content"],
|
|
2646
|
-
"isExpanded": [32],
|
|
2647
|
-
"panelHeight": [32],
|
|
2648
|
-
"shortContent": [32]
|
|
2649
|
-
},
|
|
2650
|
-
"$listeners$": undefined,
|
|
2651
|
-
"$lazyBundleId$": "-",
|
|
2652
|
-
"$attrsToReflect$": []
|
|
2653
|
-
}; }
|
|
2654
|
-
}
|
|
2655
|
-
|
|
2656
|
-
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}
|
|
2657
|
-
|
|
2658
|
-
const falsyToString = (value)=>typeof value === "boolean" ? "".concat(value) : value === 0 ? "0" : value;
|
|
2659
|
-
const cx = clsx;
|
|
2660
|
-
const cva = (base, config)=>{
|
|
2661
|
-
return (props)=>{
|
|
2662
|
-
var ref;
|
|
2663
|
-
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);
|
|
2664
|
-
const { variants , defaultVariants } = config;
|
|
2665
|
-
const getVariantClassNames = Object.keys(variants).map((variant)=>{
|
|
2666
|
-
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
2667
|
-
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
2668
|
-
if (variantProp === null) return null;
|
|
2669
|
-
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
2670
|
-
return variants[variant][variantKey];
|
|
2671
|
-
});
|
|
2672
|
-
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
|
|
2673
|
-
let [key, value] = param;
|
|
2674
|
-
if (value === undefined) {
|
|
2675
|
-
return acc;
|
|
2676
|
-
}
|
|
2677
|
-
acc[key] = value;
|
|
2678
|
-
return acc;
|
|
2679
|
-
}, {});
|
|
2680
|
-
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (ref = config.compoundVariants) === null || ref === void 0 ? void 0 : ref.reduce((acc, param1)=>{
|
|
2681
|
-
let { class: cvClass , className: cvClassName , ...compoundVariantOptions } = param1;
|
|
2682
|
-
return Object.entries(compoundVariantOptions).every((param)=>{
|
|
2683
|
-
let [key, value] = param;
|
|
2684
|
-
return Array.isArray(value) ? value.includes({
|
|
2685
|
-
...defaultVariants,
|
|
2686
|
-
...propsWithoutUndefined
|
|
2687
|
-
}[key]) : ({
|
|
2688
|
-
...defaultVariants,
|
|
2689
|
-
...propsWithoutUndefined
|
|
2690
|
-
})[key] === value;
|
|
2691
|
-
}) ? [
|
|
2692
|
-
...acc,
|
|
2693
|
-
cvClass,
|
|
2694
|
-
cvClassName
|
|
2695
|
-
] : acc;
|
|
2696
|
-
}, []);
|
|
2697
|
-
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
2698
|
-
};
|
|
2699
|
-
};
|
|
2700
|
-
|
|
2701
|
-
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";
|
|
2702
|
-
var EdsAlertStyle0 = edsAlertCss;
|
|
2703
|
-
|
|
2704
|
-
const alertStyles = cva(['w-full bg-dark rounded-lg border-inside after:border-softest after:rounded-lg'], {
|
|
2705
|
-
variants: {
|
|
2706
|
-
intent: {
|
|
2707
|
-
default: '',
|
|
2708
|
-
warning: 'bg-warning',
|
|
2709
|
-
error: 'bg-error',
|
|
2710
|
-
success: 'bg-success'
|
|
2711
|
-
},
|
|
2712
|
-
direction: {
|
|
2713
|
-
vertical: 'space-y-12',
|
|
2714
|
-
horizontal: 'flex flex-row items-center justify-between gap-x-12'
|
|
2715
|
-
},
|
|
2716
|
-
withBtn: {
|
|
2717
|
-
false: '',
|
|
2718
|
-
true: ''
|
|
2719
|
-
}
|
|
2720
|
-
},
|
|
2721
|
-
compoundVariants: [
|
|
2722
|
-
{
|
|
2723
|
-
direction: 'horizontal',
|
|
2724
|
-
withBtn: true,
|
|
2725
|
-
class: 'px-20 pr-12 py-12'
|
|
2726
|
-
},
|
|
2727
|
-
{
|
|
2728
|
-
direction: 'horizontal',
|
|
2729
|
-
withBtn: false,
|
|
2730
|
-
class: 'p-20'
|
|
2731
|
-
},
|
|
2732
|
-
{
|
|
2733
|
-
direction: 'vertical',
|
|
2734
|
-
withBtn: true,
|
|
2735
|
-
class: 'p-16'
|
|
2736
|
-
},
|
|
2737
|
-
{
|
|
2738
|
-
direction: 'vertical',
|
|
2739
|
-
withBtn: false,
|
|
2740
|
-
class: 'px-12 py-20'
|
|
2741
|
-
}
|
|
2742
|
-
],
|
|
2743
|
-
defaultVariants: {
|
|
2744
|
-
intent: 'default',
|
|
2745
|
-
direction: 'horizontal'
|
|
2746
|
-
}
|
|
2747
|
-
});
|
|
2748
|
-
/**
|
|
2749
|
-
* `EdsAlert` is a versatile alert component designed for displaying contextual messages.
|
|
2750
|
-
* This component offers various configuration options to support different use cases, making it ideal for notifying users of information, warnings, errors, or successes.
|
|
2751
|
-
*
|
|
2752
|
-
* Key features include:
|
|
2753
|
-
* - Customizable alert message with different visual intents (`default`, `warning`, `error`, `success`).
|
|
2754
|
-
* - Configurable layout direction (`horizontal` or `vertical`) to accommodate various design requirements.
|
|
2755
|
-
* - Optional pressable element (link or button) that allows users to interact with the alert.
|
|
2756
|
-
* - Emits context events to allow parent components to track alert interactions.
|
|
2757
|
-
*
|
|
2758
|
-
* This component is styled with predefined CSS classes to ensure consistent appearance across different alert types and layout configurations.
|
|
2759
|
-
*/
|
|
2760
|
-
class EdsAlert {
|
|
2761
|
-
constructor(hostRef) {
|
|
2762
|
-
registerInstance(this, hostRef);
|
|
2763
|
-
this.message = undefined;
|
|
2764
|
-
this.pressableLabel = undefined;
|
|
2765
|
-
this.pressableUrl = undefined;
|
|
2766
|
-
this.direction = 'horizontal';
|
|
2767
|
-
this.intent = 'default';
|
|
2768
|
-
this.withBtn = false;
|
|
2769
|
-
}
|
|
2770
|
-
componentWillLoad() {
|
|
2771
|
-
this.withBtn = Boolean(this.pressableLabel);
|
|
2772
|
-
}
|
|
2773
|
-
componentDidLoad() {
|
|
2774
|
-
// Query all 'eds-link' elements, including those inside shadow DOM
|
|
2775
|
-
const links = this.el.shadowRoot.querySelectorAll('eds-link');
|
|
2776
|
-
links.forEach((link) => {
|
|
2777
|
-
this.emitContext(link);
|
|
2778
|
-
});
|
|
2779
|
-
}
|
|
2780
|
-
emitContext(linkElement) {
|
|
2781
|
-
const event = new CustomEvent('parentContext', {
|
|
2782
|
-
detail: {
|
|
2783
|
-
componentName: this.el.tagName.toLowerCase(),
|
|
2784
|
-
identifier: null
|
|
2785
|
-
}
|
|
2786
|
-
});
|
|
2787
|
-
linkElement.dispatchEvent(event);
|
|
2788
|
-
}
|
|
2789
|
-
render() {
|
|
2790
|
-
return (hAsync("div", { key: '99518cd34cbfc04691f2f827b53105ef88c03af8', class: alertStyles({
|
|
2791
|
-
intent: this.intent,
|
|
2792
|
-
direction: this.direction,
|
|
2793
|
-
withBtn: this.withBtn
|
|
2794
|
-
}), role: "alert" }, hAsync("p", { key: '7eca97c849473bb4c8472d11243dc5eb9dded61f', class: "f-ui-01 py-8" }, this.message), this.withBtn &&
|
|
2795
|
-
(this.pressableUrl ? (hAsync("eds-link", { class: "eds-alert-link", label: this.pressableLabel, url: this.pressableUrl, intent: "secondary" })) : null)));
|
|
2796
|
-
}
|
|
2797
|
-
get el() { return getElement(this); }
|
|
2798
|
-
static get style() { return EdsAlertStyle0; }
|
|
2799
|
-
static get cmpMeta() { return {
|
|
2800
|
-
"$flags$": 9,
|
|
2801
|
-
"$tagName$": "eds-alert",
|
|
2802
|
-
"$members$": {
|
|
2803
|
-
"message": [1],
|
|
2804
|
-
"pressableLabel": [1, "pressable-label"],
|
|
2805
|
-
"pressableUrl": [1, "pressable-url"],
|
|
2806
|
-
"direction": [1],
|
|
2807
|
-
"intent": [1],
|
|
2808
|
-
"withBtn": [32]
|
|
2809
|
-
},
|
|
2810
|
-
"$listeners$": undefined,
|
|
2811
|
-
"$lazyBundleId$": "-",
|
|
2812
|
-
"$attrsToReflect$": []
|
|
2813
|
-
}; }
|
|
2814
|
-
}
|
|
2815
|
-
|
|
2816
2533
|
[
|
|
2817
2534
|
['eds-header', {
|
|
2818
2535
|
'home-url': '/',
|
|
@@ -2983,7 +2700,7 @@ function isMatomoAvailable() {
|
|
|
2983
2700
|
}
|
|
2984
2701
|
// General function to push data to Matomo
|
|
2985
2702
|
function pushToMatomo(action, ...args) {
|
|
2986
|
-
console.log('Pushing Matomo')
|
|
2703
|
+
//console.log('Pushing Matomo')
|
|
2987
2704
|
if (isMatomoAvailable()) {
|
|
2988
2705
|
window._paq.push([action, ...args]);
|
|
2989
2706
|
}
|
|
@@ -2996,7 +2713,7 @@ function sendAnalytics(eventData) {
|
|
|
2996
2713
|
var _a;
|
|
2997
2714
|
if (!isMatomoAvailable()) {
|
|
2998
2715
|
console.warn('Matomo is not available or not initialized.');
|
|
2999
|
-
console.log(
|
|
2716
|
+
//console.log({ ...eventData });
|
|
3000
2717
|
return;
|
|
3001
2718
|
}
|
|
3002
2719
|
// Conditionally build the name field
|
|
@@ -3019,6 +2736,51 @@ function matomoOptIn() {
|
|
|
3019
2736
|
}
|
|
3020
2737
|
}
|
|
3021
2738
|
|
|
2739
|
+
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}
|
|
2740
|
+
|
|
2741
|
+
const falsyToString = (value)=>typeof value === "boolean" ? "".concat(value) : value === 0 ? "0" : value;
|
|
2742
|
+
const cx = clsx;
|
|
2743
|
+
const cva = (base, config)=>{
|
|
2744
|
+
return (props)=>{
|
|
2745
|
+
var ref;
|
|
2746
|
+
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);
|
|
2747
|
+
const { variants , defaultVariants } = config;
|
|
2748
|
+
const getVariantClassNames = Object.keys(variants).map((variant)=>{
|
|
2749
|
+
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
2750
|
+
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
2751
|
+
if (variantProp === null) return null;
|
|
2752
|
+
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
2753
|
+
return variants[variant][variantKey];
|
|
2754
|
+
});
|
|
2755
|
+
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
|
|
2756
|
+
let [key, value] = param;
|
|
2757
|
+
if (value === undefined) {
|
|
2758
|
+
return acc;
|
|
2759
|
+
}
|
|
2760
|
+
acc[key] = value;
|
|
2761
|
+
return acc;
|
|
2762
|
+
}, {});
|
|
2763
|
+
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (ref = config.compoundVariants) === null || ref === void 0 ? void 0 : ref.reduce((acc, param1)=>{
|
|
2764
|
+
let { class: cvClass , className: cvClassName , ...compoundVariantOptions } = param1;
|
|
2765
|
+
return Object.entries(compoundVariantOptions).every((param)=>{
|
|
2766
|
+
let [key, value] = param;
|
|
2767
|
+
return Array.isArray(value) ? value.includes({
|
|
2768
|
+
...defaultVariants,
|
|
2769
|
+
...propsWithoutUndefined
|
|
2770
|
+
}[key]) : ({
|
|
2771
|
+
...defaultVariants,
|
|
2772
|
+
...propsWithoutUndefined
|
|
2773
|
+
})[key] === value;
|
|
2774
|
+
}) ? [
|
|
2775
|
+
...acc,
|
|
2776
|
+
cvClass,
|
|
2777
|
+
cvClassName
|
|
2778
|
+
] : acc;
|
|
2779
|
+
}, []);
|
|
2780
|
+
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
2781
|
+
};
|
|
2782
|
+
};
|
|
2783
|
+
|
|
3022
2784
|
const GRADIANT_TOKENS = ['green', 'yellow', 'among-blue', 'purple'];
|
|
3023
2785
|
const gradientBGColorVariants = cva([], {
|
|
3024
2786
|
variants: {
|
|
@@ -3108,45 +2870,271 @@ const gradientBGColorVariants = cva([], {
|
|
|
3108
2870
|
pseudo: false,
|
|
3109
2871
|
class: 'bg-gradient-03-top'
|
|
3110
2872
|
},
|
|
3111
|
-
{
|
|
3112
|
-
color: 'purple',
|
|
3113
|
-
direction: 'bottom',
|
|
3114
|
-
pseudo: false,
|
|
3115
|
-
class: 'bg-gradient-03-bottom'
|
|
2873
|
+
{
|
|
2874
|
+
color: 'purple',
|
|
2875
|
+
direction: 'bottom',
|
|
2876
|
+
pseudo: false,
|
|
2877
|
+
class: 'bg-gradient-03-bottom'
|
|
2878
|
+
},
|
|
2879
|
+
// endregion
|
|
2880
|
+
// region AMONG-BLUE
|
|
2881
|
+
{
|
|
2882
|
+
color: 'among-blue',
|
|
2883
|
+
direction: 'top',
|
|
2884
|
+
pseudo: true,
|
|
2885
|
+
class: 'before:bg-gradient-04-top'
|
|
2886
|
+
},
|
|
2887
|
+
{
|
|
2888
|
+
color: 'among-blue',
|
|
2889
|
+
direction: 'bottom',
|
|
2890
|
+
pseudo: true,
|
|
2891
|
+
class: 'before:bg-gradient-04-bottom'
|
|
2892
|
+
},
|
|
2893
|
+
{
|
|
2894
|
+
color: 'among-blue',
|
|
2895
|
+
direction: 'top',
|
|
2896
|
+
pseudo: false,
|
|
2897
|
+
class: 'bg-gradient-04-top'
|
|
2898
|
+
},
|
|
2899
|
+
{
|
|
2900
|
+
color: 'among-blue',
|
|
2901
|
+
direction: 'bottom',
|
|
2902
|
+
pseudo: false,
|
|
2903
|
+
class: 'bg-gradient-04-bottom'
|
|
2904
|
+
}
|
|
2905
|
+
// endregion
|
|
2906
|
+
],
|
|
2907
|
+
defaultVariants: {
|
|
2908
|
+
direction: 'top',
|
|
2909
|
+
pseudo: true
|
|
2910
|
+
}
|
|
2911
|
+
});
|
|
2912
|
+
|
|
2913
|
+
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}";
|
|
2914
|
+
var EdsAccordionStyle0 = edsAccordionCss;
|
|
2915
|
+
|
|
2916
|
+
/**
|
|
2917
|
+
* `EdsAccordion` is a flexible, interactive component for expanding and collapsing content sections.
|
|
2918
|
+
* It features a customizable header, optional description, and content area that can be dynamically expanded.
|
|
2919
|
+
* This component supports a range of configurations, including background toggling, minimum height adjustments,
|
|
2920
|
+
* and various styles to suit different layouts and display requirements.
|
|
2921
|
+
*
|
|
2922
|
+
* It includes an optional button or link element within the header, which can be customized for additional interactions.
|
|
2923
|
+
*
|
|
2924
|
+
* The `accordionChange` event is emitted when the accordion's expanded state changes, allowing parent components
|
|
2925
|
+
* to track its open/close status.
|
|
2926
|
+
*
|
|
2927
|
+
* Key features include:
|
|
2928
|
+
* - Header with customizable title
|
|
2929
|
+
* - Expandable/collapsible content section
|
|
2930
|
+
* - Background color switch on expand and hover
|
|
2931
|
+
* - Compact layout option with reduced header height
|
|
2932
|
+
* - Adjustable content height and text clamping
|
|
2933
|
+
* - Emitted events for tracking changes in expansion state and context
|
|
2934
|
+
*/
|
|
2935
|
+
class EdsAccordion {
|
|
2936
|
+
constructor(hostRef) {
|
|
2937
|
+
registerInstance(this, hostRef);
|
|
2938
|
+
this.accordionChange = createEvent(this, "accordionChange", 7);
|
|
2939
|
+
/**
|
|
2940
|
+
* Handles the click event on the accordion header to toggle expansion.
|
|
2941
|
+
* Toggles the `isExpanded` state and emits the `accordionChange` event.
|
|
2942
|
+
*/
|
|
2943
|
+
this.handleClick = () => {
|
|
2944
|
+
var _a;
|
|
2945
|
+
this.isExpanded = !this.isExpanded;
|
|
2946
|
+
this.accordionChange.emit(this.isExpanded);
|
|
2947
|
+
this.setPanelHeight();
|
|
2948
|
+
sendAnalytics({
|
|
2949
|
+
category: 'ui-component',
|
|
2950
|
+
parentContext: null,
|
|
2951
|
+
tag: this.el.tagName.toLowerCase(),
|
|
2952
|
+
name: ((_a = this.title) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
2953
|
+
action: this.isExpanded ? 'expanded' : 'collapsed'
|
|
2954
|
+
});
|
|
2955
|
+
};
|
|
2956
|
+
/**
|
|
2957
|
+
* Calculates and sets the panel height based on the content height
|
|
2958
|
+
* and adjusts based on the `shortContent` and `isExpanded` states.
|
|
2959
|
+
*/
|
|
2960
|
+
this.setPanelHeight = () => {
|
|
2961
|
+
if (this.childContentRef) {
|
|
2962
|
+
this.shortContent =
|
|
2963
|
+
this.wrapperRef.scrollWidth > 830 && !this.description
|
|
2964
|
+
? this.childContentRef.scrollHeight <= 80
|
|
2965
|
+
: this.childContentRef.scrollHeight <= 20;
|
|
2966
|
+
this.panelHeight = this.isExpanded && !this.shortContent ? this.childContentRef.scrollHeight : 0;
|
|
2967
|
+
}
|
|
2968
|
+
};
|
|
2969
|
+
this.title = undefined;
|
|
2970
|
+
this.description = undefined;
|
|
2971
|
+
this.switchBg = true;
|
|
2972
|
+
this.expanded = false;
|
|
2973
|
+
this.clampText = true;
|
|
2974
|
+
this.minHeightContent = false;
|
|
2975
|
+
this.isExpanded = this.expanded;
|
|
2976
|
+
this.panelHeight = 0;
|
|
2977
|
+
this.shortContent = false;
|
|
2978
|
+
}
|
|
2979
|
+
/**
|
|
2980
|
+
* Lifecycle method that sets up the initial panel height and adds a resize event listener
|
|
2981
|
+
* to recalculate height on window resize.
|
|
2982
|
+
*/
|
|
2983
|
+
componentDidLoad() {
|
|
2984
|
+
this.setPanelHeight();
|
|
2985
|
+
window.addEventListener('resize', this.setPanelHeight);
|
|
2986
|
+
}
|
|
2987
|
+
/**
|
|
2988
|
+
* Lifecycle method that cleans up the resize event listener when the component is removed.
|
|
2989
|
+
*/
|
|
2990
|
+
disconnectedCallback() {
|
|
2991
|
+
window.removeEventListener('resize', this.setPanelHeight);
|
|
2992
|
+
}
|
|
2993
|
+
/**
|
|
2994
|
+
* Renders the accordion structure, including header, content, description, and any slotted content.
|
|
2995
|
+
* Adjusts styles based on `switchBg`, `tiny`, `clampText`, and other props.
|
|
2996
|
+
*/
|
|
2997
|
+
render() {
|
|
2998
|
+
const minHeightContentClass = this.minHeightContent ? 'min-h-56' : '';
|
|
2999
|
+
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
|
|
3000
|
+
${this.switchBg && this.isExpanded ? 'bg-inverse' : 'bg-default'}
|
|
3001
|
+
${this.switchBg ? 'hover:bg-inverse' : ''}
|
|
3002
|
+
${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' })))))));
|
|
3003
|
+
}
|
|
3004
|
+
get el() { return getElement(this); }
|
|
3005
|
+
static get style() { return EdsAccordionStyle0; }
|
|
3006
|
+
static get cmpMeta() { return {
|
|
3007
|
+
"$flags$": 9,
|
|
3008
|
+
"$tagName$": "eds-accordion",
|
|
3009
|
+
"$members$": {
|
|
3010
|
+
"title": [1],
|
|
3011
|
+
"description": [1],
|
|
3012
|
+
"switchBg": [4, "switch-bg"],
|
|
3013
|
+
"expanded": [4],
|
|
3014
|
+
"clampText": [4, "clamp-text"],
|
|
3015
|
+
"minHeightContent": [4, "min-height-content"],
|
|
3016
|
+
"isExpanded": [32],
|
|
3017
|
+
"panelHeight": [32],
|
|
3018
|
+
"shortContent": [32]
|
|
3019
|
+
},
|
|
3020
|
+
"$listeners$": undefined,
|
|
3021
|
+
"$lazyBundleId$": "-",
|
|
3022
|
+
"$attrsToReflect$": []
|
|
3023
|
+
}; }
|
|
3024
|
+
}
|
|
3025
|
+
|
|
3026
|
+
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";
|
|
3027
|
+
var EdsAlertStyle0 = edsAlertCss;
|
|
3028
|
+
|
|
3029
|
+
const alertStyles = cva(['w-full bg-dark rounded-lg border-inside after:border-softest after:rounded-lg'], {
|
|
3030
|
+
variants: {
|
|
3031
|
+
intent: {
|
|
3032
|
+
default: '',
|
|
3033
|
+
warning: 'bg-warning',
|
|
3034
|
+
error: 'bg-error',
|
|
3035
|
+
success: 'bg-success'
|
|
3036
|
+
},
|
|
3037
|
+
direction: {
|
|
3038
|
+
vertical: 'space-y-12',
|
|
3039
|
+
horizontal: 'flex flex-row items-center justify-between gap-x-12'
|
|
3116
3040
|
},
|
|
3117
|
-
|
|
3118
|
-
|
|
3041
|
+
withBtn: {
|
|
3042
|
+
false: '',
|
|
3043
|
+
true: ''
|
|
3044
|
+
}
|
|
3045
|
+
},
|
|
3046
|
+
compoundVariants: [
|
|
3119
3047
|
{
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
class: 'before:bg-gradient-04-top'
|
|
3048
|
+
direction: 'horizontal',
|
|
3049
|
+
withBtn: true,
|
|
3050
|
+
class: 'px-20 pr-12 py-12'
|
|
3124
3051
|
},
|
|
3125
3052
|
{
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
class: 'before:bg-gradient-04-bottom'
|
|
3053
|
+
direction: 'horizontal',
|
|
3054
|
+
withBtn: false,
|
|
3055
|
+
class: 'p-20'
|
|
3130
3056
|
},
|
|
3131
3057
|
{
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
class: 'bg-gradient-04-top'
|
|
3058
|
+
direction: 'vertical',
|
|
3059
|
+
withBtn: true,
|
|
3060
|
+
class: 'p-16'
|
|
3136
3061
|
},
|
|
3137
3062
|
{
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
class: 'bg-gradient-04-bottom'
|
|
3063
|
+
direction: 'vertical',
|
|
3064
|
+
withBtn: false,
|
|
3065
|
+
class: 'px-12 py-20'
|
|
3142
3066
|
}
|
|
3143
|
-
// endregion
|
|
3144
3067
|
],
|
|
3145
3068
|
defaultVariants: {
|
|
3146
|
-
|
|
3147
|
-
|
|
3069
|
+
intent: 'default',
|
|
3070
|
+
direction: 'horizontal'
|
|
3148
3071
|
}
|
|
3149
3072
|
});
|
|
3073
|
+
/**
|
|
3074
|
+
* `EdsAlert` is a versatile alert component designed for displaying contextual messages.
|
|
3075
|
+
* This component offers various configuration options to support different use cases, making it ideal for notifying users of information, warnings, errors, or successes.
|
|
3076
|
+
*
|
|
3077
|
+
* Key features include:
|
|
3078
|
+
* - Customizable alert message with different visual intents (`default`, `warning`, `error`, `success`).
|
|
3079
|
+
* - Configurable layout direction (`horizontal` or `vertical`) to accommodate various design requirements.
|
|
3080
|
+
* - Optional pressable element (link or button) that allows users to interact with the alert.
|
|
3081
|
+
* - Emits context events to allow parent components to track alert interactions.
|
|
3082
|
+
*
|
|
3083
|
+
* This component is styled with predefined CSS classes to ensure consistent appearance across different alert types and layout configurations.
|
|
3084
|
+
*/
|
|
3085
|
+
class EdsAlert {
|
|
3086
|
+
constructor(hostRef) {
|
|
3087
|
+
registerInstance(this, hostRef);
|
|
3088
|
+
this.message = undefined;
|
|
3089
|
+
this.pressableLabel = undefined;
|
|
3090
|
+
this.pressableUrl = undefined;
|
|
3091
|
+
this.direction = 'horizontal';
|
|
3092
|
+
this.intent = 'default';
|
|
3093
|
+
this.withBtn = false;
|
|
3094
|
+
}
|
|
3095
|
+
componentWillLoad() {
|
|
3096
|
+
this.withBtn = Boolean(this.pressableLabel);
|
|
3097
|
+
}
|
|
3098
|
+
componentDidLoad() {
|
|
3099
|
+
// Query all 'eds-link' elements, including those inside shadow DOM
|
|
3100
|
+
const lnk = this.el.shadowRoot.querySelector('eds-link');
|
|
3101
|
+
this.emitContext(lnk);
|
|
3102
|
+
}
|
|
3103
|
+
emitContext(linkElement) {
|
|
3104
|
+
const event = new CustomEvent('parentContext', {
|
|
3105
|
+
detail: {
|
|
3106
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
3107
|
+
identifier: null
|
|
3108
|
+
}
|
|
3109
|
+
});
|
|
3110
|
+
linkElement.dispatchEvent(event);
|
|
3111
|
+
}
|
|
3112
|
+
render() {
|
|
3113
|
+
return (hAsync("div", { key: '089491004acd618827ef139a7c2ef486726cea9d', class: alertStyles({
|
|
3114
|
+
intent: this.intent,
|
|
3115
|
+
direction: this.direction,
|
|
3116
|
+
withBtn: this.withBtn
|
|
3117
|
+
}), role: "alert" }, hAsync("p", { key: '9a54555621b492f65b38ecd3cbb44660bf516e51', class: "f-ui-01 py-8" }, this.message), this.withBtn &&
|
|
3118
|
+
(this.pressableUrl ? (hAsync("eds-link", { class: "eds-alert-link", label: this.pressableLabel, url: this.pressableUrl, intent: "secondary", external: true })) : null)));
|
|
3119
|
+
}
|
|
3120
|
+
get el() { return getElement(this); }
|
|
3121
|
+
static get style() { return EdsAlertStyle0; }
|
|
3122
|
+
static get cmpMeta() { return {
|
|
3123
|
+
"$flags$": 9,
|
|
3124
|
+
"$tagName$": "eds-alert",
|
|
3125
|
+
"$members$": {
|
|
3126
|
+
"message": [1],
|
|
3127
|
+
"pressableLabel": [1, "pressable-label"],
|
|
3128
|
+
"pressableUrl": [1, "pressable-url"],
|
|
3129
|
+
"direction": [1],
|
|
3130
|
+
"intent": [1],
|
|
3131
|
+
"withBtn": [32]
|
|
3132
|
+
},
|
|
3133
|
+
"$listeners$": undefined,
|
|
3134
|
+
"$lazyBundleId$": "-",
|
|
3135
|
+
"$attrsToReflect$": []
|
|
3136
|
+
}; }
|
|
3137
|
+
}
|
|
3150
3138
|
|
|
3151
3139
|
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}";
|
|
3152
3140
|
var EdsAvatarStyle0 = edsAvatarCss;
|
|
@@ -3220,7 +3208,7 @@ class EdsAvatar {
|
|
|
3220
3208
|
* @returns {JSX.Element} The rendered avatar component.
|
|
3221
3209
|
*/
|
|
3222
3210
|
render() {
|
|
3223
|
-
return (hAsync("div", { key: '
|
|
3211
|
+
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))));
|
|
3224
3212
|
}
|
|
3225
3213
|
static get style() { return EdsAvatarStyle0; }
|
|
3226
3214
|
static get cmpMeta() { return {
|
|
@@ -3258,7 +3246,7 @@ class EdsBlockBreak {
|
|
|
3258
3246
|
this.extraClass = '';
|
|
3259
3247
|
}
|
|
3260
3248
|
render() {
|
|
3261
|
-
return hAsync("hr", { key: '
|
|
3249
|
+
return hAsync("hr", { key: '58ffdece778da8f323dd130908254690b3f6c8d3', class: `border-softer my-20 inline-block w-full border-t-2 ${this.extraClass}` });
|
|
3262
3250
|
}
|
|
3263
3251
|
static get style() { return EdsBlockBreakStyle0; }
|
|
3264
3252
|
static get cmpMeta() { return {
|
|
@@ -3325,6 +3313,7 @@ class EdsBreadcrumb {
|
|
|
3325
3313
|
this.parsedItems = Array.isArray(parsed) ? parsed : [];
|
|
3326
3314
|
}
|
|
3327
3315
|
catch (e) {
|
|
3316
|
+
// eslint-disable-next-line
|
|
3328
3317
|
console.error('Error parsing breadcrumb items:', e);
|
|
3329
3318
|
this.parsedItems = [];
|
|
3330
3319
|
}
|
|
@@ -3420,7 +3409,7 @@ class EdsBreadcrumb {
|
|
|
3420
3409
|
*/
|
|
3421
3410
|
render() {
|
|
3422
3411
|
const itemsToRender = this.getTruncatedItems();
|
|
3423
|
-
return (hAsync("nav", { key: '
|
|
3412
|
+
return (hAsync("nav", { key: 'd66dd18fe856e4a8d82e47117d2de0288a9e3c56', "aria-label": "Breadcrumb" }, hAsync("ol", { key: 'b3a218032b312cb5973c1ca59ab7bedcfc07d676', class: "flex items-center space-x-2" }, itemsToRender.map((item, index) => {
|
|
3424
3413
|
const isLast = index === itemsToRender.length - 1;
|
|
3425
3414
|
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" }))));
|
|
3426
3415
|
}))));
|
|
@@ -3675,7 +3664,7 @@ class EdsButton {
|
|
|
3675
3664
|
show: !this.loading
|
|
3676
3665
|
});
|
|
3677
3666
|
const ElementType = this.elementType;
|
|
3678
|
-
return (hAsync(ElementType, { key: '
|
|
3667
|
+
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: {
|
|
3679
3668
|
border: `3px solid ${this.intent === 'secondary' ? 'rgba(255, 255, 255, .3)' : 'rgba(0, 0, 0, .3)'}`,
|
|
3680
3669
|
borderBottomColor: this.intent === 'secondary' ? '#fff' : '#000'
|
|
3681
3670
|
} }))), this.icon ? hAsync("eds-icon-wrapper", { class: iconClasses, icon: this.icon }) : null));
|
|
@@ -3709,6 +3698,14 @@ class EdsButton {
|
|
|
3709
3698
|
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}";
|
|
3710
3699
|
var EdsCardDescStyle0 = edsCardDescCss;
|
|
3711
3700
|
|
|
3701
|
+
/**
|
|
3702
|
+
* `eds-card-desc` is a simple component that renders a card description.
|
|
3703
|
+
*
|
|
3704
|
+
* It displays a block of text with optional truncation applied using a CSS line clamp.
|
|
3705
|
+
* You can customize the description styling via the `descClass` property and control
|
|
3706
|
+
* whether or not the text is truncated and to how many lines.
|
|
3707
|
+
*
|
|
3708
|
+
*/
|
|
3712
3709
|
class EdsCardDesc {
|
|
3713
3710
|
constructor(hostRef) {
|
|
3714
3711
|
registerInstance(this, hostRef);
|
|
@@ -3721,7 +3718,7 @@ class EdsCardDesc {
|
|
|
3721
3718
|
return this.truncate && this.truncateLines ? `line-clamp-${this.truncateLines}` : '';
|
|
3722
3719
|
}
|
|
3723
3720
|
render() {
|
|
3724
|
-
return (hAsync("p", { key: '
|
|
3721
|
+
return (hAsync("p", { key: 'ca38bcc0895d5a0c87fda782ef455e45c4b53263', class: `text-light ${this.descClass}` }, hAsync("span", { key: '3108eec08a760b1db7ce1a7be05b68749f8f930b', class: this.getTruncateClass() }, this.description)));
|
|
3725
3722
|
}
|
|
3726
3723
|
static get style() { return EdsCardDescStyle0; }
|
|
3727
3724
|
static get cmpMeta() { return {
|
|
@@ -3765,7 +3762,7 @@ class EdsCardGeneric {
|
|
|
3765
3762
|
this.avatar = undefined;
|
|
3766
3763
|
this.shortAbbreviation = undefined;
|
|
3767
3764
|
this.headingLevel = 'h3';
|
|
3768
|
-
this.tags =
|
|
3765
|
+
this.tags = [];
|
|
3769
3766
|
this.tiny = false;
|
|
3770
3767
|
this.bg = true;
|
|
3771
3768
|
this.withHover = true;
|
|
@@ -3841,7 +3838,7 @@ class EdsCardGeneric {
|
|
|
3841
3838
|
});
|
|
3842
3839
|
}
|
|
3843
3840
|
render() {
|
|
3844
|
-
return (hAsync("article", { key: '
|
|
3841
|
+
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 })))), ' '));
|
|
3845
3842
|
}
|
|
3846
3843
|
get el() { return getElement(this); }
|
|
3847
3844
|
static get style() { return EdsCardGenericStyle0; }
|
|
@@ -3856,7 +3853,7 @@ class EdsCardGeneric {
|
|
|
3856
3853
|
"avatar": [1],
|
|
3857
3854
|
"shortAbbreviation": [1, "short-abbreviation"],
|
|
3858
3855
|
"headingLevel": [1, "heading-level"],
|
|
3859
|
-
"tags": [
|
|
3856
|
+
"tags": [1],
|
|
3860
3857
|
"tiny": [4],
|
|
3861
3858
|
"bg": [4],
|
|
3862
3859
|
"withHover": [4, "with-hover"],
|
|
@@ -3965,7 +3962,7 @@ var EdsCardSectionStyle0 = edsCardSectionCss;
|
|
|
3965
3962
|
class EdsCardSection {
|
|
3966
3963
|
constructor(hostRef) {
|
|
3967
3964
|
registerInstance(this, hostRef);
|
|
3968
|
-
this.cards =
|
|
3965
|
+
this.cards = [];
|
|
3969
3966
|
this.cols = 4;
|
|
3970
3967
|
}
|
|
3971
3968
|
/**
|
|
@@ -3988,7 +3985,7 @@ class EdsCardSection {
|
|
|
3988
3985
|
}
|
|
3989
3986
|
catch (e) {
|
|
3990
3987
|
// eslint-disable-next-line
|
|
3991
|
-
console.error('Error parsing
|
|
3988
|
+
console.error('Error parsing cards prop:', e);
|
|
3992
3989
|
return [];
|
|
3993
3990
|
}
|
|
3994
3991
|
}
|
|
@@ -4002,7 +3999,7 @@ class EdsCardSection {
|
|
|
4002
3999
|
* @returns {JSX.Element} The rendered section containing a list of cards.
|
|
4003
4000
|
*/
|
|
4004
4001
|
render() {
|
|
4005
|
-
return (hAsync("section", { key: '
|
|
4002
|
+
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 })))))));
|
|
4006
4003
|
}
|
|
4007
4004
|
static get style() { return EdsCardSectionStyle0; }
|
|
4008
4005
|
static get cmpMeta() { return {
|
|
@@ -4031,7 +4028,7 @@ class EdsCardTags {
|
|
|
4031
4028
|
this.tags = [];
|
|
4032
4029
|
}
|
|
4033
4030
|
render() {
|
|
4034
|
-
return (hAsync("div", { key: '
|
|
4031
|
+
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 })))));
|
|
4035
4032
|
}
|
|
4036
4033
|
static get style() { return EdsCardTagsStyle0; }
|
|
4037
4034
|
static get cmpMeta() { return {
|
|
@@ -4095,7 +4092,7 @@ class EdsCardTitle {
|
|
|
4095
4092
|
render() {
|
|
4096
4093
|
//const Tag = this.getTag();
|
|
4097
4094
|
const Heading = this.headingLevel;
|
|
4098
|
-
return (hAsync(Heading, { key: '
|
|
4095
|
+
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)));
|
|
4099
4096
|
}
|
|
4100
4097
|
static get style() { return EdsCardTitleStyle0; }
|
|
4101
4098
|
static get cmpMeta() { return {
|
|
@@ -4234,7 +4231,7 @@ class EdsCardWrapper {
|
|
|
4234
4231
|
this.withHover ? 'effect-shadow hover:shadow-hover cursor-pointer' : '',
|
|
4235
4232
|
'border-softer effect-focus-within relative flex grow flex-col rounded-lg border-2 p-16'
|
|
4236
4233
|
].join(' ');
|
|
4237
|
-
return (hAsync("article", { key: '
|
|
4234
|
+
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" })))));
|
|
4238
4235
|
}
|
|
4239
4236
|
get el() { return getElement(this); }
|
|
4240
4237
|
static get cmpMeta() { return {
|
|
@@ -6659,6 +6656,14 @@ Prism.languages.py = Prism.languages.python;
|
|
|
6659
6656
|
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}";
|
|
6660
6657
|
var EdsCodeBlockStyle0 = edsCodeBlockCss;
|
|
6661
6658
|
|
|
6659
|
+
//import { sendAnalytics } from '@ebrains/utils';
|
|
6660
|
+
/**
|
|
6661
|
+
* A component that displays a code block with syntax highlighting.
|
|
6662
|
+
*
|
|
6663
|
+
* Uses Prism.js for syntax highlighting. Supports multiple languages such as JavaScript, HTML, CSS,
|
|
6664
|
+
* Python, Bash/Shell, and YAML.
|
|
6665
|
+
*
|
|
6666
|
+
* */
|
|
6662
6667
|
class EdsCodeBlock {
|
|
6663
6668
|
constructor(hostRef) {
|
|
6664
6669
|
registerInstance(this, hostRef);
|
|
@@ -6666,12 +6671,58 @@ class EdsCodeBlock {
|
|
|
6666
6671
|
this.language = undefined;
|
|
6667
6672
|
this.copied = false;
|
|
6668
6673
|
}
|
|
6674
|
+
/**
|
|
6675
|
+
* Copies the current code content to the clipboard and sets a temporary copied state.
|
|
6676
|
+
*
|
|
6677
|
+
* @private
|
|
6678
|
+
* @returns {void}
|
|
6679
|
+
*/
|
|
6669
6680
|
copyToClipboard() {
|
|
6670
6681
|
navigator.clipboard.writeText(this.code).then(() => {
|
|
6671
6682
|
this.copied = true;
|
|
6683
|
+
/*const analyticsName = this.createHumanFriendlyAnalyticsName(this.code, this.language);
|
|
6684
|
+
sendAnalytics({
|
|
6685
|
+
category: 'ui-component',
|
|
6686
|
+
parentContext: null,
|
|
6687
|
+
tag: this.el.tagName.toLowerCase(),
|
|
6688
|
+
name: analyticsName || '',
|
|
6689
|
+
action: 'copy'
|
|
6690
|
+
});*/
|
|
6672
6691
|
setTimeout(() => (this.copied = false), 2000);
|
|
6673
6692
|
});
|
|
6674
6693
|
}
|
|
6694
|
+
/**
|
|
6695
|
+
* Utility function that creates a human-friendly analytics name based on the code and language.
|
|
6696
|
+
* It uses:
|
|
6697
|
+
* - The language (in uppercase)
|
|
6698
|
+
* - The number of non-empty lines in the code
|
|
6699
|
+
* - The first non-empty line of code (truncated to 30 characters, if needed)
|
|
6700
|
+
*
|
|
6701
|
+
* returns A descriptive analytics name.
|
|
6702
|
+
*/
|
|
6703
|
+
/*private createHumanFriendlyAnalyticsName(code: string, language: string): string {
|
|
6704
|
+
// Count non-empty lines
|
|
6705
|
+
const lines = code.split('\n').filter(line => line.trim() !== '').length;
|
|
6706
|
+
|
|
6707
|
+
// Find the first non-empty line and trim it
|
|
6708
|
+
let firstNonEmptyLine = code.split('\n').find(line => line.trim() !== '');
|
|
6709
|
+
firstNonEmptyLine = firstNonEmptyLine ? firstNonEmptyLine.trim() : '';
|
|
6710
|
+
|
|
6711
|
+
// Truncate the snippet if it’s too long
|
|
6712
|
+
if (firstNonEmptyLine.length > 30) {
|
|
6713
|
+
firstNonEmptyLine = firstNonEmptyLine.substring(0, 30) + '...';
|
|
6714
|
+
}
|
|
6715
|
+
|
|
6716
|
+
return `CodeBlock:${language.toLowerCase()}|${lines}-line(s)|${firstNonEmptyLine.toLowerCase()}`;
|
|
6717
|
+
}*/
|
|
6718
|
+
/**
|
|
6719
|
+
* Returns the syntax-highlighted HTML for the code.
|
|
6720
|
+
* If the provided language is supported by Prism, this method returns the highlighted code.
|
|
6721
|
+
* Otherwise, it logs a warning and returns the raw code.
|
|
6722
|
+
*
|
|
6723
|
+
* @private
|
|
6724
|
+
* @returns {string} The highlighted HTML string for the code block.
|
|
6725
|
+
*/
|
|
6675
6726
|
getHighlightedCode() {
|
|
6676
6727
|
if (this.language && Prism$1.languages[this.language]) {
|
|
6677
6728
|
return Prism$1.highlight(this.code, Prism$1.languages[this.language], this.language);
|
|
@@ -6681,8 +6732,9 @@ class EdsCodeBlock {
|
|
|
6681
6732
|
return this.code; // Fallback if language is not provided or unsupported
|
|
6682
6733
|
}
|
|
6683
6734
|
render() {
|
|
6684
|
-
return (hAsync("div", { key: '
|
|
6735
|
+
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() })))));
|
|
6685
6736
|
}
|
|
6737
|
+
get el() { return getElement(this); }
|
|
6686
6738
|
static get style() { return EdsCodeBlockStyle0; }
|
|
6687
6739
|
static get cmpMeta() { return {
|
|
6688
6740
|
"$flags$": 9,
|
|
@@ -6918,6 +6970,7 @@ class EdsDropdown {
|
|
|
6918
6970
|
* Toggles the visibility of the dropdown and manages focus.
|
|
6919
6971
|
*/
|
|
6920
6972
|
this.handleClick = () => {
|
|
6973
|
+
var _a;
|
|
6921
6974
|
this.isOpen = !this.isOpen;
|
|
6922
6975
|
if (this.isOpen) {
|
|
6923
6976
|
this.focusIndex = 0;
|
|
@@ -6926,6 +6979,13 @@ class EdsDropdown {
|
|
|
6926
6979
|
else {
|
|
6927
6980
|
this.closeDropdown();
|
|
6928
6981
|
}
|
|
6982
|
+
sendAnalytics({
|
|
6983
|
+
category: 'ui-component',
|
|
6984
|
+
parentContext: null,
|
|
6985
|
+
tag: this.host.tagName.toLowerCase(),
|
|
6986
|
+
name: ((_a = this.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
6987
|
+
action: this.isOpen ? 'expanded' : 'collapsed'
|
|
6988
|
+
});
|
|
6929
6989
|
};
|
|
6930
6990
|
this.icon = 'chevron-down';
|
|
6931
6991
|
this.label = undefined;
|
|
@@ -6992,39 +7052,20 @@ class EdsDropdown {
|
|
|
6992
7052
|
componentDidLoad() {
|
|
6993
7053
|
var _a;
|
|
6994
7054
|
this.focusableItems = Array.from(((_a = this.dropdownContent) === null || _a === void 0 ? void 0 : _a.querySelectorAll('a, button')) || []);
|
|
6995
|
-
const btns = this.host.shadowRoot.querySelectorAll('eds-button');
|
|
6996
|
-
btns.forEach((btn) => {
|
|
6997
|
-
this.emitContext(btn);
|
|
6998
|
-
});
|
|
6999
|
-
}
|
|
7000
|
-
/**
|
|
7001
|
-
* Emits a custom event called `parentContext` for a given button element.
|
|
7002
|
-
* Provides context information about the dropdown component.
|
|
7003
|
-
*
|
|
7004
|
-
* @param linkElement - The button element to which the event will be dispatched.
|
|
7005
|
-
*/
|
|
7006
|
-
emitContext(linkElement) {
|
|
7007
|
-
const event = new CustomEvent('parentContext', {
|
|
7008
|
-
detail: {
|
|
7009
|
-
componentName: this.host.tagName.toLowerCase(),
|
|
7010
|
-
identifier: null
|
|
7011
|
-
}
|
|
7012
|
-
});
|
|
7013
|
-
linkElement.dispatchEvent(event);
|
|
7014
7055
|
}
|
|
7015
7056
|
/**
|
|
7016
7057
|
* Renders the dropdown component and displays its content when open.
|
|
7017
7058
|
* @returns {JSX.Element} The rendered dropdown component.
|
|
7018
7059
|
*/
|
|
7019
7060
|
render() {
|
|
7020
|
-
return (hAsync("div", { key: '
|
|
7061
|
+
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: {
|
|
7021
7062
|
'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,
|
|
7022
7063
|
'left-4': this.dropdownPos === 'left' && this.dropdownOffset,
|
|
7023
7064
|
'left-0': this.dropdownPos === 'left' && !this.dropdownOffset,
|
|
7024
7065
|
'right-4': this.dropdownPos === 'right' && this.dropdownOffset,
|
|
7025
7066
|
'right-0': this.dropdownPos === 'right' && !this.dropdownOffset,
|
|
7026
7067
|
'rounded-lg': this.rounded
|
|
7027
|
-
}, style: { display: this.isOpen ? 'block' : 'none' }, "aria-label": "Dropdown", "aria-hidden": !this.isOpen }, hAsync("slot", { key: '
|
|
7068
|
+
}, style: { display: this.isOpen ? 'block' : 'none' }, "aria-label": "Dropdown", "aria-hidden": !this.isOpen }, hAsync("slot", { key: 'c514c5dca893708fd1660a61cfeb1607229bbff5' }))));
|
|
7028
7069
|
}
|
|
7029
7070
|
get host() { return getElement(this); }
|
|
7030
7071
|
static get style() { return EdsDropdownStyle0; }
|
|
@@ -7282,7 +7323,6 @@ class EdsForm {
|
|
|
7282
7323
|
this.formSubmitting.emit(this.isSubmitting);
|
|
7283
7324
|
}
|
|
7284
7325
|
};
|
|
7285
|
-
this.smallAlert = false;
|
|
7286
7326
|
this.setFormUrl = true;
|
|
7287
7327
|
this.submitBtn = true;
|
|
7288
7328
|
this.submitBtnLabel = 'Submit';
|
|
@@ -7291,7 +7331,7 @@ class EdsForm {
|
|
|
7291
7331
|
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.';
|
|
7292
7332
|
this.endpoint = undefined;
|
|
7293
7333
|
this.name = 'form';
|
|
7294
|
-
this.fields =
|
|
7334
|
+
this.fields = [];
|
|
7295
7335
|
this.values = {};
|
|
7296
7336
|
this.coupleAuth = false;
|
|
7297
7337
|
this.formSubmitted = false;
|
|
@@ -7301,6 +7341,7 @@ class EdsForm {
|
|
|
7301
7341
|
this.alertMessage = null;
|
|
7302
7342
|
this.isAuthenticated = false;
|
|
7303
7343
|
this.authUser = undefined;
|
|
7344
|
+
this.parsedFields = [];
|
|
7304
7345
|
}
|
|
7305
7346
|
onAuthStatusChanged(event) {
|
|
7306
7347
|
var _a;
|
|
@@ -7308,6 +7349,7 @@ class EdsForm {
|
|
|
7308
7349
|
this.authUser = event.detail.user;
|
|
7309
7350
|
}
|
|
7310
7351
|
componentDidLoad() {
|
|
7352
|
+
this.parseFields(this.fields);
|
|
7311
7353
|
// Emit context for each eds-link element after the component is fully loaded
|
|
7312
7354
|
const links = this.el.querySelectorAll('eds-button');
|
|
7313
7355
|
links.forEach((link) => {
|
|
@@ -7380,7 +7422,7 @@ class EdsForm {
|
|
|
7380
7422
|
validateForm() {
|
|
7381
7423
|
this.errors = {};
|
|
7382
7424
|
this.hasError = false;
|
|
7383
|
-
this.
|
|
7425
|
+
this.parsedFields.forEach((field) => {
|
|
7384
7426
|
if (field.type !== 'hidden') {
|
|
7385
7427
|
if ((field.type === 'checkbox' || field.type === 'radio') && !field.options) {
|
|
7386
7428
|
// Single checkbox validation
|
|
@@ -7462,27 +7504,48 @@ class EdsForm {
|
|
|
7462
7504
|
});
|
|
7463
7505
|
return formData;
|
|
7464
7506
|
}
|
|
7465
|
-
|
|
7466
|
-
|
|
7507
|
+
parseFields(newValue) {
|
|
7508
|
+
try {
|
|
7509
|
+
if (typeof newValue === 'string') {
|
|
7510
|
+
this.parsedFields = JSON.parse(newValue);
|
|
7511
|
+
}
|
|
7512
|
+
else if (Array.isArray(newValue)) {
|
|
7513
|
+
this.parsedFields = newValue;
|
|
7514
|
+
}
|
|
7515
|
+
else if (newValue && typeof newValue === 'object') {
|
|
7516
|
+
// In case a single object is passed, wrap it in an array.
|
|
7517
|
+
this.parsedFields = newValue;
|
|
7518
|
+
}
|
|
7519
|
+
else {
|
|
7520
|
+
this.parsedFields = [];
|
|
7521
|
+
}
|
|
7522
|
+
}
|
|
7523
|
+
catch (error) {
|
|
7524
|
+
// eslint-disable-next-line
|
|
7525
|
+
console.error('Error parsing fields prop:', error);
|
|
7526
|
+
this.parsedFields = [];
|
|
7527
|
+
}
|
|
7467
7528
|
}
|
|
7468
7529
|
render() {
|
|
7469
|
-
const hiddenFields = this.
|
|
7470
|
-
const otherFields = this.
|
|
7471
|
-
return (hAsync("form", { key: '
|
|
7530
|
+
const hiddenFields = this.parsedFields.filter((field) => field.type === 'hidden');
|
|
7531
|
+
const otherFields = this.parsedFields.filter((field) => field.type !== 'hidden');
|
|
7532
|
+
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) => {
|
|
7472
7533
|
var _a, _b;
|
|
7473
7534
|
if (!this.isFieldVisible(field)) {
|
|
7474
7535
|
return null;
|
|
7475
7536
|
}
|
|
7476
7537
|
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 }));
|
|
7477
|
-
})), this.submitBtn && (hAsync("div", { key: '
|
|
7538
|
+
})), 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" })))));
|
|
7478
7539
|
}
|
|
7479
7540
|
get el() { return getElement(this); }
|
|
7541
|
+
static get watchers() { return {
|
|
7542
|
+
"fields": ["parseFields"]
|
|
7543
|
+
}; }
|
|
7480
7544
|
static get style() { return EdsFormStyle0; }
|
|
7481
7545
|
static get cmpMeta() { return {
|
|
7482
7546
|
"$flags$": 4,
|
|
7483
7547
|
"$tagName$": "eds-form",
|
|
7484
7548
|
"$members$": {
|
|
7485
|
-
"smallAlert": [4, "small-alert"],
|
|
7486
7549
|
"setFormUrl": [4, "set-form-url"],
|
|
7487
7550
|
"submitBtn": [4, "submit-btn"],
|
|
7488
7551
|
"submitBtnLabel": [1, "submit-btn-label"],
|
|
@@ -7500,7 +7563,8 @@ class EdsForm {
|
|
|
7500
7563
|
"isSubmitting": [32],
|
|
7501
7564
|
"alertMessage": [32],
|
|
7502
7565
|
"isAuthenticated": [32],
|
|
7503
|
-
"authUser": [32]
|
|
7566
|
+
"authUser": [32],
|
|
7567
|
+
"parsedFields": [32]
|
|
7504
7568
|
},
|
|
7505
7569
|
"$listeners$": [[16, "authStatusChanged", "onAuthStatusChanged"]],
|
|
7506
7570
|
"$lazyBundleId$": "-",
|
|
@@ -10706,6 +10770,9 @@ class EdsInputSearch {
|
|
|
10706
10770
|
*
|
|
10707
10771
|
* The component will automatically fetch data if a dynamic configuration is provided.
|
|
10708
10772
|
*/
|
|
10773
|
+
/**
|
|
10774
|
+
* @internal
|
|
10775
|
+
*/
|
|
10709
10776
|
class EdsInputSelect {
|
|
10710
10777
|
constructor(hostRef) {
|
|
10711
10778
|
registerInstance(this, hostRef);
|
|
@@ -10781,7 +10848,7 @@ class EdsInputSelect {
|
|
|
10781
10848
|
}
|
|
10782
10849
|
}
|
|
10783
10850
|
render() {
|
|
10784
|
-
return (hAsync("div", { key: '
|
|
10851
|
+
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" }))));
|
|
10785
10852
|
}
|
|
10786
10853
|
static get watchers() { return {
|
|
10787
10854
|
"options": ["loadOptions"]
|
|
@@ -10964,12 +11031,11 @@ class EdsLink {
|
|
|
10964
11031
|
this.hideLabelOnSmallScreen = false;
|
|
10965
11032
|
this.extraClass = undefined;
|
|
10966
11033
|
}
|
|
10967
|
-
|
|
11034
|
+
handleParentContext(event) {
|
|
10968
11035
|
if (event.target !== this.el) {
|
|
10969
11036
|
// Ignore the event if it's not targeted at this specific instance
|
|
10970
11037
|
return;
|
|
10971
11038
|
}
|
|
10972
|
-
//console.log(event.detail);
|
|
10973
11039
|
this.parentContext = event.detail;
|
|
10974
11040
|
event.stopPropagation();
|
|
10975
11041
|
}
|
|
@@ -11020,7 +11086,7 @@ class EdsLink {
|
|
|
11020
11086
|
const labelClasses = this.hideLabelOnSmallScreen
|
|
11021
11087
|
? 'hidden lg:flex' // Tailwind example: hidden on small screens, visible on larger
|
|
11022
11088
|
: '';
|
|
11023
|
-
return (hAsync(ComponentType, { key: '
|
|
11089
|
+
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())));
|
|
11024
11090
|
}
|
|
11025
11091
|
get el() { return getElement(this); }
|
|
11026
11092
|
static get style() { return EdsLinkStyle0; }
|
|
@@ -11043,7 +11109,7 @@ class EdsLink {
|
|
|
11043
11109
|
"hideLabelOnSmallScreen": [4, "hide-label-on-small-screen"],
|
|
11044
11110
|
"extraClass": [1, "extra-class"]
|
|
11045
11111
|
},
|
|
11046
|
-
"$listeners$": [[0, "parentContext", "
|
|
11112
|
+
"$listeners$": [[0, "parentContext", "handleParentContext"]],
|
|
11047
11113
|
"$lazyBundleId$": "-",
|
|
11048
11114
|
"$attrsToReflect$": []
|
|
11049
11115
|
}; }
|
|
@@ -13272,7 +13338,7 @@ class EdsMatomoNotice {
|
|
|
13272
13338
|
}; }
|
|
13273
13339
|
}
|
|
13274
13340
|
|
|
13275
|
-
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}";
|
|
13341
|
+
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}";
|
|
13276
13342
|
var EdsModalStyle0 = edsModalCss;
|
|
13277
13343
|
|
|
13278
13344
|
//import { sendAnalytics } from '@ebrains/utils';
|
|
@@ -13293,33 +13359,59 @@ class EdsModal {
|
|
|
13293
13359
|
this.title = '';
|
|
13294
13360
|
this.truncate = true;
|
|
13295
13361
|
this.truncateLines = '1';
|
|
13362
|
+
this.position = 'middle';
|
|
13296
13363
|
}
|
|
13297
13364
|
getTruncateClass() {
|
|
13298
13365
|
return this.truncate && this.truncateLines ? `line-clamp-${this.truncateLines}` : '';
|
|
13299
13366
|
}
|
|
13367
|
+
/**
|
|
13368
|
+
* Returns the Tailwind CSS classes to position the modal based on the `position` prop.
|
|
13369
|
+
*
|
|
13370
|
+
* @private
|
|
13371
|
+
* @returns {string} The concatenated CSS classes for modal positioning.
|
|
13372
|
+
*/
|
|
13373
|
+
getModalPositionClasses() {
|
|
13374
|
+
switch (this.position) {
|
|
13375
|
+
case 'top':
|
|
13376
|
+
return 'left-1/2 top-20 -translate-x-1/2';
|
|
13377
|
+
case 'bottom':
|
|
13378
|
+
return 'left-1/2 bottom-20 -translate-x-1/2';
|
|
13379
|
+
case 'left':
|
|
13380
|
+
return 'left-20 top-1/2 -translate-y-1/2';
|
|
13381
|
+
case 'right':
|
|
13382
|
+
return 'right-20 top-1/2 -translate-y-1/2';
|
|
13383
|
+
case 'middle':
|
|
13384
|
+
default:
|
|
13385
|
+
return 'left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2';
|
|
13386
|
+
}
|
|
13387
|
+
}
|
|
13300
13388
|
/**
|
|
13301
13389
|
* Opens the modal.
|
|
13302
13390
|
*/
|
|
13303
13391
|
async open() {
|
|
13392
|
+
var _a;
|
|
13304
13393
|
this.isOpen = true;
|
|
13305
|
-
|
|
13306
|
-
|
|
13307
|
-
|
|
13308
|
-
|
|
13309
|
-
|
|
13310
|
-
|
|
13394
|
+
sendAnalytics({
|
|
13395
|
+
category: 'ui-component',
|
|
13396
|
+
parentContext: null,
|
|
13397
|
+
tag: this.el.tagName.toLowerCase(),
|
|
13398
|
+
name: ((_a = this.title) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
13399
|
+
action: 'opened'
|
|
13400
|
+
});
|
|
13311
13401
|
}
|
|
13312
13402
|
/**
|
|
13313
13403
|
* Closes the modal.
|
|
13314
13404
|
*/
|
|
13315
13405
|
async close() {
|
|
13406
|
+
var _a;
|
|
13316
13407
|
this.isOpen = false;
|
|
13317
|
-
|
|
13318
|
-
|
|
13319
|
-
|
|
13320
|
-
|
|
13321
|
-
|
|
13322
|
-
|
|
13408
|
+
sendAnalytics({
|
|
13409
|
+
category: 'ui-component',
|
|
13410
|
+
parentContext: null,
|
|
13411
|
+
tag: this.el.tagName.toLowerCase(),
|
|
13412
|
+
name: ((_a = this.title) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
13413
|
+
action: 'closed'
|
|
13414
|
+
});
|
|
13323
13415
|
}
|
|
13324
13416
|
/**
|
|
13325
13417
|
* Toggles the modal open or closed.
|
|
@@ -13333,30 +13425,27 @@ class EdsModal {
|
|
|
13333
13425
|
*/
|
|
13334
13426
|
componentDidLoad() {
|
|
13335
13427
|
// Emit context for each eds-link element after the component is fully loaded
|
|
13336
|
-
const
|
|
13337
|
-
|
|
13338
|
-
this.emitContext(btn);
|
|
13339
|
-
});
|
|
13428
|
+
//const btn = this.el.shadowRoot.querySelector('eds-button');
|
|
13429
|
+
//this.emitContext(btn);
|
|
13340
13430
|
}
|
|
13341
13431
|
/**
|
|
13342
13432
|
* Emits a custom event called `parentContext` for a given button element.
|
|
13343
13433
|
* This event provides context information about the eds-modal component.
|
|
13344
|
-
*
|
|
13345
|
-
* @param btnElement - The link element to which the event will be dispatched.
|
|
13346
13434
|
*/
|
|
13347
|
-
emitContext(btnElement) {
|
|
13348
|
-
|
|
13349
|
-
|
|
13350
|
-
|
|
13351
|
-
|
|
13352
|
-
|
|
13353
|
-
|
|
13354
|
-
|
|
13355
|
-
|
|
13435
|
+
/*emitContext(btnElement: HTMLElement) {
|
|
13436
|
+
const event = new CustomEvent<ParentContextDetail>('parentContext', {
|
|
13437
|
+
detail: {
|
|
13438
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
13439
|
+
identifier: null
|
|
13440
|
+
}
|
|
13441
|
+
});
|
|
13442
|
+
|
|
13443
|
+
btnElement.dispatchEvent(event);
|
|
13444
|
+
}*/
|
|
13356
13445
|
render() {
|
|
13357
|
-
return (hAsync("div", { key: '
|
|
13446
|
+
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
|
|
13358
13447
|
,
|
|
13359
|
-
onClick: () => this.close() })), hAsync("div", { key: '
|
|
13448
|
+
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' })))));
|
|
13360
13449
|
}
|
|
13361
13450
|
get el() { return getElement(this); }
|
|
13362
13451
|
static get style() { return EdsModalStyle0; }
|
|
@@ -13367,6 +13456,7 @@ class EdsModal {
|
|
|
13367
13456
|
"title": [1],
|
|
13368
13457
|
"truncate": [4],
|
|
13369
13458
|
"truncateLines": [1, "truncate-lines"],
|
|
13459
|
+
"position": [1],
|
|
13370
13460
|
"isOpen": [32],
|
|
13371
13461
|
"open": [64],
|
|
13372
13462
|
"close": [64],
|
|
@@ -13469,14 +13559,18 @@ class EdsPagination {
|
|
|
13469
13559
|
componentDidLoad() {
|
|
13470
13560
|
// Emit context for each eds-link element after the component is fully loaded
|
|
13471
13561
|
const links = this.hostEl.shadowRoot.querySelectorAll('eds-link');
|
|
13472
|
-
|
|
13473
|
-
|
|
13474
|
-
|
|
13475
|
-
|
|
13476
|
-
|
|
13477
|
-
|
|
13478
|
-
|
|
13479
|
-
|
|
13562
|
+
links.forEach((lnk) => {
|
|
13563
|
+
this.emitContext(lnk);
|
|
13564
|
+
});
|
|
13565
|
+
/*if (links.length > 0) {
|
|
13566
|
+
// Emit context for the first link
|
|
13567
|
+
this.emitContext(links[0]);
|
|
13568
|
+
|
|
13569
|
+
// Emit context for the last link, if it's different from the first
|
|
13570
|
+
if (links.length > 1) {
|
|
13571
|
+
this.emitContext(links[links.length - 1]);
|
|
13572
|
+
}
|
|
13573
|
+
}*/
|
|
13480
13574
|
}
|
|
13481
13575
|
/**
|
|
13482
13576
|
* Emits a custom event called `parentContext` for a given link element.
|
|
@@ -13606,7 +13700,7 @@ class EdsPagination {
|
|
|
13606
13700
|
}
|
|
13607
13701
|
}
|
|
13608
13702
|
render() {
|
|
13609
|
-
return (hAsync("div", { key: '
|
|
13703
|
+
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'
|
|
13610
13704
|
? this.prevUrl || '#' // Use prevUrl if provided, otherwise disable with '#'
|
|
13611
13705
|
: this.isFirstPage()
|
|
13612
13706
|
? '#'
|
|
@@ -13713,10 +13807,8 @@ class EdsRating {
|
|
|
13713
13807
|
this.selectedRating = 0;
|
|
13714
13808
|
}
|
|
13715
13809
|
/**
|
|
13716
|
-
* Parses the `
|
|
13717
|
-
* Returns an empty array if parsing fails
|
|
13718
|
-
*
|
|
13719
|
-
* @returns {any[]} Array of parsed link objects
|
|
13810
|
+
* Parses the `textMapping` prop into an array of strings.
|
|
13811
|
+
* Returns an empty array if parsing fails.
|
|
13720
13812
|
*/
|
|
13721
13813
|
get parsedMappings() {
|
|
13722
13814
|
if (typeof this.textMapping === 'object') {
|
|
@@ -13728,7 +13820,7 @@ class EdsRating {
|
|
|
13728
13820
|
}
|
|
13729
13821
|
catch (e) {
|
|
13730
13822
|
// eslint-disable-next-line
|
|
13731
|
-
console.error('Error parsing
|
|
13823
|
+
console.error('Error parsing textMapping prop:', e);
|
|
13732
13824
|
return [];
|
|
13733
13825
|
}
|
|
13734
13826
|
}
|
|
@@ -13743,10 +13835,10 @@ class EdsRating {
|
|
|
13743
13835
|
this.ratingChange.emit(rating);
|
|
13744
13836
|
}
|
|
13745
13837
|
render() {
|
|
13746
|
-
return (hAsync("div", { key: '
|
|
13838
|
+
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: {
|
|
13747
13839
|
star: true,
|
|
13748
13840
|
filled: index < this.selectedRating
|
|
13749
|
-
}, onClick: () => this.handleClick(index + 1) }, "\u2605")))), this.selectedRating > 0 && this.parsedMappings[this.selectedRating - 1] && (hAsync("span", { key: '
|
|
13841
|
+
}, 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]))));
|
|
13750
13842
|
}
|
|
13751
13843
|
static get style() { return EdsRatingStyle0; }
|
|
13752
13844
|
static get cmpMeta() { return {
|
|
@@ -13755,7 +13847,7 @@ class EdsRating {
|
|
|
13755
13847
|
"$members$": {
|
|
13756
13848
|
"stars": [2],
|
|
13757
13849
|
"label": [1],
|
|
13758
|
-
"textMapping": [
|
|
13850
|
+
"textMapping": [1, "text-mapping"],
|
|
13759
13851
|
"selectedRating": [32]
|
|
13760
13852
|
},
|
|
13761
13853
|
"$listeners$": undefined,
|
|
@@ -14126,10 +14218,24 @@ class EdsTable {
|
|
|
14126
14218
|
}
|
|
14127
14219
|
handlePageChange(newPage) {
|
|
14128
14220
|
this.currentPage = newPage;
|
|
14221
|
+
sendAnalytics({
|
|
14222
|
+
category: 'ui-component',
|
|
14223
|
+
parentContext: null,
|
|
14224
|
+
tag: `${this.hostEl.tagName.toLowerCase()}/eds-pagination`,
|
|
14225
|
+
name: `${newPage}` || '',
|
|
14226
|
+
action: 'page'
|
|
14227
|
+
});
|
|
14129
14228
|
}
|
|
14130
14229
|
handleSearch(event) {
|
|
14131
14230
|
this.searchQuery = event.target.value;
|
|
14132
14231
|
this.currentPage = 1;
|
|
14232
|
+
/*sendAnalytics({
|
|
14233
|
+
category: 'ui-component',
|
|
14234
|
+
parentContext: null,
|
|
14235
|
+
tag: `${this.hostEl.tagName.toLowerCase()}/eds-input-field/search`,
|
|
14236
|
+
name: `${this.searchQuery}` || '',
|
|
14237
|
+
action: 'page'
|
|
14238
|
+
});*/
|
|
14133
14239
|
}
|
|
14134
14240
|
renderCell(value, column) {
|
|
14135
14241
|
var _a;
|
|
@@ -14169,18 +14275,16 @@ class EdsTable {
|
|
|
14169
14275
|
: this.hostEl.getRootNode().host instanceof HTMLElement
|
|
14170
14276
|
? this.hostEl.getRootNode().host.getBoundingClientRect().width
|
|
14171
14277
|
: 400;
|
|
14172
|
-
//console.log('containerWidth:', containerWidth);
|
|
14173
14278
|
const columnWidth = visibleColumnsCount > 0 ? Math.floor((containerWidth / visibleColumnsCount) * this.divisionFactor()) : 100;
|
|
14174
|
-
|
|
14175
|
-
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...",
|
|
14279
|
+
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...",
|
|
14176
14280
|
// @ts-ignore
|
|
14177
|
-
onInput: (event) => this.handleSearch(event) }))), hAsync("div", { key: '
|
|
14281
|
+
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) => {
|
|
14178
14282
|
var _a;
|
|
14179
14283
|
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));
|
|
14180
|
-
}))), hAsync("tbody", { key: '
|
|
14284
|
+
}))), 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) => {
|
|
14181
14285
|
var _a;
|
|
14182
14286
|
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)));
|
|
14183
|
-
}))))))), this.shouldEnablePagination() && (hAsync("div", { key: '
|
|
14287
|
+
}))))))), 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" })))));
|
|
14184
14288
|
}
|
|
14185
14289
|
get hostEl() { return getElement(this); }
|
|
14186
14290
|
static get watchers() { return {
|
|
@@ -14584,7 +14688,8 @@ class EdsTimeline {
|
|
|
14584
14688
|
parsed = JSON.parse(newValue);
|
|
14585
14689
|
}
|
|
14586
14690
|
catch (e) {
|
|
14587
|
-
|
|
14691
|
+
// eslint-disable-next-line
|
|
14692
|
+
console.error('Error parsing timeline events JSON', e);
|
|
14588
14693
|
parsed = [];
|
|
14589
14694
|
}
|
|
14590
14695
|
}
|
|
@@ -14626,7 +14731,7 @@ class EdsTimeline {
|
|
|
14626
14731
|
}
|
|
14627
14732
|
}
|
|
14628
14733
|
render() {
|
|
14629
|
-
return (hAsync("div", { key: '
|
|
14734
|
+
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
|
|
14630
14735
|
? [{ label: 'completed', style: 'accent' }]
|
|
14631
14736
|
: [{ 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
|
|
14632
14737
|
? [{ label: 'completed', style: 'accent' }]
|
|
@@ -14677,6 +14782,27 @@ class EdsToast {
|
|
|
14677
14782
|
this.duration = 5000;
|
|
14678
14783
|
this.visible = true;
|
|
14679
14784
|
}
|
|
14785
|
+
/**
|
|
14786
|
+
* Lifecycle method that sets up the initial panel height and adds a resize event listener
|
|
14787
|
+
* to recalculate height on window resize.
|
|
14788
|
+
*/
|
|
14789
|
+
componentDidLoad() {
|
|
14790
|
+
// Emit context for each eds-button element after the component is fully loaded
|
|
14791
|
+
const btn = this.el.querySelector('eds-button');
|
|
14792
|
+
this.emitContext(btn);
|
|
14793
|
+
}
|
|
14794
|
+
/**
|
|
14795
|
+
* Emits a custom event called `parentContext` for a given button element.
|
|
14796
|
+
*/
|
|
14797
|
+
emitContext(linkElement) {
|
|
14798
|
+
const event = new CustomEvent('parentContext', {
|
|
14799
|
+
detail: {
|
|
14800
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
14801
|
+
identifier: null
|
|
14802
|
+
}
|
|
14803
|
+
});
|
|
14804
|
+
linkElement.dispatchEvent(event);
|
|
14805
|
+
}
|
|
14680
14806
|
connectedCallback() {
|
|
14681
14807
|
// Auto-dismiss the toast after the specified duration
|
|
14682
14808
|
this.dismissTimeout = setTimeout(this.dismissToast, this.duration);
|
|
@@ -14775,9 +14901,17 @@ class EdsTooltip {
|
|
|
14775
14901
|
* Show the tooltip and update its position.
|
|
14776
14902
|
*/
|
|
14777
14903
|
async showTooltip() {
|
|
14904
|
+
var _a;
|
|
14778
14905
|
await this.updateTooltipPosition();
|
|
14779
14906
|
this.isPositioned = true;
|
|
14780
14907
|
this.isVisible = true;
|
|
14908
|
+
sendAnalytics({
|
|
14909
|
+
category: 'ui-component',
|
|
14910
|
+
parentContext: null,
|
|
14911
|
+
tag: this.el.tagName.toLowerCase(),
|
|
14912
|
+
name: ((_a = this.content) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
14913
|
+
action: 'hover'
|
|
14914
|
+
});
|
|
14781
14915
|
}
|
|
14782
14916
|
/**
|
|
14783
14917
|
* Hide the tooltip.
|
|
@@ -14842,7 +14976,7 @@ class EdsTooltip {
|
|
|
14842
14976
|
}
|
|
14843
14977
|
}
|
|
14844
14978
|
render() {
|
|
14845
|
-
return (hAsync("div", { key: '
|
|
14979
|
+
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: {
|
|
14846
14980
|
top: this.tooltipStyle.top,
|
|
14847
14981
|
left: this.tooltipStyle.left,
|
|
14848
14982
|
transform: this.tooltipStyle.transform
|
|
@@ -14882,8 +15016,8 @@ class EdsTrl {
|
|
|
14882
15016
|
apps = JSON.parse(this.applications || '[]');
|
|
14883
15017
|
}
|
|
14884
15018
|
catch (error) {
|
|
14885
|
-
//
|
|
14886
|
-
|
|
15019
|
+
// eslint-disable-next-line
|
|
15020
|
+
console.error('Invalid applications trl JSON', error);
|
|
14887
15021
|
apps = [];
|
|
14888
15022
|
}
|
|
14889
15023
|
}
|
|
@@ -14899,18 +15033,17 @@ class EdsTrl {
|
|
|
14899
15033
|
}
|
|
14900
15034
|
render() {
|
|
14901
15035
|
const apps = this.getParsedApplications();
|
|
14902
|
-
console.log('apps:', apps);
|
|
14903
15036
|
// Map applications into table-friendly data.
|
|
14904
|
-
const tableData = apps.map(app => ({
|
|
15037
|
+
const tableData = apps.map((app) => ({
|
|
14905
15038
|
Application: app.name,
|
|
14906
|
-
|
|
15039
|
+
'Current TRL Stage': `TRL ${app.currentTrl}`,
|
|
14907
15040
|
Progress: (hAsync("div", { class: "w-[200px]" }, hAsync("eds-progress-bar", { value: this.calculateProgress(app.currentTrl) })))
|
|
14908
15041
|
}));
|
|
14909
15042
|
const tableConfig = {
|
|
14910
|
-
|
|
14911
|
-
|
|
15043
|
+
Application: { format: 'code' },
|
|
15044
|
+
'Current TRL Stage': { format: 'text' }
|
|
14912
15045
|
};
|
|
14913
|
-
return (hAsync("div", { key: '
|
|
15046
|
+
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" })));
|
|
14914
15047
|
}
|
|
14915
15048
|
static get cmpMeta() { return {
|
|
14916
15049
|
"$flags$": 0,
|