@ebrains/components 0.9.0-beta → 0.9.1-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +9 -0
  3. package/dist/cjs/components.cjs.js +1 -1
  4. package/dist/cjs/eds-accordion.cjs.entry.js +4 -4
  5. package/dist/cjs/{eds-avatar_24.cjs.entry.js → eds-avatar_26.cjs.entry.js} +186 -5
  6. package/dist/cjs/{eds-card-desc_3.cjs.entry.js → eds-card-desc_2.cjs.entry.js} +0 -35
  7. package/dist/cjs/eds-card-generic.cjs.entry.js +2 -2
  8. package/dist/cjs/eds-matomo-notice.cjs.entry.js +2 -2
  9. package/dist/cjs/eds-modal.cjs.entry.js +5 -5
  10. package/dist/cjs/eds-section-core_2.cjs.entry.js +2 -2
  11. package/dist/cjs/eds-switch.cjs.entry.js +2 -2
  12. package/dist/cjs/eds-tabs.cjs.entry.js +5 -5
  13. package/dist/cjs/eds-timeline.cjs.entry.js +1 -1
  14. package/dist/cjs/index-2f63169d.js +4 -8
  15. package/dist/cjs/loader.cjs.js +1 -1
  16. package/dist/collection/components/eds-accordion/eds-accordion.js +5 -5
  17. package/dist/collection/components/eds-breadcrump/eds-breadcrump.js +8 -1
  18. package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.css +5 -0
  19. package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.js +1 -1
  20. package/dist/collection/components/eds-link/eds-link.css +6 -6
  21. package/dist/collection/components/eds-modal/eds-modal.js +6 -6
  22. package/dist/collection/components/eds-section/eds-section-heading/eds-section-heading.js +5 -2
  23. package/dist/collection/components/eds-switch/eds-switch.js +3 -3
  24. package/dist/collection/components/eds-tag/eds-tag.css +45 -0
  25. package/dist/collection/components/eds-tag/eds-tag.js +31 -5
  26. package/dist/collection/components/eds-tag/eds-tag.stories.js +11 -4
  27. package/dist/collection/components/eds-timeline/eds-timeline.css +20 -0
  28. package/dist/collection/shared-ui/eds-matomo-notice/eds-matomo-notice.js +3 -3
  29. package/dist/collection/shared-ui/eds-social-networks/eds-social-networks.js +3 -3
  30. package/dist/collection/shared-ui/eds-tabs/eds-tabs.css +20 -0
  31. package/dist/collection/shared-ui/eds-tabs/eds-tabs.js +5 -5
  32. package/dist/collection/shared-ui/eds-user/eds-user.css +20 -0
  33. package/dist/components/components.css +20 -0
  34. package/dist/components/components.esm.js +1 -1
  35. package/dist/components/eds-accordion2.js +5 -5
  36. package/dist/components/eds-breadcrumb.js +8 -1
  37. package/dist/components/eds-card-generic2.js +2 -2
  38. package/dist/components/eds-link2.js +1 -1
  39. package/dist/components/eds-matomo-notice2.js +3 -3
  40. package/dist/components/eds-modal.js +6 -6
  41. package/dist/components/eds-section-heading2.js +2 -2
  42. package/dist/components/eds-social-networks2.js +3 -3
  43. package/dist/components/eds-switch.js +2 -2
  44. package/dist/components/eds-tabs.js +6 -6
  45. package/dist/components/eds-tag2.js +15 -6
  46. package/dist/components/eds-timeline.js +1 -1
  47. package/dist/components/eds-user.js +1 -1
  48. package/dist/components/p-0467ceb5.entry.js +1 -0
  49. package/dist/components/{p-424ba743.entry.js → p-1309a74c.entry.js} +1 -1
  50. package/dist/components/p-4620ebf5.entry.js +1 -0
  51. package/dist/components/{p-bcbc7b7f.entry.js → p-94b1f974.entry.js} +1 -1
  52. package/dist/components/p-b931a634.entry.js +1 -0
  53. package/dist/components/{p-9cbcccf8.entry.js → p-c5c782e7.entry.js} +1 -1
  54. package/dist/components/p-c99745a8.entry.js +1 -0
  55. package/dist/components/p-e42eb100.entry.js +1 -0
  56. package/dist/components/{p-59d963d1.entry.js → p-e710c860.entry.js} +1 -1
  57. package/dist/components/p-f4ce515a.entry.js +1 -0
  58. package/dist/esm/components.js +1 -1
  59. package/dist/esm/eds-accordion.entry.js +4 -4
  60. package/dist/esm/{eds-avatar_24.entry.js → eds-avatar_26.entry.js} +185 -6
  61. package/dist/esm/{eds-card-desc_3.entry.js → eds-card-desc_2.entry.js} +1 -35
  62. package/dist/esm/eds-card-generic.entry.js +2 -2
  63. package/dist/esm/eds-matomo-notice.entry.js +2 -2
  64. package/dist/esm/eds-modal.entry.js +5 -5
  65. package/dist/esm/eds-section-core_2.entry.js +2 -2
  66. package/dist/esm/eds-switch.entry.js +2 -2
  67. package/dist/esm/eds-tabs.entry.js +5 -5
  68. package/dist/esm/eds-timeline.entry.js +1 -1
  69. package/dist/esm/index-8a71b9a7.js +4 -8
  70. package/dist/esm/loader.js +1 -1
  71. package/dist/hydrate/index.js +59 -40
  72. package/dist/hydrate/index.mjs +59 -40
  73. package/dist/stencil.config.js +16 -1
  74. package/dist/types/components/eds-accordion/eds-accordion.d.ts +1 -1
  75. package/dist/types/components/eds-modal/eds-modal.d.ts +1 -1
  76. package/dist/types/components/eds-section/eds-section-heading/eds-section-heading.d.ts +3 -0
  77. package/dist/types/components/eds-switch/eds-switch.d.ts +1 -1
  78. package/dist/types/components/eds-tag/eds-tag.d.ts +5 -1
  79. package/dist/types/components/eds-tag/eds-tag.stories.d.ts +7 -0
  80. package/dist/types/components.d.ts +40 -64
  81. package/dist/types/shared-ui/eds-matomo-notice/eds-matomo-notice.d.ts +1 -1
  82. package/dist/types/shared-ui/eds-social-networks/eds-social-networks.d.ts +1 -1
  83. package/dist/types/shared-ui/eds-tabs/eds-tabs.d.ts +1 -1
  84. package/package.json +3 -3
  85. package/dist/cjs/eds-breadcrumb.cjs.entry.js +0 -139
  86. package/dist/components/p-032f9f64.entry.js +0 -1
  87. package/dist/components/p-058cf100.entry.js +0 -1
  88. package/dist/components/p-1b4e9576.entry.js +0 -1
  89. package/dist/components/p-30a319d5.entry.js +0 -1
  90. package/dist/components/p-85ad681a.entry.js +0 -1
  91. package/dist/components/p-b47d115d.entry.js +0 -1
  92. package/dist/components/p-b55b0091.entry.js +0 -1
  93. package/dist/esm/eds-breadcrumb.entry.js +0 -135
