@ebrains/components 0.2.0-alpha.0 → 0.3.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.
Files changed (262) hide show
  1. package/dist/cjs/color-primary-palette_6.cjs.entry.js +14 -14
  2. package/dist/cjs/components.cjs.js +1 -1
  3. package/dist/cjs/correct-use-of-colors.cjs.entry.js +1 -1
  4. package/dist/cjs/eds-alert.cjs.entry.js +96 -0
  5. package/dist/cjs/eds-avatar_17.cjs.entry.js +1454 -0
  6. package/dist/cjs/eds-card-desc_3.cjs.entry.js +117 -0
  7. package/dist/cjs/eds-card-generic.cjs.entry.js +105 -0
  8. package/dist/cjs/eds-card-section.cjs.entry.js +17 -6
  9. package/dist/cjs/eds-components-section.cjs.entry.js +44 -24
  10. package/dist/cjs/eds-docs-palettes.cjs.entry.js +1 -1
  11. package/dist/cjs/eds-docs-tokens.cjs.entry.js +1 -1
  12. package/dist/cjs/eds-form.cjs.entry.js +322 -0
  13. package/dist/cjs/eds-input_7.cjs.entry.js +316 -0
  14. package/dist/cjs/eds-login.cjs.entry.js +1 -1
  15. package/dist/cjs/eds-logo-variations.cjs.entry.js +27 -0
  16. package/dist/cjs/{eds-pagination.cjs.entry.js → eds-pagination_2.cjs.entry.js} +157 -0
  17. package/dist/cjs/eds-progress-bar.cjs.entry.js +29 -0
  18. package/dist/cjs/eds-svg-repository.cjs.entry.js +7 -1
  19. package/dist/cjs/eds-tabs-content.cjs.entry.js +2 -2
  20. package/dist/cjs/eds-tabs.cjs.entry.js +26 -5
  21. package/dist/cjs/eds-timeline.cjs.entry.js +76 -0
  22. package/dist/cjs/eds-trl.cjs.entry.js +52 -0
  23. package/dist/cjs/incorrect-use-of-colors.cjs.entry.js +1 -1
  24. package/dist/cjs/index-f08e4f5c.js +38 -30
  25. package/dist/cjs/loader.cjs.js +1 -1
  26. package/dist/cjs/logo-space.cjs.entry.js +1 -1
  27. package/dist/cjs/logo-variations-horizontal_2.cjs.entry.js +36 -0
  28. package/dist/cjs/logo-wrong-usage.cjs.entry.js +2 -2
  29. package/dist/cjs/token-list_3.cjs.entry.js +3 -3
  30. package/dist/cjs/token-ratios.cjs.entry.js +1 -1
  31. package/dist/cjs/token-spacing.cjs.entry.js +1 -1
  32. package/dist/cjs/token-typography.cjs.entry.js +1 -1
  33. package/dist/collection/collection-manifest.json +1 -0
  34. package/dist/collection/components/eds-breadcrump/eds-breadcrump.js +13 -12
  35. package/dist/collection/components/eds-button/eds-button.js +3 -3
  36. package/dist/collection/components/eds-input-elements/eds-input-select/eds-input-select.js +140 -15
  37. package/dist/collection/components/eds-table/eds-table.css +4 -0
  38. package/dist/collection/components/eds-table/eds-table.js +69 -11
  39. package/dist/collection/components/eds-table/eds-table.stories.js +14 -93
  40. package/dist/collection/components/eds-timeline/eds-timeline.js +26 -16
  41. package/dist/collection/components/eds-trl/eds-trl.js +30 -22
  42. package/dist/collection/eds-docs-ui/colors/color-palette/primary.js +1 -1
  43. package/dist/collection/eds-docs-ui/colors/color-palette/secondary.js +1 -1
  44. package/dist/collection/eds-docs-ui/colors/color-palette/support.js +1 -1
  45. package/dist/collection/eds-docs-ui/colors/gradient-palette/primary.js +1 -1
  46. package/dist/collection/eds-docs-ui/colors/gradient-palette/secondary.js +7 -7
  47. package/dist/collection/eds-docs-ui/colors/gradient-palette/support.js +3 -3
  48. package/dist/collection/eds-docs-ui/colors/use-of-colors/correct-use-of-colors.js +1 -1
  49. package/dist/collection/eds-docs-ui/colors/use-of-colors/incorrect-use-of-colors.js +1 -5
  50. package/dist/collection/eds-docs-ui/design-tokens/token-list/token-list.js +1 -1
  51. package/dist/collection/eds-docs-ui/design-tokens/token-radii/token-radii.js +1 -1
  52. package/dist/collection/eds-docs-ui/design-tokens/token-ratios/token-ratios.js +1 -1
  53. package/dist/collection/eds-docs-ui/design-tokens/token-shadows/token-shadows.js +1 -1
  54. package/dist/collection/eds-docs-ui/design-tokens/token-spacing/token-spacing.js +1 -1
  55. package/dist/collection/eds-docs-ui/design-tokens/token-typography/token-typography.js +1 -1
  56. package/dist/collection/eds-docs-ui/eds-components-section/eds-components-section.js +3 -6
  57. package/dist/collection/eds-docs-ui/eds-docs-palettes/eds-docs-palettes.js +1 -1
  58. package/dist/collection/eds-docs-ui/eds-docs-tokens/eds-docs-tokens.js +1 -1
  59. package/dist/collection/eds-docs-ui/eds-logo-variations/eds-logo-variations.js +44 -0
  60. package/dist/collection/eds-docs-ui/eds-svg-repository/eds-svg-repository.js +7 -1
  61. package/dist/collection/eds-docs-ui/functional/angular.js +1 -1
  62. package/dist/collection/eds-docs-ui/functional/installation.js +1 -1
  63. package/dist/collection/eds-docs-ui/functional/overview.js +1 -1
  64. package/dist/collection/eds-docs-ui/functional/react.js +1 -1
  65. package/dist/collection/eds-docs-ui/functional/vue.js +1 -1
  66. package/dist/collection/eds-docs-ui/logo/logo-space/logo-space.js +1 -1
  67. package/dist/collection/eds-docs-ui/logo/logo-variations/horizontal/logo-variations-horizontal.css +21 -1
  68. package/dist/collection/eds-docs-ui/logo/logo-variations/horizontal/logo-variations-horizontal.js +2 -54
  69. package/dist/collection/eds-docs-ui/logo/logo-variations/vertical/logo-variations-vertical.js +4 -13
  70. package/dist/collection/eds-docs-ui/logo/logo-wrong-usage/logo-wrong-usage.css +4 -0
  71. package/dist/collection/eds-docs-ui/logo/logo-wrong-usage/logo-wrong-usage.js +1 -1
  72. package/dist/collection/shared-ui/eds-card-section/eds-card-section.js +19 -8
  73. package/dist/collection/shared-ui/eds-card-section/eds-card-section.stories.js +40 -7
  74. package/dist/collection/shared-ui/eds-footer/eds-footer.js +1 -1
  75. package/dist/collection/shared-ui/eds-fullscreen-menu/eds-fullscreen-menu.js +4 -3
  76. package/dist/collection/shared-ui/eds-fullscreen-menu/eds-fullscreen-menu.stories.js +77 -0
  77. package/dist/collection/shared-ui/eds-header/eds-header.js +9 -5
  78. package/dist/collection/shared-ui/eds-header/eds-header.stories.js +16 -10
  79. package/dist/collection/shared-ui/eds-login/eds-login.js +3 -2
  80. package/dist/collection/shared-ui/eds-social-networks/eds-social-networks.js +4 -4
  81. package/dist/collection/shared-ui/eds-social-networks/eds-social-networks.stories.js +21 -0
  82. package/dist/collection/shared-ui/eds-tabs/eds-tabs.js +29 -8
  83. package/dist/collection/shared-ui/eds-tabs/eds-tabs.stories.js +22 -4
  84. package/dist/collection/shared-ui/eds-tabs-content/eds-tabs-content.js +2 -2
  85. package/dist/collection/shared-ui/eds-toast-manager/eds-toast-manager.css +48 -34
  86. package/dist/collection/shared-ui/eds-toast-manager/eds-toast-manager.js +1 -1
  87. package/dist/collection/shared-ui/eds-user/eds-user.js +12 -6
  88. package/dist/collection/shared-ui/eds-user-modal/eds-user-modal.js +1 -11
  89. package/dist/components/components.css +17 -10
  90. package/dist/components/components.esm.js +1 -1
  91. package/dist/components/correct-use-of-colors.js +1 -1
  92. package/dist/components/eds-breadcrumb.js +13 -12
  93. package/dist/components/eds-button2.js +1 -1
  94. package/dist/components/eds-card-section.js +17 -6
  95. package/dist/components/eds-components-section.js +44 -24
  96. package/dist/components/eds-docs-palettes.js +1 -1
  97. package/dist/components/eds-docs-tokens.js +1 -1
  98. package/dist/components/eds-footer2.js +1 -1
  99. package/dist/components/eds-header.js +6 -2
  100. package/dist/components/eds-input-select2.js +70 -2
  101. package/dist/components/eds-login.js +3 -2
  102. package/dist/components/eds-logo-variations.d.ts +11 -0
  103. package/dist/components/eds-logo-variations.js +60 -0
  104. package/dist/components/eds-social-networks.js +2 -2
  105. package/dist/components/eds-social-networks2.js +6 -6
  106. package/dist/components/eds-svg-repository.js +7 -1
  107. package/dist/components/eds-table2.js +36 -14
  108. package/dist/components/eds-tabs-content.js +2 -2
  109. package/dist/components/eds-tabs.js +26 -5
  110. package/dist/components/eds-timeline.js +23 -10
  111. package/dist/components/eds-toast-manager.js +1 -1
  112. package/dist/components/eds-trl.js +95 -15
  113. package/dist/components/eds-user-modal2.js +1 -5
  114. package/dist/components/eds-user2.js +12 -6
  115. package/dist/components/incorrect-use-of-colors.js +20 -2
  116. package/dist/components/logo-space.js +1 -1
  117. package/dist/components/logo-variations-horizontal.js +2 -50
  118. package/dist/components/logo-variations-horizontal2.js +37 -0
  119. package/dist/components/logo-variations-vertical.js +2 -50
  120. package/dist/components/logo-variations-vertical2.js +42 -0
  121. package/dist/components/logo-wrong-usage.js +2 -2
  122. package/dist/components/p-005de86f.entry.js +1 -0
  123. package/dist/components/{p-5eb32f03.entry.js → p-0910d733.entry.js} +1 -1
  124. package/dist/components/{p-c9c3cc49.entry.js → p-22e6d7d5.entry.js} +1 -1
  125. package/dist/components/p-2851ff44.entry.js +1 -0
  126. package/dist/components/p-29648b47.entry.js +1 -0
  127. package/dist/components/{p-9722811d.entry.js → p-2e8459ef.entry.js} +1 -1
  128. package/dist/components/p-3617841d.entry.js +1 -0
  129. package/dist/components/p-3ff76976.entry.js +1 -0
  130. package/dist/components/{p-bb60412b.entry.js → p-435a14c1.entry.js} +1 -1
  131. package/dist/components/p-52ac3456.entry.js +1 -0
  132. package/dist/components/p-57c964c5.entry.js +1 -0
  133. package/dist/components/p-5a43503a.entry.js +1 -0
  134. package/dist/components/p-5afb626c.entry.js +1 -0
  135. package/dist/components/p-5d7af761.entry.js +1 -0
  136. package/dist/components/p-6378fb3e.entry.js +1 -0
  137. package/dist/components/p-7215789a.entry.js +1 -0
  138. package/dist/components/p-762c8c83.entry.js +1 -0
  139. package/dist/components/p-7802e966.entry.js +1 -0
  140. package/dist/components/p-84957b6d.entry.js +1 -0
  141. package/dist/components/{p-1bcfbaf1.entry.js → p-87830085.entry.js} +1 -1
  142. package/dist/components/p-ac0112d5.entry.js +1 -0
  143. package/dist/components/p-acb16e1c.entry.js +1 -0
  144. package/dist/components/p-ae5dbd41.entry.js +1 -0
  145. package/dist/components/p-be6c80da.entry.js +1 -0
  146. package/dist/components/p-d1f6a722.entry.js +1 -0
  147. package/dist/components/p-d53b7a75.entry.js +1 -0
  148. package/dist/components/{p-b717f95a.entry.js → p-d571d530.entry.js} +1 -1
  149. package/dist/components/p-d7a92efb.entry.js +1 -0
  150. package/dist/components/p-fd27e56c.entry.js +1 -0
  151. package/dist/components/primary.js +1 -1
  152. package/dist/components/primary2.js +1 -1
  153. package/dist/components/secondary.js +1 -1
  154. package/dist/components/secondary2.js +7 -7
  155. package/dist/components/support.js +1 -1
  156. package/dist/components/support2.js +3 -3
  157. package/dist/components/token-list2.js +1 -1
  158. package/dist/components/token-radii2.js +1 -1
  159. package/dist/components/token-ratios.js +1 -1
  160. package/dist/components/token-shadows2.js +1 -1
  161. package/dist/components/token-spacing.js +1 -1
  162. package/dist/components/token-typography.js +1 -1
  163. package/dist/esm/color-primary-palette_6.entry.js +14 -14
  164. package/dist/esm/components.js +1 -1
  165. package/dist/esm/correct-use-of-colors.entry.js +1 -1
  166. package/dist/esm/eds-alert.entry.js +92 -0
  167. package/dist/esm/eds-avatar_17.entry.js +1434 -0
  168. package/dist/esm/eds-card-desc_3.entry.js +111 -0
  169. package/dist/esm/eds-card-generic.entry.js +101 -0
  170. package/dist/esm/eds-card-section.entry.js +17 -6
  171. package/dist/esm/eds-components-section.entry.js +44 -24
  172. package/dist/esm/eds-docs-palettes.entry.js +1 -1
  173. package/dist/esm/eds-docs-tokens.entry.js +1 -1
  174. package/dist/esm/eds-form.entry.js +318 -0
  175. package/dist/esm/eds-input_7.entry.js +306 -0
  176. package/dist/esm/eds-login.entry.js +1 -1
  177. package/dist/esm/eds-logo-variations.entry.js +23 -0
  178. package/dist/esm/{eds-pagination.entry.js → eds-pagination_2.entry.js} +157 -1
  179. package/dist/esm/eds-progress-bar.entry.js +25 -0
  180. package/dist/esm/eds-svg-repository.entry.js +8 -2
  181. package/dist/esm/eds-tabs-content.entry.js +2 -2
  182. package/dist/esm/eds-tabs.entry.js +26 -5
  183. package/dist/esm/eds-timeline.entry.js +72 -0
  184. package/dist/esm/eds-trl.entry.js +48 -0
  185. package/dist/esm/incorrect-use-of-colors.entry.js +1 -1
  186. package/dist/esm/index-e96badea.js +38 -30
  187. package/dist/esm/loader.js +1 -1
  188. package/dist/esm/logo-space.entry.js +1 -1
  189. package/dist/esm/logo-variations-horizontal_2.entry.js +31 -0
  190. package/dist/esm/logo-wrong-usage.entry.js +2 -2
  191. package/dist/esm/token-list_3.entry.js +3 -3
  192. package/dist/esm/token-ratios.entry.js +1 -1
  193. package/dist/esm/token-spacing.entry.js +1 -1
  194. package/dist/esm/token-typography.entry.js +1 -1
  195. package/dist/hydrate/index.js +378 -178
  196. package/dist/hydrate/index.mjs +378 -178
  197. package/dist/types/components/eds-breadcrump/eds-breadcrump.d.ts +1 -5
  198. package/dist/types/components/eds-button/eds-button.d.ts +2 -2
  199. package/dist/types/components/eds-input-elements/eds-input-select/eds-input-select.d.ts +106 -3
  200. package/dist/types/components/eds-table/eds-table.d.ts +9 -1
  201. package/dist/types/components/eds-table/eds-table.stories.d.ts +6 -67
  202. package/dist/types/components/eds-timeline/eds-timeline.d.ts +9 -12
  203. package/dist/types/components/eds-trl/eds-trl.d.ts +4 -1
  204. package/dist/types/components.d.ts +217 -38
  205. package/dist/types/eds-docs-ui/colors/use-of-colors/incorrect-use-of-colors.d.ts +0 -4
  206. package/dist/types/eds-docs-ui/eds-logo-variations/eds-logo-variations.d.ts +9 -0
  207. package/dist/types/eds-docs-ui/eds-svg-repository/eds-svg-repository.d.ts +2 -0
  208. package/dist/types/eds-docs-ui/logo/logo-variations/horizontal/logo-variations-horizontal.d.ts +1 -7
  209. package/dist/types/eds-docs-ui/logo/logo-variations/vertical/logo-variations-vertical.d.ts +1 -1
  210. package/dist/types/shared-ui/eds-card-section/eds-card-section.d.ts +6 -1
  211. package/dist/types/shared-ui/eds-card-section/eds-card-section.stories.d.ts +20 -1
  212. package/dist/types/shared-ui/eds-fullscreen-menu/eds-fullscreen-menu.d.ts +8 -2
  213. package/dist/types/shared-ui/eds-fullscreen-menu/eds-fullscreen-menu.stories.d.ts +29 -0
  214. package/dist/types/shared-ui/eds-header/eds-header.d.ts +7 -1
  215. package/dist/types/shared-ui/eds-header/eds-header.stories.d.ts +9 -1
  216. package/dist/types/shared-ui/eds-social-networks/eds-social-networks.d.ts +1 -1
  217. package/dist/types/shared-ui/eds-social-networks/eds-social-networks.stories.d.ts +13 -0
  218. package/dist/types/shared-ui/eds-tabs/eds-tabs.d.ts +18 -1
  219. package/dist/types/shared-ui/eds-user/eds-user.d.ts +1 -2
  220. package/package.json +3 -3
  221. package/dist/cjs/eds-alert_28.cjs.entry.js +0 -2059
  222. package/dist/cjs/eds-block-break.cjs.entry.js +0 -21
  223. package/dist/cjs/eds-breadcrumb.cjs.entry.js +0 -153
  224. package/dist/cjs/eds-footer.cjs.entry.js +0 -50
  225. package/dist/cjs/eds-fullscreen-menu.cjs.entry.js +0 -100
  226. package/dist/cjs/eds-social-networks.cjs.entry.js +0 -66
  227. package/dist/cjs/eds-table.cjs.entry.js +0 -143
  228. package/dist/cjs/logo-variations-horizontal.cjs.entry.js +0 -31
  229. package/dist/cjs/logo-variations-vertical.cjs.entry.js +0 -31
  230. package/dist/collection/components/eds-trl/eds-trl.css +0 -0
  231. package/dist/collection/shared-ui/eds-user-modal/eds-user-modal.css +0 -0
  232. package/dist/components/p-04e47e04.entry.js +0 -1
  233. package/dist/components/p-0a3b2576.entry.js +0 -1
  234. package/dist/components/p-0c99ef81.entry.js +0 -1
  235. package/dist/components/p-272d249f.entry.js +0 -1
  236. package/dist/components/p-2d8508cd.entry.js +0 -1
  237. package/dist/components/p-3a2e8ef3.entry.js +0 -1
  238. package/dist/components/p-3afafa59.entry.js +0 -1
  239. package/dist/components/p-3b40559e.entry.js +0 -1
  240. package/dist/components/p-49958f77.entry.js +0 -1
  241. package/dist/components/p-551c0b58.entry.js +0 -1
  242. package/dist/components/p-559b6ec9.entry.js +0 -1
  243. package/dist/components/p-5ae9722b.entry.js +0 -1
  244. package/dist/components/p-9000b245.entry.js +0 -1
  245. package/dist/components/p-b14ef448.entry.js +0 -1
  246. package/dist/components/p-b203eb1b.entry.js +0 -1
  247. package/dist/components/p-b33941a0.entry.js +0 -1
  248. package/dist/components/p-bca40434.entry.js +0 -1
  249. package/dist/components/p-df93db96.entry.js +0 -1
  250. package/dist/components/p-ebed87b8.entry.js +0 -1
  251. package/dist/components/p-ff5de62c.entry.js +0 -1
  252. package/dist/components/p-ffec8755.entry.js +0 -1
  253. package/dist/esm/eds-alert_28.entry.js +0 -2028
  254. package/dist/esm/eds-block-break.entry.js +0 -17
  255. package/dist/esm/eds-breadcrumb.entry.js +0 -149
  256. package/dist/esm/eds-footer.entry.js +0 -46
  257. package/dist/esm/eds-fullscreen-menu.entry.js +0 -96
  258. package/dist/esm/eds-social-networks.entry.js +0 -62
  259. package/dist/esm/eds-table.entry.js +0 -139
  260. package/dist/esm/logo-variations-horizontal.entry.js +0 -27
  261. package/dist/esm/logo-variations-vertical.entry.js +0 -27
  262. /package/dist/collection/shared-ui/eds-social-networks/{eds-social-network.css → eds-social-networks.css} +0 -0
