@ebrains/vue 0.9.2-beta → 1.0.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 (248) hide show
  1. package/README.md +4 -4
  2. package/analytics-d99780e3-Bay18Oil.mjs +28 -0
  3. package/analytics-d99780e3-DgvAss6l.js +1 -0
  4. package/arrow-diagonal-black-8f0494c3-CYl9yYTl.mjs +4 -0
  5. package/arrow-diagonal-black-8f0494c3-DqsB6ni-.js +1 -0
  6. package/arrow-right-9322ba8a-DBcxNU_p.js +3 -0
  7. package/arrow-right-9322ba8a-DHq-_PPe.mjs +6 -0
  8. package/bluesky-cc5edd2d-DaFQc-pr.js +12 -0
  9. package/bluesky-cc5edd2d-DfuDDO5h.mjs +15 -0
  10. package/bookmark-c200037c-CIcZ51ZQ.js +14 -0
  11. package/bookmark-c200037c-ClkCtyRY.mjs +17 -0
  12. package/chevron-down-6144c823-DWGlv9eV.mjs +13 -0
  13. package/chevron-down-6144c823-D_8976Ke.js +10 -0
  14. package/chevron-left-ca6c66e1-DANhLw_T.mjs +12 -0
  15. package/chevron-left-ca6c66e1-uCH5SUhm.js +9 -0
  16. package/chevron-right-b88ed2d4-C7dkTMvP.js +3 -0
  17. package/chevron-right-b88ed2d4-CgEZBvy7.mjs +6 -0
  18. package/chevron-up-c66bd477-ByW7R48t.js +10 -0
  19. package/chevron-up-c66bd477-CETJkshq.mjs +13 -0
  20. package/close-87fc0d63-Cbd-ScJr.js +3 -0
  21. package/close-87fc0d63-DtDU2HIU.mjs +6 -0
  22. package/color-primary-palette_6.entry-CfNmHzNO.mjs +300 -0
  23. package/color-primary-palette_6.entry-c48Fqrz0.js +1 -0
  24. package/components-section.entry-3yJF6nRH.js +162 -0
  25. package/components-section.entry-oQTYayXm.mjs +360 -0
  26. package/copy-03b72cb6-B_WCNQrG.mjs +6 -0
  27. package/copy-03b72cb6-CZAFAegx.js +3 -0
  28. package/correct-use-of-colors.entry-7fOSokhJ.mjs +59 -0
  29. package/correct-use-of-colors.entry-DEdyB_h5.js +1 -0
  30. package/docs-palettes.entry-6ekOz4GT.js +1 -0
  31. package/docs-palettes.entry-Bz96UO-K.mjs +22 -0
  32. package/docs-tokens.entry-D-hRYpqk.mjs +30 -0
  33. package/docs-tokens.entry-DjHB8v2C.js +1 -0
  34. package/eds-accordion.entry-Czj2ZwpQ.js +4 -0
  35. package/eds-accordion.entry-D1L8fv2r.mjs +48 -0
  36. package/eds-alert.entry-BqEeR0Xw.js +165 -0
  37. package/eds-alert.entry-DAeVRXua.mjs +251 -0
  38. package/eds-app-root.entry-BBbgNK8b.mjs +25 -0
  39. package/eds-app-root.entry-BrJeEAVb.js +1 -0
  40. package/eds-avatar_34.entry-1U84FvGQ.mjs +12120 -0
  41. package/eds-avatar_34.entry-iuvkwQW_.js +10209 -0
  42. package/eds-card-project.entry-Cd7tP9g4.mjs +170 -0
  43. package/eds-card-project.entry-CewRPvW7.js +1 -0
  44. package/eds-card-section.entry-BU4fC9y5.js +1 -0
  45. package/eds-card-section.entry-CQLG4D0D.mjs +30 -0
  46. package/eds-card-tags.entry-BKuk3O8k.mjs +13 -0
  47. package/eds-card-tags.entry-DOV6K1FD.js +1 -0
  48. package/eds-card-tool.entry-DpfInwr3.mjs +56 -0
  49. package/eds-card-tool.entry-LSjtu5k_.js +1 -0
  50. package/eds-code-block.entry-Bz1Pbg4W.mjs +1623 -0
  51. package/eds-code-block.entry-DG1tMA_4.js +9 -0
  52. package/eds-cookies-preference.entry-0J8XlEDN.js +1 -0
  53. package/eds-cookies-preference.entry-DgP6pxkr.mjs +20 -0
  54. package/eds-feedback.entry-Cmn3G5sR.js +1 -0
  55. package/eds-feedback.entry-CxyxT-OD.mjs +54 -0
  56. package/eds-frame.entry-Dh_T8O60.mjs +67 -0
  57. package/eds-frame.entry-LDVXpjkU.js +1 -0
  58. package/eds-icon-arrow-diagonal.entry-C6AHMuMB.js +1 -0
  59. package/eds-icon-arrow-diagonal.entry-C75xEcUs.mjs +13 -0
  60. package/eds-icon-arrow-right.entry-DOsVz4oP.mjs +13 -0
  61. package/eds-icon-arrow-right.entry-VMROpz2J.js +1 -0
  62. package/eds-icon-bluesky.entry-BmSl31Ky.js +1 -0
  63. package/eds-icon-bluesky.entry-C9skxio2.mjs +13 -0
  64. package/eds-icon-bookmark.entry-DdUP23Uu.js +1 -0
  65. package/eds-icon-bookmark.entry-xWgHPpg-.mjs +13 -0
  66. package/eds-icon-chevron-down.entry-DNY1bk_l.js +1 -0
  67. package/eds-icon-chevron-down.entry-ut52sjbR.mjs +13 -0
  68. package/eds-icon-chevron-left.entry-Bi82EnZL.mjs +13 -0
  69. package/eds-icon-chevron-left.entry-nzi05fTd.js +1 -0
  70. package/eds-icon-chevron-right.entry-CBW3L3p8.js +1 -0
  71. package/eds-icon-chevron-right.entry-Dc_uRypg.mjs +13 -0
  72. package/eds-icon-chevron-up.entry-CO7nzD9J.mjs +13 -0
  73. package/eds-icon-chevron-up.entry-Cc10e7Ce.js +1 -0
  74. package/eds-icon-close.entry-CvXUDttz.mjs +13 -0
  75. package/eds-icon-close.entry-Dw7ZUnkQ.js +1 -0
  76. package/eds-icon-copy.entry-DV4qtIA7.mjs +13 -0
  77. package/eds-icon-copy.entry-x46asO9P.js +1 -0
  78. package/eds-icon-eu.entry-BaEbXLNS.mjs +13 -0
  79. package/eds-icon-eu.entry-D2CoGoAF.js +1 -0
  80. package/eds-icon-external.entry-C0Zm0isI.js +1 -0
  81. package/eds-icon-external.entry-CckFcmA1.mjs +13 -0
  82. package/eds-icon-facebook.entry-CIiiUf27.mjs +13 -0
  83. package/eds-icon-facebook.entry-DwUcANz7.js +1 -0
  84. package/eds-icon-gitlab.entry-CuKUR41Q.js +1 -0
  85. package/eds-icon-gitlab.entry-PCSE_PYe.mjs +13 -0
  86. package/eds-icon-linkedin.entry-Bpoynapn.js +1 -0
  87. package/eds-icon-linkedin.entry-C9xqBwJ1.mjs +13 -0
  88. package/eds-icon-loader.entry-CkIiBDsV.mjs +13 -0
  89. package/eds-icon-loader.entry-dxgwIFD3.js +1 -0
  90. package/eds-icon-mastodon.entry-7CmZhvNG.js +1 -0
  91. package/eds-icon-mastodon.entry-k86mWfUp.mjs +13 -0
  92. package/eds-icon-menu.entry-7zPtmR24.mjs +13 -0
  93. package/eds-icon-menu.entry-CFIbaI5j.js +1 -0
  94. package/eds-icon-minus.entry-B4ntnZW_.js +1 -0
  95. package/eds-icon-minus.entry-fPsoVmGR.mjs +13 -0
  96. package/eds-icon-more.entry-D_HCuwKk.js +1 -0
  97. package/eds-icon-more.entry-DyH3sCa4.mjs +13 -0
  98. package/eds-icon-paper.entry-BQlPnCrf.mjs +13 -0
  99. package/eds-icon-paper.entry-CHAw7mqA.js +1 -0
  100. package/eds-icon-plus.entry-QOVehJoq.js +1 -0
  101. package/eds-icon-plus.entry-zTfrWeuu.mjs +13 -0
  102. package/eds-icon-portal.entry-CbJqS4OZ.js +1 -0
  103. package/eds-icon-portal.entry-SlgbRrHY.mjs +13 -0
  104. package/eds-icon-private.entry-DSIHrQEv.js +1 -0
  105. package/eds-icon-private.entry-uHBGM_wp.mjs +13 -0
  106. package/eds-icon-public.entry-Cj1hddsF.js +1 -0
  107. package/eds-icon-public.entry-_sTE1w2W.mjs +13 -0
  108. package/eds-icon-search.entry-CXVkIZak.js +1 -0
  109. package/eds-icon-search.entry-DIww9BJF.mjs +13 -0
  110. package/eds-icon-star.entry-B3WySZM_.mjs +13 -0
  111. package/eds-icon-star.entry-B464U0ht.js +1 -0
  112. package/eds-icon-success.entry-BhRuLH3J.js +1 -0
  113. package/eds-icon-success.entry-HesFgi8E.mjs +13 -0
  114. package/eds-icon-thumbs-down.entry-CbL3623r.mjs +13 -0
  115. package/eds-icon-thumbs-down.entry-DVK5ACMh.js +1 -0
  116. package/eds-icon-thumbs-up.entry-C2QZ3OSz.mjs +13 -0
  117. package/eds-icon-thumbs-up.entry-MDqpoPcO.js +1 -0
  118. package/eds-icon-tutorial.entry-DRB27GWh.mjs +13 -0
  119. package/eds-icon-tutorial.entry-xaf63POz.js +1 -0
  120. package/eds-icon-twitter.entry-CYCIFfgj.mjs +13 -0
  121. package/eds-icon-twitter.entry-CcpEPKUu.js +1 -0
  122. package/eds-icon-unknown.entry-kYRE4en_.js +1 -0
  123. package/eds-icon-unknown.entry-ksugYL8s.mjs +13 -0
  124. package/eds-icon-updown.entry-3_UTqXet.js +1 -0
  125. package/eds-icon-updown.entry-DrW4QdWY.mjs +13 -0
  126. package/eds-icon-user.entry-BimbLh7T.js +1 -0
  127. package/eds-icon-user.entry-CMjrRV4a.mjs +13 -0
  128. package/eds-icon-youtube.entry-BepDLIVw.js +1 -0
  129. package/eds-icon-youtube.entry-CGXXdMzx.mjs +13 -0
  130. package/eds-matomo-notice.entry-BnbhjXrV.js +1 -0
  131. package/eds-matomo-notice.entry-DQLfTEH4.mjs +92 -0
  132. package/eds-pagination_2.entry-BK--gyZ0.mjs +258 -0
  133. package/eds-pagination_2.entry-De883ILy.js +1 -0
  134. package/eds-progress-bar.entry-CnzFrS-7.js +1 -0
  135. package/eds-progress-bar.entry-UWeq2B4o.mjs +39 -0
  136. package/eds-rating.entry-D48_hoBw.js +1 -0
  137. package/eds-rating.entry-ScrHbfrp.mjs +61 -0
  138. package/eds-section-core_2.entry-D3FNm7II.mjs +39 -0
  139. package/eds-section-core_2.entry-DshZ38Q9.js +1 -0
  140. package/eds-spinner.entry-CAKA3YkP.js +1 -0
  141. package/eds-spinner.entry-KZWQRAHb.mjs +36 -0
  142. package/eds-splash-screen.entry-B7f2rbAn.mjs +39 -0
  143. package/eds-splash-screen.entry-YJ_mGQYU.js +1 -0
  144. package/eds-switch.entry-CKv4fbm-.js +1 -0
  145. package/eds-switch.entry-DbBUxVI8.mjs +29 -0
  146. package/eds-timeline.entry-BE-6PK5Q.js +1 -0
  147. package/eds-timeline.entry-uFV4mRmh.mjs +46 -0
  148. package/eds-toast-manager.entry-BKIf0Xw3.js +1 -0
  149. package/eds-toast-manager.entry-CXL8sMaG.mjs +61 -0
  150. package/eds-toast.entry-a-RIjL18.js +3 -0
  151. package/eds-toast.entry-oZ1Juhqm.mjs +61 -0
  152. package/eds-trl.entry-Bw8w42hZ.mjs +34 -0
  153. package/eds-trl.entry-DmSx4bnn.js +1 -0
  154. package/eu-9ddde93a-BFtIQw9B.js +28 -0
  155. package/eu-9ddde93a-ft4szvR5.mjs +31 -0
  156. package/facebook-9cb5c17f-BcUhbrj6.mjs +15 -0
  157. package/facebook-9cb5c17f-Y_gvQ682.js +12 -0
  158. package/generated/components.d.ts +40 -0
  159. package/generated/vue-component-lib/utils.d.ts +16 -0
  160. package/incorrect-use-of-colors.entry-BlDQxmUQ.mjs +42 -0
  161. package/incorrect-use-of-colors.entry-CglkFNGU.js +1 -0
  162. package/index-39c58238-BwYCDOHZ.mjs +44 -0
  163. package/index-39c58238-SQ-JC-LH.js +1 -0
  164. package/index-BvZ-fq9l.mjs +3486 -0
  165. package/index-CJvr9v3B.js +21 -0
  166. package/index.d.ts +1 -0
  167. package/index.js +1 -0
  168. package/index.mjs +42 -0
  169. package/linkedin-e8650abb-BkDrkjzY.js +26 -0
  170. package/linkedin-e8650abb-DYMdsale.mjs +29 -0
  171. package/loader-c9628637-ChpnbJkv.mjs +31 -0
  172. package/loader-c9628637-Vj8Wt1e8.js +28 -0
  173. package/logo-color-7f1fd803-CFgbXdt8.mjs +116 -0
  174. package/logo-color-7f1fd803-DRD3vZVn.js +113 -0
  175. package/logo-color-margins-ff8ce71b-B9nMsY9Q.mjs +119 -0
  176. package/logo-color-margins-ff8ce71b-Dk06zr1Z.js +116 -0
  177. package/logo-space.entry-D1gv5Jv7.mjs +19 -0
  178. package/logo-space.entry-d5Tx6GSR.js +6 -0
  179. package/logo-variations-horizontal_2.entry-CiMlktdv.js +7 -0
  180. package/logo-variations-horizontal_2.entry-DPHzlUCt.mjs +29 -0
  181. package/logo-variations-tabs.entry-BYi6NRAo.mjs +22 -0
  182. package/logo-variations-tabs.entry-CcSRDFWV.js +1 -0
  183. package/logo-white-no-bg-f382f86f-DXYn3NwV.js +1011 -0
  184. package/logo-white-no-bg-f382f86f-YhfmNmGG.mjs +1022 -0
  185. package/logo-wrong-usage.entry-9iDssoCI.mjs +14 -0
  186. package/logo-wrong-usage.entry-gsDvZ1sn.js +1 -0
  187. package/mastodon-3703ec61-C7iI4Hk0.mjs +15 -0
  188. package/mastodon-3703ec61-C9v6Olc-.js +12 -0
  189. package/menu-340ea948-BpnYX3gY.mjs +12 -0
  190. package/menu-340ea948-ZdelWVw3.js +9 -0
  191. package/minus-b30a7c71-BPAvqHzH.mjs +12 -0
  192. package/minus-b30a7c71-DqCTe6Qh.js +9 -0
  193. package/mono-53f70232-DGi2XDlR.mjs +12 -0
  194. package/mono-53f70232-DgAsWvoQ.js +9 -0
  195. package/more-4449d549-D4HA1cRq.js +11 -0
  196. package/more-4449d549-rI9hOpEp.mjs +14 -0
  197. package/package.json +1 -1
  198. package/paper-8e74ea31-BvGrc1Vo.mjs +16 -0
  199. package/paper-8e74ea31-C4CV6tlB.js +13 -0
  200. package/plus-89c07be2-BTXnjg5K.js +10 -0
  201. package/plus-89c07be2-DyT9I4-L.mjs +13 -0
  202. package/portal-d6c8ce56-Cj61ldo8.mjs +19 -0
  203. package/portal-d6c8ce56-NpSrdNZ_.js +16 -0
  204. package/private-1c25ff8e-D3Fo36q6.js +23 -0
  205. package/private-1c25ff8e-Dz82_Xf8.mjs +26 -0
  206. package/public-d4d8c585-BJKDD5F6.mjs +17 -0
  207. package/public-d4d8c585-lV6QxdPw.js +14 -0
  208. package/search-fbcd79c2-BMxCaeEk.js +10 -0
  209. package/search-fbcd79c2-rfV0PlHP.mjs +13 -0
  210. package/sharedUtils-a550989c-Ci3Tx3jc.mjs +15 -0
  211. package/sharedUtils-a550989c-m4pF1Vqy.js +1 -0
  212. package/star-0da9b5e9-B3-jr0yE.js +3 -0
  213. package/star-0da9b5e9-DX8_iFmu.mjs +6 -0
  214. package/success-443809da-BD23vltm.mjs +19 -0
  215. package/success-443809da-BUEhLsAD.js +16 -0
  216. package/svg-repository.entry-BtksDklW.mjs +301 -0
  217. package/svg-repository.entry-_-HISW99.js +173 -0
  218. package/thumbs-down-a18fd049-CzuBAj99.mjs +6 -0
  219. package/thumbs-down-a18fd049-DTNIbYbm.js +3 -0
  220. package/thumbs-up-c19a71bc-CjLv5Wgw.mjs +7 -0
  221. package/thumbs-up-c19a71bc-w8Z8gegt.js +4 -0
  222. package/token-list_3.entry-CNkWD89P.mjs +247 -0
  223. package/token-list_3.entry-CRZq4och.js +1 -0
  224. package/token-ratios.entry-CL40j9gF.js +1 -0
  225. package/token-ratios.entry-D4aHLsX-.mjs +25 -0
  226. package/token-typography.entry-D17oZHbh.js +2 -0
  227. package/token-typography.entry-ayRMMiOe.mjs +213 -0
  228. package/tutotial-150ee1fd-DFdyoHVA.mjs +28 -0
  229. package/tutotial-150ee1fd-DjN_JBL5.js +25 -0
  230. package/twitter-ac21b505-CGWVGWM9.mjs +15 -0
  231. package/twitter-ac21b505-DDdHS4hB.js +12 -0
  232. package/unknown-ed01a24c-B0AcMuip.js +20 -0
  233. package/unknown-ed01a24c-DonOUpIC.mjs +23 -0
  234. package/up-and-down-d747abee-CWoZjUyq.js +10 -0
  235. package/up-and-down-d747abee-D7g6H0T0.mjs +13 -0
  236. package/user-71ebdc15-BBKQbcQD.js +14 -0
  237. package/user-71ebdc15-CoHlCtJg.mjs +17 -0
  238. package/youtube-efbfbdc4-BLTH1Jl9.js +12 -0
  239. package/youtube-efbfbdc4-BfySbfjR.mjs +15 -0
  240. package/.eslintrc.json +0 -18
  241. package/project.json +0 -9
  242. package/src/generated/components.ts +0 -374
  243. package/src/generated/vue-component-lib/utils.ts +0 -236
  244. package/src/index.ts +0 -1
  245. package/src/vue-shims.d.ts +0 -5
  246. package/tsconfig.json +0 -18
  247. package/tsconfig.lib.json +0 -27
  248. package/vite.config.ts +0 -71
