@ebrains/react 1.0.0 → 1.2.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.
Files changed (59) hide show
  1. package/components-section.entry.esm.js +1 -1
  2. package/eds-accordion.entry.esm.js +9 -9
  3. package/eds-alert.entry.esm.js +2 -2
  4. package/{eds-avatar_34.entry.esm.js → eds-avatar_28.entry.esm.js} +694 -775
  5. package/eds-breadcrumb.entry.esm.js +179 -0
  6. package/eds-card-desc_2.entry.esm.js +85 -0
  7. package/eds-card-generic.entry.esm.js +114 -0
  8. package/eds-card-project.entry.esm.js +10 -10
  9. package/eds-card-tags.entry.esm.js +1 -1
  10. package/eds-card-tool.entry.esm.js +4 -4
  11. package/eds-code-block.entry.esm.js +7 -7
  12. package/eds-gauge.entry.esm.js +78 -0
  13. package/eds-icon-arrow-diagonal.entry.esm.js +1 -1
  14. package/eds-icon-arrow-right.entry.esm.js +1 -1
  15. package/eds-icon-bluesky.entry.esm.js +1 -1
  16. package/eds-icon-bookmark.entry.esm.js +1 -1
  17. package/eds-icon-chevron-down.entry.esm.js +1 -1
  18. package/eds-icon-chevron-left.entry.esm.js +1 -1
  19. package/eds-icon-chevron-right.entry.esm.js +1 -1
  20. package/eds-icon-chevron-up.entry.esm.js +1 -1
  21. package/eds-icon-close.entry.esm.js +1 -1
  22. package/eds-icon-copy.entry.esm.js +1 -1
  23. package/eds-icon-eu.entry.esm.js +1 -1
  24. package/eds-icon-external.entry.esm.js +1 -1
  25. package/eds-icon-facebook.entry.esm.js +1 -1
  26. package/eds-icon-gitlab.entry.esm.js +1 -1
  27. package/eds-icon-linkedin.entry.esm.js +1 -1
  28. package/eds-icon-loader.entry.esm.js +1 -1
  29. package/eds-icon-mastodon.entry.esm.js +1 -1
  30. package/eds-icon-menu.entry.esm.js +1 -1
  31. package/eds-icon-minus.entry.esm.js +1 -1
  32. package/eds-icon-more.entry.esm.js +1 -1
  33. package/eds-icon-paper.entry.esm.js +1 -1
  34. package/eds-icon-plus.entry.esm.js +1 -1
  35. package/eds-icon-portal.entry.esm.js +1 -1
  36. package/eds-icon-private.entry.esm.js +1 -1
  37. package/eds-icon-public.entry.esm.js +1 -1
  38. package/eds-icon-search.entry.esm.js +1 -1
  39. package/eds-icon-star.entry.esm.js +1 -1
  40. package/eds-icon-success.entry.esm.js +1 -1
  41. package/eds-icon-thumbs-down.entry.esm.js +1 -1
  42. package/eds-icon-thumbs-up.entry.esm.js +1 -1
  43. package/eds-icon-tutorial.entry.esm.js +1 -1
  44. package/eds-icon-twitter.entry.esm.js +1 -1
  45. package/eds-icon-unknown.entry.esm.js +1 -1
  46. package/eds-icon-updown.entry.esm.js +1 -1
  47. package/eds-icon-user.entry.esm.js +1 -1
  48. package/eds-icon-youtube.entry.esm.js +1 -1
  49. package/eds-pie.entry.esm.js +131 -0
  50. package/eds-progress-bar.entry.esm.js +4 -4
  51. package/eds-rating.entry.esm.js +1 -1
  52. package/eds-section-core_2.entry.esm.js +5 -5
  53. package/eds-spinner.entry.esm.js +3 -3
  54. package/eds-switch.entry.esm.js +5 -5
  55. package/eds-tooltip.entry.esm.js +41 -0
  56. package/index.esm2.js +23 -5
  57. package/package.json +1 -1
  58. package/token-spacing.entry.esm.js +93 -0
  59. package/eds-pagination_2.entry.esm.js +0 -493
@@ -85,7 +85,7 @@ const DocsReact = () => h("div", null, h("h2", null, "React Wrappers"), h("p", n
85
85
  "section-title": "Example React App",
86
86
  "heading-level": "h3"
87
87
  }, 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", {
88
- 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",
88
+ 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",
89
89
  language: "javascript",
90
90
  "copy-label": "Copy Code"
91
91
  })));
