@ebrains/react 0.0.1-alpha.0 → 0.3.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/README.md +4 -48
  2. package/arrow-diagonal-black-8f0494c3.esm.js +3 -0
  3. package/arrow-right-9322ba8a.esm.js +5 -0
  4. package/bluesky-cc5edd2d.esm.js +14 -0
  5. package/chevron-down-6144c823.esm.js +12 -0
  6. package/chevron-left-ca6c66e1.esm.js +11 -0
  7. package/chevron-right-b88ed2d4.esm.js +5 -0
  8. package/chevron-up-c66bd477.esm.js +12 -0
  9. package/close-87fc0d63.esm.js +5 -0
  10. package/color-0ba8ed56.esm.js +423 -0
  11. package/color-primary-palette_6.entry.esm.js +756 -0
  12. package/copy-03b72cb6.esm.js +5 -0
  13. package/correct-use-of-colors.entry.esm.js +243 -0
  14. package/eds-accordion.entry.esm.js +132 -0
  15. package/eds-alert.entry.esm.js +102 -0
  16. package/eds-avatar_17.entry.esm.js +209 -0
  17. package/eds-card-desc_3.entry.esm.js +129 -0
  18. package/eds-card-generic.entry.esm.js +125 -0
  19. package/eds-card-project.entry.esm.js +92 -0
  20. package/eds-card-section.entry.esm.js +70 -0
  21. package/eds-card-tags.entry.esm.js +27 -0
  22. package/eds-card-tool.entry.esm.js +106 -0
  23. package/eds-card-wrapper.entry.esm.js +39 -0
  24. package/eds-code-block.entry.esm.js +2243 -0
  25. package/eds-components-section.entry.esm.js +146 -0
  26. package/eds-docs-palettes.entry.esm.js +29 -0
  27. package/eds-docs-tokens.entry.esm.js +45 -0
  28. package/eds-form.entry.esm.js +374 -0
  29. package/eds-frame.entry.esm.js +117 -0
  30. package/eds-icon-arrow-diagonal.entry.esm.js +21 -0
  31. package/eds-icon-arrow-right.entry.esm.js +21 -0
  32. package/eds-icon-bluesky.entry.esm.js +21 -0
  33. package/eds-icon-chevron-down.entry.esm.js +21 -0
  34. package/eds-icon-chevron-left.entry.esm.js +21 -0
  35. package/eds-icon-chevron-right.entry.esm.js +21 -0
  36. package/eds-icon-chevron-up.entry.esm.js +21 -0
  37. package/eds-icon-close.entry.esm.js +21 -0
  38. package/eds-icon-copy.entry.esm.js +21 -0
  39. package/eds-icon-eu.entry.esm.js +21 -0
  40. package/eds-icon-facebook.entry.esm.js +21 -0
  41. package/eds-icon-gitlab.entry.esm.js +21 -0
  42. package/eds-icon-linkedin.entry.esm.js +21 -0
  43. package/eds-icon-loader.entry.esm.js +21 -0
  44. package/eds-icon-mastodon.entry.esm.js +21 -0
  45. package/eds-icon-menu.entry.esm.js +21 -0
  46. package/eds-icon-more.entry.esm.js +21 -0
  47. package/eds-icon-search.entry.esm.js +21 -0
  48. package/eds-icon-success.entry.esm.js +21 -0
  49. package/eds-icon-twitter.entry.esm.js +21 -0
  50. package/eds-icon-user.entry.esm.js +21 -0
  51. package/eds-icon-youtube.entry.esm.js +21 -0
  52. package/eds-input_7.entry.esm.js +518 -0
  53. package/eds-login.entry.esm.js +76 -0
  54. package/eds-logo-variations.entry.esm.js +29 -0
  55. package/eds-matomo-notice.entry.esm.js +129 -0
  56. package/eds-modal.entry.esm.js +114 -0
  57. package/eds-navigator.entry.esm.js +72 -0
  58. package/eds-pagination_2.entry.esm.js +456 -0
  59. package/eds-progress-bar.entry.esm.js +36 -0
  60. package/eds-rating.entry.esm.js +71 -0
  61. package/eds-section-core_2.entry.esm.js +69 -0
  62. package/eds-svg-repository.entry.esm.js +325 -0
  63. package/eds-tab.entry.esm.js +41 -0
  64. package/eds-tabs-content.entry.esm.js +145 -0
  65. package/eds-tabs.entry.esm.js +155 -0
  66. package/eds-timeline.entry.esm.js +130 -0
  67. package/eds-tooltip.entry.esm.js +116 -0
  68. package/eds-trl.entry.esm.js +69 -0
  69. package/eu-9ddde93a.esm.js +30 -0
  70. package/facebook-9cb5c17f.esm.js +14 -0
  71. package/incorrect-use-of-colors.entry.esm.js +71 -0
  72. package/index-39c58238.esm.js +58 -0
  73. package/index.esm.js +3 -2668
  74. package/index.esm2.js +4791 -0
  75. package/keycloak-13893af6.esm.js +1594 -0
  76. package/linkedin-e8650abb.esm.js +28 -0
  77. package/loader-c9628637.esm.js +30 -0
  78. package/logo-color-7f1fd803.esm.js +115 -0
  79. package/logo-color-margins-ff8ce71b.esm.js +118 -0
  80. package/logo-space.entry.esm.js +32 -0
  81. package/logo-variations-horizontal_2.entry.esm.js +116 -0
  82. package/logo-white-no-bg-f382f86f.esm.js +1021 -0
  83. package/logo-wrong-usage.entry.esm.js +137 -0
  84. package/mastodon-3703ec61.esm.js +14 -0
  85. package/menu-340ea948.esm.js +11 -0
  86. package/mono-53f70232.esm.js +11 -0
  87. package/more-4449d549.esm.js +13 -0
  88. package/package.json +1 -1
  89. package/search-fbcd79c2.esm.js +12 -0
  90. package/src/components.d.ts +40 -0
  91. package/src/index.d.ts +1 -1
  92. package/src/react-component-lib/attachProps.d.ts +16 -0
  93. package/src/react-component-lib/case.d.ts +2 -0
  94. package/src/react-component-lib/createComponent.d.ts +10 -0
  95. package/src/react-component-lib/createOverlayComponent.d.ts +21 -0
  96. package/src/react-component-lib/dev.d.ts +2 -0
  97. package/src/react-component-lib/index.d.ts +2 -0
  98. package/src/react-component-lib/interfaces.d.ts +29 -0
  99. package/src/react-component-lib/utils/attachProps.d.ts +16 -0
  100. package/src/react-component-lib/utils/case.d.ts +2 -0
  101. package/src/react-component-lib/utils/index.d.ts +10 -0
  102. package/success-443809da.esm.js +18 -0
  103. package/toastManager-d9eee791.esm.js +34 -0
  104. package/token-list_3.entry.esm.js +385 -0
  105. package/token-ratios.entry.esm.js +49 -0
  106. package/token-spacing.entry.esm.js +93 -0
  107. package/token-typography.entry.esm.js +264 -0
  108. package/twitter-ac21b505.esm.js +14 -0
  109. package/user-71ebdc15.esm.js +16 -0
  110. package/youtube-efbfbdc4.esm.js +14 -0