@@ -1,9 +1,31 @@
1
1
  import { h } from "@stencil/core";
2
+ import { toast } from "../../../utils/toastManager";
2
3
  /**
3
- * @internal
4
+ * A custom select input component that supports both static and dynamic options.
5
+ *
6
+ * Options can be provided in two formats:
7
+ * 1. Dynamic fetch configuration:
8
+ * [
9
+ * { endpoint: "http://localhost/api/applications", value: "_id", label: "title" }
10
+ * ]
11
+ * 2. Static options:
12
+ * [
13
+ * { value: "react", label: "React" },
14
+ * { value: "angular", label: "Angular" },
15
+ * { value: "vue", label: "Vue.js" },
16
+ * // etc.
17
+ * ]
18
+ *
19
+ * The component will automatically fetch data if a dynamic configuration is provided.
4
20
  */
5
21
  export class EdsInputSelect {
6
22
  constructor() {
23
+ /**
24
+ * Event handler for the select input's change event.
25
+ * Emits the selected value.
26
+ *
27
+ * @param event The change event from the select input.
28
+ */
7
29
  this.handleChange = (event) => {
8
30
  const target = event.target;
9
31
  this.changeEvent.emit(target.value);
@@ -16,10 +38,60 @@ export class EdsInputSelect {
16
38
  this.error = false;
17
39
  this.required = false;
18
40
  this.options = [];
41
+ this.labelKey = 'label';
42
+ this.valueKey = 'value';
19
43
  this.value = undefined;
44
+ this.dynamicOptions = [];
45
+ this.loading = false;
46
+ this.dynamicValueKey = 'value';
47
+ this.dynamicLabelKey = 'label';
48
+ }
49
+ componentWillLoad() {
50
+ this.loadOptions();
51
+ }
52
+ /**
53
+ * Watches for changes in the `options` prop and loads the options accordingly.
54
+ *
55
+ * If the first object in the options array contains an "endpoint" key,
56
+ * the component will fetch options from the specified endpoint using the configured keys.
57
+ * Otherwise, it will treat the options as static.
58
+ *
59
+ * @async
60
+ */
61
+ async loadOptions() {
62
+ // If the first option contains an "endpoint" key, assume dynamic fetch mode.
63
+ if (this.options && this.options.length > 0 && this.options[0].endpoint) {
64
+ const config = this.options[0];
65
+ const endpoint = config.endpoint;
66
+ this.dynamicValueKey = config.value || 'value';
67
+ this.dynamicLabelKey = config.label || 'label';
68
+ this.loading = true;
69
+ try {
70
+ const response = await fetch(endpoint);
71
+ if (!response.ok) {
72
+ toast.show(`<eds-input-select> HTTP error! Status: ${response.status}`, 'error');
73
+ }
74
+ const data = await response.json();
75
+ // Assume the API returns an array of objects.
76
+ this.dynamicOptions = data;
77
+ }
78
+ catch (error) {
79
+ //console.error('Error fetching dynamic options:', error);
80
+ toast.show(`<eds-input-select> Error fetching dynamic options ${error}`, 'error');
81
+ }
82
+ finally {
83
+ this.loading = false;
84
+ }
85
+ }
86
+ else {
87
+ // No dynamic configuration found, assume static options.
88
+ this.dynamicOptions = this.options;
89
+ this.dynamicValueKey = this.valueKey;
90
+ this.dynamicLabelKey = this.labelKey;
91
+ }
20
92
  }
21
93
  render() {
22
- return (h("div", { key: '9aaa3bf4491078f5b5df6f5f0d3d5f3739f25716', class: "relative" }, h("select", { key: '5f860de772d8d92eb36648bdaaca0c93146e8a68', id: this.inputId || this.name, name: this.name, class: `input invalid:text-lightest pr-32 ${this.error ? 'input-error' : ''}`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": this.hasMessage || this.error ? `${this.name}-error` : '', disabled: this.disabled, required: this.required, onChange: this.handleChange }, h("option", { key: '2d1e8fa6c5583e0580cbd92d731b731cdd7ecca8', value: "", disabled: true, hidden: true }, "Please select ", this.name), this.options.map((option, index) => (h("option", { key: index, value: option.value }, option.label)))), h("span", { key: 'f62edaae154ce443c964849689b5dc92d9303958', class: `bg-dark rounded-xs absolute top-1/2 right-[6px] flex h-28 w-28 -translate-y-1/2 items-center justify-center ${this.disabled ? 'text-lightest bg-transparent' : ''}` }, h("eds-icon-wrapper", { key: '07d186b6e0a6742a4f6ce39dd275ff1a6f905927', class: "w-20 h-20", icon: "chevron-right" }))));
94
+ return (h("div", { key: '0b45eaae992171cd9795f7bf01883b0f3efbcc13', class: "relative" }, h("select", { key: '0ee8bccb24f7bd65e9347c0b79905154db39dca7', id: this.inputId || this.name, name: this.name, class: `input invalid:text-lightest pr-32 ${this.error ? 'input-error' : ''}`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": this.hasMessage || this.error ? `${this.name}-error` : '', disabled: this.disabled || this.loading, required: this.required, onChange: this.handleChange }, h("option", { key: 'b1b53dcf8dd3155e8dba28327f05b4725a013435', value: "", disabled: true, hidden: true }, this.loading ? 'Loading options...' : `Please select ${this.name}`), this.dynamicOptions.map((option, index) => (h("option", { key: index, value: option[this.dynamicValueKey] }, option[this.dynamicLabelKey])))), h("span", { key: '3f652e7ed7570b602565af3f0e3c5c91506e4089', class: `bg-dark rounded-xs absolute top-1/2 right-[6px] flex h-28 w-28 -translate-y-1/2 items-center justify-center ${this.disabled || this.loading ? 'text-lightest bg-transparent' : ''}` }, h("eds-icon-wrapper", { key: '2237727060af6286c346f749d2e8e3f7f86c7c70', class: "w-20 h-20", icon: "chevron-right" }))));
23
95
  }
24
96
  static get is() { return "eds-input-select"; }
25
97
  static get properties() {
@@ -36,7 +108,7 @@ export class EdsInputSelect {
36
108
  "optional": true,
37
109
  "docs": {
38
110
  "tags": [],
39
- "text": ""
111
+ "text": "Optional id for the input. If not provided, the component uses the `name` property."
40
112
  },
41
113
  "attribute": "input-id",
42
114
  "reflect": false
@@ -53,7 +125,7 @@ export class EdsInputSelect {
53
125
  "optional": false,
54
126
  "docs": {
55
127
  "tags": [],
56
- "text": ""
128
+ "text": "The name attribute of the select input. Also used as the fallback id."
57
129
  },
58
130
  "attribute": "name",
59
131
  "reflect": false
@@ -70,7 +142,7 @@ export class EdsInputSelect {
70
142
  "optional": true,
71
143
  "docs": {
72
144
  "tags": [],
73
- "text": ""
145
+ "text": "Placeholder text (not used in the native select, but can be used for custom implementations)."
74
146
  },
75
147
  "attribute": "placeholder",
76
148
  "reflect": false
@@ -87,7 +159,7 @@ export class EdsInputSelect {
87
159
  "optional": false,
88
160
  "docs": {
89
161
  "tags": [],
90
- "text": ""
162
+ "text": "If true, the select input will be disabled."
91
163
  },
92
164
  "attribute": "disabled",
93
165
  "reflect": false,
@@ -105,7 +177,7 @@ export class EdsInputSelect {
105
177
  "optional": false,
106
178
  "docs": {
107
179
  "tags": [],
108
- "text": ""
180
+ "text": "If true, indicates that there is an associated message (help or error)."
109
181
  },
110
182
  "attribute": "has-message",
111
183
  "reflect": false,
@@ -123,7 +195,7 @@ export class EdsInputSelect {
123
195
  "optional": false,
124
196
  "docs": {
125
197
  "tags": [],
126
- "text": ""
198
+ "text": "If true, the select input is in an error state."
127
199
  },
128
200
  "attribute": "error",
129
201
  "reflect": false,
@@ -141,7 +213,7 @@ export class EdsInputSelect {
141
213
  "optional": false,
142
214
  "docs": {
143
215
  "tags": [],
144
- "text": ""
216
+ "text": "If true, the select input is marked as required."
145
217
  },
146
218
  "attribute": "required",
147
219
  "reflect": false,
@@ -151,18 +223,54 @@ export class EdsInputSelect {
151
223
  "type": "unknown",
152
224
  "mutable": false,
153
225
  "complexType": {
154
- "original": "{ label: string; value: string }[]",
155
- "resolved": "{ label: string; value: string; }[]",
226
+ "original": "{ [key: string]: any }[]",
227
+ "resolved": "{ [key: string]: any; }[]",
156
228
  "references": {}
157
229
  },
158
230
  "required": false,
159
231
  "optional": false,
160
232
  "docs": {
161
233
  "tags": [],
162
- "text": ""
234
+ "text": "Options can be provided in two formats:\n\n1. Dynamic fetch configuration:\n [\n { endpoint: \"http://localhost/api/applications\", value: \"_id\", label: \"title\" }\n ]\n\n2. Static options:\n [\n { value: \"react\", label: \"React\" },\n { value: \"angular\", label: \"Angular\" },\n { value: \"vue\", label: \"Vue.js\" },\n // etc.\n ]"
163
235
  },
164
236
  "defaultValue": "[]"
165
237
  },
238
+ "labelKey": {
239
+ "type": "string",
240
+ "mutable": false,
241
+ "complexType": {
242
+ "original": "string",
243
+ "resolved": "string",
244
+ "references": {}
245
+ },
246
+ "required": false,
247
+ "optional": false,
248
+ "docs": {
249
+ "tags": [],
250
+ "text": "For static options, this property defines the key used to retrieve the display label."
251
+ },
252
+ "attribute": "label-key",
253
+ "reflect": false,
254
+ "defaultValue": "'label'"
255
+ },
256
+ "valueKey": {
257
+ "type": "string",
258
+ "mutable": false,
259
+ "complexType": {
260
+ "original": "string",
261
+ "resolved": "string",
262
+ "references": {}
263
+ },
264
+ "required": false,
265
+ "optional": false,
266
+ "docs": {
267
+ "tags": [],
268
+ "text": "For static options, this property defines the key used to retrieve the option value."
269
+ },
270
+ "attribute": "value-key",
271
+ "reflect": false,
272
+ "defaultValue": "'value'"
273
+ },
166
274
  "value": {
167
275
  "type": "any",
168
276
  "mutable": false,
@@ -175,13 +283,21 @@ export class EdsInputSelect {
175
283
  "optional": true,
176
284
  "docs": {
177
285
  "tags": [],
178
- "text": ""
286
+ "text": "The currently selected value."
179
287
  },
180
288
  "attribute": "value",
181
289
  "reflect": false
182
290
  }
183
291
  };
184
292
  }
293
+ static get states() {
294
+ return {
295
+ "dynamicOptions": {},
296
+ "loading": {},
297
+ "dynamicValueKey": {},
298
+ "dynamicLabelKey": {}
299
+ };
300
+ }
185
301
  static get events() {
186
302
  return [{
187
303
  "method": "changeEvent",
@@ -190,8 +306,11 @@ export class EdsInputSelect {
190
306
  "cancelable": true,
191
307
  "composed": true,
192
308
  "docs": {
193
- "tags": [],
194
- "text": ""
309
+ "tags": [{
310
+ "name": "event",
311
+ "text": "changeEvent"
312
+ }],
313
+ "text": "Emitted when the value of the select input changes."
195
314
  },
196
315
  "complexType": {
197
316
  "original": "string | number",
@@ -200,4 +319,10 @@ export class EdsInputSelect {
200
319
  }
201
320
  }];
202
321
  }
322
+ static get watchers() {
323
+ return [{
324
+ "propName": "options",
325
+ "methodName": "loadOptions"
326
+ }];
327
+ }
203
328
  }
@@ -135,4 +135,8 @@ table {
135
135
 
136
136
  .text-center {
137
137
  text-align: center;
138
+ }
139
+
140
+ .break-words {
141
+ overflow-wrap: anywhere;
138
142
  }
@@ -12,13 +12,14 @@ import { h } from "@stencil/core";
12
12
  */
13
13
  export class EdsTable {
14
14
  constructor() {
15
- this.minWidth = 400; // Minimum width for components in px
16
15
  this.data = null;
17
16
  this.endpoint = null;
18
17
  this.config = {};
19
18
  this.rowsPerPage = 10;
20
19
  this.paginationEnabled = true;
21
20
  this.searchEnabled = false;
21
+ this.hostWidth = undefined;
22
+ this.columnSize = 'default';
22
23
  this.tableData = [];
23
24
  this.columns = [];
24
25
  this.currentPage = 1;
@@ -116,23 +117,42 @@ export class EdsTable {
116
117
  getVisibleColumnsCount() {
117
118
  return this.columns.filter((column) => { var _a; return !((_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.hidden); }).length;
118
119
  }
120
+ divisionFactor() {
121
+ let divisionFactor = 1;
122
+ if (this.columnSize === 'medium') {
123
+ divisionFactor = 2;
124
+ }
125
+ else if (this.columnSize === 'large') {
126
+ divisionFactor = 4;
127
+ }
128
+ return divisionFactor;
129
+ }
119
130
  render() {
131
+ // Get the paginated rows and calculate the last page.
120
132
  const paginatedRows = this.getPaginatedRows();
121
133
  const lastPage = Math.ceil(this.totalRows / this.rowsPerPage);
122
- // Calculate column width based on minWidth and number of columns
123
- //const columnWidth = Math.max(this.minWidth / this.columns.length, 100);
124
- // Use the visible column count to calculate the column width
134
+ // Determine the number of visible columns (i.e., those not hidden via config)
125
135
  const visibleColumnsCount = this.getVisibleColumnsCount();
126
- const columnWidth = visibleColumnsCount > 0 ? Math.max(this.minWidth / visibleColumnsCount, 100) : 100;
127
- return (h("div", { key: 'c5e50673eb1ed5cf00e0294885bf9cd6d13f9366', class: "container", style: { minWidth: `${this.minWidth}px` } }, h("div", { key: '0e0814a8cb5ae1e11538a26cba630e59d39dde74' }, this.searchEnabled && (h("eds-input-field", { key: 1, name: "search", "aria-label": "Search", type: "text", placeholder: "Search...",
136
+ /// Calculate container width based on the optional prop or parent's measured width.
137
+ const containerWidth = this.hostWidth && this.hostWidth.trim() !== ''
138
+ ? Number(this.hostWidth)
139
+ : this.hostEl.parentElement instanceof HTMLElement
140
+ ? this.hostEl.parentElement.getBoundingClientRect().width
141
+ : this.hostEl.getRootNode().host instanceof HTMLElement
142
+ ? this.hostEl.getRootNode().host.getBoundingClientRect().width
143
+ : 400;
144
+ //console.log('containerWidth:', containerWidth);
145
+ const columnWidth = visibleColumnsCount > 0 ? Math.floor((containerWidth / visibleColumnsCount) * this.divisionFactor()) : 100;
146
+ console.log('columnWidth:', columnWidth);
147
+ return (h("div", { key: '178a33c07e6eae9d5edc170f842b6ef29ae21d9c' }, this.searchEnabled && (h("div", { key: 'f1212a4e515a1db218df28b71367c6ffa42e3063' }, h("eds-input-field", { key: 1, name: "search", "aria-label": "Search", type: "text", placeholder: "Search...",
128
148
  // @ts-ignore
129
- onInput: (event) => this.handleSearch(event) }))), h("div", { key: '65e0c9057c313f220655ecd7692a83c932f441b3', class: "mt-20" }, h("table", { key: '9e77153c2e0983f7598a21ef55ebcf3107655e09', class: "block overflow-x-auto mt-6 p-0" }, h("thead", { key: '38e5ac67ffae80d896c29357615d19b5dfcc52d3' }, h("tr", { key: '526c5b30da0a2aa97bb90f5b473b3e9ea41dde6b', class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((column) => {
149
+ onInput: (event) => this.handleSearch(event) }))), h("div", { key: 'da6ac91e4b4d56780b044a3d35088e7722efe143', class: "mt-20" }, h("table", { key: '3c5734d2370b31d2445ed4f043a80bf87c6d4bde', class: "block overflow-x-auto mt-6 p-0" }, h("thead", { key: '3803a39b4c987ff39bf22e2567bd1bc3d513e1f4' }, h("tr", { key: 'a67fa7bdd48549c69cfa9721083a908ab036a559', class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((column) => {
130
150
  var _a;
131
- return !((_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.hidden) && (h("th", { class: "m-0 px-20 py-8 border border-softer f-ui-02", style: { minWidth: `${columnWidth}px` } }, column));
132
- }))), h("tbody", { key: '5a10525ed86eac82291746be4c6cce5f65942d2d' }, paginatedRows.map((row) => (h("tr", { class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((column) => {
151
+ return !((_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.hidden) && (h("th", { class: "m-0 py-8 border border-softer f-ui-02 break-words", style: { minWidth: `${columnWidth}px` } }, column));
152
+ }))), h("tbody", { key: '8e3f21bf2ee5b1bd84cfa93411ca2671f43ced45' }, paginatedRows.map((row) => (h("tr", { class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((column) => {
133
153
  var _a;
134
- return !((_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.hidden) && (h("td", { class: "text-center border border-softer m-0 px-20 py-8 f-ui-2", style: { minWidth: `${columnWidth}px` } }, this.renderCell(row[column], column)));
135
- }))))))), h("div", { key: 'af1183fd3e635c7d7ac982231adfdd9d892f6979', class: "mt-20" }, this.shouldEnablePagination() && (h("eds-pagination", { key: 'a5de7f25054c2d67f0788bfd2bc37d07f46de02c', currentPage: this.currentPage, lastPage: lastPage, perPage: this.rowsPerPage, total: this.totalRows, mode: "default" })))));
154
+ return !((_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.hidden) && (h("td", { class: "text-center border border-softer m-0 py-8 f-ui-2 break-words", style: { minWidth: `${columnWidth}px` } }, this.renderCell(row[column], column)));
155
+ }))))))), this.shouldEnablePagination() && (h("div", { key: '24931f257ef9ced394c1b5b1e589cacedd8035e6', class: "mt-20" }, h("eds-pagination", { key: '996b26ae090ee4fe08cc821fb11362d94879ff72', currentPage: this.currentPage, lastPage: lastPage, perPage: this.rowsPerPage, total: this.totalRows, mode: "default" })))));
136
156
  }
137
157
  static get is() { return "eds-table"; }
138
158
  static get encapsulation() { return "shadow"; }
@@ -255,6 +275,41 @@ export class EdsTable {
255
275
  "attribute": "search-enabled",
256
276
  "reflect": false,
257
277
  "defaultValue": "false"
278
+ },
279
+ "hostWidth": {
280
+ "type": "string",
281
+ "mutable": false,
282
+ "complexType": {
283
+ "original": "string",
284
+ "resolved": "string",
285
+ "references": {}
286
+ },
287
+ "required": false,
288
+ "optional": true,
289
+ "docs": {
290
+ "tags": [],
291
+ "text": ""
292
+ },
293
+ "attribute": "host-width",
294
+ "reflect": false
295
+ },
296
+ "columnSize": {
297
+ "type": "string",
298
+ "mutable": false,
299
+ "complexType": {
300
+ "original": "'default' | 'medium' | 'large'",
301
+ "resolved": "\"default\" | \"large\" | \"medium\"",
302
+ "references": {}
303
+ },
304
+ "required": false,
305
+ "optional": true,
306
+ "docs": {
307
+ "tags": [],
308
+ "text": "Optional property to control the column sizing mode.\n- 'default' uses containerWidth / visibleColumns.\n- 'medium' divides that result by 2.\n- 'large' divides that result by 4."
309
+ },
310
+ "attribute": "column-size",
311
+ "reflect": false,
312
+ "defaultValue": "'default'"
258
313
  }
259
314
  };
260
315
  }
@@ -276,6 +331,9 @@ export class EdsTable {
276
331
  }, {
277
332
  "propName": "config",
278
333
  "methodName": "handleConfigChange"
334
+ }, {
335
+ "propName": "data",
336
+ "methodName": "parseData"
279
337
  }];
280
338
  }
281
339
  }
@@ -43,57 +43,6 @@ export default {
43
43
  searchEnabled: true
44
44
  }
45
45
  };
46
- export const Default = {
47
- render: (args) => `
48
- <eds-table
49
- data='${JSON.stringify(args.data)}'
50
- config='${JSON.stringify(args.config)}'>
51
- </eds-table>`
52
- };
53
- export const WithHiddenColumn = {
54
- render: (args) => `
55
- <eds-table
56
- data='${JSON.stringify(args.data)}'
57
- config='${JSON.stringify(args.config)}'>
58
- </eds-table>`,
59
- args: {
60
- data: [
61
- { Property: 'username', Type: 'string', Required: 'Yes' },
62
- { Property: 'password', Type: 'string', Required: 'Yes' },
63
- { Property: 'email', Type: 'string', Required: 'No' }
64
- ],
65
- config: {
66
- Required: { hidden: true }
67
- }
68
- }
69
- };
70
- export const WithEndpoint = {
71
- render: (args) => `
72
- <eds-table
73
- endpoint="${args.endpoint}">
74
- </eds-table>`,
75
- args: {
76
- endpoint: 'http://127.0.0.1:5000/api/info'
77
- }
78
- };
79
- export const WithCustomFormats = {
80
- render: (args) => `
81
- <eds-table
82
- data='${JSON.stringify(args.data)}'
83
- config='${JSON.stringify(args.config)}'>
84
- </eds-table>`,
85
- args: {
86
- data: [
87
- { Property: 'username', Type: 'string', Role: 'User' },
88
- { Property: 'password', Type: 'password', Role: 'Admin' }
89
- ],
90
- config: {
91
- Property: { format: 'code' },
92
- Type: { format: 'uppercase' },
93
- Role: { format: 'bold' }
94
- }
95
- }
96
- };
97
46
  // Sample data for the table
98
47
  const sampleData = [
99
48
  { name: 'Alice', age: 25, occupation: 'Engineer' },
@@ -107,48 +56,7 @@ const sampleData = [
107
56
  { name: 'Ian', age: 27, occupation: 'Developer' },
108
57
  { name: 'Jackie', age: 33, occupation: 'Consultant' }
109
58
  ];
110
- const tableData = JSON.stringify(sampleData);
111
- export const BasicPagination = {
112
- render: (args) => `
113
- <eds-table
114
- data=${tableData}
115
- rows-per-page="${args.rowsPerPage}"
116
- pagination-enabled="${args.paginationEnabled}"
117
- ></eds-table>
118
- `,
119
- args: {
120
- rowsPerPage: 5,
121
- paginationEnabled: true
122
- }
123
- };
124
- export const CustomRowsPerPage = {
125
- render: (args) => `
126
- <eds-table
127
- data=${tableData}
128
- rows-per-page="${args.rowsPerPage}"
129
- pagination-enabled="${args.paginationEnabled}"
130
- ></eds-table>
131
- `,
132
- args: {
133
- rowsPerPage: 3,
134
- paginationEnabled: true
135
- }
136
- };
137
- export const CustomRowsPerPageEndpoint = {
138
- render: (args) => `
139
- <eds-table
140
- rows-per-page="${args.rowsPerPage}"
141
- pagination-enabled="${args.paginationEnabled}"
142
- endpoint="${args.endpoint}"
143
- ></eds-table>
144
- `,
145
- args: {
146
- rowsPerPage: 3,
147
- paginationEnabled: true,
148
- endpoint: 'http://127.0.0.1:5000/api/info'
149
- }
150
- };
151
- export const CompleteExample = {
59
+ export const Default = {
152
60
  render: (args) => `
153
61
  <eds-table
154
62
  data='${JSON.stringify(args.data)}'
@@ -171,3 +79,16 @@ export const CompleteExample = {
171
79
  endpoint: '' // Leave empty for manual data entry
172
80
  }
173
81
  };
82
+ export const WithEndpoint = {
83
+ render: (args) => `
84
+ <eds-table
85
+ endpoint="${args.endpoint}"
86
+ rows-per-page="${args.rowsPerPage}"
87
+ pagination-enabled="${args.paginationEnabled}"
88
+ search-enabled="${args.searchEnabled}"
89
+ host-width="600">
90
+ </eds-table>`,
91
+ args: {
92
+ endpoint: 'http://127.0.0.1:5001/api/info'
93
+ }
94
+ };
@@ -1,24 +1,34 @@
1
1
  import { h } from "@stencil/core";
2
- /**
3
- * @internal
4
- */
5
2
  export class EdsTimeline {
6
3
  constructor() {
4
+ this.events = undefined;
7
5
  this.selectedEvent = null;
8
6
  this.parsedEvents = [];
9
- this.events = undefined;
10
7
  }
11
8
  parseEvents(newValue) {
12
- try {
13
- const parsed = JSON.parse(newValue);
14
- this.parsedEvents = Array.isArray(parsed)
15
- ? parsed.map((event) => (Object.assign(Object.assign({}, event), { completed: event.completed === 'true' || event.completed === true // Ensure boolean conversion
16
- })))
17
- : [];
9
+ let parsed;
10
+ // If events is a string, try to parse it
11
+ if (typeof newValue === 'string') {
12
+ try {
13
+ parsed = JSON.parse(newValue);
14
+ }
15
+ catch (e) {
16
+ console.error('Error parsing events JSON', e);
17
+ parsed = [];
18
+ }
19
+ }
20
+ // If events is already an array, use it directly
21
+ else if (Array.isArray(newValue)) {
22
+ parsed = newValue;
18
23
  }
19
- catch (e) {
20
- this.parsedEvents = [];
24
+ // Otherwise, default to an empty array
25
+ else {
26
+ parsed = [];
21
27
  }
28
+ // Map over the parsed events to ensure boolean conversion for "completed"
29
+ this.parsedEvents = Array.isArray(parsed)
30
+ ? parsed.map((event) => (Object.assign(Object.assign({}, event), { completed: event.completed === 'true' || event.completed === true })))
31
+ : [];
22
32
  }
23
33
  componentWillLoad() {
24
34
  this.parseEvents(this.events);
@@ -45,7 +55,7 @@ export class EdsTimeline {
45
55
  }
46
56
  }
47
57
  render() {
48
- return (h("div", { key: '8f40212e04ab17cac2688df56b7330041a605a86', class: "max-w-sidebar mx-auto px-4 py-8" }, h("div", { key: '68421d4fce08e881e2494b5c504bd5db7570e34f', class: "relative" }, h("div", { key: 'e43edd7fba6d30b3dd48ffb2b467ff24b46c8da7', class: "absolute w-4 left-1/2 transform -translate-x-1/2 bg-strong h-full z-0" }), h("div", { key: '56dd7cebb5a2761547a5e24ec76652f7052906b2', class: "space-y-16" }, this.parsedEvents.map((event, index) => (h("div", { class: "relative flex" }, h("div", { class: `w-1/2 ${index % 2 === 0 ? 'pr-4' : ''}` }, index % 2 === 0 && (h("eds-card-generic", { cardTitle: event.title, url: "#", description: event.description, "heading-level": "h2", tiny: true, bg: !event.completed, "with-hover": "false", tags: JSON.stringify(event.completed
58
+ return (h("div", { key: '29e360adb412c67e7516f04671c276a12197d830', class: "max-w-sidebar mx-auto px-4 py-8" }, h("div", { key: 'c556578a505bfb2da435616cb1f39cb91859ec7e', class: "relative" }, h("div", { key: '8e1d307b2b3b470c643ba992d8307457581e9d4f', class: "absolute w-4 left-1/2 transform -translate-x-1/2 bg-strong h-full z-0" }), h("div", { key: '7b40b6a8944aad01d01524e13056fbafeaa8a8a8', class: "space-y-16" }, this.parsedEvents.map((event, index) => (h("div", { class: "relative flex" }, h("div", { class: `w-1/2 ${index % 2 === 0 ? 'pr-4' : ''}` }, index % 2 === 0 && (h("eds-card-generic", { cardTitle: event.title, url: "#", description: event.description, "heading-level": "h2", tiny: true, bg: !event.completed, "with-hover": "false", tags: JSON.stringify(event.completed
49
59
  ? [{ label: 'completed', style: 'accent' }]
50
60
  : [{ label: 'pending', style: 'default' }]), onClick: () => this.handleEventClick(event) }))), h("div", { class: "flex items-center justify-center relative" }, event.completed ? (h("div", { class: "w-32 h-32 bg-accent rounded-full shadow flex items-center justify-center" })) : (h("div", { class: "w-32 h-32 bg-strong rounded-full shadow flex items-center justify-center" }))), h("div", { class: `w-1/2 ${index % 2 !== 0 ? 'pl-4' : ''}` }, index % 2 !== 0 && (h("eds-card-generic", { cardTitle: event.title, url: "#", description: event.description, "heading-level": "h2", tiny: true, bg: !event.completed, "with-hover": "false", tags: JSON.stringify(event.completed
51
61
  ? [{ label: 'completed', style: 'accent' }]
@@ -58,15 +68,15 @@ export class EdsTimeline {
58
68
  "type": "string",
59
69
  "mutable": false,
60
70
  "complexType": {
61
- "original": "string",
62
- "resolved": "string",
71
+ "original": "string | any[]",
72
+ "resolved": "any[] | string",
63
73
  "references": {}
64
74
  },
65
75
  "required": false,
66
76
  "optional": false,
67
77
  "docs": {
68
78
  "tags": [],
69
- "text": "Accepts a JSON string of timeline events."
79
+ "text": "Accepts a JSON string or object of timeline events."
70
80
  },
71
81
  "attribute": "events",
72
82
  "reflect": false