@@ -0,0 +1,258 @@
1
+ import { r as h, h as i, g as d } from "./index-BvZ-fq9l.mjs";
2
+ import { s as g } from "./analytics-d99780e3-Bay18Oil.mjs";
3
+ import { p as c } from "./sharedUtils-a550989c-Ci3Tx3jc.mjs";
4
+ const u = "ul,menu{list-style:none;margin:0;padding:0}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.f-ui-03-light{font-family:var(--f-ui-03-light-fontFamily);font-weight:var(--f-ui-03-light-fontWeight);font-size:var(--f-ui-03-light-fontSize);line-height:var(--f-ui-03-light-lineHeight);letter-spacing:var(--f-ui-03-light-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.f-ui-02-light{font-family:var(--f-ui-02-light-fontFamily);font-weight:var(--f-ui-02-light-fontWeight);font-size:var(--f-ui-02-light-fontSize);line-height:var(--f-ui-02-light-lineHeight);letter-spacing:var(--f-ui-02-light-letterSpacing)}.text-lightest{color:var(--grey-500)}.mb-28{margin-bottom:1.75rem}.w-full{width:100%}.w-20{width:1.25rem}.h-20{height:1.25rem}.h-28{height:1.75rem}.h-32{height:2rem}.h-36{height:2.25rem}.text-center{text-align:center}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-x-8{-moz-column-gap:0.5rem;column-gap:0.5rem}.mr-auto{margin-right:auto}.ml-auto{margin-left:auto}.\\!p-8{padding:0.5rem !important}.ml-4{margin-left:0.25rem}.mr-4{margin-right:0.25rem}.hidden{display:none}.gap-1{gap:0.0625rem}.py-4{padding-top:0.25rem;padding-bottom:0.25rem}.transition-colors{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:150ms}@media (min-width: 900px){.lg\\:\\!pr-12{padding-right:0.75rem !important}.lg\\:flex{display:flex}}", f = u, p = class {
5
+ constructor(t) {
6
+ h(this, t), this.currentPage = void 0, this.lastPage = void 0, this.perPage = 10, this.total = 0, this.url = "", this.mode = "default", this.prevLabel = "Prev", this.nextLabel = "Next", this.prevUrl = "", this.nextUrl = "", this.links = [];
7
+ }
8
+ /** Lifecycle hook to generate pagination links on component load */
9
+ componentWillLoad() {
10
+ this.mode === "default" && this.generateLinks();
11
+ }
12
+ componentDidLoad() {
13
+ this.hostEl.shadowRoot.querySelectorAll("eds-link").forEach((e) => {
14
+ this.emitContext(e);
15
+ });
16
+ }
17
+ /**
18
+ * Emits a custom event called `parentContext` for a given link element.
19
+ * This event provides context information about the breadcrumb component.
20
+ *
21
+ * @param linkElement - The link element to which the event will be dispatched.
22
+ */
23
+ emitContext(t) {
24
+ const e = new CustomEvent("parentContext", {
25
+ detail: {
26
+ componentName: this.hostEl.tagName.toLowerCase(),
27
+ identifier: null
28
+ }
29
+ });
30
+ t.dispatchEvent(e);
31
+ }
32
+ onPageOrLastPageChange() {
33
+ this.mode === "default" && this.generateLinks();
34
+ }
35
+ /**
36
+ * Checks if the current page is the first page
37
+ * @returns {boolean} - true if current page is the first page
38
+ */
39
+ isFirstPage() {
40
+ return this.currentPage === 1;
41
+ }
42
+ /**
43
+ * Checks if the current page is the last page
44
+ * @returns {boolean} - true if current page is the last page
45
+ */
46
+ isLastPage() {
47
+ return this.currentPage === this.lastPage;
48
+ }
49
+ /**
50
+ * Generates a pagination link object
51
+ * @param {number} page - Page number for the link
52
+ * @returns {Link} - Link object with page details
53
+ */
54
+ generateLink(t) {
55
+ const e = this.url.includes("?");
56
+ return {
57
+ ariaLabel: `Page ${t}`,
58
+ url: `${this.url}${e ? "&" : "?"}page=${t}`,
59
+ label: t.toString(),
60
+ current: this.currentPage === t,
61
+ disabled: !1
62
+ };
63
+ }
64
+ /** Generates pagination links based on the last page and current page */
65
+ generateLinks() {
66
+ this.lastPage && this.lastPage > 5 ? this.links = this.getPaginationGenerator(this.currentPage || 1, this.lastPage).map((t) => typeof t == "number" ? this.generateLink(t) : t) : this.lastPage && (this.links = Array.from({ length: this.lastPage }).map((t, e) => this.generateLink(e + 1)));
67
+ }
68
+ /**
69
+ * Creates a pagination range based on delta, current, and total pages
70
+ * @param {number} current - Current page number
71
+ * @param {number} total - Total number of pages
72
+ * @param {number} delta - Range of pages to display around the current page
73
+ * @returns {(number | string)[]} - Range of page numbers or ellipses
74
+ */
75
+ getPaginationGenerator(t, e) {
76
+ const a = [];
77
+ if (e <= 5)
78
+ for (let n = 1; n <= e; n++)
79
+ a.push(n);
80
+ else {
81
+ a.push(1), t - 1 > 2 && a.push("...");
82
+ for (let n = Math.max(2, t - 1); n <= Math.min(e - 1, t + 1); n++)
83
+ a.push(n);
84
+ t + 1 < e - 1 && a.push("..."), a.push(e);
85
+ }
86
+ return a;
87
+ }
88
+ /**
89
+ * Formats the current page results information for display
90
+ * @returns {string} - Formatted page result information
91
+ */
92
+ pageResults() {
93
+ return this.total > 0 ? this.total > this.perPage ? `${this.perPage * ((this.currentPage || 1) - 1) + 1} - ${this.perPage * (this.currentPage || 1) >= this.total ? this.total : this.perPage * (this.currentPage || 1)} of ${this.total}` : `${this.total}` : "";
94
+ }
95
+ /**
96
+ * Handles a page click event, updating the current page and dispatching an event
97
+ * @param {MouseEvent} event - Click event
98
+ * @param {number} newPage - New page number
99
+ */
100
+ handlePageClick(t, e) {
101
+ if (this.mode !== "navigator" && (t.preventDefault(), e !== this.currentPage)) {
102
+ this.links = this.links.map((a) => typeof a == "object" ? Object.assign(Object.assign({}, a), { current: parseInt(a.label) === e }) : a);
103
+ const s = new CustomEvent("page", {
104
+ detail: e,
105
+ bubbles: !0,
106
+ composed: !0
107
+ });
108
+ this.hostEl.dispatchEvent(s), this.currentPage = e;
109
+ }
110
+ }
111
+ render() {
112
+ return i("div", { key: "1d53f69179791434224f152503c0b81c4cfc7cd3" }, this.total > 0 && this.mode === "default" && i("p", { key: "00ae324b49d62a74feee9d1cde21d67cd726ecf0", class: "f-ui-03 text-lightest mb-28 w-full text-center" }, i("span", { key: "dedf2ce2700eae9d1386b305ec1d1904b133f992", class: "sr-only" }, "Results:"), this.pageResults()), this.mode === "navigator" || this.lastPage && this.lastPage > 1 ? i("nav", { "aria-label": "Pagination" }, i("ul", { class: "flex items-center justify-center gap-x-8" }, i("li", { class: "mr-auto" }, i("eds-link", { label: this.prevLabel, url: this.mode === "navigator" ? this.prevUrl || "#" : this.isFirstPage() ? "#" : this.generateLink(this.currentPage - 1).url, disabled: this.mode === "navigator" ? !this.prevUrl : this.isFirstPage(), "aria-label": "Previous page", icon: "chevron-left", "icon-pos": "left", size: "small", "icon-small": "true", intent: "strong", "hide-label-on-small-screen": !0, class: "!p-8 lg:!pr-12", onClick: (t) => {
113
+ this.mode === "default" && (this.isFirstPage() ? t.preventDefault() : this.handlePageClick(t, (this.currentPage || 1) - 1));
114
+ } })), this.mode === "default" && this.links.map((t, e) => i("li", { key: e, class: "f-ui-02 flex h-36 items-center justify-center" }, typeof t == "string" ? i("span", { class: "flex items-center justify-center" }, t) : i("eds-link", { url: t.url, "aria-label": t.ariaLabel, label: t.label, current: t.current, size: "small", class: "!p-8", intent: t.current ? "secondary" : "ghost", onClick: (s) => this.handlePageClick(s, parseInt(t.label)) }))), i("li", { class: "ml-auto" }, i("eds-link", { label: this.nextLabel, url: this.mode === "navigator" ? this.nextUrl || "#" : this.isLastPage() ? "#" : this.generateLink(this.currentPage + 1).url, disabled: this.mode === "navigator" ? !this.nextUrl : this.isLastPage(), "aria-label": "Next page", size: "small", "icon-small": "true", icon: "chevron-right", intent: "strong", "hide-label-on-small-screen": !0, class: "!p-8 lg:!pl-12 flex items-center gap-1 py-4 transition-colors", onClick: (t) => {
115
+ this.mode === "default" && (this.isLastPage() ? t.preventDefault() : this.handlePageClick(t, (this.currentPage || 1) + 1));
116
+ } })))) : null);
117
+ }
118
+ get hostEl() {
119
+ return d(this);
120
+ }
121
+ static get watchers() {
122
+ return {
123
+ currentPage: ["onPageOrLastPageChange"],
124
+ lastPage: ["onPageOrLastPageChange"]
125
+ };
126
+ }
127
+ };
128
+ p.style = f;
129
+ const m = "table{text-indent:0;border-color:inherit;border-collapse:collapse;}.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}.pt-32{padding-top:2rem}.pt-40{padding-top:2.5rem}.pt-48{padding-top:3rem}.pb-28{padding-bottom:1.75rem}.pb-60{padding-bottom:3.75rem}.mt-20{margin-top:1.25rem}.mt-28{margin-top:1.75rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.overflow-x-auto{overflow-x:auto}.mt-6{margin-top:0.375rem}.p-0{padding:0rem}.m-0{margin:0rem}.border{border-width:1px}.border-softer{border:1px solid rgba(0, 0, 0, .1)}.even\\:bg-inverse-softer:nth-child(even){background-color:rgba(255, 255, 255, .15)}.px-20{padding-left:1.25rem;padding-right:1.25rem}.py-8{padding-top:0.5rem;padding-bottom:0.5rem}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-weight:var(--f-ui-01-fontWeight);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.text-center{text-align:center}.break-words{overflow-wrap:anywhere}", b = m, v = class {
130
+ constructor(t) {
131
+ h(this, t), this.handleResize = () => {
132
+ this.updateContainerWidth();
133
+ }, this.data = null, this.endpoint = null, this.config = {}, this.rowsPerPage = 10, this.paginationEnabled = !0, this.searchEnabled = !1, this.hostWidth = void 0, this.columnSize = "default", this.tbData = [], this.columns = [], this.currentPage = 1, this.parsedConfig = {}, this.totalRows = 0, this.searchQuery = "", this.containerWidth = 0;
134
+ }
135
+ handleDataChange() {
136
+ this.parseData();
137
+ }
138
+ handleConfigChange() {
139
+ this.parseConfig();
140
+ }
141
+ componentWillLoad() {
142
+ this.parseConfig(), this.data ? this.parseData() : this.endpoint && this.fetchData();
143
+ }
144
+ componentDidLoad() {
145
+ this.updateContainerWidth(), window.addEventListener("resize", this.handleResize), this.setupPaginationListener();
146
+ }
147
+ componentDidUpdate() {
148
+ this.setupPaginationListener();
149
+ }
150
+ disconnectedCallback() {
151
+ window.removeEventListener("resize", this.handleResize);
152
+ }
153
+ updateContainerWidth() {
154
+ this.hostWidth && this.hostWidth.trim() !== "" ? this.containerWidth = Number(this.hostWidth) : this.hostEl.parentElement instanceof HTMLElement ? this.containerWidth = this.hostEl.parentElement.getBoundingClientRect().width : this.containerWidth = 400;
155
+ }
156
+ parseData() {
157
+ try {
158
+ this.tbData = c(this.data), this.totalRows = this.tbData.length, this.updateColumns(), this.currentPage = 1;
159
+ } catch (t) {
160
+ console.error("Failed to parse data:", t), this.tbData = [];
161
+ }
162
+ }
163
+ parseConfig() {
164
+ try {
165
+ this.parsedConfig = typeof this.config == "string" ? JSON.parse(this.config) : this.config;
166
+ } catch (t) {
167
+ console.error("Failed to parse config:", t), this.parsedConfig = {};
168
+ }
169
+ }
170
+ async fetchData() {
171
+ try {
172
+ const e = await (await fetch(this.endpoint)).json();
173
+ this.data = e;
174
+ } catch (t) {
175
+ console.error("Failed to fetch data:", t);
176
+ }
177
+ }
178
+ setupPaginationListener() {
179
+ if (!this.shouldEnablePagination())
180
+ return;
181
+ const t = this.hostEl.shadowRoot.querySelector("eds-pagination");
182
+ t && !t.hasAttribute("listener-attached") && (t.addEventListener("page", (e) => this.handlePageChange(e.detail)), t.setAttribute("listener-attached", "true"));
183
+ }
184
+ getFilteredRows() {
185
+ return this.tbData.filter((t) => Object.values(t).some((e) => e.toString().toLowerCase().includes(this.searchQuery.toLowerCase())));
186
+ }
187
+ getPaginatedRows() {
188
+ const t = this.getFilteredRows();
189
+ this.totalRows = t.length;
190
+ const e = (this.currentPage - 1) * this.rowsPerPage;
191
+ return t.slice(e, e + this.rowsPerPage);
192
+ }
193
+ handlePageChange(t) {
194
+ this.currentPage = t, g({
195
+ category: "ui-component",
196
+ parentContext: null,
197
+ tag: `${this.hostEl.tagName.toLowerCase()}/eds-pagination`,
198
+ name: `${t}` || "",
199
+ action: "page"
200
+ });
201
+ }
202
+ handleSearch(t) {
203
+ this.searchQuery = t.target.value, this.currentPage = 1;
204
+ }
205
+ renderCell(t, e) {
206
+ var s;
207
+ const a = (s = this.parsedConfig[e]) === null || s === void 0 ? void 0 : s.format;
208
+ return a === "uppercase" ? t == null ? void 0 : t.toString().toUpperCase() : a === "svg" ? i("div", { innerHTML: t }) : a === "bold" ? i("strong", null, t) : a === "code" ? i("code", null, t) : t;
209
+ }
210
+ shouldEnablePagination() {
211
+ return this.paginationEnabled && this.totalRows > this.rowsPerPage;
212
+ }
213
+ updateColumns() {
214
+ this.columns = this.tbData.length > 0 ? Object.keys(this.tbData[0]) : [];
215
+ }
216
+ getVisibleColumnsCount() {
217
+ return this.columns.filter((t) => {
218
+ var e;
219
+ return !(!((e = this.parsedConfig[t]) === null || e === void 0) && e.hidden);
220
+ }).length;
221
+ }
222
+ divisionFactor() {
223
+ let t = 1;
224
+ return this.columnSize === "medium" ? t = 2 : this.columnSize === "large" && (t = 4), t;
225
+ }
226
+ render() {
227
+ const t = this.hostWidth && this.hostWidth.trim() !== "" ? Number(this.hostWidth) : this.containerWidth || 400, e = this.getVisibleColumnsCount(), s = e > 0 ? Math.floor(t / e * this.divisionFactor()) : 100, a = this.getPaginatedRows(), n = Math.ceil(this.totalRows / this.rowsPerPage);
228
+ return i("div", { key: "81735ac374853c8c92b3f50e26263ff9d71b326c" }, this.searchEnabled && i("div", { key: "0b2ab8dbb343033f605e2028890bd963cd650998" }, i("eds-input-field", {
229
+ key: 1,
230
+ name: "search",
231
+ "aria-label": "Search",
232
+ type: "text",
233
+ placeholder: "Search...",
234
+ // @ts-ignore
235
+ onInput: (o) => this.handleSearch(o)
236
+ })), i("div", { key: "eb3eebe6fb124d4e1983b2fb7e636707817d36bd", class: "mt-20" }, i("table", { key: "03b312ac20bdec28843a46907a3cc4fba69f62ae", class: "block overflow-x-auto mt-6 p-0" }, i("thead", { key: "ccab58dc46ae765df28da97ded6b1dd14d45d7f1" }, i("tr", { key: "904a125aad610cebe42b0bce46615be38f0ee17a", class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((o) => {
237
+ var r;
238
+ return !(!((r = this.parsedConfig[o]) === null || r === void 0) && r.hidden) && i("th", { class: "m-0 py-8 border border-softer f-ui-02 break-words", style: { minWidth: `${s - 4}px` } }, o);
239
+ }))), i("tbody", { key: "a4c54c9c89d15546020dbb684e5486decde33f30" }, a.map((o) => i("tr", { class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((r) => {
240
+ var l;
241
+ return !(!((l = this.parsedConfig[r]) === null || l === void 0) && l.hidden) && i("td", { class: "text-center border border-softer m-0 py-8 f-ui-2 break-words", style: { minWidth: `${s - 4}px` } }, this.renderCell(o[r], r));
242
+ })))))), this.shouldEnablePagination() && i("div", { key: "2a248cbbe81ac8c1ad4dfbb49a9615f15931bac6", class: "mt-20" }, i("eds-pagination", { key: "11701d81922ca4c8b36fe82be32316a175eddbcd", currentPage: this.currentPage, lastPage: n, perPage: this.rowsPerPage, total: this.totalRows, mode: "default" })));
243
+ }
244
+ get hostEl() {
245
+ return d(this);
246
+ }
247
+ static get watchers() {
248
+ return {
249
+ data: ["handleDataChange", "parseData"],
250
+ config: ["handleConfigChange"]
251
+ };
252
+ }
253
+ };
254
+ v.style = b;
255
+ export {
256
+ p as eds_pagination,
257
+ v as eds_table
258
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CJvr9v3B.js"),g=require("./analytics-d99780e3-DgvAss6l.js"),c=require("./sharedUtils-a550989c-m4pF1Vqy.js"),u="ul,menu{list-style:none;margin:0;padding:0}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.f-ui-03-light{font-family:var(--f-ui-03-light-fontFamily);font-weight:var(--f-ui-03-light-fontWeight);font-size:var(--f-ui-03-light-fontSize);line-height:var(--f-ui-03-light-lineHeight);letter-spacing:var(--f-ui-03-light-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.f-ui-02-light{font-family:var(--f-ui-02-light-fontFamily);font-weight:var(--f-ui-02-light-fontWeight);font-size:var(--f-ui-02-light-fontSize);line-height:var(--f-ui-02-light-lineHeight);letter-spacing:var(--f-ui-02-light-letterSpacing)}.text-lightest{color:var(--grey-500)}.mb-28{margin-bottom:1.75rem}.w-full{width:100%}.w-20{width:1.25rem}.h-20{height:1.25rem}.h-28{height:1.75rem}.h-32{height:2rem}.h-36{height:2.25rem}.text-center{text-align:center}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-x-8{-moz-column-gap:0.5rem;column-gap:0.5rem}.mr-auto{margin-right:auto}.ml-auto{margin-left:auto}.\\!p-8{padding:0.5rem !important}.ml-4{margin-left:0.25rem}.mr-4{margin-right:0.25rem}.hidden{display:none}.gap-1{gap:0.0625rem}.py-4{padding-top:0.25rem;padding-bottom:0.25rem}.transition-colors{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:150ms}@media (min-width: 900px){.lg\\:\\!pr-12{padding-right:0.75rem !important}.lg\\:flex{display:flex}}",f=u,h=class{constructor(t){i.registerInstance(this,t),this.currentPage=void 0,this.lastPage=void 0,this.perPage=10,this.total=0,this.url="",this.mode="default",this.prevLabel="Prev",this.nextLabel="Next",this.prevUrl="",this.nextUrl="",this.links=[]}componentWillLoad(){this.mode==="default"&&this.generateLinks()}componentDidLoad(){this.hostEl.shadowRoot.querySelectorAll("eds-link").forEach(e=>{this.emitContext(e)})}emitContext(t){const e=new CustomEvent("parentContext",{detail:{componentName:this.hostEl.tagName.toLowerCase(),identifier:null}});t.dispatchEvent(e)}onPageOrLastPageChange(){this.mode==="default"&&this.generateLinks()}isFirstPage(){return this.currentPage===1}isLastPage(){return this.currentPage===this.lastPage}generateLink(t){const e=this.url.includes("?");return{ariaLabel:`Page ${t}`,url:`${this.url}${e?"&":"?"}page=${t}`,label:t.toString(),current:this.currentPage===t,disabled:!1}}generateLinks(){this.lastPage&&this.lastPage>5?this.links=this.getPaginationGenerator(this.currentPage||1,this.lastPage).map(t=>typeof t=="number"?this.generateLink(t):t):this.lastPage&&(this.links=Array.from({length:this.lastPage}).map((t,e)=>this.generateLink(e+1)))}getPaginationGenerator(t,e){const a=[];if(e<=5)for(let n=1;n<=e;n++)a.push(n);else{a.push(1),t-1>2&&a.push("...");for(let n=Math.max(2,t-1);n<=Math.min(e-1,t+1);n++)a.push(n);t+1<e-1&&a.push("..."),a.push(e)}return a}pageResults(){return this.total>0?this.total>this.perPage?`${this.perPage*((this.currentPage||1)-1)+1} - ${this.perPage*(this.currentPage||1)>=this.total?this.total:this.perPage*(this.currentPage||1)} of ${this.total}`:`${this.total}`:""}handlePageClick(t,e){if(this.mode!=="navigator"&&(t.preventDefault(),e!==this.currentPage)){this.links=this.links.map(a=>typeof a=="object"?Object.assign(Object.assign({},a),{current:parseInt(a.label)===e}):a);const s=new CustomEvent("page",{detail:e,bubbles:!0,composed:!0});this.hostEl.dispatchEvent(s),this.currentPage=e}}render(){return i.h("div",{key:"1d53f69179791434224f152503c0b81c4cfc7cd3"},this.total>0&&this.mode==="default"&&i.h("p",{key:"00ae324b49d62a74feee9d1cde21d67cd726ecf0",class:"f-ui-03 text-lightest mb-28 w-full text-center"},i.h("span",{key:"dedf2ce2700eae9d1386b305ec1d1904b133f992",class:"sr-only"},"Results:"),this.pageResults()),this.mode==="navigator"||this.lastPage&&this.lastPage>1?i.h("nav",{"aria-label":"Pagination"},i.h("ul",{class:"flex items-center justify-center gap-x-8"},i.h("li",{class:"mr-auto"},i.h("eds-link",{label:this.prevLabel,url:this.mode==="navigator"?this.prevUrl||"#":this.isFirstPage()?"#":this.generateLink(this.currentPage-1).url,disabled:this.mode==="navigator"?!this.prevUrl:this.isFirstPage(),"aria-label":"Previous page",icon:"chevron-left","icon-pos":"left",size:"small","icon-small":"true",intent:"strong","hide-label-on-small-screen":!0,class:"!p-8 lg:!pr-12",onClick:t=>{this.mode==="default"&&(this.isFirstPage()?t.preventDefault():this.handlePageClick(t,(this.currentPage||1)-1))}})),this.mode==="default"&&this.links.map((t,e)=>i.h("li",{key:e,class:"f-ui-02 flex h-36 items-center justify-center"},typeof t=="string"?i.h("span",{class:"flex items-center justify-center"},t):i.h("eds-link",{url:t.url,"aria-label":t.ariaLabel,label:t.label,current:t.current,size:"small",class:"!p-8",intent:t.current?"secondary":"ghost",onClick:s=>this.handlePageClick(s,parseInt(t.label))}))),i.h("li",{class:"ml-auto"},i.h("eds-link",{label:this.nextLabel,url:this.mode==="navigator"?this.nextUrl||"#":this.isLastPage()?"#":this.generateLink(this.currentPage+1).url,disabled:this.mode==="navigator"?!this.nextUrl:this.isLastPage(),"aria-label":"Next page",size:"small","icon-small":"true",icon:"chevron-right",intent:"strong","hide-label-on-small-screen":!0,class:"!p-8 lg:!pl-12 flex items-center gap-1 py-4 transition-colors",onClick:t=>{this.mode==="default"&&(this.isLastPage()?t.preventDefault():this.handlePageClick(t,(this.currentPage||1)+1))}})))):null)}get hostEl(){return i.getElement(this)}static get watchers(){return{currentPage:["onPageOrLastPageChange"],lastPage:["onPageOrLastPageChange"]}}};h.style=f;const p="table{text-indent:0;border-color:inherit;border-collapse:collapse;}.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}.pt-32{padding-top:2rem}.pt-40{padding-top:2.5rem}.pt-48{padding-top:3rem}.pb-28{padding-bottom:1.75rem}.pb-60{padding-bottom:3.75rem}.mt-20{margin-top:1.25rem}.mt-28{margin-top:1.75rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.overflow-x-auto{overflow-x:auto}.mt-6{margin-top:0.375rem}.p-0{padding:0rem}.m-0{margin:0rem}.border{border-width:1px}.border-softer{border:1px solid rgba(0, 0, 0, .1)}.even\\:bg-inverse-softer:nth-child(even){background-color:rgba(255, 255, 255, .15)}.px-20{padding-left:1.25rem;padding-right:1.25rem}.py-8{padding-top:0.5rem;padding-bottom:0.5rem}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-weight:var(--f-ui-01-fontWeight);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.text-center{text-align:center}.break-words{overflow-wrap:anywhere}",m=p,d=class{constructor(t){i.registerInstance(this,t),this.handleResize=()=>{this.updateContainerWidth()},this.data=null,this.endpoint=null,this.config={},this.rowsPerPage=10,this.paginationEnabled=!0,this.searchEnabled=!1,this.hostWidth=void 0,this.columnSize="default",this.tbData=[],this.columns=[],this.currentPage=1,this.parsedConfig={},this.totalRows=0,this.searchQuery="",this.containerWidth=0}handleDataChange(){this.parseData()}handleConfigChange(){this.parseConfig()}componentWillLoad(){this.parseConfig(),this.data?this.parseData():this.endpoint&&this.fetchData()}componentDidLoad(){this.updateContainerWidth(),window.addEventListener("resize",this.handleResize),this.setupPaginationListener()}componentDidUpdate(){this.setupPaginationListener()}disconnectedCallback(){window.removeEventListener("resize",this.handleResize)}updateContainerWidth(){this.hostWidth&&this.hostWidth.trim()!==""?this.containerWidth=Number(this.hostWidth):this.hostEl.parentElement instanceof HTMLElement?this.containerWidth=this.hostEl.parentElement.getBoundingClientRect().width:this.containerWidth=400}parseData(){try{this.tbData=c.parseData(this.data),this.totalRows=this.tbData.length,this.updateColumns(),this.currentPage=1}catch(t){console.error("Failed to parse data:",t),this.tbData=[]}}parseConfig(){try{this.parsedConfig=typeof this.config=="string"?JSON.parse(this.config):this.config}catch(t){console.error("Failed to parse config:",t),this.parsedConfig={}}}async fetchData(){try{const e=await(await fetch(this.endpoint)).json();this.data=e}catch(t){console.error("Failed to fetch data:",t)}}setupPaginationListener(){if(!this.shouldEnablePagination())return;const t=this.hostEl.shadowRoot.querySelector("eds-pagination");t&&!t.hasAttribute("listener-attached")&&(t.addEventListener("page",e=>this.handlePageChange(e.detail)),t.setAttribute("listener-attached","true"))}getFilteredRows(){return this.tbData.filter(t=>Object.values(t).some(e=>e.toString().toLowerCase().includes(this.searchQuery.toLowerCase())))}getPaginatedRows(){const t=this.getFilteredRows();this.totalRows=t.length;const e=(this.currentPage-1)*this.rowsPerPage;return t.slice(e,e+this.rowsPerPage)}handlePageChange(t){this.currentPage=t,g.sendAnalytics({category:"ui-component",parentContext:null,tag:`${this.hostEl.tagName.toLowerCase()}/eds-pagination`,name:`${t}`||"",action:"page"})}handleSearch(t){this.searchQuery=t.target.value,this.currentPage=1}renderCell(t,e){var s;const a=(s=this.parsedConfig[e])===null||s===void 0?void 0:s.format;return a==="uppercase"?t==null?void 0:t.toString().toUpperCase():a==="svg"?i.h("div",{innerHTML:t}):a==="bold"?i.h("strong",null,t):a==="code"?i.h("code",null,t):t}shouldEnablePagination(){return this.paginationEnabled&&this.totalRows>this.rowsPerPage}updateColumns(){this.columns=this.tbData.length>0?Object.keys(this.tbData[0]):[]}getVisibleColumnsCount(){return this.columns.filter(t=>{var e;return!(!((e=this.parsedConfig[t])===null||e===void 0)&&e.hidden)}).length}divisionFactor(){let t=1;return this.columnSize==="medium"?t=2:this.columnSize==="large"&&(t=4),t}render(){const t=this.hostWidth&&this.hostWidth.trim()!==""?Number(this.hostWidth):this.containerWidth||400,e=this.getVisibleColumnsCount(),s=e>0?Math.floor(t/e*this.divisionFactor()):100,a=this.getPaginatedRows(),n=Math.ceil(this.totalRows/this.rowsPerPage);return i.h("div",{key:"81735ac374853c8c92b3f50e26263ff9d71b326c"},this.searchEnabled&&i.h("div",{key:"0b2ab8dbb343033f605e2028890bd963cd650998"},i.h("eds-input-field",{key:1,name:"search","aria-label":"Search",type:"text",placeholder:"Search...",onInput:o=>this.handleSearch(o)})),i.h("div",{key:"eb3eebe6fb124d4e1983b2fb7e636707817d36bd",class:"mt-20"},i.h("table",{key:"03b312ac20bdec28843a46907a3cc4fba69f62ae",class:"block overflow-x-auto mt-6 p-0"},i.h("thead",{key:"ccab58dc46ae765df28da97ded6b1dd14d45d7f1"},i.h("tr",{key:"904a125aad610cebe42b0bce46615be38f0ee17a",class:"m-0 p-0 border border-softer even:bg-inverse-softer"},this.columns.map(o=>{var r;return!(!((r=this.parsedConfig[o])===null||r===void 0)&&r.hidden)&&i.h("th",{class:"m-0 py-8 border border-softer f-ui-02 break-words",style:{minWidth:`${s-4}px`}},o)}))),i.h("tbody",{key:"a4c54c9c89d15546020dbb684e5486decde33f30"},a.map(o=>i.h("tr",{class:"m-0 p-0 border border-softer even:bg-inverse-softer"},this.columns.map(r=>{var l;return!(!((l=this.parsedConfig[r])===null||l===void 0)&&l.hidden)&&i.h("td",{class:"text-center border border-softer m-0 py-8 f-ui-2 break-words",style:{minWidth:`${s-4}px`}},this.renderCell(o[r],r))})))))),this.shouldEnablePagination()&&i.h("div",{key:"2a248cbbe81ac8c1ad4dfbb49a9615f15931bac6",class:"mt-20"},i.h("eds-pagination",{key:"11701d81922ca4c8b36fe82be32316a175eddbcd",currentPage:this.currentPage,lastPage:n,perPage:this.rowsPerPage,total:this.totalRows,mode:"default"})))}get hostEl(){return i.getElement(this)}static get watchers(){return{data:["handleDataChange","parseData"],config:["handleConfigChange"]}}};d.style=m;exports.eds_pagination=h;exports.eds_table=d;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CJvr9v3B.js"),n=".w-full{width:100%}.h-full{height:100%}.bg-default{background-color:var(--grey-200)}.rounded-lg{border-radius:16px}.h-24{height:1.5rem}.border{border-width:1px}.border-softer{border:2px solid rgba(0, 0, 0, .1)}.overflow-hidden{overflow:hidden}.bg-accent{background-color:var(--green-500)}.bg-\\[\\#0034CB\\]{--tw-text-opacity:1;background-color:rgb(0 52 203 / var(--tw-text-opacity))}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.duration-300{transition-duration:300ms}.flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.text-default{color:var(--black)}.text-inverse{color:var(--white)}.f-body-02{font-family:var(--f-body-02-fontFamily);font-weight:var(--f-body-02-fontWeight);font-size:var(--f-body-02-fontSize);line-height:var(--f-body-02-lineHeight);letter-spacing:var(--f-body-02-letterSpacing)}.absolute{position:absolute}.relative{position:relative}.z-0{z-index:0}.z-10{z-index:10}.inset-0{inset:0rem}.pointer-events-none{pointer-events:none}",i=n,r=class{constructor(e){t.registerInstance(this,e),this.value=0,this.rounded=!0}async updateValue(e){this.value=Math.min(100,Math.max(0,e))}render(){const e=Math.min(100,Math.max(0,this.value)),o=["outer","w-full","h-24","bg-default","border","border-softer","overflow-hidden",this.rounded?"rounded-lg":"","relative"].filter(Boolean).join(" "),a=["inner","h-full","transition-all","duration-300","bg-accent",e>0&&this.rounded?"rounded-lg":"","z-0"].filter(Boolean).join(" ");return t.h("div",{key:"8760afff9f85f05fec52b0a7fb668661e49dc06f",role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e,"aria-valuetext":`${e}%`,class:o},t.h("div",{key:"06165b69fe7e170f4f61d9f95b5a44342d4ee67a",class:a,style:{width:`${e}%`}}),t.h("div",{key:"0c48e65c5a6cb0b4dff7a7e3e248052cdc29957d",class:"absolute inset-0 flex items-center justify-center pointer-events-none z-10"},t.h("span",{key:"fc6f7396cf741ba18d1b5d065bdd1b7bfff12abe",class:"text-default f-body-02"},e,"%")))}};r.style=i;exports.eds_progress_bar=r;
@@ -0,0 +1,39 @@
1
+ import { r as a, h as t } from "./index-BvZ-fq9l.mjs";
2
+ const n = ".w-full{width:100%}.h-full{height:100%}.bg-default{background-color:var(--grey-200)}.rounded-lg{border-radius:16px}.h-24{height:1.5rem}.border{border-width:1px}.border-softer{border:2px solid rgba(0, 0, 0, .1)}.overflow-hidden{overflow:hidden}.bg-accent{background-color:var(--green-500)}.bg-\\[\\#0034CB\\]{--tw-text-opacity:1;background-color:rgb(0 52 203 / var(--tw-text-opacity))}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.duration-300{transition-duration:300ms}.flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.text-default{color:var(--black)}.text-inverse{color:var(--white)}.f-body-02{font-family:var(--f-body-02-fontFamily);font-weight:var(--f-body-02-fontWeight);font-size:var(--f-body-02-fontSize);line-height:var(--f-body-02-lineHeight);letter-spacing:var(--f-body-02-letterSpacing)}.absolute{position:absolute}.relative{position:relative}.z-0{z-index:0}.z-10{z-index:10}.inset-0{inset:0rem}.pointer-events-none{pointer-events:none}", i = n, s = class {
3
+ constructor(e) {
4
+ a(this, e), this.value = 0, this.rounded = !0;
5
+ }
6
+ /**
7
+ * Method to update the progress value externally.
8
+ * @param newValue The new progress value (0-100).
9
+ */
10
+ async updateValue(e) {
11
+ this.value = Math.min(100, Math.max(0, e));
12
+ }
13
+ render() {
14
+ const e = Math.min(100, Math.max(0, this.value)), r = [
15
+ "outer",
16
+ "w-full",
17
+ "h-24",
18
+ "bg-default",
19
+ "border",
20
+ "border-softer",
21
+ "overflow-hidden",
22
+ this.rounded ? "rounded-lg" : "",
23
+ "relative"
24
+ ].filter(Boolean).join(" "), o = [
25
+ "inner",
26
+ "h-full",
27
+ "transition-all",
28
+ "duration-300",
29
+ "bg-accent",
30
+ e > 0 && this.rounded ? "rounded-lg" : "",
31
+ "z-0"
32
+ ].filter(Boolean).join(" ");
33
+ return t("div", { key: "8760afff9f85f05fec52b0a7fb668661e49dc06f", role: "progressbar", "aria-valuemin": "0", "aria-valuemax": "100", "aria-valuenow": e, "aria-valuetext": `${e}%`, class: r }, t("div", { key: "06165b69fe7e170f4f61d9f95b5a44342d4ee67a", class: o, style: { width: `${e}%` } }), t("div", { key: "0c48e65c5a6cb0b4dff7a7e3e248052cdc29957d", class: "absolute inset-0 flex items-center justify-center pointer-events-none z-10" }, t("span", { key: "fc6f7396cf741ba18d1b5d065bdd1b7bfff12abe", class: "text-default f-body-02" }, e, "%")));
34
+ }
35
+ };
36
+ s.style = i;
37
+ export {
38
+ s as eds_progress_bar
39
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CJvr9v3B.js"),s=":host{display:inline-block}.block{display:block}.stars{display:flex;gap:0.25rem;cursor:pointer}.star{color:var(--star-empty-color, #ccc);transition:color 0.2s ease-in-out}.star.filled{color:var(--green-500);}.star:hover,.star.filled:hover{transform:scale(1.2)}.flex{display:flex}.inline-flex{display:inline-flex}.flex-col{flex-direction:column}.mt-4{margin-top:0.25rem}.mt-6{margin-top:0.375rem}.mt-8{margin-top:0.5rem}.my-4{margin-top:0.25rem;margin-bottom:0.25rem}.my-8{margin-top:0.5rem;margin-bottom:0.5rem}.my-16{margin-top:1rem;margin-bottom:1rem}.my-20{margin-top:1.25rem;margin-bottom:1.25rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.0625rem * var(--tw-space-x-reverse));margin-left:calc(0.0625rem * calc(1 - var(--tw-space-x-reverse)))}",o=s,n=class{constructor(e){r.registerInstance(this,e),this.rating=r.createEvent(this,"rating",7),this.ratingType="star",this.ratingCount=5,this.selectedRating=0}componentDidLoad(){this.el.shadowRoot.querySelectorAll("eds-button").forEach(t=>{this.emitContext(t)})}emitContext(e){const t=new CustomEvent("parentContext",{detail:{componentName:this.el.tagName.toLowerCase(),identifier:this.selectedRating}});e.dispatchEvent(t)}handleClick(e){this.selectedRating=e,this.rating.emit(e)}render(){return r.h("div",{key:"685ac01e4db577b07d00030b0c25e10b9b0defa8",role:"radiogroup",class:"stars flex space-x-1 my-8"},Array.from({length:this.ratingCount},(e,t)=>{const a=t+1,i=a<=this.selectedRating;return r.h("eds-button",{icon:this.ratingType,role:"radio","aria-checked":i?"true":"false","aria-label":this.ratingType,onClick:()=>this.handleClick(a),tabIndex:this.selectedRating===0&&t===0||i?0:-1,intent:i?"primary":"ghost",size:"large","extra-class":"p-2"})}))}get el(){return r.getElement(this)}};n.style=o;exports.eds_rating=n;
@@ -0,0 +1,61 @@
1
+ import { r as s, c as n, h as i, g as o } from "./index-BvZ-fq9l.mjs";
2
+ const l = ":host{display:inline-block}.block{display:block}.stars{display:flex;gap:0.25rem;cursor:pointer}.star{color:var(--star-empty-color, #ccc);transition:color 0.2s ease-in-out}.star.filled{color:var(--green-500);}.star:hover,.star.filled:hover{transform:scale(1.2)}.flex{display:flex}.inline-flex{display:inline-flex}.flex-col{flex-direction:column}.mt-4{margin-top:0.25rem}.mt-6{margin-top:0.375rem}.mt-8{margin-top:0.5rem}.my-4{margin-top:0.25rem;margin-bottom:0.25rem}.my-8{margin-top:0.5rem;margin-bottom:0.5rem}.my-16{margin-top:1rem;margin-bottom:1rem}.my-20{margin-top:1.25rem;margin-bottom:1.25rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.0625rem * var(--tw-space-x-reverse));margin-left:calc(0.0625rem * calc(1 - var(--tw-space-x-reverse)))}", c = l, m = class {
3
+ constructor(t) {
4
+ s(this, t), this.rating = n(this, "rating", 7), this.ratingType = "star", this.ratingCount = 5, this.selectedRating = 0;
5
+ }
6
+ /**
7
+ * Lifecycle method that runs when the component has fully loaded.
8
+ * It emits a custom event for each `eds-button` element contained within the breadcrumb.
9
+ */
10
+ componentDidLoad() {
11
+ this.el.shadowRoot.querySelectorAll("eds-button").forEach((e) => {
12
+ this.emitContext(e);
13
+ });
14
+ }
15
+ /**
16
+ * Emits a custom event called `parentContext` for a given link element.
17
+ * This event provides context information about the breadcrumb component.
18
+ *
19
+ * @param btnElement - The link element to which the event will be dispatched.
20
+ */
21
+ emitContext(t) {
22
+ const e = new CustomEvent("parentContext", {
23
+ detail: {
24
+ componentName: this.el.tagName.toLowerCase(),
25
+ identifier: this.selectedRating
26
+ }
27
+ });
28
+ t.dispatchEvent(e);
29
+ }
30
+ /**
31
+ * Handles the click event on a star.
32
+ * @param rating - The selected rating value.
33
+ */
34
+ handleClick(t) {
35
+ this.selectedRating = t, this.rating.emit(t);
36
+ }
37
+ render() {
38
+ return i("div", { key: "685ac01e4db577b07d00030b0c25e10b9b0defa8", role: "radiogroup", class: "stars flex space-x-1 my-8" }, Array.from({ length: this.ratingCount }, (t, e) => {
39
+ const a = e + 1, r = a <= this.selectedRating;
40
+ return i("eds-button", {
41
+ icon: this.ratingType,
42
+ role: "radio",
43
+ "aria-checked": r ? "true" : "false",
44
+ "aria-label": this.ratingType,
45
+ onClick: () => this.handleClick(a),
46
+ tabIndex: this.selectedRating === 0 && e === 0 || r ? 0 : -1,
47
+ intent: r ? "primary" : "ghost",
48
+ size: "large",
49
+ "extra-class": "p-2"
50
+ // Optional padding or styling for the star button
51
+ });
52
+ }));
53
+ }
54
+ get el() {
55
+ return o(this);
56
+ }
57
+ };
58
+ m.style = c;
59
+ export {
60
+ m as eds_rating
61
+ };
@@ -0,0 +1,39 @@
1
+ import { r as t, h as s } from "./index-BvZ-fq9l.mjs";
2
+ const a = "", n = a, c = class {
3
+ constructor(e) {
4
+ t(this, e), this.tag = "section", this.sectionTitle = "", this.headingLevel = "h2";
5
+ }
6
+ render() {
7
+ const e = this.tag;
8
+ return s(e, { key: "ff0b28dffb8aca2ad0ac1ee3eea7ebda75078f96" }, s("eds-section-heading", { key: "23e9bb2b084c6b8a534dd310fbe10e0de0211187", headingLevel: this.headingLevel, sectionTitle: this.sectionTitle }), s("slot", { key: "9cae6378bdb5304191d393967025570f94fdcdb2" }));
9
+ }
10
+ };
11
+ c.style = n;
12
+ const h = class {
13
+ constructor(e) {
14
+ t(this, e), this.sectionTitle = void 0, this.withContainer = !0, this.headingLevel = "h2", this.tag = "div", this.spacingLarge = !1;
15
+ }
16
+ getHeadingClass() {
17
+ return {
18
+ h1: "f-heading-01",
19
+ h2: "f-heading-02",
20
+ h3: "f-heading-03",
21
+ h4: "f-heading-04",
22
+ h5: "f-heading-05",
23
+ h6: "f-heading-06"
24
+ }[this.headingLevel];
25
+ }
26
+ render() {
27
+ const e = this.tag, i = this.headingLevel;
28
+ return s(e, { key: "bb32f87fd944ebf08ebcde3980c18cd4bed18783", class: {
29
+ "ui-section-header flex flex-wrap items-center justify-between gap-x-12 gap-y-8": !0,
30
+ container: this.withContainer,
31
+ "pt-48": this.spacingLarge,
32
+ "pt-28": !this.spacingLarge
33
+ } }, s(i, { key: "0cd8ea8aada58e30675579c82ba130b40257c7c6", class: this.getHeadingClass() }, this.sectionTitle));
34
+ }
35
+ };
36
+ export {
37
+ c as eds_section_core,
38
+ h as eds_section_heading
39
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CJvr9v3B.js"),n="",a=n,s=class{constructor(e){t.registerInstance(this,e),this.tag="section",this.sectionTitle="",this.headingLevel="h2"}render(){const e=this.tag;return t.h(e,{key:"ff0b28dffb8aca2ad0ac1ee3eea7ebda75078f96"},t.h("eds-section-heading",{key:"23e9bb2b084c6b8a534dd310fbe10e0de0211187",headingLevel:this.headingLevel,sectionTitle:this.sectionTitle}),t.h("slot",{key:"9cae6378bdb5304191d393967025570f94fdcdb2"}))}};s.style=a;const c=class{constructor(e){t.registerInstance(this,e),this.sectionTitle=void 0,this.withContainer=!0,this.headingLevel="h2",this.tag="div",this.spacingLarge=!1}getHeadingClass(){return{h1:"f-heading-01",h2:"f-heading-02",h3:"f-heading-03",h4:"f-heading-04",h5:"f-heading-05",h6:"f-heading-06"}[this.headingLevel]}render(){const e=this.tag,i=this.headingLevel;return t.h(e,{key:"bb32f87fd944ebf08ebcde3980c18cd4bed18783",class:{"ui-section-header flex flex-wrap items-center justify-between gap-x-12 gap-y-8":!0,container:this.withContainer,"pt-48":this.spacingLarge,"pt-28":!this.spacingLarge}},t.h(i,{key:"0cd8ea8aada58e30675579c82ba130b40257c7c6",class:this.getHeadingClass()},this.sectionTitle))}};exports.eds_section_core=s;exports.eds_section_heading=c;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CJvr9v3B.js"),r=":host{display:block}.spinner{box-sizing:border-box;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}",n=r,t=class{constructor(s){e.registerInstance(this,s),this.size="1rem",this.thickness="10px",this.borderColor="var(--grey-400)",this.bottomColor="var(--grey-900)",this.background="var(--grey-200)",this.fullscreen=!1}render(){const s=Object.assign({width:this.size,height:this.size,border:`${this.thickness} solid ${this.borderColor}`,borderBottomColor:this.bottomColor},!this.fullscreen&&{display:"inline-block"}),i=this.fullscreen?{position:"fixed",top:"0",left:"0",width:"100vw",height:"100vh",zIndex:"9999999",backgroundColor:this.background,display:"flex",alignItems:"center",justifyContent:"center"}:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",zIndex:"1000",backgroundColor:this.background,display:"flex",alignItems:"center",justifyContent:"center"};return e.h(e.Host,{key:"214876a56949c147e74c1a7072406234c2fb1a02"},e.h("div",{key:"b75b639fa38aafaf13e1eb727e28c5e67f3edafe",class:"spinner-overlay",style:i},e.h("span",{key:"87ba2ef7e1e9601ac0ae8132e9c891b4149a20b5",class:"spinner",style:s})))}};t.style=n;exports.eds_spinner=t;
@@ -0,0 +1,36 @@
1
+ import { r as i, h as s, H as r } from "./index-BvZ-fq9l.mjs";
2
+ const n = ":host{display:block}.spinner{box-sizing:border-box;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}", o = n, a = class {
3
+ constructor(e) {
4
+ i(this, e), this.size = "1rem", this.thickness = "10px", this.borderColor = "var(--grey-400)", this.bottomColor = "var(--grey-900)", this.background = "var(--grey-200)", this.fullscreen = !1;
5
+ }
6
+ render() {
7
+ const e = Object.assign({ width: this.size, height: this.size, border: `${this.thickness} solid ${this.borderColor}`, borderBottomColor: this.bottomColor }, !this.fullscreen && { display: "inline-block" }), t = this.fullscreen ? {
8
+ position: "fixed",
9
+ top: "0",
10
+ left: "0",
11
+ width: "100vw",
12
+ height: "100vh",
13
+ zIndex: "9999999",
14
+ backgroundColor: this.background,
15
+ display: "flex",
16
+ alignItems: "center",
17
+ justifyContent: "center"
18
+ } : {
19
+ position: "absolute",
20
+ top: "0",
21
+ left: "0",
22
+ width: "100%",
23
+ height: "100%",
24
+ zIndex: "1000",
25
+ backgroundColor: this.background,
26
+ display: "flex",
27
+ alignItems: "center",
28
+ justifyContent: "center"
29
+ };
30
+ return s(r, { key: "214876a56949c147e74c1a7072406234c2fb1a02" }, s("div", { key: "b75b639fa38aafaf13e1eb727e28c5e67f3edafe", class: "spinner-overlay", style: t }, s("span", { key: "87ba2ef7e1e9601ac0ae8132e9c891b4149a20b5", class: "spinner", style: e })));
31
+ }
32
+ };
33
+ a.style = o;
34
+ export {
35
+ a as eds_spinner
36
+ };
@@ -0,0 +1,39 @@
1
+ import { r as t, c as r, h as e, H as n } from "./index-BvZ-fq9l.mjs";
2
+ const o = ".splash-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999999;background-color:var(--grey-200);display:flex;flex-direction:column;align-items:center;justify-content:center}.logo-container{width:200px;height:200px;margin-bottom:1rem}.content-container{position:relative;width:5rem;height:5rem;display:flex;align-items:center;justify-content:center}", a = o, l = class {
3
+ constructor(s) {
4
+ t(this, s), this.splash = r(this, "splash", 7), this.inverse = !1, this.initPromise = void 0, this.isVisible = !0;
5
+ }
6
+ // When the component loads, check if there is a promise.
7
+ componentWillLoad() {
8
+ this.initPromise && this.handleInitPromise(this.initPromise);
9
+ }
10
+ // Watch for changes on initPromise.
11
+ async watchInitPromise(s) {
12
+ s && this.handleInitPromise(s);
13
+ }
14
+ async handleInitPromise(s) {
15
+ try {
16
+ await s, this.hideSplash();
17
+ } catch (i) {
18
+ this.splash.emit({ type: "error", message: i.message || "Unknown error" });
19
+ }
20
+ }
21
+ handleHideSplash() {
22
+ this.hideSplash();
23
+ }
24
+ hideSplash() {
25
+ this.isVisible = !1, this.splash.emit({ type: "hidden", message: "Splash screen hidden successfully" });
26
+ }
27
+ render() {
28
+ return this.isVisible ? e(n, null, e("div", { class: "splash-overlay", style: { background: this.inverse ? "black" : "var(--grey-200)" } }, e("div", { class: "logo-container" }, this.inverse ? e("eds-logo", { orientation: "vertical", type: "color-white" }) : e("eds-logo", { orientation: "vertical", type: "color" })), e("div", { class: "content-container" }, e("eds-spinner", { size: "1rem", thickness: "3px", "border-color": "var(--grey-400)", "bottom-color": "var(--grey-900)", background: "none", fullscreen: !1 })))) : null;
29
+ }
30
+ static get watchers() {
31
+ return {
32
+ initPromise: ["watchInitPromise"]
33
+ };
34
+ }
35
+ };
36
+ l.style = a;
37
+ export {
38
+ l as eds_splash_screen
39
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CJvr9v3B.js"),n=".splash-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999999;background-color:var(--grey-200);display:flex;flex-direction:column;align-items:center;justify-content:center}.logo-container{width:200px;height:200px;margin-bottom:1rem}.content-container{position:relative;width:5rem;height:5rem;display:flex;align-items:center;justify-content:center}",r=n,i=class{constructor(s){e.registerInstance(this,s),this.splash=e.createEvent(this,"splash",7),this.inverse=!1,this.initPromise=void 0,this.isVisible=!0}componentWillLoad(){this.initPromise&&this.handleInitPromise(this.initPromise)}async watchInitPromise(s){s&&this.handleInitPromise(s)}async handleInitPromise(s){try{await s,this.hideSplash()}catch(t){this.splash.emit({type:"error",message:t.message||"Unknown error"})}}handleHideSplash(){this.hideSplash()}hideSplash(){this.isVisible=!1,this.splash.emit({type:"hidden",message:"Splash screen hidden successfully"})}render(){return this.isVisible?e.h(e.Host,null,e.h("div",{class:"splash-overlay",style:{background:this.inverse?"black":"var(--grey-200)"}},e.h("div",{class:"logo-container"},this.inverse?e.h("eds-logo",{orientation:"vertical",type:"color-white"}):e.h("eds-logo",{orientation:"vertical",type:"color"})),e.h("div",{class:"content-container"},e.h("eds-spinner",{size:"1rem",thickness:"3px","border-color":"var(--grey-400)","bottom-color":"var(--grey-900)",background:"none",fullscreen:!1})))):null}static get watchers(){return{initPromise:["watchInitPromise"]}}};i.style=r;exports.eds_splash_screen=i;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CJvr9v3B.js"),s=require("./analytics-d99780e3-DgvAss6l.js"),a=":host{display:inline-block}.switch-container{display:inline-flex;align-items:center}.switch-label{font-family:var(--f-ui-02-light-fontFamily);font-weight:var(--f-ui-02-light-fontWeight);font-size:var(--f-ui-02-light-fontSize);line-height:var(--f-ui-02-light-lineHeight);letter-spacing:var(--f-ui-02-light-letterSpacing)}button.switch{position:relative;display:inline-flex;align-items:center;width:50px;height:26px;border:none;border-radius:13px;background-color:#ccc;padding:0;cursor:pointer;transition:background-color 0.2s}button.switch:focus{outline:none;box-shadow:0 0 0 2px #007aff}button.switch.switch--checked{background-color:var(--green-500)}button.switch.switch--disabled{opacity:0.6;cursor:not-allowed}.switch-handle{position:absolute;width:22px;height:22px;border-radius:50%;background-color:#fff;top:2px;left:2px;transition:transform 0.2s}button.switch.switch--checked .switch-handle{transform:translateX(24px)}.ml-8{margin-left:0.5rem}.mr-8{margin-right:0.5rem}",c=a,i=class{constructor(t){e.registerInstance(this,t),this.uiswitch=e.createEvent(this,"uiswitch",7),this.toggleSwitch=()=>{this.disabled||(this.checked=!this.checked,this.uiswitch.emit(this.checked),s.sendAnalytics({category:"ui-component",tag:this.el.tagName.toLowerCase(),name:this.checked?this.labelOn:this.labelOff||"",action:"checked"}))},this.checked=!1,this.disabled=!1,this.labelOn="",this.labelOff=""}render(){const t=this.labelOn||this.labelOff?this.checked?this.labelOn:this.labelOff:"Toggle switch";return e.h("div",{key:"442876be1bad7ea8c9e383bc68b192a2744c38f9",class:"switch-container"},this.labelOff&&e.h("span",{key:"e4a7b01c0188d26e5b6524741b1c8ef66e357e35",class:"switch-label switch-label--off mr-8"},this.labelOff),e.h("button",{key:"f56b3762622671acf793568a96567193c38999c7",type:"button",role:"switch","aria-checked":this.checked?"true":"false","aria-disabled":this.disabled?"true":"false","aria-label":t,class:{switch:!0,"switch--checked":this.checked,"switch--disabled":this.disabled},onClick:this.toggleSwitch,disabled:this.disabled},e.h("span",{key:"b76e89a1e37130542dd86ce3aed8c5690aeeda63",class:"switch-handle"})),this.labelOn&&e.h("span",{key:"4e5d4f8a2f19bb612a17fa73e441e7e718b71508",class:"switch-label switch-label--on ml-8"},this.labelOn))}get el(){return e.getElement(this)}};i.style=c;exports.eds_switch=i;
@@ -0,0 +1,29 @@
1
+ import { r as i, c as s, h as e, g as a } from "./index-BvZ-fq9l.mjs";
2
+ import { s as c } from "./analytics-d99780e3-Bay18Oil.mjs";
3
+ const l = ":host{display:inline-block}.switch-container{display:inline-flex;align-items:center}.switch-label{font-family:var(--f-ui-02-light-fontFamily);font-weight:var(--f-ui-02-light-fontWeight);font-size:var(--f-ui-02-light-fontSize);line-height:var(--f-ui-02-light-lineHeight);letter-spacing:var(--f-ui-02-light-letterSpacing)}button.switch{position:relative;display:inline-flex;align-items:center;width:50px;height:26px;border:none;border-radius:13px;background-color:#ccc;padding:0;cursor:pointer;transition:background-color 0.2s}button.switch:focus{outline:none;box-shadow:0 0 0 2px #007aff}button.switch.switch--checked{background-color:var(--green-500)}button.switch.switch--disabled{opacity:0.6;cursor:not-allowed}.switch-handle{position:absolute;width:22px;height:22px;border-radius:50%;background-color:#fff;top:2px;left:2px;transition:transform 0.2s}button.switch.switch--checked .switch-handle{transform:translateX(24px)}.ml-8{margin-left:0.5rem}.mr-8{margin-right:0.5rem}", h = l, n = class {
4
+ constructor(t) {
5
+ i(this, t), this.uiswitch = s(this, "uiswitch", 7), this.toggleSwitch = () => {
6
+ this.disabled || (this.checked = !this.checked, this.uiswitch.emit(this.checked), c({
7
+ category: "ui-component",
8
+ tag: this.el.tagName.toLowerCase(),
9
+ name: this.checked ? this.labelOn : this.labelOff || "",
10
+ action: "checked"
11
+ }));
12
+ }, this.checked = !1, this.disabled = !1, this.labelOn = "", this.labelOff = "";
13
+ }
14
+ render() {
15
+ const t = this.labelOn || this.labelOff ? this.checked ? this.labelOn : this.labelOff : "Toggle switch";
16
+ return e("div", { key: "442876be1bad7ea8c9e383bc68b192a2744c38f9", class: "switch-container" }, this.labelOff && e("span", { key: "e4a7b01c0188d26e5b6524741b1c8ef66e357e35", class: "switch-label switch-label--off mr-8" }, this.labelOff), e("button", { key: "f56b3762622671acf793568a96567193c38999c7", type: "button", role: "switch", "aria-checked": this.checked ? "true" : "false", "aria-disabled": this.disabled ? "true" : "false", "aria-label": t, class: {
17
+ switch: !0,
18
+ "switch--checked": this.checked,
19
+ "switch--disabled": this.disabled
20
+ }, onClick: this.toggleSwitch, disabled: this.disabled }, e("span", { key: "b76e89a1e37130542dd86ce3aed8c5690aeeda63", class: "switch-handle" })), this.labelOn && e("span", { key: "4e5d4f8a2f19bb612a17fa73e441e7e718b71508", class: "switch-label switch-label--on ml-8" }, this.labelOn));
21
+ }
22
+ get el() {
23
+ return a(this);
24
+ }
25
+ };
26
+ n.style = h;
27
+ export {
28
+ n as eds_switch
29
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CJvr9v3B.js"),l=require("./sharedUtils-a550989c-m4pF1Vqy.js"),i=".max-w-sidebar{max-width:1224px}.mx-auto{margin-left:auto;margin-right:auto}.px-4{padding-left:0.25rem;padding-right:0.25rem}.py-8{padding-top:0.5rem;padding-bottom:0.5rem}.relative{position:relative}.absolute{position:absolute}.flex{display:flex}.w-4{width:0.25rem}.pr-4{padding-right:0.25rem}.pl-4{padding-left:0.25rem}.w-1\\/2{width:50%}.left-1\\/2{left:50%}.transform{transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.bg-strong{background-color:var(--grey-700)}.h-full{height:100%}.z-0{z-index:0}.space-y-16>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.items-center{align-items:center}.justify-center{justify-content:center}.w-32{width:2rem}.h-32{height:2rem}.bg-accent{background-color:var(--green-500)}.rounded-full{border-radius:9999px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}",n=i,r=class{constructor(e){t.registerInstance(this,e),this.events=void 0,this.selectedEvent=null,this.parsedEvents=[]}parseEvents(e){const a=l.parseData(e);this.parsedEvents=Array.isArray(a)?a.map(s=>Object.assign(Object.assign({},s),{completed:s.completed==="true"||s.completed===!0})):[]}componentWillLoad(){this.parseEvents(this.events)}componentDidLoad(){this.el.querySelectorAll("eds-card-generic").forEach(a=>{this.emitContext(a)})}emitContext(e){const a=new CustomEvent("parentContext",{detail:{componentName:this.el.tagName.toLowerCase(),identifier:null}});e.dispatchEvent(a)}handleEventClick(e){this.selectedEvent=e,this.modalRef&&typeof this.modalRef.open=="function"&&this.modalRef.open()}render(){return t.h("div",{key:"63ce0ce7e3a632906f664011243abf9f816bc53a",class:"max-w-sidebar mx-auto px-4 py-8"},t.h("div",{key:"794d16f6b68d87bb1fb4665cc5ef84b381fb55ea",class:"relative"},t.h("div",{key:"2b82b5594a9ed5c056898725f40e56858282412a",class:"absolute w-4 left-1/2 transform -translate-x-1/2 bg-strong h-full z-0"}),t.h("div",{key:"6d33b71396649e7b90d050c0858912fa49c309a7",class:"space-y-16"},this.parsedEvents.map((e,a)=>t.h("div",{class:"relative flex"},t.h("div",{class:`w-1/2 ${a%2===0?"pr-4":""}`},a%2===0&&t.h("eds-card-generic",{cardTitle:e.title,url:"#",description:e.description,"heading-level":"h2",tiny:!0,bg:!e.completed,"with-hover":"false",tags:JSON.stringify(e.completed?[{label:"completed",style:"accent"}]:[{label:"pending",style:"default"}]),onClick:()=>this.handleEventClick(e)})),t.h("div",{class:"flex items-center justify-center relative"},e.completed?t.h("div",{class:"w-32 h-32 bg-accent rounded-full shadow flex items-center justify-center"}):t.h("div",{class:"w-32 h-32 bg-strong rounded-full shadow flex items-center justify-center"})),t.h("div",{class:`w-1/2 ${a%2!==0?"pl-4":""}`},a%2!==0&&t.h("eds-card-generic",{cardTitle:e.title,url:"#",description:e.description,"heading-level":"h2",tiny:!0,bg:!e.completed,"with-hover":"false",tags:JSON.stringify(e.completed?[{label:"completed",style:"accent"}]:[{label:"pending",style:"default"}]),onClick:()=>this.handleEventClick(e)})))))))}get el(){return t.getElement(this)}static get watchers(){return{events:["parseEvents"]}}};r.style=n;exports.eds_timeline=r;