@@ -2,6 +2,7 @@ import { reactOutputTarget } from "@stencil/react-output-target";
2
2
  import { vueOutputTarget } from "@stencil/vue-output-target";
3
3
  import { angularOutputTarget } from "@stencil/angular-output-target";
4
4
  import { inlineSvg } from "stencil-inline-svg";
5
+ import path from "path";
5
6
  export const config = {
6
7
  env: {},
7
8
  namespace: 'components',
@@ -16,6 +17,20 @@ export const config = {
16
17
  {
17
18
  type: 'dist',
18
19
  esmLoaderPath: '../loader',
20
+ copy: [
21
+ {
22
+ // README.md next to this config file
23
+ src: path.resolve(__dirname, 'README.md'),
24
+ // your stencil dist folder
25
+ dest: path.resolve(__dirname, '../../dist/packages/components'),
26
+ },
27
+ {
28
+ // README.md next to this config file
29
+ src: path.resolve(__dirname, 'LICENSE'),
30
+ // your stencil dist folder
31
+ dest: path.resolve(__dirname, '../../dist/packages/components'),
32
+ }
33
+ ]
19
34
  },
20
35
  {
21
36
  type: 'docs-readme',
@@ -30,7 +45,7 @@ export const config = {
30
45
  },
31
46
  {
32
47
  type: 'dist-custom-elements',
33
- includeGlobalScripts: false,
48
+ includeGlobalScripts: false
34
49
  },
35
50
  reactOutputTarget({
36
51
  componentCorePackage: '@ebrains/components',
@@ -22,7 +22,7 @@ export declare class EdsAccordion {
22
22
  /** Host element reference */
23
23
  el: HTMLElement;
24
24
  /** The title of the accordion, displayed in the header area */
25
- title: string;
25
+ heading: string;
26
26
  /** Optional description displayed above the main content */
27
27
  description?: string;
28
28
  /** Toggles the background color on expand and hover */
@@ -16,7 +16,7 @@ export declare class EdsModal {
16
16
  /**
17
17
  * The title of the modal.
18
18
  */
19
- title: string;
19
+ heading: string;
20
20
  /**
21
21
  * A boolean indicating whether the description should be truncated.
22
22
  * Default is `true`.
@@ -8,6 +8,9 @@
8
8
  *
9
9
  * This component is suitable for structuring page sections with visually distinct and accessible headings.
10
10
  */
11
+ /**
12
+ * @internal
13
+ */
11
14
  export declare class EdsSectionHeading {
12
15
  /**
13
16
  * The main title for the section. This is required and displayed prominently.
@@ -19,7 +19,7 @@ export declare class EdsSwitch {
19
19
  /**
20
20
  * Emitted when the switch is toggled.
21
21
  */
22
- change: EventEmitter<boolean>;
22
+ toggle: EventEmitter<boolean>;
23
23
  private toggleSwitch;
24
24
  render(): any;
25
25
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * `EdsTag` is a stylized label component designed to display short, categorical information.
3
- * It supports multiple visual styles defined by the `intent` prop.
3
+ * It supports multiple visual styles defined by the `intent` prop and three sizes.
4
4
  */
5
5
  export declare class EdsTag {
6
6
  /**
@@ -11,5 +11,9 @@ export declare class EdsTag {
11
11
  * The visual style or intent of the tag.
12
12
  */
13
13
  intent: 'default' | 'strong' | 'accent' | 'weak' | 'inverse' | 'inverse-strong';
14
+ /**
15
+ * The size of the tag: small, medium, or large.
16
+ */
17
+ size: 'small' | 'medium' | 'large';
14
18
  render(): any;
15
19
  }
@@ -11,10 +11,16 @@ declare const _default: {
11
11
  options: string[];
12
12
  description: string;
13
13
  };
14
+ size: {
15
+ control: string;
16
+ options: string[];
17
+ description: string;
18
+ };
14
19
  };
15
20
  args: {
16
21
  label: string;
17
22
  intent: string;
23
+ size: string;
18
24
  };
19
25
  parameters: {};
20
26
  };
@@ -24,5 +30,6 @@ export declare const Default: {
24
30
  args: {
25
31
  label: string;
26
32
  intent: string;
33
+ size: string;
27
34
  };
28
35
  };
@@ -71,13 +71,13 @@ export namespace Components {
71
71
  */
72
72
  "expanded": boolean;
73
73
  /**
74
- * Toggles the background color on expand and hover
74
+ * The title of the accordion, displayed in the header area
75
75
  */
76
- "switchBg": boolean;
76
+ "heading": string;
77
77
  /**
78
- * The title of the accordion, displayed in the header area
78
+ * Toggles the background color on expand and hover
79
79
  */
80
- "title": string;
80
+ "switchBg": boolean;
81
81
  }
82
82
  /**
83
83
  * `EdsAlert` is a versatile alert component designed for displaying contextual messages.
@@ -1409,11 +1409,11 @@ export namespace Components {
1409
1409
  * When true, the notice is forced to show regardless of cookies/session.
1410
1410
  */
1411
1411
  "forceShow": boolean;
1412
- "optOutMessage": string;
1413
1412
  /**
1414
1413
  * The title displayed in the notice.
1415
1414
  */
1416
- "title": string;
1415
+ "heading": string;
1416
+ "optOutMessage": string;
1417
1417
  }
1418
1418
  /**
1419
1419
  * `EdsModal` is a modal dialog component that can be toggled open or closed.
@@ -1428,6 +1428,10 @@ export namespace Components {
1428
1428
  * Closes the modal.
1429
1429
  */
1430
1430
  "close": () => Promise<void>;
1431
+ /**
1432
+ * The title of the modal.
1433
+ */
1434
+ "heading": string;
1431
1435
  /**
1432
1436
  * Opens the modal.
1433
1437
  */
@@ -1436,10 +1440,6 @@ export namespace Components {
1436
1440
  * Specifies the position of the modal. Acceptable values are: - `"middle"` (default): The modal is centered both vertically and horizontally. - `"top"`: The modal is positioned near the top of the viewport. - `"bottom"`: The modal is positioned near the bottom of the viewport. - `"left"`: The modal is positioned on the left side of the viewport, centered vertically. - `"right"`: The modal is positioned on the right side of the viewport, centered vertically.
1437
1441
  */
1438
1442
  "position": 'middle' | 'top' | 'bottom' | 'left' | 'right';
1439
- /**
1440
- * The title of the modal.
1441
- */
1442
- "title": string;
1443
1443
  /**
1444
1444
  * Toggles the modal open or closed.
1445
1445
  */
@@ -1546,14 +1546,6 @@ export namespace Components {
1546
1546
  */
1547
1547
  "tag": 'div' | 'section';
1548
1548
  }
1549
- /**
1550
- * `EdsSectionHeading` is a configurable component for displaying section titles with customizable headings and optional container styling.
1551
- * Key Features:
1552
- * - Allows dynamic selection of HTML heading level (e.g., `h1`, `h2`) for semantic structure.
1553
- * - Supports wrapping the heading in a container with configurable padding.
1554
- * - Can be used within sections to provide consistent and accessible headings.
1555
- * This component is suitable for structuring page sections with visually distinct and accessible headings.
1556
- */
1557
1549
  interface EdsSectionHeading {
1558
1550
  /**
1559
1551
  * The HTML heading level for the section title (e.g., 'h1', 'h2', etc.). Default is 'h2'.
@@ -1584,7 +1576,7 @@ export namespace Components {
1584
1576
  /**
1585
1577
  * Social Network custom title to display
1586
1578
  */
1587
- "title": string;
1579
+ "heading": string;
1588
1580
  }
1589
1581
  interface EdsSpinner {
1590
1582
  /**
@@ -1730,7 +1722,7 @@ export namespace Components {
1730
1722
  /**
1731
1723
  * The Tabs identifier
1732
1724
  */
1733
- "id": string;
1725
+ "identifier": string;
1734
1726
  /**
1735
1727
  * Aria label for the navigation
1736
1728
  */
@@ -1742,7 +1734,7 @@ export namespace Components {
1742
1734
  }
1743
1735
  /**
1744
1736
  * `EdsTag` is a stylized label component designed to display short, categorical information.
1745
- * It supports multiple visual styles defined by the `intent` prop.
1737
+ * It supports multiple visual styles defined by the `intent` prop and three sizes.
1746
1738
  */
1747
1739
  interface EdsTag {
1748
1740
  /**
@@ -1753,6 +1745,10 @@ export namespace Components {
1753
1745
  * The label to be displayed inside the tag.
1754
1746
  */
1755
1747
  "label": string;
1748
+ /**
1749
+ * The size of the tag: small, medium, or large.
1750
+ */
1751
+ "size": 'small' | 'medium' | 'large';
1756
1752
  }
1757
1753
  interface EdsTimeline {
1758
1754
  /**
@@ -2811,14 +2807,6 @@ declare global {
2811
2807
  prototype: HTMLEdsSectionCoreElement;
2812
2808
  new (): HTMLEdsSectionCoreElement;
2813
2809
  };
2814
- /**
2815
- * `EdsSectionHeading` is a configurable component for displaying section titles with customizable headings and optional container styling.
2816
- * Key Features:
2817
- * - Allows dynamic selection of HTML heading level (e.g., `h1`, `h2`) for semantic structure.
2818
- * - Supports wrapping the heading in a container with configurable padding.
2819
- * - Can be used within sections to provide consistent and accessible headings.
2820
- * This component is suitable for structuring page sections with visually distinct and accessible headings.
2821
- */
2822
2810
  interface HTMLEdsSectionHeadingElement extends Components.EdsSectionHeading, HTMLStencilElement {
2823
2811
  }
2824
2812
  var HTMLEdsSectionHeadingElement: {
@@ -2893,7 +2881,7 @@ declare global {
2893
2881
  new (): HTMLEdsStepsV2Element;
2894
2882
  };
2895
2883
  interface HTMLEdsSwitchElementEventMap {
2896
- "change": boolean;
2884
+ "toggle": boolean;
2897
2885
  }
2898
2886
  interface HTMLEdsSwitchElement extends Components.EdsSwitch, HTMLStencilElement {
2899
2887
  addEventListener<K extends keyof HTMLEdsSwitchElementEventMap>(type: K, listener: (this: HTMLEdsSwitchElement, ev: EdsSwitchCustomEvent<HTMLEdsSwitchElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -2955,7 +2943,7 @@ declare global {
2955
2943
  };
2956
2944
  /**
2957
2945
  * `EdsTag` is a stylized label component designed to display short, categorical information.
2958
- * It supports multiple visual styles defined by the `intent` prop.
2946
+ * It supports multiple visual styles defined by the `intent` prop and three sizes.
2959
2947
  */
2960
2948
  interface HTMLEdsTagElement extends Components.EdsTag, HTMLStencilElement {
2961
2949
  }
@@ -3280,6 +3268,10 @@ declare namespace LocalJSX {
3280
3268
  * Determines if the accordion is expanded by default
3281
3269
  */
3282
3270
  "expanded"?: boolean;
3271
+ /**
3272
+ * The title of the accordion, displayed in the header area
3273
+ */
3274
+ "heading"?: string;
3283
3275
  /**
3284
3276
  * Event emitted when the accordion toggles, indicating the new expanded/collapsed state
3285
3277
  */
@@ -3288,10 +3280,6 @@ declare namespace LocalJSX {
3288
3280
  * Toggles the background color on expand and hover
3289
3281
  */
3290
3282
  "switchBg"?: boolean;
3291
- /**
3292
- * The title of the accordion, displayed in the header area
3293
- */
3294
- "title"?: string;
3295
3283
  }
3296
3284
  /**
3297
3285
  * `EdsAlert` is a versatile alert component designed for displaying contextual messages.
@@ -4671,15 +4659,15 @@ declare namespace LocalJSX {
4671
4659
  * When true, the notice is forced to show regardless of cookies/session.
4672
4660
  */
4673
4661
  "forceShow"?: boolean;
4662
+ /**
4663
+ * The title displayed in the notice.
4664
+ */
4665
+ "heading"?: string;
4674
4666
  /**
4675
4667
  * Event emitted when the rating is changed.
4676
4668
  */
4677
4669
  "onConsent"?: (event: EdsMatomoNoticeCustomEvent<'in' | 'out' | 'defer'>) => void;
4678
4670
  "optOutMessage"?: string;
4679
- /**
4680
- * The title displayed in the notice.
4681
- */
4682
- "title"?: string;
4683
4671
  }
4684
4672
  /**
4685
4673
  * `EdsModal` is a modal dialog component that can be toggled open or closed.
@@ -4691,13 +4679,13 @@ declare namespace LocalJSX {
4691
4679
  */
4692
4680
  interface EdsModal {
4693
4681
  /**
4694
- * Specifies the position of the modal. Acceptable values are: - `"middle"` (default): The modal is centered both vertically and horizontally. - `"top"`: The modal is positioned near the top of the viewport. - `"bottom"`: The modal is positioned near the bottom of the viewport. - `"left"`: The modal is positioned on the left side of the viewport, centered vertically. - `"right"`: The modal is positioned on the right side of the viewport, centered vertically.
4682
+ * The title of the modal.
4695
4683
  */
4696
- "position"?: 'middle' | 'top' | 'bottom' | 'left' | 'right';
4684
+ "heading"?: string;
4697
4685
  /**
4698
- * The title of the modal.
4686
+ * Specifies the position of the modal. Acceptable values are: - `"middle"` (default): The modal is centered both vertically and horizontally. - `"top"`: The modal is positioned near the top of the viewport. - `"bottom"`: The modal is positioned near the bottom of the viewport. - `"left"`: The modal is positioned on the left side of the viewport, centered vertically. - `"right"`: The modal is positioned on the right side of the viewport, centered vertically.
4699
4687
  */
4700
- "title"?: string;
4688
+ "position"?: 'middle' | 'top' | 'bottom' | 'left' | 'right';
4701
4689
  /**
4702
4690
  * A boolean indicating whether the description should be truncated. Default is `true`.
4703
4691
  */
@@ -4799,14 +4787,6 @@ declare namespace LocalJSX {
4799
4787
  */
4800
4788
  "tag"?: 'div' | 'section';
4801
4789
  }
4802
- /**
4803
- * `EdsSectionHeading` is a configurable component for displaying section titles with customizable headings and optional container styling.
4804
- * Key Features:
4805
- * - Allows dynamic selection of HTML heading level (e.g., `h1`, `h2`) for semantic structure.
4806
- * - Supports wrapping the heading in a container with configurable padding.
4807
- * - Can be used within sections to provide consistent and accessible headings.
4808
- * This component is suitable for structuring page sections with visually distinct and accessible headings.
4809
- */
4810
4790
  interface EdsSectionHeading {
4811
4791
  /**
4812
4792
  * The HTML heading level for the section title (e.g., 'h1', 'h2', etc.). Default is 'h2'.
@@ -4837,7 +4817,7 @@ declare namespace LocalJSX {
4837
4817
  /**
4838
4818
  * Social Network custom title to display
4839
4819
  */
4840
- "title"?: string;
4820
+ "heading"?: string;
4841
4821
  }
4842
4822
  interface EdsSpinner {
4843
4823
  /**
@@ -4939,7 +4919,7 @@ declare namespace LocalJSX {
4939
4919
  /**
4940
4920
  * Emitted when the switch is toggled.
4941
4921
  */
4942
- "onChange"?: (event: EdsSwitchCustomEvent<boolean>) => void;
4922
+ "onToggle"?: (event: EdsSwitchCustomEvent<boolean>) => void;
4943
4923
  }
4944
4924
  /**
4945
4925
  * `EdsTable` is a customizable data table component with support for dynamic data fetching, column configuration, pagination, and search functionality.
@@ -4999,7 +4979,7 @@ declare namespace LocalJSX {
4999
4979
  /**
5000
4980
  * The Tabs identifier
5001
4981
  */
5002
- "id"?: string;
4982
+ "identifier"?: string;
5003
4983
  /**
5004
4984
  * Aria label for the navigation
5005
4985
  */
@@ -5016,7 +4996,7 @@ declare namespace LocalJSX {
5016
4996
  }
5017
4997
  /**
5018
4998
  * `EdsTag` is a stylized label component designed to display short, categorical information.
5019
- * It supports multiple visual styles defined by the `intent` prop.
4999
+ * It supports multiple visual styles defined by the `intent` prop and three sizes.
5020
5000
  */
5021
5001
  interface EdsTag {
5022
5002
  /**
@@ -5027,6 +5007,10 @@ declare namespace LocalJSX {
5027
5007
  * The label to be displayed inside the tag.
5028
5008
  */
5029
5009
  "label": string;
5010
+ /**
5011
+ * The size of the tag: small, medium, or large.
5012
+ */
5013
+ "size"?: 'small' | 'medium' | 'large';
5030
5014
  }
5031
5015
  interface EdsTimeline {
5032
5016
  /**
@@ -5552,14 +5536,6 @@ declare module "@stencil/core" {
5552
5536
  * This component is suitable for organizing content into clearly defined sections with semantic HTML structure.
5553
5537
  */
5554
5538
  "eds-section-core": LocalJSX.EdsSectionCore & JSXBase.HTMLAttributes<HTMLEdsSectionCoreElement>;
5555
- /**
5556
- * `EdsSectionHeading` is a configurable component for displaying section titles with customizable headings and optional container styling.
5557
- * Key Features:
5558
- * - Allows dynamic selection of HTML heading level (e.g., `h1`, `h2`) for semantic structure.
5559
- * - Supports wrapping the heading in a container with configurable padding.
5560
- * - Can be used within sections to provide consistent and accessible headings.
5561
- * This component is suitable for structuring page sections with visually distinct and accessible headings.
5562
- */
5563
5539
  "eds-section-heading": LocalJSX.EdsSectionHeading & JSXBase.HTMLAttributes<HTMLEdsSectionHeadingElement>;
5564
5540
  /**
5565
5541
  * Component representing a list of social network links for EBRAINS.
@@ -5592,7 +5568,7 @@ declare module "@stencil/core" {
5592
5568
  "eds-tabs": LocalJSX.EdsTabs & JSXBase.HTMLAttributes<HTMLEdsTabsElement>;
5593
5569
  /**
5594
5570
  * `EdsTag` is a stylized label component designed to display short, categorical information.
5595
- * It supports multiple visual styles defined by the `intent` prop.
5571
+ * It supports multiple visual styles defined by the `intent` prop and three sizes.
5596
5572
  */
5597
5573
  "eds-tag": LocalJSX.EdsTag & JSXBase.HTMLAttributes<HTMLEdsTagElement>;
5598
5574
  "eds-timeline": LocalJSX.EdsTimeline & JSXBase.HTMLAttributes<HTMLEdsTimelineElement>;
@@ -3,7 +3,7 @@ export declare class EdsMatomoNotice {
3
3
  /**
4
4
  * The title displayed in the notice.
5
5
  */
6
- title: string;
6
+ heading: string;
7
7
  /**
8
8
  * The description displayed in the notice.
9
9
  */
@@ -6,7 +6,7 @@ export declare class EdsSocialNetworks {
6
6
  /**
7
7
  * Social Network custom title to display
8
8
  */
9
- title: string;
9
+ heading: string;
10
10
  /**
11
11
  * Array of social network objects, each containing label, URL, and icon.
12
12
  * These are used to render the social network links.
@@ -11,7 +11,7 @@ import { EventEmitter } from '../../stencil-public-runtime';
11
11
  export declare class EdsTabs {
12
12
  el: HTMLElement;
13
13
  /** The Tabs identifier */
14
- id: string;
14
+ identifier: string;
15
15
  /** Aria label for the navigation */
16
16
  navAriaLabel: string;
17
17
  /** JSON string for tabs data */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebrains/components",
3
- "version": "0.9.0-beta",
3
+ "version": "0.9.1-beta",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -14,7 +14,7 @@
14
14
  "loader/"
15
15
  ],
16
16
  "dependencies": {
17
- "@ebrains/assets":"0.6.0-beta",
18
- "@ebrains/svgs":"0.6.0-beta"
17
+ "@ebrains/assets":"0.6.1-beta",
18
+ "@ebrains/svgs":"0.6.1-beta"
19
19
  }
20
20
  }
@@ -1,139 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-2f63169d.js');
6
- const sharedUtils = require('./sharedUtils-8e287250.js');
7
-
8
- const edsBreadcrumbCss = "blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}.hidden{display:none}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.125rem * var(--tw-space-x-reverse));margin-left:calc(0.125rem * calc(1 - var(--tw-space-x-reverse)))}.px-2{padding-left:0.125rem;padding-right:0.125rem}.w-20{width:1.25rem}.w-28{width:1.75rem}.w-32{width:2rem}.w-44{width:2.75rem}.h-20{height:1.25rem}.h-24{height:1.5rem}.h-28{height:1.75rem}.h-32{height:2rem}@media (min-width: 750px){.md\\:block{display:block}}";
9
- const EdsBreadcrumbStyle0 = edsBreadcrumbCss;
10
-
11
- const EdsBreadcrumb = class {
12
- constructor(hostRef) {
13
- index.registerInstance(this, hostRef);
14
- /**
15
- * Updates the maximum number of visible items and tracks if the screen is small.
16
- */
17
- this.updateScreenSize = () => {
18
- const width = window.innerWidth;
19
- if (width < 769) {
20
- this.maxVisibleItems = 3;
21
- this.isSmallScreen = true;
22
- }
23
- else if (width <= 1024) {
24
- this.maxVisibleItems = 3;
25
- this.isSmallScreen = true;
26
- }
27
- else if (width <= 2200) {
28
- this.maxVisibleItems = 4;
29
- this.isSmallScreen = false;
30
- }
31
- else {
32
- this.maxVisibleItems = 6;
33
- this.isSmallScreen = false;
34
- }
35
- };
36
- this.items = [];
37
- this.intent = 'ghost';
38
- this.parsedItems = [];
39
- this.isSmallScreen = false;
40
- this.maxVisibleItems = 6;
41
- }
42
- /**
43
- * Watches for changes to the `items` prop and parses it.
44
- */
45
- parseItems(newValue) {
46
- this.parsedItems = sharedUtils.parseData(newValue);
47
- }
48
- /**
49
- * Lifecycle method that runs when the component is about to be loaded.
50
- * It parses the initial `items` prop value.
51
- */
52
- componentWillLoad() {
53
- this.parseItems(this.items);
54
- this.updateScreenSize();
55
- window.addEventListener('resize', this.updateScreenSize);
56
- }
57
- disconnectedCallback() {
58
- window.removeEventListener('resize', this.updateScreenSize);
59
- }
60
- /**
61
- * Lifecycle method that runs when the component has fully loaded.
62
- * It emits a custom event for each `eds-link` element contained within the breadcrumb.
63
- */
64
- componentDidLoad() {
65
- var _a;
66
- const links = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('eds-link');
67
- links === null || links === void 0 ? void 0 : links.forEach((link) => {
68
- this.emitContext(link);
69
- });
70
- }
71
- /**
72
- * Emits a custom event called `parentContext` for a given link element.
73
- * This event provides context information about the breadcrumb component.
74
- *
75
- * @param linkElement - The link element to which the event will be dispatched.
76
- */
77
- emitContext(linkElement) {
78
- const event = new CustomEvent('parentContext', {
79
- detail: {
80
- componentName: this.el.tagName.toLowerCase(),
81
- identifier: null
82
- }
83
- });
84
- linkElement.dispatchEvent(event);
85
- }
86
- /**
87
- * Returns breadcrumb items with potential truncation if there are too many.
88
- * It inserts an ellipsis item where necessary.
89
- */
90
- getTruncatedItems() {
91
- const totalItems = this.parsedItems.length;
92
- const ellipsis = { label: '...', url: '', isHidden: true };
93
- if (totalItems > this.maxVisibleItems) {
94
- const firstItem = this.parsedItems[0];
95
- const lastItems = this.parsedItems.slice(-2);
96
- if (this.maxVisibleItems === 3) {
97
- return [firstItem, ellipsis, ...lastItems];
98
- }
99
- else if (this.maxVisibleItems === 4) {
100
- const middleItem = this.parsedItems[Math.floor(totalItems / 2)];
101
- return [firstItem, middleItem, ellipsis, ...lastItems];
102
- }
103
- }
104
- return this.parsedItems;
105
- }
106
- /**
107
- * Helper to determine the display label and full label.
108
- * If the label is longer than 15 characters and the item is not the current (last) item,
109
- * we display a truncated version but use the full label for aria attributes.
110
- */
111
- getLabels(item, isCurrent) {
112
- if (!isCurrent && item.label.length > 15) {
113
- return { displayLabel: `${item.label.slice(0, 15)}...`, fullLabel: item.label };
114
- }
115
- return { displayLabel: item.label, fullLabel: item.label };
116
- }
117
- /**
118
- * Render method for the breadcrumb component.
119
- * It creates a navigation element with an ordered list of breadcrumb links.
120
- * The last link is marked as the current page.
121
- */
122
- render() {
123
- const itemsToRender = this.getTruncatedItems();
124
- return (index.h("nav", { key: '75bb5629a10de2a2a7bd0b2bbef04e5f699f5fe2', "aria-label": "Breadcrumb" }, index.h("ol", { key: '7a5cc115b70d60bc878aa3d865802662f30948c1', class: "flex items-center space-x-2" }, itemsToRender.map((item, index$1) => {
125
- const isLast = index$1 === itemsToRender.length - 1;
126
- return (index.h("li", { class: "flex items-center" }, !item.isHidden ? ((() => {
127
- const { displayLabel, fullLabel } = this.getLabels(item, isLast);
128
- return (index.h("eds-link", Object.assign({ label: displayLabel, url: item.url, intent: this.intent, current: isLast, "aria-label": fullLabel, size: "small", "icon-small": "false" }, (isLast ? { 'aria-current': 'page' } : {}))));
129
- })()) : (index.h("span", { class: "truncate px-2", "aria-hidden": "true" }, "...")), !isLast && !item.isHidden && (index.h("eds-icon-wrapper", { icon: "chevron-right", class: "w-20 h-20" }))));
130
- }))));
131
- }
132
- get el() { return index.getElement(this); }
133
- static get watchers() { return {
134
- "items": ["parseItems"]
135
- }; }
136
- };
137
- EdsBreadcrumb.style = EdsBreadcrumbStyle0;
138
-
139
- exports.eds_breadcrumb = EdsBreadcrumb;
@@ -1 +0,0 @@
1
- import{r as e,c as i,h as t,g as n}from"./p-cccacbd3.js";import{s as o}from"./p-13efafb9.js";const r=class{constructor(t){e(this,t),this.accordion=i(this,"accordion",7),this.handleClick=()=>{var e;this.isExpanded=!this.isExpanded,this.accordion.emit(this.isExpanded),this.setPanelHeight(),o({category:"ui-component",parentContext:null,tag:this.el.tagName.toLowerCase(),name:(null===(e=this.title)||void 0===e?void 0:e.toLowerCase())||"",action:this.isExpanded?"expanded":"collapsed"})},this.setPanelHeight=()=>{this.childContentRef&&(this.shortContent=this.wrapperRef.scrollWidth>830&&!this.description?this.childContentRef.scrollHeight<=80:this.childContentRef.scrollHeight<=20,this.panelHeight=this.isExpanded&&!this.shortContent?this.childContentRef.scrollHeight:0),this.headerRef&&(this.headerHeight=this.headerRef.scrollHeight-30)},this.title=void 0,this.description=void 0,this.switchBg=!0,this.expanded=!1,this.clampText=!0,this.isExpanded=this.expanded,this.panelHeight=0,this.shortContent=!1,this.headerHeight=0}componentDidLoad(){this.setPanelHeight(),window.addEventListener("resize",this.setPanelHeight)}disconnectedCallback(){window.removeEventListener("resize",this.setPanelHeight)}render(){return t("div",{key:"db04fa9db1f53e95a7ac758656b32e75281f5749",ref:e=>this.wrapperRef=e,class:`flex effect-color border-softer relative grid overflow-hidden rounded-lg border-2 p-16 \n ${this.switchBg&&this.isExpanded?"bg-inverse":"bg-default"} \n ${this.switchBg?"hover:bg-inverse":""}\n ${this.description?"min-h-56":""}`},t("h3",{key:"a6fc54388e0eab3ddfb81dfb5907c55a1d6d40e1",ref:e=>this.headerRef=e,class:"mr-auto f-heading-06 text-left absolute inset-x-16 break-words top-16 pr-40"},this.title),t("div",{key:"96a1e4ae2849300e6cd3c737357a7e6e9a0439d5",class:"ml-auto"},t("eds-button",{key:"ca53eed446f9bc7a96182da9e9e3a45b1c63dba2",id:"toggleAccordion",intent:"tertiary","aria-expanded":this.isExpanded||this.shortContent,"aria-label":"Toggle accordion","aria-controls":"accordionSection",class:"effect-color flex w-full items-center justify-between rounded-md outline-none focus:outline-none",onClick:this.handleClick,icon:"chevron-down"})),t("div",{key:"2e1c52759fa07ecf63fed47f79c0384a79cd81c6",class:"w-full",style:Number.isFinite(this.headerHeight)?{marginTop:`${this.headerHeight}px`}:{}},this.description?t("span",{class:"text-light "+(!this.isExpanded&&this.clampText?"line-clamp-1":"")},this.description):null,t("section",{key:"6ca819b2d9cb989f0942b98f32cd7243771b6ae9",id:"accordionSection",role:"region","aria-labelledby":"accordionHeader","aria-hidden":!this.isExpanded,class:"z-1 effect-height relative h-0 w-full "+(!this.isExpanded&&this.clampText?"overflow-hidden":""),style:{height:this.isExpanded?"auto":"0"}},t("div",{key:"aa33297747aca21c3b3ed33eb3eabc2998192aeb",ref:e=>this.childContentRef=e,class:"accordion-content effect-color pt-4","aria-hidden":!this.isExpanded},t("span",{key:"af5b6e2218419a3c95e21e7e432696b073b7752b",class:!this.isExpanded&&this.clampText?"line-clamp-2":""},t("slot",{key:"2a9d1ef2d2537c831b28fbecb02a6125a1412019"}))))))}get el(){return n(this)}};r.style="blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}.min-h-56{min-height:3.5rem}.container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.break-words{overflow-wrap:break-word}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.effect-color{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.border-softer{border:2px solid rgba(0, 0, 0, .1)}.bg-default{background-color:var(--grey-200)}.bg-inverse{background-color:var(--white)}.relative{position:relative}.absolute{position:absolute}.inset-x-16{left:1rem;right:1rem}.top-16{top:1rem}.pr-32{padding-right:2rem}.pr-36{padding-right:2.25rem}.pr-40{padding-right:2.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}.w-full{width:100%}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.rounded-md{border-radius:12px}.outline-none{outline:2px solid transparent;outline-offset:2px}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.text-light{color:var(--grey-700)}.z-1{z-index:1}.z-10{z-index:10}.effect-height{transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-property:height}.h-0{height:0rem}.h-auto{height:auto}.pt-4{padding-top:0.25rem}.overflow-hidden{overflow:hidden}.grid{display:grid}.overflow-hidden{overflow:hidden}.rounded-lg{border-radius:16px}.border-2{border-width:2px}.p-16{padding:1rem}.ml-auto{margin-left:auto}.mr-auto{margin-right:auto}.f-heading-05{font-family:var(--f-heading-05-fontFamily);font-weight:var(--f-heading-05-fontWeight);font-size:var(--f-heading-05-fontSize);line-height:var(--f-heading-05-lineHeight);letter-spacing:var(--f-heading-05-letterSpacing)}.f-heading-06{font-family:var(--f-heading-06-fontFamily);font-weight:var(--f-heading-06-fontWeight);font-size:var(--f-heading-06-fontSize);line-height:var(--f-heading-06-lineHeight);letter-spacing:var(--f-heading-06-letterSpacing)}.text-left{text-align:left}.text-center{text-align:center}";export{r as eds_accordion}
@@ -1 +0,0 @@
1
- import{r as e,h as t}from"./p-cccacbd3.js";import{c as i}from"./p-112122d6.js";const a=class{constructor(t){e(this,t),this.description=void 0,this.descClass="f-ui-03-light",this.truncate=!0,this.truncateLines="3"}getTruncateClass(){return this.truncate&&this.truncateLines?`line-clamp-${this.truncateLines}`:""}render(){return t("p",{key:"96ba520be4ef9acf871a6e992d5ea74aaf17c962",class:`text-light ${this.descClass}`},t("span",{key:"951358bd0c992426175e3c1b3c580f2f9be4027f",class:this.getTruncateClass()},this.description))}};a.style=".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)}.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)}.text-light{color:var(--grey-700)}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}";const r=class{constructor(t){e(this,t),this.url=void 0,this.titleClass=void 0,this.headingLevel="h3",this.externalLink=!1,this.cardTitle=void 0,this.hierarchy=!0}getTitleClass(){return`f-heading-${(this.hierarchy?{h1:"05",h2:"05",h3:"05",h4:"05",h5:"05",h6:"06"}:{h1:"01",h2:"02",h3:"03",h4:"04",h5:"05",h6:"06"})[this.headingLevel]}`}render(){return t(this.headingLevel,{key:"57ce97f35ee52623d32fac0b6b1a576ca8b5aa70",class:this.getTitleClass()},t("a",{key:"60fb313d2b8753974658f73aaddd359a63548a79",class:"break-words after:absolute after:inset-0 after:z-10 after:content-[''] focus:outline-none",href:this.url,target:this.externalLink?"_blank":void 0,rel:this.externalLink?"noopener noreferrer":void 0},this.cardTitle))}};r.style="a{all:unset;display:inline;color:inherit;text-decoration:none;cursor:pointer}h1,h2,h3,h4,h5,h6{margin:0}.f-heading-01{font-family:var(--f-heading-01-fontFamily);font-weight:var(--f-heading-01-fontWeight);font-size:var(--f-heading-01-fontSize);line-height:var(--f-heading-01-lineHeight);letter-spacing:var(--f-heading-01-letterSpacing)}.f-heading-02{font-family:var(--f-heading-02-fontFamily);font-weight:var(--f-heading-02-fontWeight);font-size:var(--f-heading-02-fontSize);line-height:var(--f-heading-02-lineHeight);letter-spacing:var(--f-heading-02-letterSpacing)}.f-heading-03{font-family:var(--f-heading-03-fontFamily);font-weight:var(--f-heading-03-fontWeight);font-size:var(--f-heading-03-fontSize);line-height:var(--f-heading-03-lineHeight);letter-spacing:var(--f-heading-03-letterSpacing)}.f-heading-04{font-family:var(--f-heading-04-fontFamily);font-weight:var(--f-heading-04-fontWeight);font-size:var(--f-heading-04-fontSize);line-height:var(--f-heading-04-lineHeight);letter-spacing:var(--f-heading-04-letterSpacing)}.f-heading-05{font-family:var(--f-heading-05-fontFamily);font-weight:var(--f-heading-05-fontWeight);font-size:var(--f-heading-05-fontSize);line-height:var(--f-heading-05-lineHeight);letter-spacing:var(--f-heading-05-letterSpacing)}.f-heading-06{font-family:var(--f-heading-06-fontFamily);font-weight:var(--f-heading-06-fontWeight);font-size:var(--f-heading-06-fontSize);line-height:var(--f-heading-06-lineHeight);letter-spacing:var(--f-heading-06-letterSpacing)}.break-words{overflow-wrap:break-word}.after\\:absolute::after{position:absolute}.after\\:inset-0::after{inset:0rem}.after\\:z-10::after{z-index:10}.after\\:content-\\[\\'\\'\\]::after{--tw-content:'';content:var(--tw-content)}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}";const n=i(["f-ui-05 py-1 px-4 border-2 rounded-pill"],{variants:{intent:{default:"border-default",strong:"text-inverse bg-strongest border-default",accent:"text-[#0034CB] border-[#0034CB]",weak:"text-light bg-strongest-soft border-transparent",inverse:"border-inverse text-inverse","inverse-strong":"bg-inverse border-inverse text-lighter"}},defaultVariants:{intent:"default"}}),o=class{constructor(t){e(this,t),this.label=void 0,this.intent="default"}render(){const e=n({intent:this.intent});return t("span",{key:"55a6039b040436e5dded9aaf1007668b97091ba3",class:e},this.label)}};o.style=".f-ui-05{font-family:var(--f-ui-05-fontFamily);font-weight:var(--f-ui-05-fontWeight);font-size:var(--f-ui-05-fontSize);line-height:var(--f-ui-05-lineHeight);letter-spacing:var(--f-ui-05-letterSpacing)}.py-1{padding-top:0.0625rem;padding-bottom:0.0625rem}.px-4{padding-left:0.25rem;padding-right:0.25rem}.border-2{border-width:2px}.rounded-pill{border-radius:100px}.border-default{border:2px solid var(--black)}.text-inverse{color:var(--white)}.bg-strongest{background-color:var(--black)}.text-\\[\\#0034CB\\]{--tw-text-opacity:1;color:rgb(0 52 203 / var(--tw-text-opacity))}.border-\\[\\#0034CB\\]{--tw-border-opacity:1;border:2px solid rgb(0 52 203 / var(--tw-border-opacity))}.text-light{color:var(--grey-700)}.bg-strongest-soft{background-color:rgba(0, 0, 0, .05)}.border-transparent{border-color:var(--transparent)}.border-inverse{border-color:var(--white)}.bg-inverse{background-color:var(--white)}.text-lighter{color:var(--grey-600)}";export{a as eds_card_desc,r as eds_card_title,o as eds_tag}
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as a,g as s}from"./p-cccacbd3.js";import{m as n,a as o}from"./p-13efafb9.js";const r=class{constructor(a){t(this,a),this.consent=e(this,"consent",7),this.title="Analytics Consent",this.description="We use anonymous analytics to improve our services. No data is collected unless you give your consent. If you don't wish to send data right now, you can always re-enable analytics later by clicking the Cookies Preference button in the footer. However, by opting in today, you're joining a community that shapes our product's future—all while keeping your data completely anonymous.",this.optOutMessage="You are already part of our community, and your anonymous data helps shape our product's future! Rest assured, your privacy is fully protected.",this.forceShow=!1,this.showNotice=!0}toggleCookiesConsent(){this.showNotice=!this.showNotice}hasCookieConsent(){return!!document.cookie.split("; ").find((t=>t.startsWith("mtm_consent=")))}optedOut(){return!!document.cookie.split("; ").find((t=>t.startsWith("mtm_consent_removed")))}getStorageKey(){return`${window.location.host}-matomo-deferred`}componentWillLoad(){if("out"===localStorage.getItem("matomo-consent-given")||this.optedOut())this.showNotice=!1;else if(this.forceShow)this.showNotice=!0;else if(this.hasCookieConsent())this.showNotice=!1;else{const t=sessionStorage.getItem(this.getStorageKey());this.showNotice=!t}}componentDidLoad(){this.el.shadowRoot.querySelectorAll("eds-button").forEach((t=>{this.emitContext(t)}))}emitContext(t){const e=new CustomEvent("parentContext",{detail:{componentName:this.el.tagName.toLowerCase(),identifier:null}});t.dispatchEvent(e)}optInAnalytics(){n(),localStorage.removeItem("matomo-consent-given"),this.hideNotice(),this.consent.emit("in")}optOutAnalytics(){o(),this.hideNotice(),this.consent.emit("out")}noThanks(){localStorage.setItem("matomo-consent-given","out"),this.hideNotice()}deferDecision(){sessionStorage.setItem(this.getStorageKey(),"true"),this.hideNotice(),this.consent.emit("defer")}keepMeIn(){this.hideNotice()}hideNotice(){this.showNotice=!1}render(){return this.showNotice?a("div",{class:"fixed bottom-0 p-8 z-[999999] grow md:left-1/2 md:-translate-x-1/2 md:-translate-y-1/2 justify-center"},a("eds-accordion",{title:this.title,description:this.hasCookieConsent()?this.optOutMessage:this.description,switchBg:!0,expanded:!0},this.hasCookieConsent()?a("div",{class:"flex items-center gap-4"},this.optedOut()?a("eds-button",{intent:"primary",label:"Opt me in again","aria-label":"Opt me in again",onClick:()=>this.optInAnalytics()}):a("eds-button",{intent:"primary",label:"Keep Me In","aria-label":"Keep Me In",onClick:()=>this.keepMeIn()}),a("eds-button",{intent:"ghostInverse",label:"Opt-out","aria-label":"Opt-out from analytics",onClick:()=>this.optOutAnalytics()})):a("div",{class:"flex items-center gap-4"},a("eds-button",{intent:"primary",label:"I agree","aria-label":"Opt-in for analytics",onClick:()=>this.optInAnalytics()}),a("eds-button",{intent:"ghost",label:"No, thanks","aria-label":"Opt-out from analytics",onClick:()=>this.noThanks()}),a("eds-button",{intent:"ghost",label:"Ask me later","aria-label":"Defer analytics decision",onClick:()=>this.deferDecision()})))):null}get el(){return s(this)}};r.style=".fixed{position:fixed}.absolute{position:absolute}.w-full{width:100%}.bottom-0{bottom:0rem}.bottom-4{bottom:0.25rem}.p-4{padding:0.25rem}.p-6{padding:0.375rem}.p-8{padding:0.5rem}.z-10{z-index:10}.z-\\[999999\\]{z-index:999999}.left-0{left:0rem}.left-1\\/2{left:50%}.grow{flex-grow:1}.-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))}.-translate-y-1\\/2{--tw-translate-y:-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))}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.flex{display:flex}.gap-12{gap:0.75rem}.gap-20{gap:1.25rem}.gap-4{gap:0.25rem}@media (min-width: 750px){.md\\:left-1\\/2{left:50%}.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:-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))}.md\\:-translate-y-1\\/2{--tw-translate-y:-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))}}";export{r as eds_matomo_notice}