@@ -70,21 +70,21 @@ const EdsAccordion = class {
70
70
  */
71
71
  render() {
72
72
  return h("div", {
73
- key: 'd2fcce2468130200dd1516902a203c4ca8ae543f',
73
+ key: 'addeb5f79d497efcd3eab9f849890adf48a5e275',
74
74
  ref: el => this.wrapperRef = el,
75
75
  class: `flex effect-color border-softer relative grid overflow-hidden rounded-lg border-2 p-16
76
76
  ${this.switchBg && this.isExpanded ? 'bg-inverse' : 'bg-default'}
77
77
  ${this.switchBg ? 'hover:bg-inverse' : ''}
78
78
  ${this.description ? 'min-h-56' : ''}`
79
79
  }, h("h3", {
80
- key: 'f59a85e886736b483f6a311a00426340a36dcb71',
80
+ key: 'c522c074c205e471f9e95991a03f703bec8d3219',
81
81
  ref: el => this.headerRef = el,
82
82
  class: "mr-auto f-heading-06 text-left absolute inset-x-16 break-words top-16 pr-40"
83
83
  }, this.heading), h("div", {
84
- key: '9fe1d99f46f3c066bbb1e8f4ef695fe87e8fad54',
84
+ key: '5ee474856bf9a3cdc732c27c6fccb68c24e0dc3b',
85
85
  class: "ml-auto"
86
86
  }, h("eds-button", {
87
- key: '4d4c16a958df05f1e773fe74fa49647fc94766c7',
87
+ key: 'a274b1d82f30607f61103433aa6ceb745464f530',
88
88
  id: "toggleAccordion",
89
89
  intent: "tertiary",
90
90
  "aria-expanded": this.isExpanded || this.shortContent,
@@ -94,7 +94,7 @@ const EdsAccordion = class {
94
94
  onClick: this.handleClick,
95
95
  icon: "chevron-down"
96
96
  })), h("div", {
97
- key: '5d84ffe8032834575d165f7a5e097539de73350f',
97
+ key: '69a638f2dc3c5ebff95fc4049c47abd4884b13ad',
98
98
  class: `w-full`,
99
99
  style: Number.isFinite(this.headerHeight) ? {
100
100
  marginTop: `${this.headerHeight}px`
@@ -102,7 +102,7 @@ const EdsAccordion = class {
102
102
  }, this.description ? h("span", {
103
103
  class: `text-light ${!this.isExpanded && this.clampText ? 'line-clamp-1' : ''}`
104
104
  }, this.description) : null, h("section", {
105
- key: '1813aea1369b8883cd45088799f9715cf8fc0556',
105
+ key: '820f39174c6e6d42e7c4407a2a4175fb077f86ac',
106
106
  id: "accordionSection",
107
107
  role: "region",
108
108
  "aria-labelledby": "accordionHeader",
@@ -112,15 +112,15 @@ const EdsAccordion = class {
112
112
  height: this.isExpanded ? 'auto' : '0'
113
113
  }
114
114
  }, h("div", {
115
- key: 'a9a95adbb819530f426045c55ca1a02f3a778f0a',
115
+ key: '3d9ea33856d350434d26c07ddc9d230e28d8c344',
116
116
  ref: el => this.childContentRef = el,
117
117
  class: `accordion-content effect-color pt-4`,
118
118
  "aria-hidden": !this.isExpanded
119
119
  }, h("span", {
120
- key: '2518e3243e0bd199061ac255922d661e0558bdc8',
120
+ key: '1d0761d7894d5ba4d7c7f5051031857555ce0b0c',
121
121
  class: `${!this.isExpanded && this.clampText ? 'line-clamp-2' : ''}`
122
122
  }, h("slot", {
123
- key: '3f3ab74926e7e45d4aacc4c7003c05be3c6b82c3'
123
+ key: 'ed31f44736a8ce85a7df4216b2f90c2ca7d9b873'
124
124
  }))))));
125
125
  }
126
126
  get el() {
@@ -83,7 +83,7 @@ const EdsAlert = class {
83
83
  }
84
84
  render() {
85
85
  return h("div", {
86
- key: '90eae6088fb792c671eca1d74d9a6e7d212c2c1c',
86
+ key: '5252aca583e87d8c3249c501e55368e340ef0d64',
87
87
  class: alertStyles({
88
88
  intent: this.intent,
89
89
  brd: this.brd,
@@ -92,7 +92,7 @@ const EdsAlert = class {
92
92
  }),
93
93
  role: "alert"
94
94
  }, h("p", {
95
- key: '201a9e6352350dbe9d4f1ab137a669f212519ea5',
95
+ key: 'bb23c94e802ec5e287a2b8619277e83de173b498',
96
96
  class: "f-ui-01 py-8",
97
97
  innerHTML: this.message
98
98
  }), this.withBtn && (this.pressableUrl ? h("eds-link", {