@ebrains/react 0.5.0-alpha.0 → 0.7.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/{analytics-1cde8e4a.esm.js → analytics-44b1416b.esm.js} +9 -1
- package/color-primary-palette_6.entry.esm.js +106 -106
- package/correct-use-of-colors.entry.esm.js +33 -33
- package/eds-accordion_22.entry.esm.js +269 -0
- package/eds-alert.entry.esm.js +104 -0
- package/eds-app-root.entry.esm.js +53 -0
- package/eds-avatar_4.entry.esm.js +2 -10
- package/eds-breadcrumb.entry.esm.js +171 -0
- package/eds-card-generic.entry.esm.js +7 -17
- package/eds-card-project.entry.esm.js +1 -1
- package/eds-card-section.entry.esm.js +8 -22
- package/eds-card-tool.entry.esm.js +1 -1
- package/eds-components-section.entry.esm.js +1 -1
- package/eds-cookies-preference.entry.esm.js +47 -0
- package/eds-docs-palettes.entry.esm.js +1 -1
- package/eds-docs-tokens.entry.esm.js +1 -1
- package/{eds-dropdown_2.entry.esm.js → eds-dropdown.entry.esm.js} +20 -99
- package/eds-feedback.entry.esm.js +82 -0
- package/eds-form.entry.esm.js +254 -254
- package/eds-frame.entry.esm.js +34 -33
- package/eds-icon-arrow-diagonal.entry.esm.js +1 -1
- package/eds-icon-arrow-right.entry.esm.js +1 -1
- package/eds-icon-bluesky.entry.esm.js +1 -1
- package/eds-icon-chevron-down.entry.esm.js +1 -1
- package/eds-icon-chevron-left.entry.esm.js +1 -1
- package/eds-icon-chevron-right.entry.esm.js +1 -1
- package/eds-icon-chevron-up.entry.esm.js +1 -1
- package/eds-icon-close.entry.esm.js +1 -1
- package/eds-icon-copy.entry.esm.js +1 -1
- package/eds-icon-eu.entry.esm.js +1 -1
- package/eds-icon-facebook.entry.esm.js +1 -1
- package/eds-icon-gitlab.entry.esm.js +1 -1
- package/eds-icon-linkedin.entry.esm.js +1 -1
- package/eds-icon-loader.entry.esm.js +1 -1
- package/eds-icon-mastodon.entry.esm.js +1 -1
- package/eds-icon-menu.entry.esm.js +1 -1
- package/eds-icon-more.entry.esm.js +1 -1
- package/eds-icon-search.entry.esm.js +1 -1
- package/eds-icon-star.entry.esm.js +21 -0
- package/eds-icon-success.entry.esm.js +1 -1
- package/eds-icon-thumbs-down.entry.esm.js +21 -0
- package/eds-icon-thumbs-up.entry.esm.js +21 -0
- package/eds-icon-twitter.entry.esm.js +1 -1
- package/eds-icon-user.entry.esm.js +1 -1
- package/eds-icon-youtube.entry.esm.js +1 -1
- package/{keycloak-d502ec16.esm.js → eds-login_2.entry.esm.js} +172 -1
- package/eds-logo-variations.entry.esm.js +1 -1
- package/eds-modal.entry.esm.js +23 -10
- package/eds-progress-bar.entry.esm.js +2 -2
- package/eds-rating.entry.esm.js +79 -0
- package/eds-section-core_2.entry.esm.js +5 -5
- package/eds-spinner.entry.esm.js +67 -0
- package/eds-steps.entry.esm.js +89 -0
- package/eds-svg-repository.entry.esm.js +8 -2
- package/eds-switch.entry.esm.js +58 -0
- package/eds-tabs.entry.esm.js +15 -27
- package/eds-timeline.entry.esm.js +6 -23
- package/eds-toast-manager.entry.esm.js +62 -0
- package/eds-toast.entry.esm.js +92 -0
- package/eds-tooltip.entry.esm.js +4 -4
- package/eds-trl.entry.esm.js +2 -2
- package/eds-user.entry.esm.js +64 -87
- package/eds-vertical-stepper.entry.esm.js +5 -5
- package/formUtils-ac68474d.esm.js +247 -0
- package/incorrect-use-of-colors.entry.esm.js +7 -7
- package/index.esm.js +1 -1
- package/index.esm2.js +51 -27
- package/logo-space.entry.esm.js +4 -4
- package/logo-variations-horizontal_2.entry.esm.js +26 -26
- package/logo-wrong-usage.entry.esm.js +37 -37
- package/package.json +1 -1
- package/sharedUtils-a550989c.esm.js +17 -0
- package/src/components.d.ts +4 -1
- package/star-0da9b5e9.esm.js +5 -0
- package/thumbs-down-a18fd049.esm.js +5 -0
- package/thumbs-up-c19a71bc.esm.js +6 -0
- package/token-list_3.entry.esm.js +5 -5
- package/token-ratios.entry.esm.js +3 -3
- package/token-spacing.entry.esm.js +26 -26
- package/token-typography.entry.esm.js +2 -2
- package/eds-accordion.entry.esm.js +0 -126
- package/eds-alert_17.entry.esm.js +0 -187
- package/eds-input_7.entry.esm.js +0 -529
- package/eds-login.entry.esm.js +0 -97
- package/eds-matomo-notice.entry.esm.js +0 -128
- package/eds-navigator.entry.esm.js +0 -72
- package/eds-pagination_2.entry.esm.js +0 -472
- package/eds-tab.entry.esm.js +0 -41
- package/eds-tabs-content.entry.esm.js +0 -145
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
+
import { c as cva } from './index-39c58238.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
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";
|
|
8
|
+
const EdsAlertStyle0 = edsAlertCss;
|
|
9
|
+
const alertStyles = cva(['w-full bg-dark rounded-lg border-inside after:border-softest after:rounded-lg'], {
|
|
10
|
+
variants: {
|
|
11
|
+
intent: {
|
|
12
|
+
default: '',
|
|
13
|
+
warning: 'bg-warning',
|
|
14
|
+
error: 'bg-error',
|
|
15
|
+
success: 'bg-success'
|
|
16
|
+
},
|
|
17
|
+
direction: {
|
|
18
|
+
vertical: 'space-y-12',
|
|
19
|
+
horizontal: 'flex flex-row items-center justify-between gap-x-12'
|
|
20
|
+
},
|
|
21
|
+
withBtn: {
|
|
22
|
+
false: '',
|
|
23
|
+
true: ''
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
compoundVariants: [{
|
|
27
|
+
direction: 'horizontal',
|
|
28
|
+
withBtn: true,
|
|
29
|
+
class: 'px-20 pr-12 py-12'
|
|
30
|
+
}, {
|
|
31
|
+
direction: 'horizontal',
|
|
32
|
+
withBtn: false,
|
|
33
|
+
class: 'p-20'
|
|
34
|
+
}, {
|
|
35
|
+
direction: 'vertical',
|
|
36
|
+
withBtn: true,
|
|
37
|
+
class: 'p-16'
|
|
38
|
+
}, {
|
|
39
|
+
direction: 'vertical',
|
|
40
|
+
withBtn: false,
|
|
41
|
+
class: 'px-12 py-20'
|
|
42
|
+
}],
|
|
43
|
+
defaultVariants: {
|
|
44
|
+
intent: 'default',
|
|
45
|
+
direction: 'horizontal'
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const EdsAlert = class {
|
|
49
|
+
constructor(hostRef) {
|
|
50
|
+
registerInstance(this, hostRef);
|
|
51
|
+
this.message = undefined;
|
|
52
|
+
this.pressableLabel = undefined;
|
|
53
|
+
this.pressableUrl = undefined;
|
|
54
|
+
this.direction = 'horizontal';
|
|
55
|
+
this.intent = 'default';
|
|
56
|
+
this.withBtn = false;
|
|
57
|
+
}
|
|
58
|
+
componentWillLoad() {
|
|
59
|
+
this.withBtn = Boolean(this.pressableLabel);
|
|
60
|
+
}
|
|
61
|
+
componentDidLoad() {
|
|
62
|
+
var _a;
|
|
63
|
+
// Query for the 'eds-link' element inside the shadow root.
|
|
64
|
+
const lnk = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('eds-link');
|
|
65
|
+
if (lnk) {
|
|
66
|
+
this.emitContext(lnk);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
emitContext(linkElement) {
|
|
70
|
+
const event = new CustomEvent('parentContext', {
|
|
71
|
+
detail: {
|
|
72
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
73
|
+
identifier: null
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
linkElement.dispatchEvent(event);
|
|
77
|
+
}
|
|
78
|
+
render() {
|
|
79
|
+
return h("div", {
|
|
80
|
+
key: '519742081f681d6d67bc1b42c89fe1b6d005fe0f',
|
|
81
|
+
class: alertStyles({
|
|
82
|
+
intent: this.intent,
|
|
83
|
+
direction: this.direction,
|
|
84
|
+
withBtn: this.withBtn
|
|
85
|
+
}),
|
|
86
|
+
role: "alert"
|
|
87
|
+
}, h("p", {
|
|
88
|
+
key: '6a5d11fdc2a975512b12c307286b0a8b06998bec',
|
|
89
|
+
class: "f-ui-01 py-8"
|
|
90
|
+
}, this.message), this.withBtn && (this.pressableUrl ? h("eds-link", {
|
|
91
|
+
class: "eds-alert-link",
|
|
92
|
+
label: this.pressableLabel,
|
|
93
|
+
url: this.pressableUrl,
|
|
94
|
+
intent: "secondary",
|
|
95
|
+
external: true
|
|
96
|
+
}) : null));
|
|
97
|
+
}
|
|
98
|
+
get el() {
|
|
99
|
+
return getElement(this);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
EdsAlert.style = EdsAlertStyle0;
|
|
103
|
+
|
|
104
|
+
export { EdsAlert as eds_alert };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react-dom';
|
|
5
|
+
|
|
6
|
+
const EdsAppRoot = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.isAuthenticated = false;
|
|
10
|
+
}
|
|
11
|
+
componentWillLoad() {
|
|
12
|
+
// Create a promise for the initKeycloak event.
|
|
13
|
+
const initKeycloakPromise = new Promise(resolve => {
|
|
14
|
+
document.addEventListener('initKeycloak', event => {
|
|
15
|
+
//console.log('initKeycloak event received:', event.detail);
|
|
16
|
+
resolve(event.detail);
|
|
17
|
+
}, {
|
|
18
|
+
once: true
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
// Create a promise for the authStatusChanged event.
|
|
22
|
+
const authStatusPromise = new Promise(resolve => {
|
|
23
|
+
document.addEventListener('authStatusChanged', event => {
|
|
24
|
+
var _a;
|
|
25
|
+
this.isAuthenticated = (_a = event.detail) === null || _a === void 0 ? void 0 : _a.authenticated;
|
|
26
|
+
//console.log('authStatusChanged event received:', event.detail);
|
|
27
|
+
resolve(event.detail);
|
|
28
|
+
}, {
|
|
29
|
+
once: true
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
// Combine both promises. The splash screen will hide only when both have resolved.
|
|
33
|
+
this.combinedInitPromise = Promise.all([initKeycloakPromise, authStatusPromise]);
|
|
34
|
+
}
|
|
35
|
+
render() {
|
|
36
|
+
return h("div", {
|
|
37
|
+
key: 'f7ff644cea84bfc78190afcfa33f1f6d6c6de29a'
|
|
38
|
+
}, h("eds-splash-screen", {
|
|
39
|
+
key: '5e04f163eafe8f0d55394b8f508386bac013907e',
|
|
40
|
+
inverse: true,
|
|
41
|
+
initPromise: this.combinedInitPromise
|
|
42
|
+
}), h("eds-login", {
|
|
43
|
+
key: '94c9dc0546e48fe8f9e6fc17fde9dcbf75fbe3bc',
|
|
44
|
+
"keycloak-url": "http://localhost:8080",
|
|
45
|
+
"keycloak-realm": "nigeor-realm",
|
|
46
|
+
"keycloak-client-id": "stencil-app"
|
|
47
|
+
}), h("main", {
|
|
48
|
+
key: '975cfb32924ecf0a4bb7d8f4788792eae500e166'
|
|
49
|
+
}, this.isAuthenticated ? h("h1", null, "Welcome, authenticated user!") : h("h1", null, "Please log in.")));
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export { EdsAppRoot as eds_app_root };
|
|
@@ -168,23 +168,15 @@ const EdsTag = class {
|
|
|
168
168
|
constructor(hostRef) {
|
|
169
169
|
registerInstance(this, hostRef);
|
|
170
170
|
this.label = undefined;
|
|
171
|
-
this.ariaLabel = '';
|
|
172
171
|
this.intent = 'default';
|
|
173
172
|
}
|
|
174
|
-
/**
|
|
175
|
-
* Render the component.
|
|
176
|
-
* @returns The rendered HTML for the tag component with the applied styles and label.
|
|
177
|
-
*/
|
|
178
173
|
render() {
|
|
179
|
-
var _a;
|
|
180
174
|
const classes = tagStyles({
|
|
181
175
|
intent: this.intent
|
|
182
176
|
});
|
|
183
|
-
const accessibleLabel = ((_a = this.ariaLabel) === null || _a === void 0 ? void 0 : _a.length) ? this.ariaLabel : this.label;
|
|
184
177
|
return h("span", {
|
|
185
|
-
key: '
|
|
186
|
-
class: classes
|
|
187
|
-
"aria-label": accessibleLabel
|
|
178
|
+
key: '2f4b0011094538aaa0a7cc855eadc1b39c9dc028',
|
|
179
|
+
class: classes
|
|
188
180
|
}, this.label);
|
|
189
181
|
}
|
|
190
182
|
};
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
+
import { p as parseData } from './sharedUtils-a550989c.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const edsBreadcrumbCss = "blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}.hidden{display:none}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.125rem * var(--tw-space-x-reverse));margin-left:calc(0.125rem * calc(1 - var(--tw-space-x-reverse)))}.px-2{padding-left:0.125rem;padding-right:0.125rem}.w-20{width:1.25rem}.w-28{width:1.75rem}.w-32{width:2rem}.w-44{width:2.75rem}.h-20{height:1.25rem}.h-24{height:1.5rem}.h-28{height:1.75rem}.h-32{height:2rem}@media (min-width: 750px){.md\\:block{display:block}}";
|
|
8
|
+
const EdsBreadcrumbStyle0 = edsBreadcrumbCss;
|
|
9
|
+
const EdsBreadcrumb = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
registerInstance(this, hostRef);
|
|
12
|
+
/**
|
|
13
|
+
* Updates the maximum number of visible items and tracks if the screen is small.
|
|
14
|
+
*/
|
|
15
|
+
this.updateScreenSize = () => {
|
|
16
|
+
const width = window.innerWidth;
|
|
17
|
+
if (width < 769) {
|
|
18
|
+
this.maxVisibleItems = 3;
|
|
19
|
+
this.isSmallScreen = true;
|
|
20
|
+
} else if (width <= 1024) {
|
|
21
|
+
this.maxVisibleItems = 4;
|
|
22
|
+
this.isSmallScreen = true;
|
|
23
|
+
} else {
|
|
24
|
+
this.maxVisibleItems = 6;
|
|
25
|
+
this.isSmallScreen = false;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
this.items = [];
|
|
29
|
+
this.intent = 'ghost';
|
|
30
|
+
this.parsedItems = [];
|
|
31
|
+
this.isSmallScreen = false;
|
|
32
|
+
this.maxVisibleItems = 6;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Watches for changes to the `items` prop and parses it.
|
|
36
|
+
*/
|
|
37
|
+
parseItems(newValue) {
|
|
38
|
+
this.parsedItems = parseData(newValue);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Lifecycle method that runs when the component is about to be loaded.
|
|
42
|
+
* It parses the initial `items` prop value.
|
|
43
|
+
*/
|
|
44
|
+
componentWillLoad() {
|
|
45
|
+
this.parseItems(this.items);
|
|
46
|
+
this.updateScreenSize();
|
|
47
|
+
window.addEventListener('resize', this.updateScreenSize);
|
|
48
|
+
}
|
|
49
|
+
disconnectedCallback() {
|
|
50
|
+
window.removeEventListener('resize', this.updateScreenSize);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Lifecycle method that runs when the component has fully loaded.
|
|
54
|
+
* It emits a custom event for each `eds-link` element contained within the breadcrumb.
|
|
55
|
+
*/
|
|
56
|
+
componentDidLoad() {
|
|
57
|
+
var _a;
|
|
58
|
+
const links = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('eds-link');
|
|
59
|
+
links === null || links === void 0 ? void 0 : links.forEach(link => {
|
|
60
|
+
this.emitContext(link);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Emits a custom event called `parentContext` for a given link element.
|
|
65
|
+
* This event provides context information about the breadcrumb component.
|
|
66
|
+
*
|
|
67
|
+
* @param linkElement - The link element to which the event will be dispatched.
|
|
68
|
+
*/
|
|
69
|
+
emitContext(linkElement) {
|
|
70
|
+
const event = new CustomEvent('parentContext', {
|
|
71
|
+
detail: {
|
|
72
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
73
|
+
identifier: null
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
linkElement.dispatchEvent(event);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Returns breadcrumb items with potential truncation if there are too many.
|
|
80
|
+
* It inserts an ellipsis item where necessary.
|
|
81
|
+
*/
|
|
82
|
+
getTruncatedItems() {
|
|
83
|
+
const totalItems = this.parsedItems.length;
|
|
84
|
+
const ellipsis = {
|
|
85
|
+
label: '...',
|
|
86
|
+
url: '',
|
|
87
|
+
isHidden: true
|
|
88
|
+
};
|
|
89
|
+
if (totalItems > this.maxVisibleItems) {
|
|
90
|
+
const firstItem = this.parsedItems[0];
|
|
91
|
+
const lastItems = this.parsedItems.slice(-2);
|
|
92
|
+
if (this.maxVisibleItems === 3) {
|
|
93
|
+
return [firstItem, ellipsis, ...lastItems];
|
|
94
|
+
} else if (this.maxVisibleItems === 4) {
|
|
95
|
+
const middleItem = this.parsedItems[Math.floor(totalItems / 2)];
|
|
96
|
+
return [firstItem, middleItem, ellipsis, ...lastItems];
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return this.parsedItems;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Helper to determine the display label and full label.
|
|
103
|
+
* If the label is longer than 15 characters and the item is not the current (last) item,
|
|
104
|
+
* we display a truncated version but use the full label for aria attributes.
|
|
105
|
+
*/
|
|
106
|
+
getLabels(item, isCurrent) {
|
|
107
|
+
if (!isCurrent && item.label.length > 15) {
|
|
108
|
+
return {
|
|
109
|
+
displayLabel: `${item.label.slice(0, 15)}...`,
|
|
110
|
+
fullLabel: item.label
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
return {
|
|
114
|
+
displayLabel: item.label,
|
|
115
|
+
fullLabel: item.label
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Render method for the breadcrumb component.
|
|
120
|
+
* It creates a navigation element with an ordered list of breadcrumb links.
|
|
121
|
+
* The last link is marked as the current page.
|
|
122
|
+
*/
|
|
123
|
+
render() {
|
|
124
|
+
const itemsToRender = this.getTruncatedItems();
|
|
125
|
+
return h("nav", {
|
|
126
|
+
key: '02537ec4208124f8a5ba564f7487f6fad552f7da',
|
|
127
|
+
"aria-label": "Breadcrumb"
|
|
128
|
+
}, h("ol", {
|
|
129
|
+
key: 'ac6e2ecd59a8ddef52e004d95fbb492f78a9b248',
|
|
130
|
+
class: "flex items-center space-x-2"
|
|
131
|
+
}, itemsToRender.map((item, index) => {
|
|
132
|
+
const isLast = index === itemsToRender.length - 1;
|
|
133
|
+
return h("li", {
|
|
134
|
+
class: "flex items-center"
|
|
135
|
+
}, !item.isHidden ? (() => {
|
|
136
|
+
const {
|
|
137
|
+
displayLabel,
|
|
138
|
+
fullLabel
|
|
139
|
+
} = this.getLabels(item, isLast);
|
|
140
|
+
return h("eds-link", Object.assign({
|
|
141
|
+
label: displayLabel,
|
|
142
|
+
url: item.url,
|
|
143
|
+
intent: this.intent,
|
|
144
|
+
current: isLast,
|
|
145
|
+
"aria-label": fullLabel,
|
|
146
|
+
size: "small",
|
|
147
|
+
"icon-small": "false"
|
|
148
|
+
}, isLast ? {
|
|
149
|
+
'aria-current': 'page'
|
|
150
|
+
} : {}));
|
|
151
|
+
})() : h("span", {
|
|
152
|
+
class: "truncate px-2",
|
|
153
|
+
"aria-hidden": "true"
|
|
154
|
+
}, "..."), !isLast && !item.isHidden && h("eds-icon-wrapper", {
|
|
155
|
+
icon: "chevron-right",
|
|
156
|
+
class: "w-20 h-20"
|
|
157
|
+
}));
|
|
158
|
+
})));
|
|
159
|
+
}
|
|
160
|
+
get el() {
|
|
161
|
+
return getElement(this);
|
|
162
|
+
}
|
|
163
|
+
static get watchers() {
|
|
164
|
+
return {
|
|
165
|
+
"items": ["parseItems"]
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
EdsBreadcrumb.style = EdsBreadcrumbStyle0;
|
|
170
|
+
|
|
171
|
+
export { EdsBreadcrumb as eds_breadcrumb };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import {
|
|
2
|
+
import { p as parseData } from './sharedUtils-a550989c.esm.js';
|
|
3
|
+
import { s as sendAnalytics } from './analytics-44b1416b.esm.js';
|
|
3
4
|
import 'react';
|
|
4
5
|
import 'react/jsx-runtime';
|
|
5
6
|
import 'react-dom';
|
|
@@ -57,18 +58,7 @@ const EdsCardGeneric = class {
|
|
|
57
58
|
* @returns {any[]} Array of parsed link objects
|
|
58
59
|
*/
|
|
59
60
|
get parsedTags() {
|
|
60
|
-
|
|
61
|
-
return this.tags;
|
|
62
|
-
} else if (typeof this.tags === 'string') {
|
|
63
|
-
try {
|
|
64
|
-
return JSON.parse(this.tags);
|
|
65
|
-
} catch (e) {
|
|
66
|
-
// eslint-disable-next-line
|
|
67
|
-
console.error('Error parsing tags prop:', e);
|
|
68
|
-
return [];
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return [];
|
|
61
|
+
return parseData(this.tags);
|
|
72
62
|
}
|
|
73
63
|
articleClasses() {
|
|
74
64
|
return [this.description ? this.tiny ? 'min-h-120' : 'min-h-156' : 'h-auto', this.bg ? 'bg-inverse' : 'bg-default', this.withHover ? 'effect-shadow hover:shadow-hover cursor-pointer' : '', 'border-softer effect-focus-within relative flex grow flex-col rounded-lg border-2 p-16'].join(' ');
|
|
@@ -85,18 +75,18 @@ const EdsCardGeneric = class {
|
|
|
85
75
|
}
|
|
86
76
|
render() {
|
|
87
77
|
return h("article", {
|
|
88
|
-
key: '
|
|
78
|
+
key: '440a448c841370838c0c66610bd1266b46f66541',
|
|
89
79
|
class: this.articleClasses(),
|
|
90
80
|
onClick: () => this.handleClick()
|
|
91
81
|
}, h("eds-card-title", {
|
|
92
|
-
key: '
|
|
82
|
+
key: '292d93a9a993c6dcbfd276097a21d3984b1794c4',
|
|
93
83
|
"heading-level": this.headingLevel,
|
|
94
84
|
titleClass: this.image ? 'f-ui-01' : undefined,
|
|
95
85
|
"card-title": this.cardTitle,
|
|
96
86
|
url: this.url,
|
|
97
87
|
hierarchy: this.hierarchy
|
|
98
88
|
}), this.description && h("eds-card-desc", {
|
|
99
|
-
key: '
|
|
89
|
+
key: '4b304cc3c65a42b3b1bcbebd9968c45e79cdabf7',
|
|
100
90
|
class: "mt-8",
|
|
101
91
|
"truncate-lines": "3",
|
|
102
92
|
description: this.description
|
|
@@ -107,7 +97,7 @@ const EdsCardGeneric = class {
|
|
|
107
97
|
picture: this.avatar,
|
|
108
98
|
initials: this.shortAbbreviation
|
|
109
99
|
}) : null, h("div", {
|
|
110
|
-
key: '
|
|
100
|
+
key: 'cb5c191f6c190fb6edb46446187dbf6b8c1b778b',
|
|
111
101
|
class: "flex flex-wrap gap-y-4"
|
|
112
102
|
}, this.parsedTags.map((tag, index) => h("eds-tag", {
|
|
113
103
|
key: index,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import { s as sendAnalytics } from './analytics-
|
|
2
|
+
import { s as sendAnalytics } from './analytics-44b1416b.esm.js';
|
|
3
3
|
import { g as gradientBGColorVariants } from './color-2554aad6.esm.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import { p as parseData } from './sharedUtils-a550989c.esm.js';
|
|
2
3
|
import 'react';
|
|
3
4
|
import 'react/jsx-runtime';
|
|
4
5
|
import 'react-dom';
|
|
5
6
|
|
|
6
|
-
const edsCardSectionCss = ".w-full{width:100%}.grid-layout{display:grid;grid-template-columns:repeat(var(--container-grid-columns, var(--grid-columns)), 1fr);grid-gap:var(--inner-gutter)}.grid-col-span-
|
|
7
|
+
const edsCardSectionCss = "ol,ul,menu{list-style:none;margin:0;padding:0}.w-full{width:100%}.grid-layout{display:grid;grid-template-columns:repeat(var(--container-grid-columns, var(--grid-columns)), 1fr);grid-gap:var(--inner-gutter)}.grid-cols-4{grid-template-columns:repeat(4, minmax(0, 1fr))}.grid-cols-4[class*=\"grid-line-x\"][class*=\"grid-line-x\"]>*:nth-child(n)::before{border-bottom-width:1px}.grid-cols-4[class*=\"grid-line-xfull\"]>*:nth-child(n)::before{inset-inline-start:calc(var(--inner-gutter) / -2);inset-inline-end:calc(var(--inner-gutter) / -2)}.grid-cols-4[class*=\"grid-line-x\"]>*:nth-child(4n+1)::before{inset-inline-start:0}.grid-cols-4[class*=\"grid-line-x\"]>*:nth-child(4n+4)::before{inset-inline-end:0}.grid-cols-4[class*=\"grid-line-x\"]>*:nth-child(4n+1):nth-last-child(-n+4)::before{border-bottom-width:0}.grid-cols-4[class*=\"grid-line-x\"]>*:nth-child(4n+1):nth-last-child(-n+4)~*::before{border-bottom-width:0}.grid-cols-4[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(n)::after{border-inline-end-width:1px}.grid-cols-4[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(4n+4)::after{border-inline-end-width:0}.grid-cols-4[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(-n+4)::after{top:0}.grid-cols-4[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(4n+1):nth-last-child(-n+4)::after{bottom:0}.grid-cols-4[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(4n+1):nth-last-child(-n+4)~li::after{bottom:0}.grid-col-span-4{--container-grid-columns:4;grid-column:span 4 / span 4}.gap-y-4{row-gap:0.25rem}.gap-y-8{row-gap:0.5rem}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}@media (min-width: 750px){.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:gap-y-12{row-gap:0.75rem}.md\\:pt-28{padding-top:1.75rem}}@media (min-width: 750px){.md\\:grid-col-span-1{--container-grid-columns:1;grid-column:span 1 / span 1}.md\\:grid-col-span-2{--container-grid-columns:2;grid-column:span 2 / span 2}.md\\:grid-col-span-3{--container-grid-columns:3;grid-column:span 3 / span 3}.md\\:grid-col-span-4{--container-grid-columns:4;grid-column:span 4 / span 4}.md\\:w-10-cols{width:calc(((10 / var(--container-grid-columns, var(--grid-columns))) * 100%) - (var(--inner-gutter) - (10 / var(--container-grid-columns, var(--grid-columns)) * var(--inner-gutter))))}.cols-container>.md\\:w-10-cols{width:calc(((10 / var(--container-grid-columns, var(--grid-columns))) * (100% - var(--inner-gutter))) - (var(--inner-gutter) - (10 / var(--container-grid-columns, var(--grid-columns)) * var(--inner-gutter))))}.md\\:w-10-cols>*{--container-grid-columns:10}}@media (min-width: 900px){.lg\\:grid-col-span-5{--container-grid-columns:5;grid-column:span 5 / span 5}.lg\\:grid-col-span-6{--container-grid-columns:6;grid-column:span 6 / span 6}.lg\\:grid-col-start-7{grid-column-start:7}.lg\\:w-8-cols{width:calc(((8 / var(--container-grid-columns, var(--grid-columns))) * 100%) - (var(--inner-gutter) - (8 / var(--container-grid-columns, var(--grid-columns)) * var(--inner-gutter))))}.cols-container>.lg\\:w-8-cols{width:calc(((8 / var(--container-grid-columns, var(--grid-columns))) * (100% - var(--inner-gutter))) - (var(--inner-gutter) - (8 / var(--container-grid-columns, var(--grid-columns)) * var(--inner-gutter))))}.lg\\:w-8-cols>*{--container-grid-columns:8}.lg\\:w-10-cols{width:calc(((10 / var(--container-grid-columns, var(--grid-columns))) * 100%) - (var(--inner-gutter) - (10 / var(--container-grid-columns, var(--grid-columns)) * var(--inner-gutter))))}.cols-container>.lg\\:w-10-cols{width:calc(((10 / var(--container-grid-columns, var(--grid-columns))) * (100% - var(--inner-gutter))) - (var(--inner-gutter) - (10 / var(--container-grid-columns, var(--grid-columns)) * var(--inner-gutter))))}.lg\\:w-10-cols>*{--container-grid-columns:10}}@media (min-width: 900px){.lg\\:order-last{order:9999}.lg\\:order-none{order:0}.lg\\:mt-0{margin-top:0rem}.lg\\:block{display:block}.lg\\:flex{display:flex}.lg\\:hidden{display:none}.lg\\:w-\\[150px\\]{width:150px}.lg\\:w-auto{width:auto}.lg\\:max-w-\\[720px\\]{max-width:720px}.lg\\:flex-row{flex-direction:row}.lg\\:flex-nowrap{flex-wrap:nowrap}.lg\\:gap-y-16{row-gap:1rem}.lg\\:px-28{padding-left:1.75rem;padding-right:1.75rem}.lg\\:\\!pl-12{padding-left:0.75rem !important}.lg\\:\\!pr-12{padding-right:0.75rem !important}}";
|
|
7
8
|
const EdsCardSectionStyle0 = edsCardSectionCss;
|
|
8
9
|
const EdsCardSection = class {
|
|
9
10
|
constructor(hostRef) {
|
|
10
11
|
registerInstance(this, hostRef);
|
|
11
12
|
this.cards = [];
|
|
12
|
-
this.
|
|
13
|
+
this.occupyCols = 1;
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* Parses the `cards` JSON string prop into an array of card objects.
|
|
@@ -18,22 +19,7 @@ const EdsCardSection = class {
|
|
|
18
19
|
* @returns {any[]} An array of parsed card objects.
|
|
19
20
|
*/
|
|
20
21
|
get parsedCards() {
|
|
21
|
-
|
|
22
|
-
if (Array.isArray(this.cards)) {
|
|
23
|
-
return this.cards;
|
|
24
|
-
}
|
|
25
|
-
if (typeof this.cards === 'object') {
|
|
26
|
-
return this.cards;
|
|
27
|
-
} else if (typeof this.cards === 'string') {
|
|
28
|
-
try {
|
|
29
|
-
return JSON.parse(this.cards);
|
|
30
|
-
} catch (e) {
|
|
31
|
-
// eslint-disable-next-line
|
|
32
|
-
console.error('Error parsing cards prop:', e);
|
|
33
|
-
return [];
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return [];
|
|
22
|
+
return parseData(this.cards);
|
|
37
23
|
}
|
|
38
24
|
/**
|
|
39
25
|
* Renders the card section as a grid layout.
|
|
@@ -44,13 +30,13 @@ const EdsCardSection = class {
|
|
|
44
30
|
*/
|
|
45
31
|
render() {
|
|
46
32
|
return h("section", {
|
|
47
|
-
key: '
|
|
33
|
+
key: 'eb64be830a5a1b752fadd0a8a76be9240b70cfe8',
|
|
48
34
|
class: "w-full"
|
|
49
35
|
}, h("ul", {
|
|
50
|
-
key: '
|
|
51
|
-
class: "grid-layout gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
36
|
+
key: 'd4eb8d8492a67f7491535953e0e37172fc9e09ff',
|
|
37
|
+
class: "grid-layout grid-cols-4 gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
52
38
|
}, this.parsedCards.map(card => h("li", {
|
|
53
|
-
class: `grid-col-span-
|
|
39
|
+
class: `grid-col-span-4 md:grid-col-span-${this.occupyCols} flex flex-col`
|
|
54
40
|
}, h("eds-card-generic", {
|
|
55
41
|
cardTitle: card.title,
|
|
56
42
|
description: card.description,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import { s as sendAnalytics } from './analytics-
|
|
2
|
+
import { s as sendAnalytics } from './analytics-44b1416b.esm.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'react-dom';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react-dom';
|
|
5
|
+
|
|
6
|
+
const edsCookiesPreferenceCss = "";
|
|
7
|
+
const EdsCookiesPreferenceStyle0 = edsCookiesPreferenceCss;
|
|
8
|
+
const EdsCookiesPreference = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.buttonText = 'Cookies Preferences';
|
|
12
|
+
this.intent = undefined;
|
|
13
|
+
this.showMatomoNotice = false;
|
|
14
|
+
this.noticeKey = 0;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Always shows the eds-matomo-notice popup.
|
|
18
|
+
* Every click removes the "matomo-deferred" key and forces a remount.
|
|
19
|
+
*/
|
|
20
|
+
toggleCookiesPopup() {
|
|
21
|
+
// Remove the key from session storage so that the notice will run its checks (or be forced to show)
|
|
22
|
+
sessionStorage.removeItem('matomo-deferred');
|
|
23
|
+
if (this.showMatomoNotice) {
|
|
24
|
+
// Force a remount by changing the key
|
|
25
|
+
this.noticeKey = this.noticeKey + 1;
|
|
26
|
+
} else {
|
|
27
|
+
this.showMatomoNotice = true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return h("div", {
|
|
32
|
+
key: '48f67648644ae9c8e645791ad3cbba5491866dc5'
|
|
33
|
+
}, h("eds-link", {
|
|
34
|
+
key: '50154721f0f44e811ebe362e18bcf8cfb77b8f64',
|
|
35
|
+
size: "small",
|
|
36
|
+
intent: this.intent,
|
|
37
|
+
label: this.buttonText,
|
|
38
|
+
onClick: () => this.toggleCookiesPopup()
|
|
39
|
+
}), this.showMatomoNotice && h("eds-matomo-notice", {
|
|
40
|
+
"force-show": true,
|
|
41
|
+
key: this.noticeKey
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
EdsCookiesPreference.style = EdsCookiesPreferenceStyle0;
|
|
46
|
+
|
|
47
|
+
export { EdsCookiesPreference as eds_cookies_preference };
|