@ebrains/react 0.8.0-alpha.0 → 0.9.1-beta
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/LICENSE +21 -0
- package/README.md +11 -0
- package/bookmark-c200037c.esm.js +16 -0
- package/color-primary-palette_6.entry.esm.js +163 -141
- package/{eds-components-section.entry.esm.js → components-section.entry.esm.js} +22 -18
- package/correct-use-of-colors.entry.esm.js +49 -49
- package/{eds-docs-palettes.entry.esm.js → docs-palettes.entry.esm.js} +3 -3
- package/{eds-docs-tokens.entry.esm.js → docs-tokens.entry.esm.js} +3 -3
- package/eds-accordion.entry.esm.js +132 -0
- package/eds-app-root.entry.esm.js +4 -4
- package/eds-avatar_26.entry.esm.js +306 -0
- package/{eds-card-desc_3.entry.esm.js → eds-card-desc_2.entry.esm.js} +1 -40
- package/eds-card-generic.entry.esm.js +3 -3
- package/eds-cookies-preference.entry.esm.js +2 -2
- package/eds-feedback.entry.esm.js +9 -9
- package/eds-frame.entry.esm.js +9 -15
- package/eds-icon-bluesky.entry.esm.js +1 -1
- package/eds-icon-bookmark.entry.esm.js +21 -0
- 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-external.entry.esm.js +21 -0
- 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-minus.entry.esm.js +21 -0
- package/eds-icon-more.entry.esm.js +1 -1
- package/eds-icon-paper.entry.esm.js +21 -0
- package/eds-icon-plus.entry.esm.js +21 -0
- package/eds-icon-portal.entry.esm.js +21 -0
- package/eds-icon-private.entry.esm.js +21 -0
- package/eds-icon-public.entry.esm.js +21 -0
- package/eds-icon-search.entry.esm.js +1 -1
- package/eds-icon-star.entry.esm.js +1 -1
- package/eds-icon-success.entry.esm.js +1 -1
- package/eds-icon-thumbs-down.entry.esm.js +1 -1
- package/eds-icon-thumbs-up.entry.esm.js +1 -1
- package/eds-icon-tutorial.entry.esm.js +21 -0
- package/eds-icon-twitter.entry.esm.js +1 -1
- package/eds-icon-unknown.entry.esm.js +21 -0
- package/eds-icon-updown.entry.esm.js +21 -0
- package/eds-icon-user.entry.esm.js +1 -1
- package/eds-icon-youtube.entry.esm.js +1 -1
- package/eds-login_2.entry.esm.js +27 -15
- package/eds-matomo-notice.entry.esm.js +162 -0
- package/eds-modal.entry.esm.js +17 -17
- package/eds-pagination_2.entry.esm.js +12 -12
- package/eds-progress-bar.entry.esm.js +2 -2
- package/eds-rating.entry.esm.js +1 -1
- package/eds-section-core_2.entry.esm.js +5 -5
- package/eds-spinner.entry.esm.js +3 -3
- package/eds-switch.entry.esm.js +7 -7
- package/eds-tabs.entry.esm.js +8 -8
- package/eds-timeline.entry.esm.js +5 -5
- package/eds-toast-manager.entry.esm.js +1 -1
- package/eds-tooltip.entry.esm.js +3 -3
- package/eds-trl.entry.esm.js +2 -2
- package/incorrect-use-of-colors.entry.esm.js +9 -9
- package/index.esm.js +1 -1
- package/index.esm2.js +60 -36
- package/logo-space.entry.esm.js +28 -12
- package/logo-variations-horizontal_2.entry.esm.js +73 -66
- package/{eds-logo-variations.entry.esm.js → logo-variations-tabs.entry.esm.js} +3 -3
- package/logo-wrong-usage.entry.esm.js +71 -107
- package/minus-b30a7c71.esm.js +11 -0
- package/package.json +1 -1
- package/paper-8e74ea31.esm.js +15 -0
- package/plus-89c07be2.esm.js +12 -0
- package/portal-d6c8ce56.esm.js +18 -0
- package/private-1c25ff8e.esm.js +25 -0
- package/public-d4d8c585.esm.js +16 -0
- package/src/components.d.ts +0 -3
- package/{eds-svg-repository.entry.esm.js → svg-repository.entry.esm.js} +29 -28
- package/token-list_3.entry.esm.js +9 -9
- package/token-ratios.entry.esm.js +3 -3
- package/token-typography.entry.esm.js +10 -7
- package/tutotial-150ee1fd.esm.js +27 -0
- package/unknown-ed01a24c.esm.js +22 -0
- package/up-and-down-d747abee.esm.js +12 -0
- package/eds-accordion_17.entry.esm.js +0 -196
- package/eds-breadcrumb.entry.esm.js +0 -174
- package/eds-form.entry.esm.js +0 -473
- package/eds-input_7.entry.esm.js +0 -569
- package/token-spacing.entry.esm.js +0 -93
|
@@ -3,7 +3,7 @@ import 'react';
|
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react-dom';
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const DocsOverview = () => h("div", {
|
|
7
7
|
class: "static-content container"
|
|
8
8
|
}, h("h2", null, "Load the module"), h("p", null, "Integrating the EBRAINS UI Components to a project without a JavaScript framework is straight forward. If you\u2019re working on a simple HTML page, you can start using the components immediately by adding the tags below to the", ' ', h("code", null, "head"), "."), h("eds-code-block", {
|
|
9
9
|
code: "<script type='module'>\n import { defineCustomElements } from 'https://unpkg.com/@ebrains/components@latest/loader/index.js'; \n // Define custom elements\n defineCustomElements(window);\n</script>",
|
|
@@ -31,12 +31,16 @@ const EdsComponentsOverview = () => h("div", {
|
|
|
31
31
|
code: '<link rel="stylesheet" href="https://unpkg.com/@ebrains/assets@latest/styles/output.css"/>',
|
|
32
32
|
language: "css",
|
|
33
33
|
"copy-label": "Copy Code"
|
|
34
|
+
}), h("p", null, "To directly use only the produced variables add the tag below to the ", h("code", null, "head")), h("eds-code-block", {
|
|
35
|
+
code: '<link rel="stylesheet" href="https://unpkg.com/@ebrains/assets@latest/styles/vars.css"/>',
|
|
36
|
+
language: "css",
|
|
37
|
+
"copy-label": "Copy Code"
|
|
34
38
|
}), h("p", null, "Note that, loading the predefined CSS framework above,", ' ', h("b", null, "automatically loads the fonts so you can skip loading them separately"), ". If you wish, however, to load the fonts, add the tag below to the ", h("code", null, "head")), h("eds-code-block", {
|
|
35
|
-
code: '<link rel="stylesheet" href="https://unpkg.com/@ebrains/assets@
|
|
39
|
+
code: '<link rel="stylesheet" href="https://unpkg.com/@ebrains/assets@latest/styles/base/fonts.css"/>',
|
|
36
40
|
language: "css",
|
|
37
41
|
"copy-label": "Copy Code"
|
|
38
42
|
}));
|
|
39
|
-
const
|
|
43
|
+
const DocsInstallation = () => h("div", null, h("p", null, "Before proceeding, ensure that Node.js is installed on your machine\u2014you can download the latest version from the official website. If your project doesn\u2019t already use npm and you plan to integrate EBRAINS Components, you'll need to create a package.json file by running npm init and following the on-screen instructions."), h("div", {
|
|
40
44
|
class: "my-8"
|
|
41
45
|
}, h("eds-code-block", {
|
|
42
46
|
code: "npm install @ebrains/components",
|
|
@@ -67,19 +71,19 @@ const EdsDocsInstallation = () => h("div", null, h("p", null, "Before proceeding
|
|
|
67
71
|
language: "html",
|
|
68
72
|
"copy-label": "Copy Code"
|
|
69
73
|
})));
|
|
70
|
-
const
|
|
74
|
+
const DocsReact = () => h("div", null, h("h2", null, "React Wrappers"), h("p", null, "To use the EBRAINS web components in a React Application, simple install the package below and check out the examples"), h("eds-code-block", {
|
|
71
75
|
code: "npm install @ebrains/react",
|
|
72
76
|
language: "javascript",
|
|
73
77
|
"copy-label": "Copy Code"
|
|
74
78
|
}), h("eds-section-core", {
|
|
75
79
|
"section-title": "Example React App",
|
|
76
80
|
"heading-level": "h3"
|
|
77
|
-
}, h("eds-code-block", {
|
|
78
|
-
code:
|
|
81
|
+
}, h("p", null, "This code displays a Stencil-based splash screen that stays visible until an initialization promise resolves (or errors), then hides itself and reveals the main React app content."), h("eds-code-block", {
|
|
82
|
+
code: "\nimport React, { useMemo, useState } from 'react';\nimport {\n EdsHeader\n EdsSplashScreen,\n EdsMatomoNotice,\n EdsSteps\n} from '@ebrains/react';\nimport './app.css';\n\n// simulate 2s\nfunction fakeInit(): Promise<void> {\n return new Promise(resolve => setTimeout(resolve, 2000));\n}\n\nexport function App() {\n // 1) create init promise\n const initPromise = useMemo(() => fakeInit(), []);\n\n // 2) is splash still visible\n const [splashVisible, setSplashVisible] = useState(true);\n const [initError, setInitError] = useState<string | null>(null);\n\n // 3) show the UI after the splash has hidden\n const showApp = !splashVisible && !initError;\n\n return (\n <div>\n {splashVisible && (\n <EdsSplashScreen\n inverse={false}\n initPromise={initPromise}\n onSplash={(e: CustomEvent) => {\n if (e.detail.type === 'hidden') {\n setSplashVisible(false);\n } else if (e.detail.type === 'error') {\n setInitError(e.detail.message);\n setSplashVisible(false);\n }\n }}\n />\n )}\n\n {initError && (\n <div className='error'>\n Failed to initialize: {initError}\n </div>\n )}\n\n {/* Show App only when ready */}\n {showApp && (\n <>\n <EdsHeader></EdsHeader>\n <EdsSteps\n steps={[\n {\n title: 'Introduction',\n content: 'Begin by familiarizing yourself with the overall process.'\n },\n {\n title: 'Process Overview',\n content: 'Review the detailed steps and understand the workflow.'\n }\n ]}\n type='linear'\n />\n\n <EdsMatomoNotice />\n\n <div id='root'></div>\n </>\n )}\n </div>\n );\n}\nexport default App;\n",
|
|
79
83
|
language: "javascript",
|
|
80
84
|
"copy-label": "Copy Code"
|
|
81
85
|
})));
|
|
82
|
-
const
|
|
86
|
+
const DocsVue = () => h("div", null, h("h2", null, "Vue Wrappers"), h("p", null, "To use the EBRAINS web components in a Vue Application, simple install the package below and check out the examples."), h("eds-code-block", {
|
|
83
87
|
code: "npm install @ebrains/vue",
|
|
84
88
|
language: "javascript",
|
|
85
89
|
"copy-label": "Copy Code"
|
|
@@ -96,7 +100,7 @@ const EdsDocsVue = () => h("div", null, h("h2", null, "Vue Wrappers"), h("p", nu
|
|
|
96
100
|
class: "my-8"
|
|
97
101
|
}, h("eds-alert", {
|
|
98
102
|
message: "Use the .prop modifier to ensure properties are passed correctly.",
|
|
99
|
-
intent: "
|
|
103
|
+
intent: "default"
|
|
100
104
|
})), h("eds-code-block", {
|
|
101
105
|
code: '<EdsAlert\n message="This is a default informational alert."\n intent="default"\n :pressableLabel.prop="Press Me"\n :pressableUrl.prop="https://ebrains.eu"\n></EdsAlert>',
|
|
102
106
|
language: "javascript",
|
|
@@ -105,11 +109,11 @@ const EdsDocsVue = () => h("div", null, h("h2", null, "Vue Wrappers"), h("p", nu
|
|
|
105
109
|
"section-title": "Example Vue App",
|
|
106
110
|
"heading-level": "h3"
|
|
107
111
|
}, h("eds-code-block", {
|
|
108
|
-
code: '\n<template>\n <EdsHeader \n
|
|
112
|
+
code: '\n<template>\n <div>\n <EdsHeader></EdsHeader>\n <!-- render the splash until we manually hide it -->\n <EdsSplashScreen inverse="false" />\n\n <!-- then show main UI -->\n <div v-if="!splashVisible" class="container my-16">\n <EdsSteps \n :steps="JSON.stringify(stepsdata)"\n type="linear"\n />\n </div>\n </div>\n</template>\n\n<script>\nimport { EdsSplashScreen, EdsSteps, EdsHeader } from "@ebrains/vue";\n\nexport default {\n name: "App",\n components: { EdsHeader, EdsSplashScreen, EdsSteps },\n data() {\n return {\n stepsdata: [\n { title: "Introduction", content: "Begin by familiarizing yourself with the overall process." },\n { title: "Process Overview", content: "Review the detailed steps and understand the workflow." }\n ],\n splashVisible: true\n };\n },\n methods: {\n delay(ms) {\n return new Promise(resolve => setTimeout(resolve, ms));\n },\n async initialize() {\n try {\n // simulate your init work\n await this.delay(2000);\n\n // fire the built-in event that EdsSplashScreen listens for\n window.dispatchEvent(new Event("hideSplash"));\n } catch (e) {\n console.error("Init error", e);\n window.dispatchEvent(new Event("hideSplash"));\n } finally {\n // show the rest of the app\n this.splashVisible = false;\n }\n }\n },\n mounted() {\n this.initialize();\n }\n};\n</script>\n',
|
|
109
113
|
language: "javascript",
|
|
110
114
|
"copy-label": "Copy Code"
|
|
111
115
|
})));
|
|
112
|
-
const
|
|
116
|
+
const DocsAngular = () => h("div", null, h("h2", null, "Angular Wrappers"), h("p", null, "To use the EBRAINS web components in an Angular Application, simple install the package below and check out the examples."), h("eds-code-block", {
|
|
113
117
|
code: "npm install @ebrains/angular",
|
|
114
118
|
language: "javascript",
|
|
115
119
|
"copy-label": "Copy Code"
|
|
@@ -129,7 +133,7 @@ const EdsDocsAngular = () => h("div", null, h("h2", null, "Angular Wrappers"), h
|
|
|
129
133
|
language: "javascript",
|
|
130
134
|
"copy-label": "Copy Code"
|
|
131
135
|
})));
|
|
132
|
-
const
|
|
136
|
+
const ComponentsSection = class {
|
|
133
137
|
constructor(hostRef) {
|
|
134
138
|
registerInstance(this, hostRef);
|
|
135
139
|
this.tabIndex = undefined;
|
|
@@ -137,25 +141,25 @@ const EdsComponentsSection = class {
|
|
|
137
141
|
renderContent() {
|
|
138
142
|
switch (this.tabIndex) {
|
|
139
143
|
case 0:
|
|
140
|
-
return h(
|
|
144
|
+
return h(DocsOverview, null);
|
|
141
145
|
case 1:
|
|
142
|
-
return h(
|
|
146
|
+
return h(DocsInstallation, null);
|
|
143
147
|
case 2:
|
|
144
|
-
return h(
|
|
148
|
+
return h(DocsReact, null);
|
|
145
149
|
case 3:
|
|
146
|
-
return h(
|
|
150
|
+
return h(DocsVue, null);
|
|
147
151
|
case 4:
|
|
148
|
-
return h(
|
|
152
|
+
return h(DocsAngular, null);
|
|
149
153
|
default:
|
|
150
154
|
return h("p", null, "Content not available.");
|
|
151
155
|
}
|
|
152
156
|
}
|
|
153
157
|
render() {
|
|
154
158
|
return h("div", {
|
|
155
|
-
key: '
|
|
159
|
+
key: 'ee8facfaad3786770fd3ea39f1db7922a67ffd3e',
|
|
156
160
|
class: "container"
|
|
157
161
|
}, this.renderContent());
|
|
158
162
|
}
|
|
159
163
|
};
|
|
160
164
|
|
|
161
|
-
export {
|
|
165
|
+
export { ComponentsSection as components_section };
|
|
@@ -42,36 +42,36 @@ const CorrectUseOfColors = class {
|
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
44
|
return h("div", {
|
|
45
|
-
key: '
|
|
45
|
+
key: '966cb542b868e89c3f2538548e8a1ca8e20ea8d8',
|
|
46
46
|
class: "container"
|
|
47
47
|
}, h("p", {
|
|
48
|
-
key: '
|
|
48
|
+
key: '3c595ffa9a2de45b681924354486309004d4ceaf',
|
|
49
49
|
class: "f-body-01"
|
|
50
50
|
}, "This guide demonstrates the correct usage of the", h("eds-link", {
|
|
51
|
-
key: '
|
|
51
|
+
key: '1d1fded0f8cf78cec9e364e5b6844598b55f3f86',
|
|
52
52
|
label: "primary",
|
|
53
53
|
size: "small",
|
|
54
|
-
intent: "
|
|
54
|
+
intent: "underline",
|
|
55
55
|
icon: "chevron-right",
|
|
56
56
|
url: "../color-palette/#primary-palette",
|
|
57
57
|
"extra-class": "inline-block ml-4"
|
|
58
58
|
}), "and", h("eds-link", {
|
|
59
|
-
key: '
|
|
59
|
+
key: 'abae691bb80eca1019f97375997b1aa6a577ba8b',
|
|
60
60
|
label: "support",
|
|
61
61
|
size: "small",
|
|
62
|
-
intent: "
|
|
62
|
+
intent: "underline",
|
|
63
63
|
icon: "chevron-right",
|
|
64
64
|
url: "../color-palette/#support-palette",
|
|
65
65
|
"extra-class": "inline-block ml-4"
|
|
66
66
|
}), "color palettes."), h("div", {
|
|
67
|
-
key: '
|
|
67
|
+
key: '251e6d8ad16d70974b67fa044d53abd1be79ccac',
|
|
68
68
|
class: "flex"
|
|
69
69
|
}, h("div", {
|
|
70
|
-
key: '
|
|
70
|
+
key: 'de5b9b6720aababb693421663c52db85cee1b5fc',
|
|
71
71
|
class: "w-full"
|
|
72
72
|
}, h("ul", {
|
|
73
|
-
key: '
|
|
74
|
-
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
73
|
+
key: 'a61f669f45c2f9d3b53d87bacc222a4274f93d34',
|
|
74
|
+
class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
75
75
|
}, primary.map(color => h("li", {
|
|
76
76
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
77
77
|
}, h("div", {
|
|
@@ -80,11 +80,11 @@ const CorrectUseOfColors = class {
|
|
|
80
80
|
backgroundColor: color.background
|
|
81
81
|
}
|
|
82
82
|
}))))), h("div", {
|
|
83
|
-
key: '
|
|
83
|
+
key: 'e7787d0ae843d7767ecac3267f11325dcfecf948',
|
|
84
84
|
class: "w-full"
|
|
85
85
|
}, h("ul", {
|
|
86
|
-
key: '
|
|
87
|
-
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
86
|
+
key: '0d740ad8178c88175939d32a4f84d518f587e43a',
|
|
87
|
+
class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
88
88
|
}, support.map(color => h("li", {
|
|
89
89
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
90
90
|
}, h("div", {
|
|
@@ -93,33 +93,33 @@ const CorrectUseOfColors = class {
|
|
|
93
93
|
backgroundColor: color.background
|
|
94
94
|
}
|
|
95
95
|
})))))), h("p", {
|
|
96
|
-
key: '
|
|
96
|
+
key: '6c59b2c574f5039baafd91a2939fbbb307732500',
|
|
97
97
|
class: "f-body-01"
|
|
98
98
|
}, "This guide demonstrates the correct usage of the", h("eds-link", {
|
|
99
|
-
key: '
|
|
99
|
+
key: '03e9ca7b0831c2b1d1908001324a38147ecea835',
|
|
100
100
|
label: "purple",
|
|
101
101
|
size: "small",
|
|
102
|
-
intent: "
|
|
102
|
+
intent: "underline",
|
|
103
103
|
icon: "chevron-right",
|
|
104
104
|
url: "../color-palette/#primary-palette",
|
|
105
105
|
"extra-class": "inline-block ml-4"
|
|
106
106
|
}), "and", h("eds-link", {
|
|
107
|
-
key: '
|
|
107
|
+
key: '021affd3b5db00ccb5ef0d51de4552c5d3a11f44',
|
|
108
108
|
label: "support",
|
|
109
109
|
size: "small",
|
|
110
|
-
intent: "
|
|
110
|
+
intent: "underline",
|
|
111
111
|
icon: "chevron-right",
|
|
112
112
|
url: "../color-palette/#support-palette",
|
|
113
113
|
"extra-class": "inline-block ml-4"
|
|
114
114
|
}), "color palettes."), h("div", {
|
|
115
|
-
key: '
|
|
115
|
+
key: 'b7a5c4c10adab099c57ed70c0d2186d791aa70ec',
|
|
116
116
|
class: "flex"
|
|
117
117
|
}, h("div", {
|
|
118
|
-
key: '
|
|
118
|
+
key: '3732c49a47158c206e1b40fc5425e555487ec757',
|
|
119
119
|
class: "w-full"
|
|
120
120
|
}, h("ul", {
|
|
121
|
-
key: '
|
|
122
|
-
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
121
|
+
key: '54a5d35510bd77397d1418aa2638cf310534e986',
|
|
122
|
+
class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
123
123
|
}, purple.map(color => h("li", {
|
|
124
124
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
125
125
|
}, h("div", {
|
|
@@ -128,11 +128,11 @@ const CorrectUseOfColors = class {
|
|
|
128
128
|
backgroundColor: color.background
|
|
129
129
|
}
|
|
130
130
|
}))))), h("div", {
|
|
131
|
-
key: '
|
|
131
|
+
key: '048de44bd69a7b6ecefe3188d76821e4d5145620',
|
|
132
132
|
class: "w-full"
|
|
133
133
|
}, h("ul", {
|
|
134
|
-
key: '
|
|
135
|
-
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
134
|
+
key: 'e3f8cadce4b9a575e1d844958cfccf20a19db681',
|
|
135
|
+
class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
136
136
|
}, support.map(color => h("li", {
|
|
137
137
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
138
138
|
}, h("div", {
|
|
@@ -141,33 +141,33 @@ const CorrectUseOfColors = class {
|
|
|
141
141
|
backgroundColor: color.background
|
|
142
142
|
}
|
|
143
143
|
})))))), h("p", {
|
|
144
|
-
key: '
|
|
144
|
+
key: '14d7f9c88ae769d6feb2a8344f8b45b40d4ae095',
|
|
145
145
|
class: "f-body-01"
|
|
146
146
|
}, "This guide demonstrates the correct usage of the", h("eds-link", {
|
|
147
|
-
key: '
|
|
147
|
+
key: '810bdfa6fd175f9d483129b70bbae469051e0e0d',
|
|
148
148
|
label: "blue",
|
|
149
149
|
size: "small",
|
|
150
|
-
intent: "
|
|
150
|
+
intent: "underline",
|
|
151
151
|
icon: "chevron-right",
|
|
152
152
|
url: "../color-palette/#primary-palette",
|
|
153
153
|
"extra-class": "inline-block ml-4"
|
|
154
154
|
}), "and", h("eds-link", {
|
|
155
|
-
key: '
|
|
155
|
+
key: 'fb8a9712f8e1ae1cffbb85c79f7e9c2657f867db',
|
|
156
156
|
label: "support",
|
|
157
157
|
size: "small",
|
|
158
|
-
intent: "
|
|
158
|
+
intent: "underline",
|
|
159
159
|
icon: "chevron-right",
|
|
160
160
|
url: "../color-palette/#support-palette",
|
|
161
161
|
"extra-class": "inline-block ml-4"
|
|
162
162
|
}), "color palettes."), h("div", {
|
|
163
|
-
key: '
|
|
163
|
+
key: '1df0919bb4c75ee251d7f5c8cf95bb2e2e990242',
|
|
164
164
|
class: "flex"
|
|
165
165
|
}, h("div", {
|
|
166
|
-
key: '
|
|
166
|
+
key: '5a898462aa680267f4ac35aefb98e60b7f486c63',
|
|
167
167
|
class: "w-full"
|
|
168
168
|
}, h("ul", {
|
|
169
|
-
key: '
|
|
170
|
-
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
169
|
+
key: 'ad6f3e6ccde7d225be344efbc176064fc89aa796',
|
|
170
|
+
class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
171
171
|
}, blue.map(color => h("li", {
|
|
172
172
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
173
173
|
}, h("div", {
|
|
@@ -176,11 +176,11 @@ const CorrectUseOfColors = class {
|
|
|
176
176
|
backgroundColor: color.background
|
|
177
177
|
}
|
|
178
178
|
}))))), h("div", {
|
|
179
|
-
key: '
|
|
179
|
+
key: '8dd6e01b989c8589be6b553c85f0512c268ac369',
|
|
180
180
|
class: "w-full"
|
|
181
181
|
}, h("ul", {
|
|
182
|
-
key: '
|
|
183
|
-
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
182
|
+
key: 'c36937d99efd585c4e8a37b80de5bce82374186c',
|
|
183
|
+
class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
184
184
|
}, support.map(color => h("li", {
|
|
185
185
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
186
186
|
}, h("div", {
|
|
@@ -189,33 +189,33 @@ const CorrectUseOfColors = class {
|
|
|
189
189
|
backgroundColor: color.background
|
|
190
190
|
}
|
|
191
191
|
})))))), h("p", {
|
|
192
|
-
key: '
|
|
192
|
+
key: '452c68d1c797de34e531d7c734d350fcc36ae2f2',
|
|
193
193
|
class: "f-body-01"
|
|
194
194
|
}, "This guide demonstrates the correct usage of the", h("eds-link", {
|
|
195
|
-
key: '
|
|
195
|
+
key: '17453c9d78c20583c989281672c0f41bbe8d036f',
|
|
196
196
|
label: "redish",
|
|
197
197
|
size: "small",
|
|
198
|
-
intent: "
|
|
198
|
+
intent: "underline",
|
|
199
199
|
icon: "chevron-right",
|
|
200
200
|
url: "../color-palette/#primary-palette",
|
|
201
201
|
"extra-class": "inline-block ml-4"
|
|
202
202
|
}), "and", h("eds-link", {
|
|
203
|
-
key: '
|
|
203
|
+
key: '3e78eb924b6a857674d50d4a209e4843f76e5fc3',
|
|
204
204
|
label: "support",
|
|
205
205
|
size: "small",
|
|
206
|
-
intent: "
|
|
206
|
+
intent: "underline",
|
|
207
207
|
icon: "chevron-right",
|
|
208
208
|
url: "../color-palette/#support-palette",
|
|
209
209
|
"extra-class": "inline-block ml-4"
|
|
210
210
|
}), "color palettes."), h("div", {
|
|
211
|
-
key: '
|
|
211
|
+
key: 'ae3e2a703633013f632df3a75f45ec932ce5e13b',
|
|
212
212
|
class: "flex"
|
|
213
213
|
}, h("div", {
|
|
214
|
-
key: '
|
|
214
|
+
key: '4a0f256fa355dcbd6d6fc0e95e81a6c2821c917d',
|
|
215
215
|
class: "w-full"
|
|
216
216
|
}, h("ul", {
|
|
217
|
-
key: '
|
|
218
|
-
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
217
|
+
key: '8aaf611ed9b87b86d0c1b47b1e37cb01989838b2',
|
|
218
|
+
class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
219
219
|
}, red.map(color => h("li", {
|
|
220
220
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
221
221
|
}, h("div", {
|
|
@@ -224,11 +224,11 @@ const CorrectUseOfColors = class {
|
|
|
224
224
|
backgroundColor: color.background
|
|
225
225
|
}
|
|
226
226
|
}))))), h("div", {
|
|
227
|
-
key: '
|
|
227
|
+
key: '112e50da1627a671fbca843111becf51cd02ebc5',
|
|
228
228
|
class: "w-full"
|
|
229
229
|
}, h("ul", {
|
|
230
|
-
key: '
|
|
231
|
-
class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
230
|
+
key: '14033bd08a9d16bd0b6cfe8b87acc2a841c48a29',
|
|
231
|
+
class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
232
232
|
}, support.map(color => h("li", {
|
|
233
233
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
234
234
|
}, h("div", {
|
|
@@ -3,7 +3,7 @@ import 'react';
|
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react-dom';
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const DocsPalettes = class {
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
this.tabIndex = undefined;
|
|
@@ -20,10 +20,10 @@ const EdsDocsPalettes = class {
|
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
22
|
return h("div", {
|
|
23
|
-
key: '
|
|
23
|
+
key: 'f985628b9ea3f02a511e2facbda99b54f0723acf',
|
|
24
24
|
class: "container"
|
|
25
25
|
}, this.renderContent());
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
export {
|
|
29
|
+
export { DocsPalettes as docs_palettes };
|
|
@@ -3,7 +3,7 @@ import 'react';
|
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react-dom';
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const DocsContent = class {
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
this.tabIndex = undefined;
|
|
@@ -36,10 +36,10 @@ const EdsDocsContent = class {
|
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
38
|
return h("div", {
|
|
39
|
-
key: '
|
|
39
|
+
key: '29810a0ace60d2e5a0fc84d6715fc2fc89d6187f',
|
|
40
40
|
class: "container"
|
|
41
41
|
}, this.renderContent());
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
export {
|
|
45
|
+
export { DocsContent as docs_tokens };
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index.esm2.js';
|
|
2
|
+
import { s as sendAnalytics } from './analytics-44b1416b.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
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-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}.break-words{overflow-wrap:break-word}.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}.pr-32{padding-right:2rem}.pr-36{padding-right:2.25rem}.pr-40{padding-right:2.5rem}.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-4{padding-top:0.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}";
|
|
8
|
+
const EdsAccordionStyle0 = edsAccordionCss;
|
|
9
|
+
const EdsAccordion = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
registerInstance(this, hostRef);
|
|
12
|
+
this.accordion = createEvent(this, "accordion", 7);
|
|
13
|
+
/**
|
|
14
|
+
* Handles the click event on the accordion header to toggle expansion.
|
|
15
|
+
* Toggles the `isExpanded` state and emits the `accordion` event.
|
|
16
|
+
*/
|
|
17
|
+
this.handleClick = () => {
|
|
18
|
+
var _a;
|
|
19
|
+
this.isExpanded = !this.isExpanded;
|
|
20
|
+
this.accordion.emit(this.isExpanded);
|
|
21
|
+
this.setPanelHeight();
|
|
22
|
+
sendAnalytics({
|
|
23
|
+
category: 'ui-component',
|
|
24
|
+
parentContext: null,
|
|
25
|
+
tag: this.el.tagName.toLowerCase(),
|
|
26
|
+
name: ((_a = this.heading) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
27
|
+
action: this.isExpanded ? 'expanded' : 'collapsed'
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Calculates and sets the panel height based on the content height
|
|
32
|
+
* and adjusts based on the `shortContent` and `isExpanded` states.
|
|
33
|
+
*/
|
|
34
|
+
this.setPanelHeight = () => {
|
|
35
|
+
if (this.childContentRef) {
|
|
36
|
+
this.shortContent = this.wrapperRef.scrollWidth > 830 && !this.description ? this.childContentRef.scrollHeight <= 80 : this.childContentRef.scrollHeight <= 20;
|
|
37
|
+
this.panelHeight = this.isExpanded && !this.shortContent ? this.childContentRef.scrollHeight : 0;
|
|
38
|
+
}
|
|
39
|
+
if (this.headerRef) {
|
|
40
|
+
this.headerHeight = this.headerRef.scrollHeight - 30;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
this.heading = undefined;
|
|
44
|
+
this.description = undefined;
|
|
45
|
+
this.switchBg = true;
|
|
46
|
+
this.expanded = false;
|
|
47
|
+
this.clampText = true;
|
|
48
|
+
this.isExpanded = this.expanded;
|
|
49
|
+
this.panelHeight = 0;
|
|
50
|
+
this.shortContent = false;
|
|
51
|
+
this.headerHeight = 0;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Lifecycle method that sets up the initial panel height and adds a resize event listener
|
|
55
|
+
* to recalculate height on window resize.
|
|
56
|
+
*/
|
|
57
|
+
componentDidLoad() {
|
|
58
|
+
this.setPanelHeight();
|
|
59
|
+
window.addEventListener('resize', this.setPanelHeight);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Lifecycle method that cleans up the resize event listener when the component is removed.
|
|
63
|
+
*/
|
|
64
|
+
disconnectedCallback() {
|
|
65
|
+
window.removeEventListener('resize', this.setPanelHeight);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Renders the accordion structure, including header, content, description, and any slotted content.
|
|
69
|
+
* Adjusts styles based on `switchBg`, `tiny`, `clampText`, and other props.
|
|
70
|
+
*/
|
|
71
|
+
render() {
|
|
72
|
+
return h("div", {
|
|
73
|
+
key: '9545d005b8c1dab935f2dcc7d9194aacfded535e',
|
|
74
|
+
ref: el => this.wrapperRef = el,
|
|
75
|
+
class: `flex effect-color border-softer relative grid overflow-hidden rounded-lg border-2 p-16
|
|
76
|
+
${this.switchBg && this.isExpanded ? 'bg-inverse' : 'bg-default'}
|
|
77
|
+
${this.switchBg ? 'hover:bg-inverse' : ''}
|
|
78
|
+
${this.description ? 'min-h-56' : ''}`
|
|
79
|
+
}, h("h3", {
|
|
80
|
+
key: '243b3a8e6c168f8b7809e997c2299917f000d6ee',
|
|
81
|
+
ref: el => this.headerRef = el,
|
|
82
|
+
class: "mr-auto f-heading-06 text-left absolute inset-x-16 break-words top-16 pr-40"
|
|
83
|
+
}, this.heading), h("div", {
|
|
84
|
+
key: '7ecf3dca450a58169464e1482962e5cc5e8b7b5e',
|
|
85
|
+
class: "ml-auto"
|
|
86
|
+
}, h("eds-button", {
|
|
87
|
+
key: '4a3572e61e1054dca181d1eb05eef1d73f07ff96',
|
|
88
|
+
id: "toggleAccordion",
|
|
89
|
+
intent: "tertiary",
|
|
90
|
+
"aria-expanded": this.isExpanded || this.shortContent,
|
|
91
|
+
"aria-label": "Toggle accordion",
|
|
92
|
+
"aria-controls": "accordionSection",
|
|
93
|
+
class: `effect-color flex w-full items-center justify-between rounded-md outline-none focus:outline-none`,
|
|
94
|
+
onClick: this.handleClick,
|
|
95
|
+
icon: "chevron-down"
|
|
96
|
+
})), h("div", {
|
|
97
|
+
key: 'f7cd77703aab8f2b56e6f7d36aeab90f7263bd76',
|
|
98
|
+
class: `w-full`,
|
|
99
|
+
style: Number.isFinite(this.headerHeight) ? {
|
|
100
|
+
marginTop: `${this.headerHeight}px`
|
|
101
|
+
} : {}
|
|
102
|
+
}, this.description ? h("span", {
|
|
103
|
+
class: `text-light ${!this.isExpanded && this.clampText ? 'line-clamp-1' : ''}`
|
|
104
|
+
}, this.description) : null, h("section", {
|
|
105
|
+
key: 'dbfa879d6aa14be50d18a31587e451f7e06a03df',
|
|
106
|
+
id: "accordionSection",
|
|
107
|
+
role: "region",
|
|
108
|
+
"aria-labelledby": "accordionHeader",
|
|
109
|
+
"aria-hidden": !this.isExpanded,
|
|
110
|
+
class: `z-1 effect-height relative h-0 w-full ${!this.isExpanded && this.clampText ? 'overflow-hidden' : ''}`,
|
|
111
|
+
style: {
|
|
112
|
+
height: this.isExpanded ? 'auto' : '0'
|
|
113
|
+
}
|
|
114
|
+
}, h("div", {
|
|
115
|
+
key: 'ae5c56f8eb6597c34df4bd1cb78a00b3333baf1e',
|
|
116
|
+
ref: el => this.childContentRef = el,
|
|
117
|
+
class: `accordion-content effect-color pt-4`,
|
|
118
|
+
"aria-hidden": !this.isExpanded
|
|
119
|
+
}, h("span", {
|
|
120
|
+
key: '093f851cde64acefd8b9285d4b6e15f7d2e5c592',
|
|
121
|
+
class: `${!this.isExpanded && this.clampText ? 'line-clamp-2' : ''}`
|
|
122
|
+
}, h("slot", {
|
|
123
|
+
key: '68f428a78168f89637018f588ab431e1a1bef7a4'
|
|
124
|
+
}))))));
|
|
125
|
+
}
|
|
126
|
+
get el() {
|
|
127
|
+
return getElement(this);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
EdsAccordion.style = EdsAccordionStyle0;
|
|
131
|
+
|
|
132
|
+
export { EdsAccordion as eds_accordion };
|
|
@@ -34,18 +34,18 @@ const EdsAppRoot = class {
|
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
36
|
return h("div", {
|
|
37
|
-
key: '
|
|
37
|
+
key: '7b0b74c02f9fa25dc3d3e5a0fd10d8b4c3a59ffe'
|
|
38
38
|
}, h("eds-splash-screen", {
|
|
39
|
-
key: '
|
|
39
|
+
key: 'e1fabb47903b011c397af3a8da59130e8455280f',
|
|
40
40
|
inverse: true,
|
|
41
41
|
initPromise: this.combinedInitPromise
|
|
42
42
|
}), h("eds-login", {
|
|
43
|
-
key: '
|
|
43
|
+
key: '30d8ca5116c5b8a18972df9c55bd4a947226d682',
|
|
44
44
|
"keycloak-url": "http://localhost:8080",
|
|
45
45
|
"keycloak-realm": "nigeor-realm",
|
|
46
46
|
"keycloak-client-id": "stencil-app"
|
|
47
47
|
}), h("main", {
|
|
48
|
-
key: '
|
|
48
|
+
key: '16ead78b24f561049fb12609b23bff028262d9d5'
|
|
49
49
|
}, this.isAuthenticated ? h("h1", null, "Welcome, authenticated user!") : h("h1", null, "Please log in.")));
|
|
50
50
|
}
|
|
51
51
|
};
|