@ebrains/react 0.4.0-alpha.0 → 0.6.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-44b1416b.esm.js +55 -0
- package/color-2554aad6.esm.js +122 -0
- package/color-primary-palette_6.entry.esm.js +106 -106
- package/correct-use-of-colors.entry.esm.js +33 -33
- package/eds-accordion_13.entry.esm.js +1064 -0
- package/eds-alert.entry.esm.js +104 -0
- package/eds-block-break.entry.esm.js +22 -0
- package/eds-breadcrumb.entry.esm.js +182 -0
- package/eds-card-project.entry.esm.js +12 -11
- package/eds-card-tags.entry.esm.js +1 -1
- package/eds-card-tool.entry.esm.js +5 -6
- package/eds-card-wrapper.entry.esm.js +4 -4
- package/eds-code-block.entry.esm.js +8 -8
- package/eds-components-section.entry.esm.js +14 -2
- 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 +235 -0
- package/eds-footer.entry.esm.js +102 -0
- package/eds-form.entry.esm.js +410 -0
- package/eds-frame.entry.esm.js +117 -0
- package/eds-fullscreen-menu.entry.esm.js +143 -0
- package/eds-header.entry.esm.js +130 -0
- 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-success.entry.esm.js +1 -1
- 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/eds-input_7.entry.esm.js +529 -0
- package/eds-link.entry.esm.js +204 -0
- package/eds-login.entry.esm.js +66 -45
- package/eds-logo-variations.entry.esm.js +1 -1
- package/eds-logo.entry.esm.js +87 -0
- package/eds-modal.entry.esm.js +129 -0
- package/eds-navigator.entry.esm.js +5 -5
- package/eds-pagination_2.entry.esm.js +15 -16
- package/eds-progress-bar.entry.esm.js +7 -2
- package/eds-rating.entry.esm.js +28 -18
- package/eds-section-core_2.entry.esm.js +5 -5
- package/eds-social-networks.entry.esm.js +74 -0
- package/eds-steps.entry.esm.js +98 -0
- package/eds-svg-repository.entry.esm.js +1 -1
- package/eds-switch.entry.esm.js +58 -0
- package/eds-tab.entry.esm.js +1 -1
- package/eds-tabs-content.entry.esm.js +5 -5
- package/eds-tabs.entry.esm.js +4 -4
- package/eds-timeline.entry.esm.js +4 -4
- package/eds-tooltip.entry.esm.js +4 -5
- package/eds-trl.entry.esm.js +2 -2
- package/eds-user.entry.esm.js +118 -0
- package/eds-vertical-stepper.entry.esm.js +81 -0
- package/incorrect-use-of-colors.entry.esm.js +7 -7
- package/index.esm.js +1 -1
- package/index.esm2.js +63 -9
- package/{keycloak-13893af6.esm.js → keycloak-d502ec16.esm.js} +219 -168
- 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/src/components.d.ts +3 -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/color-bb472c37.esm.js +0 -423
- package/eds-accordion_33.entry.esm.js +0 -369
- package/eds-card-section.entry.esm.js +0 -70
- package/eds-matomo-notice.entry.esm.js +0 -129
|
@@ -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,22 @@
|
|
|
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 edsBlockBreakCss = ".border-soft{border-color:rgba(0, 0, 0, .15)}.border-softer{border-color:rgba(0, 0, 0, .1)}.border-softest{border-color:rgba(0, 0, 0, .05)}.my-16{margin-top:1rem;margin-bottom:1rem}.my-20{margin-top:1.25rem;margin-bottom:1.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.w-full{width:100%}.border-t-2{border-top-width:2px}";
|
|
7
|
+
const EdsBlockBreakStyle0 = edsBlockBreakCss;
|
|
8
|
+
const EdsBlockBreak = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.extraClass = '';
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return h("hr", {
|
|
15
|
+
key: '8cb39dda5d7f909b459390fe7e3f86dfd147ba98',
|
|
16
|
+
class: `border-softer my-20 inline-block w-full border-t-2 ${this.extraClass}`
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
EdsBlockBreak.style = EdsBlockBreakStyle0;
|
|
21
|
+
|
|
22
|
+
export { EdsBlockBreak as eds_block_break };
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react-dom';
|
|
5
|
+
|
|
6
|
+
const edsBreadcrumbCss = "blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}.hidden{display:none}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.125rem * var(--tw-space-x-reverse));margin-left:calc(0.125rem * calc(1 - var(--tw-space-x-reverse)))}.px-2{padding-left:0.125rem;padding-right:0.125rem}.w-20{width:1.25rem}.w-28{width:1.75rem}.w-32{width:2rem}.w-44{width:2.75rem}.h-20{height:1.25rem}.h-24{height:1.5rem}.h-28{height:1.75rem}.h-32{height:2rem}@media (min-width: 750px){.md\\:block{display:block}}";
|
|
7
|
+
const EdsBreadcrumbStyle0 = edsBreadcrumbCss;
|
|
8
|
+
const EdsBreadcrumb = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
/**
|
|
12
|
+
* Updates the maximum number of visible items and tracks if the screen is small.
|
|
13
|
+
*/
|
|
14
|
+
this.updateScreenSize = () => {
|
|
15
|
+
const width = window.innerWidth;
|
|
16
|
+
if (width < 769) {
|
|
17
|
+
this.maxVisibleItems = 3;
|
|
18
|
+
this.isSmallScreen = true;
|
|
19
|
+
} else if (width <= 1024) {
|
|
20
|
+
this.maxVisibleItems = 4;
|
|
21
|
+
this.isSmallScreen = true;
|
|
22
|
+
} else {
|
|
23
|
+
this.maxVisibleItems = 6;
|
|
24
|
+
this.isSmallScreen = false;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
this.items = [];
|
|
28
|
+
this.intent = 'ghost';
|
|
29
|
+
this.parsedItems = [];
|
|
30
|
+
this.isSmallScreen = false;
|
|
31
|
+
this.maxVisibleItems = 6;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Watches for changes to the `items` prop and parses it.
|
|
35
|
+
*/
|
|
36
|
+
parseItems(newValue) {
|
|
37
|
+
if (typeof newValue === 'string') {
|
|
38
|
+
try {
|
|
39
|
+
const parsed = JSON.parse(newValue);
|
|
40
|
+
this.parsedItems = Array.isArray(parsed) ? parsed : [];
|
|
41
|
+
} catch (e) {
|
|
42
|
+
//console.error('Error parsing breadcrumb items:', e);
|
|
43
|
+
this.parsedItems = [];
|
|
44
|
+
}
|
|
45
|
+
} else if (Array.isArray(newValue)) {
|
|
46
|
+
this.parsedItems = newValue;
|
|
47
|
+
} else {
|
|
48
|
+
this.parsedItems = [];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Lifecycle method that runs when the component is about to be loaded.
|
|
53
|
+
* It parses the initial `items` prop value.
|
|
54
|
+
*/
|
|
55
|
+
componentWillLoad() {
|
|
56
|
+
this.parseItems(this.items);
|
|
57
|
+
this.updateScreenSize();
|
|
58
|
+
window.addEventListener('resize', this.updateScreenSize);
|
|
59
|
+
}
|
|
60
|
+
disconnectedCallback() {
|
|
61
|
+
window.removeEventListener('resize', this.updateScreenSize);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Lifecycle method that runs when the component has fully loaded.
|
|
65
|
+
* It emits a custom event for each `eds-link` element contained within the breadcrumb.
|
|
66
|
+
*/
|
|
67
|
+
componentDidLoad() {
|
|
68
|
+
var _a;
|
|
69
|
+
const links = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('eds-link');
|
|
70
|
+
links === null || links === void 0 ? void 0 : links.forEach(link => {
|
|
71
|
+
this.emitContext(link);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Emits a custom event called `parentContext` for a given link element.
|
|
76
|
+
* This event provides context information about the breadcrumb component.
|
|
77
|
+
*
|
|
78
|
+
* @param linkElement - The link element to which the event will be dispatched.
|
|
79
|
+
*/
|
|
80
|
+
emitContext(linkElement) {
|
|
81
|
+
const event = new CustomEvent('parentContext', {
|
|
82
|
+
detail: {
|
|
83
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
84
|
+
identifier: null
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
linkElement.dispatchEvent(event);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Returns breadcrumb items with potential truncation if there are too many.
|
|
91
|
+
* It inserts an ellipsis item where necessary.
|
|
92
|
+
*/
|
|
93
|
+
getTruncatedItems() {
|
|
94
|
+
const totalItems = this.parsedItems.length;
|
|
95
|
+
const ellipsis = {
|
|
96
|
+
label: '...',
|
|
97
|
+
url: '',
|
|
98
|
+
isHidden: true
|
|
99
|
+
};
|
|
100
|
+
if (totalItems > this.maxVisibleItems) {
|
|
101
|
+
const firstItem = this.parsedItems[0];
|
|
102
|
+
const lastItems = this.parsedItems.slice(-2);
|
|
103
|
+
if (this.maxVisibleItems === 3) {
|
|
104
|
+
return [firstItem, ellipsis, ...lastItems];
|
|
105
|
+
} else if (this.maxVisibleItems === 4) {
|
|
106
|
+
const middleItem = this.parsedItems[Math.floor(totalItems / 2)];
|
|
107
|
+
return [firstItem, middleItem, ellipsis, ...lastItems];
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return this.parsedItems;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Helper to determine the display label and full label.
|
|
114
|
+
* If the label is longer than 15 characters and the item is not the current (last) item,
|
|
115
|
+
* we display a truncated version but use the full label for aria attributes.
|
|
116
|
+
*/
|
|
117
|
+
getLabels(item, isCurrent) {
|
|
118
|
+
if (!isCurrent && item.label.length > 15) {
|
|
119
|
+
return {
|
|
120
|
+
displayLabel: `${item.label.slice(0, 15)}...`,
|
|
121
|
+
fullLabel: item.label
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
displayLabel: item.label,
|
|
126
|
+
fullLabel: item.label
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Render method for the breadcrumb component.
|
|
131
|
+
* It creates a navigation element with an ordered list of breadcrumb links.
|
|
132
|
+
* The last link is marked as the current page.
|
|
133
|
+
*/
|
|
134
|
+
render() {
|
|
135
|
+
const itemsToRender = this.getTruncatedItems();
|
|
136
|
+
return h("nav", {
|
|
137
|
+
key: 'd177957e1b3218c21991bbdc9636a8e32befe990',
|
|
138
|
+
"aria-label": "Breadcrumb"
|
|
139
|
+
}, h("ol", {
|
|
140
|
+
key: 'd10336ddee99b9fb84d17e53093c57c6a025982f',
|
|
141
|
+
class: "flex items-center space-x-2"
|
|
142
|
+
}, itemsToRender.map((item, index) => {
|
|
143
|
+
const isLast = index === itemsToRender.length - 1;
|
|
144
|
+
return h("li", {
|
|
145
|
+
class: "flex items-center"
|
|
146
|
+
}, !item.isHidden ? (() => {
|
|
147
|
+
const {
|
|
148
|
+
displayLabel,
|
|
149
|
+
fullLabel
|
|
150
|
+
} = this.getLabels(item, isLast);
|
|
151
|
+
return h("eds-link", Object.assign({
|
|
152
|
+
label: displayLabel,
|
|
153
|
+
url: item.url,
|
|
154
|
+
intent: this.intent,
|
|
155
|
+
current: isLast,
|
|
156
|
+
"aria-label": fullLabel,
|
|
157
|
+
size: "small",
|
|
158
|
+
"icon-small": "false"
|
|
159
|
+
}, isLast ? {
|
|
160
|
+
'aria-current': 'page'
|
|
161
|
+
} : {}));
|
|
162
|
+
})() : h("span", {
|
|
163
|
+
class: "truncate px-2",
|
|
164
|
+
"aria-hidden": "true"
|
|
165
|
+
}, "..."), !isLast && !item.isHidden && h("eds-icon-wrapper", {
|
|
166
|
+
icon: "chevron-right",
|
|
167
|
+
class: "w-20 h-20"
|
|
168
|
+
}));
|
|
169
|
+
})));
|
|
170
|
+
}
|
|
171
|
+
get el() {
|
|
172
|
+
return getElement(this);
|
|
173
|
+
}
|
|
174
|
+
static get watchers() {
|
|
175
|
+
return {
|
|
176
|
+
"items": ["parseItems"]
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
EdsBreadcrumb.style = EdsBreadcrumbStyle0;
|
|
181
|
+
|
|
182
|
+
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 { s as sendAnalytics
|
|
2
|
+
import { s as sendAnalytics } from './analytics-44b1416b.esm.js';
|
|
3
|
+
import { g as gradientBGColorVariants } from './color-2554aad6.esm.js';
|
|
3
4
|
import 'react';
|
|
4
5
|
import 'react/jsx-runtime';
|
|
5
6
|
import 'react-dom';
|
|
@@ -49,38 +50,38 @@ const EdsCardProject = class {
|
|
|
49
50
|
}) : 'bg-default', this.bgOnHover && this.color ? 'effect-background bg-default focus-within:bg-transparent hover:bg-transparent' : 'effect-background hover:bg-default', this.vertical ? 'flex-col gap-y-16' : 'flex-col gap-x-16 gap-y-12 lg:flex-row'].join(' ');
|
|
50
51
|
const imageClasses = this.vertical ? '' : 'max-w-120 @md:max-w-192 order-first w-full lg:order-last';
|
|
51
52
|
return h("article", {
|
|
52
|
-
key: '
|
|
53
|
+
key: '98c5dbd033ec05d08965559e00f32d9fe18698ef',
|
|
53
54
|
class: cardClasses,
|
|
54
55
|
onClick: event => this.handleClick(event)
|
|
55
56
|
}, h("div", {
|
|
56
|
-
key: '
|
|
57
|
+
key: 'e083c43e38c3c24fcd996a90267f7cd92d3651b3',
|
|
57
58
|
class: `flex grow flex-col ${this.vertical ? 'min-h-156' : ''}`
|
|
58
59
|
}, h("div", {
|
|
59
|
-
key: '
|
|
60
|
+
key: '37de1e46023b533fd8595a3077c4e68c11fb01af',
|
|
60
61
|
class: "lg:max-w-[720px]"
|
|
61
62
|
}, h("eds-card-title", {
|
|
62
|
-
key: '
|
|
63
|
+
key: 'ee31ae2804d2c17c82e8f4c0c3269ac8254331df',
|
|
63
64
|
"heading-level": this.headingLevel,
|
|
64
65
|
titleClass: this.image ? 'f-ui-01' : undefined,
|
|
65
66
|
"card-title": this.titleProject,
|
|
66
67
|
url: this.url
|
|
67
68
|
}), this.editorialTitle && h("span", {
|
|
68
|
-
key: '
|
|
69
|
+
key: 'c6f74ba9b5b522f713e25d3339f541efa68cdddd',
|
|
69
70
|
class: `block ${this.vertical ? 'f-ui-02' : 'mt-4 f-heading-06'}`
|
|
70
71
|
}, this.editorialTitle)), this.categoryTitle && h("div", {
|
|
71
|
-
key: '
|
|
72
|
+
key: 'ab18e55046777cf4a4f58ebd057641db9b9e0328',
|
|
72
73
|
class: "mt-auto flex items-center gap-x-12 pt-12"
|
|
73
74
|
}, ((_a = this.categoryTitle) === null || _a === void 0 ? void 0 : _a.length) && h("eds-tag", {
|
|
74
|
-
key: '
|
|
75
|
+
key: '3714ee86a74dce7f33a8f953fd726db349ba9271',
|
|
75
76
|
label: this.categoryTitle
|
|
76
77
|
}))), this.parsedImage && h("div", {
|
|
77
|
-
key: '
|
|
78
|
+
key: '2818d15f7ab671b7b2dfb34ec3085b390150f38d',
|
|
78
79
|
class: imageClasses
|
|
79
80
|
}, h("div", {
|
|
80
|
-
key: '
|
|
81
|
+
key: '5166feef3674631298f699449b956655f38f0db9',
|
|
81
82
|
class: "aspect-1x1 w-full"
|
|
82
83
|
}, h("eds-img", Object.assign({
|
|
83
|
-
key: '
|
|
84
|
+
key: '86555a43491da5b2aa3b287e539e603a2c2adaf3',
|
|
84
85
|
sizes: this.vertical ? this.parsedImage.sizes || '' : '192px'
|
|
85
86
|
}, this.parsedImage)))));
|
|
86
87
|
}
|
|
@@ -13,7 +13,7 @@ const EdsCardTags = class {
|
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
15
|
return h("div", {
|
|
16
|
-
key: '
|
|
16
|
+
key: '272d53abb9be9086881cb2f8e99f7fb7aae1bb59',
|
|
17
17
|
class: "flex flex-wrap gap-y-4"
|
|
18
18
|
}, this.tags.map((tag, index) => h("eds-tag", {
|
|
19
19
|
key: index,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import { s as sendAnalytics } from './
|
|
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';
|
|
6
|
-
import './index-39c58238.esm.js';
|
|
7
6
|
|
|
8
7
|
const edsCardToolCss = ".h-auto{height:auto}.h-full{height:100%}.\\!min-h-20{min-height:1.25rem !important}.min-h-120{min-height:120px}.min-h-156{min-height:156px}.bg-default{background-color:var(--grey-200)}.bg-inverse{background-color:var(--white)}.effect-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.hover\\:shadow-hover:hover{--tw-shadow:0px 0px 16px rgba(0, 0, 0, 0.2);--tw-shadow-colored:0px 0px 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.cursor-pointer{cursor:pointer}.border-soft{border-color:rgba(0, 0, 0, .15 )}.border-softer{border:2px solid rgba(0, 0, 0, .1 )}.effect-focus-within{outline-width:3px;outline-offset:2px;outline-color:var(--green-500)}.effect-focus-within:focus-within{outline-style:solid}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grow{flex-grow:1}.flex-col{flex-direction:column}.rounded-lg{border-radius:16px}.border-2{border-width:2px}.p-12{padding:0.75rem}.p-16{padding:1rem}.mt-6{margin-top:0.375rem}.mt-8{margin-top:0.5rem}.gap-y-4{row-gap:0.25rem}.order-first{order:-9999}.mb-10{margin-bottom:0.625rem}.mb-12{margin-bottom:0.75rem}";
|
|
9
8
|
const EdsCardToolStyle0 = edsCardToolCss;
|
|
@@ -63,11 +62,11 @@ const EdsCardTool = class {
|
|
|
63
62
|
}
|
|
64
63
|
render() {
|
|
65
64
|
return h("article", {
|
|
66
|
-
key: '
|
|
65
|
+
key: 'da61b384e966b148cd1f77eec59671bc4d92e259',
|
|
67
66
|
class: `${this.el.tagName.toLowerCase()} ${this.articleClasses()}`,
|
|
68
67
|
onClick: () => this.handleClick()
|
|
69
68
|
}, h("eds-card-title", {
|
|
70
|
-
key: '
|
|
69
|
+
key: '00702d032bc25f52b2a2c98255ceb60a1d314f4d',
|
|
71
70
|
"heading-level": this.headingLevel,
|
|
72
71
|
titleClass: this.image ? 'f-ui-01' : undefined,
|
|
73
72
|
"card-title": this.cardTitle,
|
|
@@ -75,7 +74,7 @@ const EdsCardTool = class {
|
|
|
75
74
|
"external-link": this.external,
|
|
76
75
|
hierarchy: this.hierarchy
|
|
77
76
|
}), this.description && h("eds-card-desc", {
|
|
78
|
-
key: '
|
|
77
|
+
key: 'd2b135ed422fb64f142af71330dc666e2f0c2b1f',
|
|
79
78
|
class: "mt-8",
|
|
80
79
|
"truncate-lines": "3",
|
|
81
80
|
description: this.description
|
|
@@ -89,7 +88,7 @@ const EdsCardTool = class {
|
|
|
89
88
|
picture: this.avatar,
|
|
90
89
|
initials: this.shortAbbreviation
|
|
91
90
|
}) : null, h("div", {
|
|
92
|
-
key: '
|
|
91
|
+
key: '54111e90175754cb0c1f2eb339e86926914ca0e7',
|
|
93
92
|
class: "flex flex-wrap gap-y-4"
|
|
94
93
|
}, this.parsedTags.map((tag, index) => h("eds-tag", {
|
|
95
94
|
key: index,
|
|
@@ -19,15 +19,15 @@ const EdsCardWrapper = class {
|
|
|
19
19
|
render() {
|
|
20
20
|
const articleClasses = [this.tiny ? 'min-h-120' : 'min-h-156', this.withBg ? '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(' ');
|
|
21
21
|
return h("article", {
|
|
22
|
-
key: '
|
|
22
|
+
key: 'f21cc9703011026652765b399e2b87b1ef80d220',
|
|
23
23
|
class: articleClasses
|
|
24
24
|
}, h("slot", {
|
|
25
|
-
key: '
|
|
25
|
+
key: '9a37adad73d2d49edcc9ca9222d5b188202c5612'
|
|
26
26
|
}), this.hasSlot('footer') && h("div", {
|
|
27
|
-
key: '
|
|
27
|
+
key: '87addfc052ed4ae33736724fbd8fbc8aca873b4d',
|
|
28
28
|
class: "mt-auto"
|
|
29
29
|
}, h("slot", {
|
|
30
|
-
key: '
|
|
30
|
+
key: '2e48677f42ac2aa951bc1a82afa9291fea3ddd72',
|
|
31
31
|
name: "footer"
|
|
32
32
|
})));
|
|
33
33
|
}
|
|
@@ -2242,15 +2242,15 @@ const EdsCodeBlock = class {
|
|
|
2242
2242
|
return Prism$1.highlight(this.code, Prism$1.languages[this.language], this.language);
|
|
2243
2243
|
}
|
|
2244
2244
|
// eslint-disable-next-line
|
|
2245
|
-
console.warn(`Unsupported or missing language: ${this.language}`);
|
|
2245
|
+
//console.warn(`Unsupported or missing language: ${this.language}`);
|
|
2246
2246
|
return this.code; // Fallback if language is not provided or unsupported
|
|
2247
2247
|
}
|
|
2248
2248
|
render() {
|
|
2249
2249
|
return h("div", {
|
|
2250
|
-
key: '
|
|
2250
|
+
key: 'cb379e82bcf71345945b0b88397650ecd4992770',
|
|
2251
2251
|
class: "relative bg-stronger rounded-sm"
|
|
2252
2252
|
}, h("div", {
|
|
2253
|
-
key: '
|
|
2253
|
+
key: '945046d4fd747cd64a83155b421a897e380cc612',
|
|
2254
2254
|
class: "text-inverse flex justify-between items-center p-8"
|
|
2255
2255
|
}, this.language ? h("span", {
|
|
2256
2256
|
class: "f-ui-03"
|
|
@@ -2261,23 +2261,23 @@ const EdsCodeBlock = class {
|
|
|
2261
2261
|
}, h("code", {
|
|
2262
2262
|
innerHTML: this.getHighlightedCode()
|
|
2263
2263
|
})), h("span", {
|
|
2264
|
-
key: '
|
|
2264
|
+
key: '3f6c7e996101f0bb83fb8c9e6991a205a0b268c8',
|
|
2265
2265
|
"aria-hidden": "true",
|
|
2266
2266
|
class: "w-20 h-20 mt-8"
|
|
2267
2267
|
}, h("eds-icon-wrapper", {
|
|
2268
|
-
key: '
|
|
2268
|
+
key: '8ad9beb61058f29e688f6777233c61f7fb3ccfe8',
|
|
2269
2269
|
icon: this.copied ? 'success' : 'copy',
|
|
2270
2270
|
onClick: () => this.copyToClipboard()
|
|
2271
2271
|
})), h("span", {
|
|
2272
|
-
key: '
|
|
2272
|
+
key: 'a4f9a07906e1c2d9febb7ae789a3eed76dc422e9',
|
|
2273
2273
|
class: "sr-only"
|
|
2274
2274
|
}, "Copy Code")), this.language && h("pre", {
|
|
2275
|
-
key: '
|
|
2275
|
+
key: 'e31339126dd3cc885511aaa2bdf6f06f3a113c74',
|
|
2276
2276
|
class: `language-${this.language} bg-stronger pl-8 pb-8`,
|
|
2277
2277
|
role: "region",
|
|
2278
2278
|
"aria-label": `Code block in ${this.language}`
|
|
2279
2279
|
}, h("code", {
|
|
2280
|
-
key: '
|
|
2280
|
+
key: '7efacd276f26a00f0f61793f6b8748259e1614b5',
|
|
2281
2281
|
innerHTML: this.getHighlightedCode()
|
|
2282
2282
|
})));
|
|
2283
2283
|
}
|
|
@@ -45,6 +45,18 @@ const EdsDocsInstallation = () => h("div", null, h("p", null, "Before proceeding
|
|
|
45
45
|
code: "npm install @ebrains/react",
|
|
46
46
|
language: "html",
|
|
47
47
|
"copy-label": "Copy Code"
|
|
48
|
+
})), h("div", {
|
|
49
|
+
class: "my-8"
|
|
50
|
+
}, h("eds-code-block", {
|
|
51
|
+
code: "npm install @ebrains/vue",
|
|
52
|
+
language: "html",
|
|
53
|
+
"copy-label": "Copy Code"
|
|
54
|
+
})), h("div", {
|
|
55
|
+
class: "my-8"
|
|
56
|
+
}, h("eds-code-block", {
|
|
57
|
+
code: "npm install @ebrains/angular",
|
|
58
|
+
language: "html",
|
|
59
|
+
"copy-label": "Copy Code"
|
|
48
60
|
})));
|
|
49
61
|
const EdsDocsReact = () => h("div", null, h("h2", null, "React Wrappers"), h("p", null, "Learn how to use our components in a React Application.Simple install the package below and check out the examples"), h("div", {
|
|
50
62
|
class: "my-8"
|
|
@@ -56,7 +68,7 @@ const EdsDocsReact = () => h("div", null, h("h2", null, "React Wrappers"), h("p"
|
|
|
56
68
|
"section-title": "Example React App",
|
|
57
69
|
"heading-level": "h3"
|
|
58
70
|
}, h("eds-code-block", {
|
|
59
|
-
code: '\nimport {
|
|
71
|
+
code: '\nimport {\n EdsHeader,\n EdsFullscreenMenu,\n EdsUser\n} from "@ebrains/react";\n\ninterface User {\n firstname: string;\n lastname: string;\n // Add any other properties your user object might have\n}\n\ninterface AuthStatus {\n authenticated: boolean;\n user: User | null;\n}\n\nimport { useEffect, useState } from "react";\n\nexport function App() {\n const [authStatus, setAuthStatus] = useState<AuthStatus>({\n authenticated: false,\n user: null,\n });\n const [activeTabIndex, setActiveTabIndex] = useState<number>(0);\n\n // Use useEffect to render Stencil components dynamically after the component mounts\n useEffect(() => {\n const handleAuthStatusChange = (event: CustomEvent) => {\n console.log(event.detail);\n setAuthStatus(event.detail); // Set the entire object\n };\n\n document.addEventListener(\n "authStatusChanged",\n handleAuthStatusChange as EventListener,\n );\n\n return () => {\n document.removeEventListener(\n "authStatusChanged",\n handleAuthStatusChange as EventListener,\n );\n };\n }, []);\n\n return (\n <div>\n <EdsHeader\n homeUrl="/"\n menuEnabled={true}\n inverseHeader={false}\n links={[\n { label: "About", url: "#" },\n { label: "Focus Areas", url: "#" },\n { label: "News & Events", url: "#" },\n { label: "Contact", url: "#" }\n ]}\n >\n <div className="px-16">\n <EdsUser\n keycloak-url="http://localhost:8080"\n keycloak-realm="nigeor-realm"\n keycloak-client-id="stencil-app"\n ></EdsUser>\n </div>\n </EdsHeader>\n\n <EdsFullscreenMenu\n home-url="/"\n links={[\n { label: "About", url: "#" },\n { label: "Focus Areas", url: "#" },\n { label: "News & Events", url: "#" },\n { label: "Contact", url: "#" }\n ]}\n ></EdsFullscreenMenu>\n \n <div>\n User is{" "}\n {authStatus.authenticated ? "authenticated" : "not authenticated"}\n </div>\n {authStatus.user && <div>Welcome, {authStatus.user.firstname}</div>}\n\n <div id="main"></div>\n </div>\n );\n}\n\nexport default App;\n\n',
|
|
60
72
|
language: "javascript",
|
|
61
73
|
"copy-label": "Copy Code"
|
|
62
74
|
})));
|
|
@@ -137,7 +149,7 @@ const EdsComponentsSection = class {
|
|
|
137
149
|
}
|
|
138
150
|
render() {
|
|
139
151
|
return h("div", {
|
|
140
|
-
key: '
|
|
152
|
+
key: '7e582a0eeafc2687229454532b5a7f66f91c1856',
|
|
141
153
|
class: "container"
|
|
142
154
|
}, this.renderContent());
|
|
143
155
|
}
|
|
@@ -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: 'ca5d44522f94e9ea009c657c5eae6e357cd0d13a'
|
|
33
|
+
}, h("eds-link", {
|
|
34
|
+
key: '563a369e2ed44d08a6dd47922c1c1c888e81543a',
|
|
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 };
|