@@ -0,0 +1,5 @@
1
+ const copy = `<svg width="20" height="20" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
2
+ <path stroke-linecap="round" stroke-linejoin="round" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path>
3
+ </svg>`;
4
+
5
+ export { copy as c };
@@ -0,0 +1,243 @@
1
+ import { r as registerInstance, h } from './index.esm2.js';
2
+ import 'react';
3
+ import 'react/jsx-runtime';
4
+ import 'react-dom';
5
+
6
+ const primary = [{
7
+ background: '#9CE142'
8
+ }, {
9
+ background: '#00C959'
10
+ }, {
11
+ background: '#00A595'
12
+ }];
13
+ const support = [{
14
+ background: '#141414'
15
+ }, {
16
+ background: '#383838'
17
+ }, {
18
+ background: '#CCCCCC'
19
+ }, {
20
+ background: '#E6E6E6'
21
+ }, {
22
+ background: '#FFFFFF'
23
+ }];
24
+ const blue = [{
25
+ background: '#3FA9F5'
26
+ }, {
27
+ background: '#0644F4'
28
+ }];
29
+ const purple = [{
30
+ background: '#C461FF'
31
+ }, {
32
+ background: '#5D3DF9'
33
+ }];
34
+ const red = [{
35
+ background: '#FFA543'
36
+ }, {
37
+ background: '#FF4D68'
38
+ }];
39
+ const CorrectUseOfColors = class {
40
+ constructor(hostRef) {
41
+ registerInstance(this, hostRef);
42
+ }
43
+ render() {
44
+ return h("div", {
45
+ key: '33f38f14e5b6e7271ae26608fb1a1ed0c7930c7c',
46
+ class: "container"
47
+ }, h("p", {
48
+ key: '4857375e983add7d8e5e0a0d9896641774be018e',
49
+ class: "f-body-01"
50
+ }, "This guide demonstrates the correct usage of the", h("eds-link", {
51
+ key: '1c6bd69472074babf8f830fdba9be31e73afcd88',
52
+ label: "primary",
53
+ size: "small",
54
+ intent: "blueish",
55
+ icon: "chevron-right",
56
+ url: "../color-palette/#primary-palette",
57
+ "extra-class": "inline-block ml-4"
58
+ }), "and", h("eds-link", {
59
+ key: 'ae3429fadbea001f01731d3c15f28865d668a50a',
60
+ label: "support",
61
+ size: "small",
62
+ intent: "blueish",
63
+ icon: "chevron-right",
64
+ url: "../color-palette/#support-palette",
65
+ "extra-class": "inline-block ml-4"
66
+ }), "color palettes."), h("div", {
67
+ key: 'd8c6b9ab88abbf6194a4fb26120244982b59c2c4',
68
+ class: "flex"
69
+ }, h("div", {
70
+ key: 'fc7f854940caabb9e032999f51732b64555e96e7',
71
+ class: "w-full"
72
+ }, h("ul", {
73
+ key: '99c6a2e47c683ac38f2a14feec80177c0cf1c174',
74
+ class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
75
+ }, primary.map(color => h("li", {
76
+ class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
77
+ }, h("div", {
78
+ class: "w-full min-h-[150px] effect-height flex items-center justify-between p-16",
79
+ style: {
80
+ backgroundColor: color.background
81
+ }
82
+ }))))), h("div", {
83
+ key: '91048e89cff083356c589c0f1bfecdd482e0c797',
84
+ class: "w-full"
85
+ }, h("ul", {
86
+ key: '6ee69388227089a5224a6d249c8e1eea4efde128',
87
+ class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
88
+ }, support.map(color => h("li", {
89
+ class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
90
+ }, h("div", {
91
+ class: "w-full min-h-[90px] effect-height flex items-center justify-between p-16",
92
+ style: {
93
+ backgroundColor: color.background
94
+ }
95
+ })))))), h("p", {
96
+ key: 'c0a8e42942f2655648aa2ec3ce74bbf8d043ba63',
97
+ class: "f-body-01"
98
+ }, "This guide demonstrates the correct usage of the", h("eds-link", {
99
+ key: '3f272298bcd7d0e6ad791edc408ef636349fbf7d',
100
+ label: "purple",
101
+ size: "small",
102
+ intent: "blueish",
103
+ icon: "chevron-right",
104
+ url: "../color-palette/#primary-palette",
105
+ "extra-class": "inline-block ml-4"
106
+ }), "and", h("eds-link", {
107
+ key: '9a0b28f388483944aa4b053b9f8e807c1383431e',
108
+ label: "support",
109
+ size: "small",
110
+ intent: "blueish",
111
+ icon: "chevron-right",
112
+ url: "../color-palette/#support-palette",
113
+ "extra-class": "inline-block ml-4"
114
+ }), "color palettes."), h("div", {
115
+ key: '27ab1cdb936918fafe122c5a569c83322043bb79',
116
+ class: "flex"
117
+ }, h("div", {
118
+ key: '037b9916ff3a3e8c2e9db64b650d44a57aedbcf9',
119
+ class: "w-full"
120
+ }, h("ul", {
121
+ key: '60f4f6290b31a29852fb934c678edcaa61c8e930',
122
+ class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
123
+ }, purple.map(color => h("li", {
124
+ class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
125
+ }, h("div", {
126
+ class: "w-full min-h-[225px] effect-height flex items-center justify-between p-16",
127
+ style: {
128
+ backgroundColor: color.background
129
+ }
130
+ }))))), h("div", {
131
+ key: '36397292a31417703736b3be5b77e17241675dd9',
132
+ class: "w-full"
133
+ }, h("ul", {
134
+ key: '20a9e6bb396c184c2718a18554eb1b4828817379',
135
+ class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
136
+ }, support.map(color => h("li", {
137
+ class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
138
+ }, h("div", {
139
+ class: "w-full min-h-[90px] effect-height flex items-center justify-between p-16",
140
+ style: {
141
+ backgroundColor: color.background
142
+ }
143
+ })))))), h("p", {
144
+ key: '0b89819b9fce1dff39b06b70873d651b7a1c84ac',
145
+ class: "f-body-01"
146
+ }, "This guide demonstrates the correct usage of the", h("eds-link", {
147
+ key: '9b3e7d46ac8116ff5f47f895bb06e89cd49c4e03',
148
+ label: "blue",
149
+ size: "small",
150
+ intent: "blueish",
151
+ icon: "chevron-right",
152
+ url: "../color-palette/#primary-palette",
153
+ "extra-class": "inline-block ml-4"
154
+ }), "and", h("eds-link", {
155
+ key: '94c3384e546bcae55d5634064a37436b4cdaab0f',
156
+ label: "support",
157
+ size: "small",
158
+ intent: "blueish",
159
+ icon: "chevron-right",
160
+ url: "../color-palette/#support-palette",
161
+ "extra-class": "inline-block ml-4"
162
+ }), "color palettes."), h("div", {
163
+ key: '7e3fe503559fa6865b824fd7f93dfdf8ed368f34',
164
+ class: "flex"
165
+ }, h("div", {
166
+ key: '4ed98a3b92ba8b73e3cd67dec625b4b8dfb34ee1',
167
+ class: "w-full"
168
+ }, h("ul", {
169
+ key: '0ccfd018568eb834ae05771976122736f5944205',
170
+ class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
171
+ }, blue.map(color => h("li", {
172
+ class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
173
+ }, h("div", {
174
+ class: "w-full min-h-[225px] effect-height flex items-center justify-between p-16",
175
+ style: {
176
+ backgroundColor: color.background
177
+ }
178
+ }))))), h("div", {
179
+ key: 'd2cef9f5bd8ce7fb103e22a8964cee88853c1162',
180
+ class: "w-full"
181
+ }, h("ul", {
182
+ key: '24301ce590bd1530316f351202bd76fafaa7dda5',
183
+ class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
184
+ }, support.map(color => h("li", {
185
+ class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
186
+ }, h("div", {
187
+ class: "w-full min-h-[90px] effect-height flex items-center justify-between p-16",
188
+ style: {
189
+ backgroundColor: color.background
190
+ }
191
+ })))))), h("p", {
192
+ key: '748852527301ab6465b593f5f271dc6dcef9d198',
193
+ class: "f-body-01"
194
+ }, "This guide demonstrates the correct usage of the", h("eds-link", {
195
+ key: 'f035467c04170412a1b06f05b8675b6be57e8aa2',
196
+ label: "redish",
197
+ size: "small",
198
+ intent: "blueish",
199
+ icon: "chevron-right",
200
+ url: "../color-palette/#primary-palette",
201
+ "extra-class": "inline-block ml-4"
202
+ }), "and", h("eds-link", {
203
+ key: '6e4eb577c6582a160b8282b54a6edfc58f20926b',
204
+ label: "support",
205
+ size: "small",
206
+ intent: "blueish",
207
+ icon: "chevron-right",
208
+ url: "../color-palette/#support-palette",
209
+ "extra-class": "inline-block ml-4"
210
+ }), "color palettes."), h("div", {
211
+ key: '9209fd1ab3092cd21dd81a3328171c8de4fb8bca',
212
+ class: "flex"
213
+ }, h("div", {
214
+ key: 'dc71b931a70fbd31a4f72814b23a1d97933bc721',
215
+ class: "w-full"
216
+ }, h("ul", {
217
+ key: 'd3f6f25439b6fbc8e8c08b39bf46de9ce52482fa',
218
+ class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
219
+ }, red.map(color => h("li", {
220
+ class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
221
+ }, h("div", {
222
+ class: "w-full min-h-[225px] effect-height flex items-center justify-between p-16",
223
+ style: {
224
+ backgroundColor: color.background
225
+ }
226
+ }))))), h("div", {
227
+ key: '78d64d48a72836043c53e485269402bf566a5d98',
228
+ class: "w-full"
229
+ }, h("ul", {
230
+ key: '6eb824d03f4d0e2d3966963c899473e242b31dc6',
231
+ class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
232
+ }, support.map(color => h("li", {
233
+ class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
234
+ }, h("div", {
235
+ class: "w-full min-h-[90px] effect-height flex items-center justify-between p-16",
236
+ style: {
237
+ backgroundColor: color.background
238
+ }
239
+ })))))));
240
+ }
241
+ };
242
+
243
+ export { CorrectUseOfColors as correct_use_of_colors };
@@ -0,0 +1,132 @@
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index.esm2.js';
2
+ import 'react';
3
+ import 'react/jsx-runtime';
4
+ import 'react-dom';
5
+
6
+ const edsAccordionCss = "blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}.min-h-36{min-height:2.25rem}.min-h-44{min-height:2.75rem}.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}.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}.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-20{padding-top:1.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}";
7
+ const EdsAccordionStyle0 = edsAccordionCss;
8
+ const EdsAccordion = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.accordionChange = createEvent(this, "accordionChange", 7);
12
+ /**
13
+ * Handles the click event on the accordion header to toggle expansion.
14
+ * Toggles the `isExpanded` state and emits the `accordionChange` event.
15
+ */
16
+ this.handleClick = () => {
17
+ this.isExpanded = !this.isExpanded;
18
+ this.accordionChange.emit(this.isExpanded);
19
+ this.setPanelHeight();
20
+ };
21
+ /**
22
+ * Calculates and sets the panel height based on the content height
23
+ * and adjusts based on the `shortContent` and `isExpanded` states.
24
+ */
25
+ this.setPanelHeight = () => {
26
+ if (this.childContentRef) {
27
+ this.shortContent = this.wrapperRef.scrollWidth > 830 && !this.description ? this.childContentRef.scrollHeight <= 80 : this.childContentRef.scrollHeight <= 20;
28
+ this.panelHeight = this.isExpanded && !this.shortContent ? this.childContentRef.scrollHeight : 0;
29
+ }
30
+ };
31
+ this.title = undefined;
32
+ this.description = undefined;
33
+ this.switchBg = true;
34
+ this.expanded = false;
35
+ this.clampText = true;
36
+ this.minHeightContent = false;
37
+ this.isExpanded = this.expanded;
38
+ this.panelHeight = 0;
39
+ this.shortContent = false;
40
+ }
41
+ /**
42
+ * Lifecycle method that sets up the initial panel height and adds a resize event listener
43
+ * to recalculate height on window resize.
44
+ */
45
+ componentDidLoad() {
46
+ this.setPanelHeight();
47
+ // Emit context for each eds-link element after the component is fully loaded
48
+ const btn = this.el.shadowRoot.querySelector('eds-button');
49
+ this.emitContext(btn);
50
+ window.addEventListener('resize', this.setPanelHeight);
51
+ }
52
+ /**
53
+ * Emits a custom event called `parentContext` for a given link element.
54
+ * This event provides context information about the breadcrumb component.
55
+ *
56
+ * @param linkElement - The link element to which the event will be dispatched.
57
+ */
58
+ emitContext(linkElement) {
59
+ const event = new CustomEvent('parentContext', {
60
+ detail: {
61
+ componentName: this.el.tagName.toLowerCase(),
62
+ identifier: null
63
+ }
64
+ });
65
+ linkElement.dispatchEvent(event);
66
+ }
67
+ /**
68
+ * Lifecycle method that cleans up the resize event listener when the component is removed.
69
+ */
70
+ disconnectedCallback() {
71
+ window.removeEventListener('resize', this.setPanelHeight);
72
+ }
73
+ /**
74
+ * Renders the accordion structure, including header, content, description, and any slotted content.
75
+ * Adjusts styles based on `switchBg`, `tiny`, `clampText`, and other props.
76
+ */
77
+ render() {
78
+ const minHeightContentClass = this.minHeightContent ? 'min-h-56' : '';
79
+ return h("div", {
80
+ key: '1f8ea188c4b39f6d1a8d10cdbf43d3df88d1281f',
81
+ ref: el => this.wrapperRef = el,
82
+ class: `container flex effect-color border-softer relative grid overflow-hidden rounded-lg border-2 p-16
83
+ ${this.switchBg && this.isExpanded ? 'bg-inverse' : 'bg-default'}
84
+ ${this.switchBg ? 'hover:bg-inverse' : ''}
85
+ ${minHeightContentClass}`
86
+ }, h("h3", {
87
+ key: '4490bdc1a18b99850e8db8ae1c38fcb37912ec0d',
88
+ class: "mr-auto f-heading-06 text-left absolute inset-x-16 top-16 line-clamp-1"
89
+ }, this.title), h("div", {
90
+ key: '82df433a9cc6805a735300fd1bb52f41c639c992',
91
+ class: "ml-auto"
92
+ }, h("eds-button", {
93
+ key: '9965d5eecfa02fbea08c23c44d325417767f6495',
94
+ id: "accordionId",
95
+ intent: "tertiary",
96
+ "aria-expanded": this.isExpanded || this.shortContent,
97
+ "aria-controls": "accordionId",
98
+ class: `effect-color flex w-full items-center justify-between rounded-md outline-none focus:outline-none`,
99
+ onClick: this.handleClick,
100
+ icon: "chevron-down"
101
+ })), h("div", {
102
+ key: '7ab8d2d07d55fa05c5e5647d1d00d1165f0d40ce',
103
+ class: `w-full`
104
+ }, this.description ? h("span", {
105
+ class: `text-light ${!this.isExpanded && this.clampText ? 'line-clamp-1' : ''}`
106
+ }, this.description) : null, h("section", {
107
+ key: 'cb122dd5433d7012cba6f3769f79e92a155c45d7',
108
+ id: "sectionId",
109
+ "aria-hidden": !this.isExpanded,
110
+ class: `z-1 effect-height relative h-0 w-full ${!this.isExpanded && this.clampText ? 'overflow-hidden' : ''}`,
111
+ style: {
112
+ height: this.isExpanded ? 'auto' : '0'
113
+ }
114
+ }, h("div", {
115
+ key: '0c2e1d9b38f21f0cb7f50aa3923edcc448418e3f',
116
+ ref: el => this.childContentRef = el,
117
+ class: `accordion-content effect-color pt-20`,
118
+ "aria-hidden": !this.isExpanded
119
+ }, h("span", {
120
+ key: 'd119c88d54e8d5e83d4cc3d4d16d1cd53d689bc7',
121
+ class: `${!this.isExpanded && this.clampText ? 'line-clamp-2' : ''}`
122
+ }, h("slot", {
123
+ key: 'b2a6917ec65bc808389a2d1c77cd1183f00cbaa1'
124
+ }))))));
125
+ }
126
+ get el() {
127
+ return getElement(this);
128
+ }
129
+ };
130
+ EdsAccordion.style = EdsAccordionStyle0;
131
+
132
+ export { EdsAccordion as eds_accordion };
@@ -0,0 +1,102 @@
1
+ import { r as registerInstance, h, g as getElement } from './index.esm2.js';
2
+ import { c as cva } from './index-39c58238.esm.js';
3
+ import 'react';
4
+ import 'react/jsx-runtime';
5
+ import 'react-dom';
6
+
7
+ const edsAlertCss = ":root {\n font-optical-sizing: auto;\n}\nhtml,\nbody {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n/*\n:focus[data-focus-method=\"mouse\"],\n:focus[data-focus-method=\"touch\"] {\n outline: none !important;\n}\n*/\n/*FADE*/\n/*FADE TRANSLATE Y*/\n/*SLIDE LEFT*/\n/*SLIDE BOTTOM*/\n/*COLLAPSE Y*/\n*, ::before, ::after {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n}\n::backdrop {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n}\n/*\n! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com\n*/\n/*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: currentColor; /* 2 */\n}\n::before,\n::after {\n}\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\nhtml {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n/*\nRemove the default font size and weight for headings.\n*/\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\na {\n color: inherit;\n text-decoration: inherit;\n}\n/*\nAdd the correct font weight in Edge and Safari.\n*/\nb,\nstrong {\n font-weight: bolder;\n}\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\ncode,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n/*\nAdd the correct font size in all browsers.\n*/\nsmall {\n font-size: 80%;\n}\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\nsub {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsub {\n bottom: -0.25em;\n}\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\nbutton,\ninput,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\nbutton,\nselect {\n text-transform: none;\n}\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\nbutton,\ninput:where([type='button']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n/*\nAdd the correct display in Chrome and Safari.\n*/\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\np,\npre {\n margin: 0;\n}\nfieldset {\n margin: 0;\n padding: 0;\n}\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n/*\nPrevent resizing textareas horizontally by default.\n*/\ntextarea {\n resize: vertical;\n}\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n/*\nSet the default cursor for buttons.\n*/\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\nimg,\niframe,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\nimg {\n max-width: 100%;\n height: auto;\n}\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n:root {\n --inner-gutter: 8px;\n}\n@media (min-width: 750px) {\n :root {\n --inner-gutter: 12px;\n }\n}\n@media (min-width: 900px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n@media (min-width: 1024px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n@media (min-width: 1280px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n@media (min-width: 2200px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n:root {\n}\n@media (min-width: 900px) {\n :root {\n}\n}\n:root {\n --sans: Inter, Helvetica, Arial, sans-serif;\n --f-ui-01-fontFamily: var(--sans);\n --f-ui-01-fontWeight: 800;\n --f-ui-01-fontSize: 18px;\n --f-ui-01-lineHeight: 110%;\n --f-ui-01-letterSpacing: -0.01em;\n}\n.f-ui-01 {\n font-family: var(--f-ui-01-fontFamily);\n font-weight: var(--f-ui-01-fontWeight);\n font-size: var(--f-ui-01-fontSize);\n line-height: var(--f-ui-01-lineHeight);\n letter-spacing: var(--f-ui-01-letterSpacing);\n}\n@media (min-width: 750px) {\n :root {\n}\n}\n@media (min-width: 900px) {\n :root {\n}\n}\n@media (min-width: 1024px) {\n :root {\n}\n}\n.f-ui-01 b, .f-ui-01 strong {\n font-weight: var(--f-ui-01---bold-weight, bold);\n}\n:root {\n --grey-300: #e6e6e6;\n --green-200: #d3ffdc;\n --yellow-200: #ffffcb;\n --red-200: #ffe0e1;\n}\n@media (min-width: 750px) {\n .md\\:grid-line-x > *::before {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: 0;\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .md\\:grid-line-xfull > *::before {\n content: attr(👻);\n inset-inline-start: calc(var(--inner-gutter) / -2);\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .md\\:grid-line-x-0 > *::before {\n content: none;\n }\n .md\\:grid-line-y > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .md\\:grid-line-yfull > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: calc(var(--inner-gutter) / -1);\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .md\\:grid-line-y-0 > *::after {\n content: none;\n }\n}\n@media (min-width: 900px) {\n .lg\\:grid-line-x > *::before {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: 0;\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .lg\\:grid-line-xfull > *::before {\n content: attr(👻);\n inset-inline-start: calc(var(--inner-gutter) / -2);\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .lg\\:grid-line-x-0 > *::before {\n content: none;\n }\n .lg\\:grid-line-y > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .lg\\:grid-line-yfull > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: calc(var(--inner-gutter) / -1);\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .lg\\:grid-line-y-0 > *::after {\n content: none;\n }\n}\n.border-inside {\n position: relative;\n\n &::after {\n pointer-events: none;\n }\n\n &::after {\n position: absolute;\n }\n\n &::after {\n inset: 0rem;\n }\n\n &::after {\n z-index: 1;\n }\n\n &::after {\n border-radius: 8px;\n }\n\n &::after {\n border-width: 1px;\n }\n\n &::after {\n border-width: 2px;\n }\n\n &::after {\n border-color: rgba(0, 0, 0, .1 );\n }\n\n &::after {\n content: '';\n }\n}\n/** region TRANSITIONS */\n/** endregion */\n/* region FOCUS */\n/* endregion */\n/* region BG */\n/* endregion */\n/*region shadow*/\n/*endregion*/\n.flex {\n display: flex;\n}\n.w-full {\n width: 100%;\n}\n.flex-row {\n flex-direction: row;\n}\n.items-center {\n align-items: center;\n}\n.justify-between {\n justify-content: space-between;\n}\n.gap-x-12 {\n -moz-column-gap: 0.75rem;\n column-gap: 0.75rem;\n}\n.space-y-12 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));\n}\n.rounded-lg {\n border-radius: 16px;\n}\n.bg-dark {\n background-color: var(--grey-300);\n}\n.bg-error {\n background-color: var(--red-200);\n}\n.bg-success {\n background-color: var(--green-200);\n}\n.bg-warning {\n background-color: var(--yellow-200);\n}\n.p-16 {\n padding: 1rem;\n}\n.p-20 {\n padding: 1.25rem;\n}\n.px-12 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.px-20 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n.py-12 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n.py-20 {\n padding-top: 1.25rem;\n padding-bottom: 1.25rem;\n}\n.py-8 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.pr-12 {\n padding-right: 0.75rem;\n}\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n[class*=underline-] {\n text-decoration-line: underline;\n}\n.after\\:rounded-lg::after {\n border-radius: 16px;\n}\n.after\\:border-softest::after {\n border-color: rgba(0, 0, 0, .05 );\n}\n";
8
+ const EdsAlertStyle0 = edsAlertCss;
9
+ const alertStyles = cva(['w-full bg-dark rounded-lg border-inside after:border-softest after:rounded-lg'], {
10
+ variants: {
11
+ intent: {
12
+ default: '',
13
+ warning: 'bg-warning',
14
+ error: 'bg-error',
15
+ success: 'bg-success'
16
+ },
17
+ direction: {
18
+ vertical: 'space-y-12',
19
+ horizontal: 'flex flex-row items-center justify-between gap-x-12'
20
+ },
21
+ withBtn: {
22
+ false: '',
23
+ true: ''
24
+ }
25
+ },
26
+ compoundVariants: [{
27
+ direction: 'horizontal',
28
+ withBtn: true,
29
+ class: 'px-20 pr-12 py-12'
30
+ }, {
31
+ direction: 'horizontal',
32
+ withBtn: false,
33
+ class: 'p-20'
34
+ }, {
35
+ direction: 'vertical',
36
+ withBtn: true,
37
+ class: 'p-16'
38
+ }, {
39
+ direction: 'vertical',
40
+ withBtn: false,
41
+ class: 'px-12 py-20'
42
+ }],
43
+ defaultVariants: {
44
+ intent: 'default',
45
+ direction: 'horizontal'
46
+ }
47
+ });
48
+ const EdsAlert = class {
49
+ constructor(hostRef) {
50
+ registerInstance(this, hostRef);
51
+ this.message = undefined;
52
+ this.pressableLabel = undefined;
53
+ this.pressableUrl = undefined;
54
+ this.direction = 'horizontal';
55
+ this.intent = 'default';
56
+ this.withBtn = false;
57
+ }
58
+ componentWillLoad() {
59
+ this.withBtn = Boolean(this.pressableLabel);
60
+ }
61
+ componentDidLoad() {
62
+ // Query all 'eds-link' elements, including those inside shadow DOM
63
+ const links = this.el.shadowRoot.querySelectorAll('eds-link');
64
+ links.forEach(link => {
65
+ this.emitContext(link);
66
+ });
67
+ }
68
+ emitContext(linkElement) {
69
+ const event = new CustomEvent('parentContext', {
70
+ detail: {
71
+ componentName: this.el.tagName.toLowerCase(),
72
+ identifier: null
73
+ }
74
+ });
75
+ linkElement.dispatchEvent(event);
76
+ }
77
+ render() {
78
+ return h("div", {
79
+ key: '99518cd34cbfc04691f2f827b53105ef88c03af8',
80
+ class: alertStyles({
81
+ intent: this.intent,
82
+ direction: this.direction,
83
+ withBtn: this.withBtn
84
+ }),
85
+ role: "alert"
86
+ }, h("p", {
87
+ key: '7eca97c849473bb4c8472d11243dc5eb9dded61f',
88
+ class: "f-ui-01 py-8"
89
+ }, this.message), this.withBtn && (this.pressableUrl ? h("eds-link", {
90
+ class: "eds-alert-link",
91
+ label: this.pressableLabel,
92
+ url: this.pressableUrl,
93
+ intent: "secondary"
94
+ }) : null));
95
+ }
96
+ get el() {
97
+ return getElement(this);
98
+ }
99
+ };
100
+ EdsAlert.style = EdsAlertStyle0;
101
+
102
+ export { EdsAlert as eds_alert };