solid-ui 3.0.6 → 3.1.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 (129) hide show
  1. package/README.md +128 -2
  2. package/dist/acl/access-groups.js +1 -1
  3. package/dist/components/footer/index.d.ts +1 -0
  4. package/dist/components/footer/index.esm.js +24364 -0
  5. package/dist/components/footer/index.esm.js.map +1 -0
  6. package/dist/components/footer/index.esm.min.js +137 -0
  7. package/dist/components/footer/index.esm.min.js.map +1 -0
  8. package/dist/components/footer/index.js +23252 -0
  9. package/dist/components/footer/index.js.map +1 -0
  10. package/dist/components/footer/index.min.js +125 -0
  11. package/dist/components/footer/index.min.js.map +1 -0
  12. package/dist/components/header/index.d.ts +1 -0
  13. package/dist/components/header/index.esm.js +1894 -0
  14. package/dist/components/header/index.esm.js.map +1 -0
  15. package/dist/components/header/index.esm.min.js +1083 -0
  16. package/dist/components/header/index.esm.min.js.map +1 -0
  17. package/dist/components/header/index.js +1855 -0
  18. package/dist/components/header/index.js.map +1 -0
  19. package/dist/components/header/index.min.js +1084 -0
  20. package/dist/components/header/index.min.js.map +1 -0
  21. package/dist/components/loginButton/index.d.ts +1 -0
  22. package/dist/components/loginButton/index.esm.js +719 -0
  23. package/dist/components/loginButton/index.esm.js.map +1 -0
  24. package/dist/components/loginButton/index.esm.min.js +402 -0
  25. package/dist/components/loginButton/index.esm.min.js.map +1 -0
  26. package/dist/components/loginButton/index.js +701 -0
  27. package/dist/components/loginButton/index.js.map +1 -0
  28. package/dist/components/loginButton/index.min.js +402 -0
  29. package/dist/components/loginButton/index.min.js.map +1 -0
  30. package/dist/components/signupButton/index.d.ts +1 -0
  31. package/dist/components/signupButton/index.esm.js +270 -0
  32. package/dist/components/signupButton/index.esm.js.map +1 -0
  33. package/dist/components/signupButton/index.esm.min.js +82 -0
  34. package/dist/components/signupButton/index.esm.min.js.map +1 -0
  35. package/dist/components/signupButton/index.js +264 -0
  36. package/dist/components/signupButton/index.js.map +1 -0
  37. package/dist/components/signupButton/index.min.js +82 -0
  38. package/dist/components/signupButton/index.min.js.map +1 -0
  39. package/dist/footer/index.d.ts.map +1 -1
  40. package/dist/footer/index.js +8 -4
  41. package/dist/footer/index.js.map +1 -1
  42. package/dist/icons/v2/icons-svg/contactIcons.d.ts +3 -0
  43. package/dist/icons/v2/icons-svg/contactIcons.d.ts.map +1 -0
  44. package/dist/icons/v2/icons-svg/contactIcons.js +27 -0
  45. package/dist/icons/v2/icons-svg/contactIcons.js.map +1 -0
  46. package/dist/icons/v2/icons-svg/headerIcons.d.ts +18 -0
  47. package/dist/icons/v2/icons-svg/headerIcons.d.ts.map +1 -0
  48. package/dist/icons/v2/icons-svg/headerIcons.js +245 -0
  49. package/dist/icons/v2/icons-svg/headerIcons.js.map +1 -0
  50. package/dist/icons/v2/icons-svg/pngIcons.d.ts +3 -0
  51. package/dist/icons/v2/icons-svg/pngIcons.d.ts.map +1 -0
  52. package/dist/icons/v2/icons-svg/pngIcons.js +4 -0
  53. package/dist/icons/v2/icons-svg/pngIcons.js.map +1 -0
  54. package/dist/icons/v2/icons-svg/profileIcons.d.ts +23 -0
  55. package/dist/icons/v2/icons-svg/profileIcons.d.ts.map +1 -0
  56. package/dist/icons/v2/icons-svg/profileIcons.js +317 -0
  57. package/dist/icons/v2/icons-svg/profileIcons.js.map +1 -0
  58. package/dist/pad.d.ts.map +1 -1
  59. package/dist/pad.js +13 -13
  60. package/dist/pad.js.map +1 -1
  61. package/dist/solid-ui.esm.js +9560 -12181
  62. package/dist/solid-ui.esm.js.map +1 -1
  63. package/dist/solid-ui.esm.min.js +15 -14
  64. package/dist/solid-ui.esm.min.js.map +1 -1
  65. package/dist/solid-ui.js +12531 -14794
  66. package/dist/solid-ui.js.map +1 -1
  67. package/dist/solid-ui.min.js +23 -22
  68. package/dist/solid-ui.min.js.map +1 -1
  69. package/dist/utils/headerFooterHelpers.d.ts.map +1 -1
  70. package/dist/utils/headerFooterHelpers.js +11 -2
  71. package/dist/utils/headerFooterHelpers.js.map +1 -1
  72. package/dist/v2/components/footer/Footer.d.ts +60 -0
  73. package/dist/v2/components/footer/Footer.d.ts.map +1 -0
  74. package/dist/v2/components/footer/Footer.js +148 -0
  75. package/dist/v2/components/footer/Footer.js.map +1 -0
  76. package/dist/v2/components/footer/Footer.test.d.ts +2 -0
  77. package/dist/v2/components/footer/Footer.test.d.ts.map +1 -0
  78. package/dist/v2/components/footer/Footer.test.js +53 -0
  79. package/dist/v2/components/footer/Footer.test.js.map +1 -0
  80. package/dist/v2/components/footer/index.d.ts +3 -0
  81. package/dist/v2/components/footer/index.d.ts.map +1 -0
  82. package/dist/v2/components/footer/index.js +7 -0
  83. package/dist/v2/components/footer/index.js.map +1 -0
  84. package/dist/v2/components/header/Header.d.ts +155 -0
  85. package/dist/v2/components/header/Header.d.ts.map +1 -0
  86. package/dist/v2/components/header/Header.js +845 -0
  87. package/dist/v2/components/header/Header.js.map +1 -0
  88. package/dist/v2/components/header/header.test.d.ts +2 -0
  89. package/dist/v2/components/header/header.test.d.ts.map +1 -0
  90. package/dist/v2/components/header/header.test.js +242 -0
  91. package/dist/v2/components/header/header.test.js.map +1 -0
  92. package/dist/v2/components/header/index.d.ts +4 -0
  93. package/dist/v2/components/header/index.d.ts.map +1 -0
  94. package/dist/v2/components/header/index.js +7 -0
  95. package/dist/v2/components/header/index.js.map +1 -0
  96. package/dist/v2/components/loginButton/LoginButton.d.ts +62 -0
  97. package/dist/v2/components/loginButton/LoginButton.d.ts.map +1 -0
  98. package/dist/v2/components/loginButton/LoginButton.js +497 -0
  99. package/dist/v2/components/loginButton/LoginButton.js.map +1 -0
  100. package/dist/v2/components/loginButton/LoginButton.test.d.ts +2 -0
  101. package/dist/v2/components/loginButton/LoginButton.test.d.ts.map +1 -0
  102. package/dist/v2/components/loginButton/LoginButton.test.js +53 -0
  103. package/dist/v2/components/loginButton/LoginButton.test.js.map +1 -0
  104. package/dist/v2/components/loginButton/downArrow.d.ts +2 -0
  105. package/dist/v2/components/loginButton/downArrow.d.ts.map +1 -0
  106. package/dist/v2/components/loginButton/downArrow.js +10 -0
  107. package/dist/v2/components/loginButton/downArrow.js.map +1 -0
  108. package/dist/v2/components/loginButton/index.d.ts +3 -0
  109. package/dist/v2/components/loginButton/index.d.ts.map +1 -0
  110. package/dist/v2/components/loginButton/index.js +7 -0
  111. package/dist/v2/components/loginButton/index.js.map +1 -0
  112. package/dist/v2/components/signupButton/SignupButton.d.ts +36 -0
  113. package/dist/v2/components/signupButton/SignupButton.d.ts.map +1 -0
  114. package/dist/v2/components/signupButton/SignupButton.js +84 -0
  115. package/dist/v2/components/signupButton/SignupButton.js.map +1 -0
  116. package/dist/v2/components/signupButton/SignupButton.test.d.ts +2 -0
  117. package/dist/v2/components/signupButton/SignupButton.test.d.ts.map +1 -0
  118. package/dist/v2/components/signupButton/SignupButton.test.js +49 -0
  119. package/dist/v2/components/signupButton/SignupButton.test.js.map +1 -0
  120. package/dist/v2/components/signupButton/index.d.ts +3 -0
  121. package/dist/v2/components/signupButton/index.d.ts.map +1 -0
  122. package/dist/v2/components/signupButton/index.js +7 -0
  123. package/dist/v2/components/signupButton/index.js.map +1 -0
  124. package/dist/versionInfo.js +7 -7
  125. package/dist/widgets/buttons.d.ts +9 -3
  126. package/dist/widgets/buttons.d.ts.map +1 -1
  127. package/dist/widgets/buttons.js +68 -7
  128. package/dist/widgets/buttons.js.map +1 -1
  129. package/package.json +34 -7
@@ -0,0 +1,1855 @@
1
+ /******/ (() => { // webpackBootstrap
2
+ /******/ "use strict";
3
+ /******/ var __webpack_modules__ = ({
4
+
5
+ /***/ 423
6
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
7
+
8
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9
+ /* harmony export */ Rm: () => (/* binding */ log)
10
+ /* harmony export */ });
11
+ /* unused harmony exports warn, error, trace */
12
+ function log(...args) {
13
+ console.log(...args);
14
+ }
15
+ function warn(...args) {
16
+ console.warn(...args);
17
+ }
18
+ function error(...args) {
19
+ console.error(...args);
20
+ }
21
+ function trace(...args) {
22
+ console.trace(...args);
23
+ }
24
+
25
+ /***/ },
26
+
27
+ /***/ 378
28
+ (module, __webpack_exports__, __webpack_require__) {
29
+
30
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
31
+ /* harmony export */ Pt: () => (/* binding */ icons)
32
+ /* harmony export */ });
33
+ /* unused harmony exports iconBase, originalIconBase */
34
+ /* harmony import */ var _debug__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(423);
35
+ /* module decorator */ module = __webpack_require__.hmd(module);
36
+ // Works in FF extension - what about browserify??
37
+ // 2021-04-08 Convert to TS
38
+
39
+ /* The Firefox case is left for historical record, as we don't currenly
40
+ * have a FF extension for mashlib, but we could. This is sthepoint to
41
+ * hack the place it can find its icons internally
42
+ *
43
+ * The $SolidTestEnvironment is important and is used for
44
+ * example when testing on localhost to specify a place the icons be found
45
+ * in your test set up.
46
+ *
47
+ * You can also use it if you want to just run a mashlib whhich takes its
48
+ * icons seved by other than github.
49
+ */
50
+
51
+
52
+ // Do not export. Always us this module to find the icons, as they vary
53
+ const iconsOnGithub = 'https://solidos.github.io/solid-ui/src'; // changed org 2022-05
54
+
55
+ const icons = module.scriptURI // Firefox extension
56
+ ? {
57
+ iconBase: module.scriptURI.slice(0, module.scriptURI.lastIndexOf('/')) + '/icons/',
58
+ originalIconBase: module.scriptURI.slice(0, module.scriptURI.lastIndexOf('/')) + '/originalIcons/'
59
+ } : typeof $SolidTestEnvironment !== 'undefined' && $SolidTestEnvironment.iconBase // Test environemnt
60
+ ? {
61
+ iconBase: $SolidTestEnvironment.iconBase,
62
+ originalIconBase: $SolidTestEnvironment.originalIconBase
63
+ } : {
64
+ // Normal case:
65
+ iconBase: iconsOnGithub + '/icons/',
66
+ originalIconBase: iconsOnGithub + '/originalIcons/'
67
+ };
68
+ (0,_debug__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm)(' icons.iconBase is set to : ' + icons.iconBase);
69
+
70
+ // allow tests etc named-import this directly from this module
71
+ const iconBase = icons.iconBase;
72
+ const originalIconBase = icons.originalIconBase;
73
+
74
+ /***/ },
75
+
76
+ /***/ 568
77
+ (__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
78
+
79
+
80
+ // UNUSED EXPORTS: LoginButton
81
+
82
+ // EXTERNAL MODULE: ./node_modules/lit/index.js
83
+ var lit = __webpack_require__(161);
84
+ // EXTERNAL MODULE: external "SolidLogic"
85
+ var external_SolidLogic_ = __webpack_require__(892);
86
+ // EXTERNAL MODULE: ./node_modules/lit-html/lit-html.js
87
+ var lit_html = __webpack_require__(752);
88
+ ;// ./src/v2/components/loginButton/downArrow.ts
89
+
90
+ const phoneIcon = (0,lit_html/* html */.qy)`
91
+ <svg xmlns="http://www.w3.org/2000/svg"
92
+ viewBox="0 0 12 7"
93
+ fill="none"
94
+ >
95
+ <path d="M0.679688 0.678955L5.50729 5.50656L10.3349 0.678955" stroke="#6A7282" stroke-width="1.35776" stroke-linecap="round" stroke-linejoin="round"/>
96
+ </svg>
97
+ `;
98
+ ;// ./src/v2/components/loginButton/LoginButton.ts
99
+
100
+
101
+
102
+ class LoginButton extends lit/* LitElement */.WF {
103
+ static properties = {
104
+ label: {
105
+ type: String,
106
+ reflect: true
107
+ },
108
+ theme: {
109
+ type: String,
110
+ reflect: true
111
+ },
112
+ issuerUrl: {
113
+ type: String,
114
+ attribute: 'issuer-url',
115
+ reflect: true
116
+ },
117
+ icon: {
118
+ type: String,
119
+ reflect: true
120
+ },
121
+ layout: {
122
+ type: String,
123
+ reflect: true
124
+ },
125
+ _popupOpen: {
126
+ state: true
127
+ },
128
+ _issuerInputValue: {
129
+ state: true
130
+ },
131
+ _dropdownOpen: {
132
+ state: true
133
+ }
134
+ };
135
+ static styles = (0,lit/* css */.AH)`
136
+ :host { // default theme
137
+ display: inline-block;
138
+ position: relative;
139
+ z-index: 400;
140
+ --login-button-background: var(--lavender-900, #7c4cff);
141
+ --login-button-text: var(--color-header-text, #ffffff);
142
+ --popup-background: var(--color-background, #F8F9FB);
143
+ --popup-text: var(--color-text, #1A1A1A);
144
+ --popup-border: var(--color-border, #E5E7EB);
145
+ --popup-shadow: var(--box-shadow-sm, 0 1px 4px rgba(124,77,255,0.12));
146
+ --popup-overlay-background: rgba(0, 0, 0, 0.6);
147
+ --issuer-input-background: var(--color-background, #F8F9FB);
148
+ --issuer-input-text: var(--color-text, #1A1A1A);
149
+ --issuer-input-border: var(--color-text, #1A1A1A);
150
+ --issuer-button-background: var(--color-background, #F8F9FB);
151
+ --issuer-button-text: var(--color-text, #1A1A1A);
152
+ --issuer-button-border: var(--color-border, #E5E7EB);
153
+ --issuer-button-hover-background: var(--lavender-900, #7c4cff);
154
+ --issuer-label-color: var(--grey-purple-700, #1A1A1A);
155
+ --issuer-placeholder-color: var(--grey-purple-700, #5e546d);;
156
+ --error-text-color: var(--color-error, #B00020);
157
+ }
158
+
159
+ :host([theme='dark']) {
160
+ display: inline-block;
161
+ position: relative;
162
+ z-index: 900;
163
+ --login-button-background: var(--lavender-900, #7c4cff);
164
+ --login-button-text: var(--color-header-text, #ffffff);
165
+ --popup-background: var(--color-background, #F8F9FB);
166
+ --popup-text: var(--color-text, #1A1A1A);
167
+ --popup-border: var(--color-border, #E5E7EB);
168
+ --popup-shadow: var(--box-shadow-sm, 0 1px 4px rgba(124,77,255,0.12));
169
+ --popup-overlay-background: rgba(0, 0, 0, 0.6);
170
+ --issuer-input-background: var(--color-background, #F8F9FB);
171
+ --issuer-input-text: var(--color-text, #1A1A1A);
172
+ --issuer-input-border: var(--color-text, #1A1A1A);
173
+ --issuer-button-background: var(--color-background, #F8F9FB);
174
+ --issuer-button-text: var(--color-text, #1A1A1A);
175
+ --issuer-button-border: var(--color-text, #1A1A1A);
176
+ --issuer-button-hover-background: var(--lavender-900, #7c4cff);
177
+ --issuer-label-color: var(--grey-purple-700, #1A1A1A);
178
+ --issuer-placeholder-color: var(--grey-purple-700, #5e546d);;
179
+ --error-text-color: var(--color-error, #B00020);
180
+ }
181
+
182
+ .login-button {
183
+ display: flex;
184
+ height: 35px;
185
+ padding: var(--spacing-xxs, 0.3125rem) var(--spacing-xs, 0.75rem);
186
+ align-items: center;
187
+ gap: var(--spacing-xxs, 0.3125rem);
188
+ border-radius: var(--border-radius-base, 0.3125rem);
189
+ background: var(--login-button-background);
190
+ border: none;
191
+ color: var(--login-button-text);
192
+ cursor: pointer;
193
+ font: inherit;
194
+ line-height: 1;
195
+ white-space: nowrap;
196
+ text-decoration: none;
197
+ box-sizing: border-box;
198
+ transition: transform 0.2s ease;
199
+ }
200
+
201
+ .login-button-icon {
202
+ width: 16px;
203
+ height: 16px;
204
+ display: inline-block;
205
+ object-fit: contain;
206
+ }
207
+
208
+ .login-button:active {
209
+ transform: translateY(1px);
210
+ }
211
+
212
+ .popup-dialog {
213
+ border: none;
214
+ padding: 0;
215
+ background: transparent;
216
+ outline: none;
217
+ overflow: visible;
218
+ max-height: none;
219
+ max-width: none;
220
+ }
221
+
222
+ .popup-dialog::backdrop {
223
+ background: var(--popup-overlay-background, rgba(0, 0, 0, 0.6));
224
+ }
225
+
226
+ .popup-box {
227
+ background: var(--popup-background);
228
+ color: var(--popup-text);
229
+ box-shadow: var(--popup-shadow);
230
+ border: 1px solid var(--popup-border);
231
+ border-radius: var(--border-radius-md, 0.5rem);
232
+ min-width: 480px;
233
+ z-index: 1001;
234
+ }
235
+
236
+ .popup-top-menu {
237
+ border-bottom: 1px solid #DDD;
238
+ display: flex;
239
+ flex-direction: row;
240
+ align-items: center;
241
+ justify-content: space-between;
242
+ padding-bottom: 8px;
243
+ margin-bottom: 8px;
244
+ padding: 1rem;
245
+ background: var(--gray-200, #E5E7EB);
246
+ }
247
+
248
+ .popup-title {
249
+ font-weight: 800;
250
+ }
251
+
252
+ .popup-close {
253
+ background: transparent;
254
+ border: none;
255
+ cursor: pointer;
256
+ font-size: 1.25rem;
257
+ line-height: 1;
258
+ padding: 0 0.25rem;
259
+ }
260
+
261
+ .issuer-text-section {
262
+ display: flex;
263
+ flex-direction: column;
264
+ padding: 1rem 1rem 1.75rem;
265
+ }
266
+
267
+ .issuer-text-label {
268
+ color: var(--issuer-label-color);
269
+ margin-bottom: 6px;
270
+ }
271
+
272
+ .issuer-text-row {
273
+ display: flex;
274
+ flex-direction: row;
275
+ gap: 6px;
276
+ align-items: flex-start;
277
+ }
278
+
279
+ .issuer-input-wrapper {
280
+ flex: 1;
281
+ display: flex;
282
+ flex-direction: column;
283
+ min-width: 0;
284
+ position: relative;
285
+ }
286
+
287
+ .issuer-input-field-row {
288
+ display: flex;
289
+ flex-direction: row;
290
+ position: relative;
291
+ }
292
+
293
+ .issuer-text-input {
294
+ flex: 1;
295
+ padding: 0.375rem 2.75rem 0.375rem 0.5rem;
296
+ border: 1px solid var(--issuer-input-border);
297
+ border-radius: var(--border-radius-base, 0.3125rem);
298
+ background: var(--issuer-input-background);
299
+ color: var(--issuer-input-text);
300
+ font: inherit;
301
+ min-width: 0;
302
+ }
303
+
304
+ .issuer-text-input::placeholder {
305
+ color: var(--issuer-placeholder-color);
306
+ }
307
+
308
+ .issuer-dropdown-toggle {
309
+ position: absolute;
310
+ right: 6px;
311
+ top: 50%;
312
+ transform: translateY(-50%);
313
+ width: 26px;
314
+ height: 26px;
315
+ padding: 0;
316
+ border: none;
317
+ background: transparent;
318
+ cursor: pointer;
319
+ display: flex;
320
+ align-items: center;
321
+ justify-content: center;
322
+ flex-shrink: 0;
323
+ border-radius: var(--border-radius-base, 0.3125rem);
324
+ }
325
+
326
+ .issuer-dropdown-toggle:hover {
327
+ background: var(--color-header-menu-item-hover, #e6dcff);
328
+ }
329
+
330
+ .issuer-dropdown-toggle svg {
331
+ width: 14px;
332
+ height: 14px;
333
+ display: block;
334
+ }
335
+
336
+ .issuer-dropdown-list {
337
+ position: absolute;
338
+ top: calc(100% + 6px);
339
+ left: 0;
340
+ right: 0;
341
+ border: 1px solid var(--color-border, #E5E7EB);
342
+ border-top: none;
343
+ border-radius: 0 0 var(--border-radius-base, 0.3125rem) var(--border-radius-base, 0.3125rem);
344
+ background: var(--issuer-input-background);
345
+ overflow: visible;
346
+ z-index: 10;
347
+ box-shadow: 0 4px 12px rgba(124, 77, 255, 0.12);
348
+ }
349
+
350
+ .issuer-dropdown-item {
351
+ display: block;
352
+ width: 100%;
353
+ padding: 0.625rem 0.75rem;
354
+ border: none;
355
+ border-bottom: 1px solid var(--color-border, #E5E7EB);
356
+ background: transparent;
357
+ color: var(--issuer-button-text);
358
+ cursor: pointer;
359
+ font: inherit;
360
+ text-align: left;
361
+ box-sizing: border-box;
362
+ }
363
+
364
+ .issuer-dropdown-item:last-child {
365
+ border-bottom: none;
366
+ }
367
+
368
+ .issuer-dropdown-item:hover {
369
+ background: var(--color-header-menu-item-hover, #e6dcff);
370
+ border-radius: var(--border-radius-base-md, 0.5rem);
371
+ }
372
+
373
+ .popup-footer {
374
+ display: flex;
375
+ flex-direction: row;
376
+ justify-content: center;
377
+ gap: 8px;
378
+ padding: 0.75rem 1rem 1rem;
379
+ }
380
+
381
+ .popup-footer-hr {
382
+ margin: 0;
383
+ border: none;
384
+ border-top: 1px solid var(--popup-border, #E5E7EB);
385
+ }
386
+
387
+ .popup-cancel-button {
388
+ padding: 0.5rem 1.25rem;
389
+ border: 1px solid #C0BFC7;
390
+ border-radius: var(--border-radius-base, 0.3125rem);
391
+ background: var(--popup-background);
392
+ color: #314158;
393
+ cursor: pointer;
394
+ font: inherit;
395
+ }
396
+
397
+ .popup-cancel-button:hover {
398
+ background: #D1D5DB;
399
+ }
400
+
401
+ .popup-login-button {
402
+ padding: 0.5rem 1.25rem;
403
+ border: none;
404
+ border-radius: var(--border-radius-base, 0.3125rem);
405
+ background: var(--lavender-900, #7c4cff);
406
+ color: #ffffff;
407
+ cursor: pointer;
408
+ font: inherit;
409
+ }
410
+
411
+ .popup-login-button:hover {
412
+ background: #6a3de8;
413
+ }
414
+
415
+ .popup-login-button:disabled {
416
+ opacity: 0.5;
417
+ cursor: not-allowed;
418
+ }
419
+
420
+ .error-msg {
421
+ color: var(--error-text-color);
422
+ font-size: 0.875rem;
423
+ margin-top: 8px;
424
+ }
425
+ `;
426
+ _issuerInputId = `issuer-url-input-${Math.random().toString(36).slice(2, 10)}`;
427
+ _errorMsg = '';
428
+ constructor() {
429
+ super();
430
+ this.label = 'Log In';
431
+ this.theme = 'light';
432
+ this.issuerUrl = '';
433
+ this.icon = '';
434
+ this.layout = 'desktop';
435
+ this._popupOpen = false;
436
+ this._issuerInputValue = '';
437
+ this._dropdownOpen = false;
438
+ }
439
+ connectedCallback() {
440
+ super.connectedCallback();
441
+ }
442
+ disconnectedCallback() {
443
+ super.disconnectedCallback();
444
+ }
445
+ _openPopup() {
446
+ const offline = (0,external_SolidLogic_.offlineTestID)();
447
+ if (offline) {
448
+ this._loginComplete(offline.uri);
449
+ return;
450
+ }
451
+ this._issuerInputValue = typeof localStorage !== 'undefined' && localStorage.getItem('loginIssuer') || this.issuerUrl || '';
452
+ this._errorMsg = '';
453
+ this._popupOpen = true;
454
+ }
455
+ _closePopup() {
456
+ this._popupOpen = false;
457
+ }
458
+ updated() {
459
+ const dialog = this.shadowRoot?.querySelector('dialog');
460
+ if (!dialog) return;
461
+ if (this._popupOpen && !dialog.open) {
462
+ dialog.showModal();
463
+ } else if (!this._popupOpen && dialog.open) {
464
+ dialog.close();
465
+ }
466
+ }
467
+ async _loginToIssuer(issuerUri) {
468
+ if (!issuerUri) return;
469
+ try {
470
+ // clear authorization metadata from store
471
+ ;
472
+ external_SolidLogic_.solidLogicSingleton.store.updater.flagAuthorizationMetadata();
473
+ const preLoginRedirectHash = new URL(window.location.href).hash;
474
+ if (preLoginRedirectHash) {
475
+ window.localStorage.setItem('preLoginRedirectHash', preLoginRedirectHash);
476
+ }
477
+ window.localStorage.setItem('loginIssuer', issuerUri);
478
+ const locationUrl = new URL(window.location.href);
479
+ locationUrl.hash = '';
480
+ await external_SolidLogic_.authSession.login({
481
+ redirectUrl: locationUrl.href,
482
+ oidcIssuer: issuerUri
483
+ });
484
+ } catch (err) {
485
+ this._errorMsg = err.message || String(err);
486
+ this.requestUpdate();
487
+ }
488
+ }
489
+ _loginComplete(webIdUri) {
490
+ external_SolidLogic_.authn.saveUser(webIdUri);
491
+ this.dispatchEvent(new CustomEvent('login-success', {
492
+ detail: {
493
+ webId: webIdUri
494
+ },
495
+ bubbles: true,
496
+ composed: true
497
+ }));
498
+ }
499
+ _handleGoClick() {
500
+ this._dropdownOpen = false;
501
+ this._loginToIssuer(this._issuerInputValue);
502
+ }
503
+ _toggleDropdown() {
504
+ this._dropdownOpen = !this._dropdownOpen;
505
+ }
506
+ _selectIssuerFromDropdown(uri) {
507
+ this._issuerInputValue = uri;
508
+ this._dropdownOpen = false;
509
+ }
510
+ _handleInputChange(e) {
511
+ this._issuerInputValue = e.target.value;
512
+ }
513
+ _handleInputKeydown(e) {
514
+ if (e.key === 'Enter') {
515
+ this._loginToIssuer(this._issuerInputValue);
516
+ }
517
+ if (e.key === 'Escape') {
518
+ this._closePopup();
519
+ }
520
+ }
521
+ _renderPopup() {
522
+ const suggestedIssuers = (0,external_SolidLogic_.getSuggestedIssuers)();
523
+ return (0,lit/* html */.qy)`
524
+ <div class="popup-box">
525
+ <div class="popup-top-menu">
526
+ <span class="popup-title">Select an identity provider</span>
527
+ <button class="popup-close" type="button" aria-label="Close" @click="${() => this._closePopup()}">&#x2715;</button>
528
+ </div>
529
+
530
+ <div class="issuer-text-section">
531
+ <label class="issuer-text-label" for="${this._issuerInputId}">Solid Identity Provider</label>
532
+ <div class="issuer-text-row">
533
+ <div class="issuer-input-wrapper">
534
+ <div class="issuer-input-field-row">
535
+ <input
536
+ id="${this._issuerInputId}"
537
+ class="issuer-text-input"
538
+ type="text"
539
+ placeholder="https://example.com"
540
+ .value="${this._issuerInputValue}"
541
+ @input="${this._handleInputChange}"
542
+ @keydown="${this._handleInputKeydown}"
543
+ autocomplete="url"
544
+ />
545
+ ${suggestedIssuers.length ? (0,lit/* html */.qy)`
546
+ <button
547
+ class="issuer-dropdown-toggle"
548
+ type="button"
549
+ aria-label="Show identity provider suggestions"
550
+ aria-expanded="${this._dropdownOpen}"
551
+ @click="${() => this._toggleDropdown()}"
552
+ >${phoneIcon}</button>
553
+ ` : ''}
554
+ </div>
555
+ ${this._dropdownOpen && suggestedIssuers.length ? (0,lit/* html */.qy)`
556
+ <div class="issuer-dropdown-list" role="listbox">
557
+ ${suggestedIssuers.map(issuerInfo => (0,lit/* html */.qy)`
558
+ <button
559
+ class="issuer-dropdown-item"
560
+ type="button"
561
+ role="option"
562
+ @click="${() => this._selectIssuerFromDropdown(issuerInfo.uri)}"
563
+ >${issuerInfo.name}</button>
564
+ `)}
565
+ </div>
566
+ ` : ''}
567
+ </div>
568
+ </div>
569
+ ${this._errorMsg ? (0,lit/* html */.qy)`<div class="error-msg">${this._errorMsg}</div>` : ''}
570
+ </div>
571
+ <hr class="popup-footer-hr" />
572
+ <div class="popup-footer">
573
+ <button class="popup-cancel-button" type="button" @click="${() => this._closePopup()}">Cancel</button>
574
+ <button
575
+ class="popup-login-button"
576
+ type="button"
577
+ ?disabled="${!this._issuerInputValue}"
578
+ @click="${() => this._handleGoClick()}"
579
+ >Log In</button>
580
+ </div>
581
+ </div>
582
+ `;
583
+ }
584
+ render() {
585
+ return (0,lit/* html */.qy)`
586
+ <button
587
+ class="login-button"
588
+ type="button"
589
+ part="login-button"
590
+ @click="${() => this._openPopup()}"
591
+ >
592
+ ${this.icon ? (0,lit/* html */.qy)`<img class="login-button-icon" src="${this.icon}" alt="" aria-hidden="true" part="login-button-icon" />` : ''}
593
+ <slot>${this.label}</slot>
594
+ </button>
595
+
596
+ <dialog
597
+ class="popup-dialog"
598
+ role="dialog"
599
+ aria-modal="true"
600
+ aria-label="Select an identity provider"
601
+ @cancel="${e => {
602
+ e.preventDefault();
603
+ this._closePopup();
604
+ }}"
605
+ @click="${e => {
606
+ if (e.target === e.currentTarget) this._closePopup();
607
+ }}"
608
+ >
609
+ ${this._popupOpen ? this._renderPopup() : ''}
610
+ </dialog>
611
+ `;
612
+ }
613
+ }
614
+ ;// ./src/v2/components/loginButton/index.ts
615
+
616
+
617
+ const LOGIN_BUTTON_TAG_NAME = 'solid-ui-login-button';
618
+ if (!customElements.get(LOGIN_BUTTON_TAG_NAME)) {
619
+ customElements.define(LOGIN_BUTTON_TAG_NAME, LoginButton);
620
+ }
621
+
622
+ /***/ },
623
+
624
+ /***/ 765
625
+ (__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
626
+
627
+
628
+ // UNUSED EXPORTS: SignupButton
629
+
630
+ // EXTERNAL MODULE: ./node_modules/lit/index.js
631
+ var lit = __webpack_require__(161);
632
+ ;// ./src/v2/components/signupButton/SignupButton.ts
633
+
634
+ const DEFAULT_SIGNUP_URL = 'https://solidproject.org/get_a_pod';
635
+ class SignupButton extends lit/* LitElement */.WF {
636
+ static properties = {
637
+ label: {
638
+ type: String,
639
+ reflect: true
640
+ },
641
+ theme: {
642
+ type: String,
643
+ reflect: true
644
+ },
645
+ signupUrl: {
646
+ type: String,
647
+ attribute: 'signup-url',
648
+ reflect: true
649
+ },
650
+ icon: {
651
+ type: String,
652
+ reflect: true
653
+ },
654
+ layout: {
655
+ type: String,
656
+ reflect: true
657
+ }
658
+ };
659
+ static styles = (0,lit/* css */.AH)`
660
+ :host {
661
+ display: inline-block;
662
+ --signup-button-background: transparent;
663
+ --signup-button-border: var(--color-border, #E5E7EB);
664
+ --signup-button-text: var(--color-header-text, #ffffff);
665
+ }
666
+
667
+ :host([theme='dark']) {
668
+ --signup-button-background: transparent;
669
+ --signup-button-border: var(--color-border, #E5E7EB);
670
+ --signup-button-text: var(--color-header-text, #ffffff);
671
+ }
672
+
673
+ .signup-button {
674
+ display: flex;
675
+ height: 35px;
676
+ padding: var(--spacing-xxs, 0.3125rem) var(--spacing-xs, 0.75rem);
677
+ align-items: center;
678
+ gap: var(--spacing-xxs, 0.3125rem);
679
+ border-radius: var(--border-radius-base, 0.3125rem);
680
+ background: var(--signup-button-background);
681
+ border: 1px solid var(--signup-button-border);
682
+ color: var(--signup-button-text);
683
+ cursor: pointer;
684
+ font: inherit;
685
+ line-height: 1;
686
+ white-space: nowrap;
687
+ text-decoration: none;
688
+ box-sizing: border-box;
689
+ transition: transform 0.2s ease;
690
+ }
691
+
692
+ :host([layout='mobile']) .signup-button {
693
+ border: none;
694
+ }
695
+
696
+ .signup-button-icon {
697
+ width: 16px;
698
+ height: 16px;
699
+ display: inline-block;
700
+ object-fit: contain;
701
+ }
702
+
703
+ .signup-button:active {
704
+ transform: translateY(1px);
705
+ }
706
+ `;
707
+ constructor() {
708
+ super();
709
+ this.label = 'Sign Up';
710
+ this.signupUrl = DEFAULT_SIGNUP_URL;
711
+ this.theme = 'light';
712
+ this.icon = '';
713
+ this.layout = 'desktop';
714
+ }
715
+ _handleClick() {
716
+ window.open(this.signupUrl, '_blank', 'noopener,noreferrer');
717
+ }
718
+ render() {
719
+ return (0,lit/* html */.qy)`
720
+ <button
721
+ class="signup-button"
722
+ type="button"
723
+ part="signup-button"
724
+ @click="${() => this._handleClick()}"
725
+ >
726
+ ${this.icon ? (0,lit/* html */.qy)`<img class="signup-button-icon" src="${this.icon}" alt="" aria-hidden="true" part="signup-button-icon" />` : ''}
727
+ <slot>${this.label}</slot>
728
+ </button>
729
+ `;
730
+ }
731
+ }
732
+ ;// ./src/v2/components/signupButton/index.ts
733
+
734
+
735
+ const SIGNUP_BUTTON_TAG_NAME = 'solid-ui-signup-button';
736
+ if (!customElements.get(SIGNUP_BUTTON_TAG_NAME)) {
737
+ customElements.define(SIGNUP_BUTTON_TAG_NAME, SignupButton);
738
+ }
739
+
740
+ /***/ },
741
+
742
+ /***/ 892
743
+ (module) {
744
+
745
+ module.exports = SolidLogic;
746
+
747
+ /***/ },
748
+
749
+ /***/ 826
750
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
751
+
752
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
753
+ /* harmony export */ AH: () => (/* binding */ i),
754
+ /* harmony export */ Rf: () => (/* binding */ S),
755
+ /* harmony export */ sk: () => (/* binding */ c)
756
+ /* harmony export */ });
757
+ /* unused harmony exports CSSResult, supportsAdoptingStyleSheets, unsafeCSS */
758
+ /**
759
+ * @license
760
+ * Copyright 2019 Google LLC
761
+ * SPDX-License-Identifier: BSD-3-Clause
762
+ */
763
+ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n("string"==typeof t?t:t+"",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1],t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement("style"),n=t.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;
764
+ //# sourceMappingURL=css-tag.js.map
765
+
766
+
767
+ /***/ },
768
+
769
+ /***/ 760
770
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
771
+
772
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
773
+ /* harmony export */ AH: () => (/* reexport safe */ _css_tag_js__WEBPACK_IMPORTED_MODULE_0__.AH),
774
+ /* harmony export */ mN: () => (/* binding */ y)
775
+ /* harmony export */ });
776
+ /* unused harmony exports defaultConverter, notEqual */
777
+ /* harmony import */ var _css_tag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(826);
778
+
779
+ /**
780
+ * @license
781
+ * Copyright 2017 Google LLC
782
+ * SPDX-License-Identifier: BSD-3-Clause
783
+ */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:"",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol("metadata"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d("elementProperties")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d("properties"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift((0,_css_tag_js__WEBPACK_IMPORTED_MODULE_0__/* .getCompatibleStyle */ .sk)(s))}else void 0!==s&&i.push((0,_css_tag_js__WEBPACK_IMPORTED_MODULE_0__/* .getCompatibleStyle */ .sk)(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return (0,_css_tag_js__WEBPACK_IMPORTED_MODULE_0__/* .adoptStyles */ .Rf)(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i,e=!1,h){if(void 0!==t){const r=this.constructor;if(!1===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[d("elementProperties")]=new Map,y[d("finalized")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push("2.1.2");
784
+ //# sourceMappingURL=reactive-element.js.map
785
+
786
+
787
+ /***/ },
788
+
789
+ /***/ 228
790
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
791
+
792
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
793
+ /* harmony export */ AH: () => (/* reexport safe */ _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__.AH),
794
+ /* harmony export */ WF: () => (/* binding */ i),
795
+ /* harmony export */ qy: () => (/* reexport safe */ lit_html__WEBPACK_IMPORTED_MODULE_1__.qy)
796
+ /* harmony export */ });
797
+ /* unused harmony export _$LE */
798
+ /* harmony import */ var _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(760);
799
+ /* harmony import */ var lit_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(752);
800
+
801
+ /**
802
+ * @license
803
+ * Copyright 2017 Google LLC
804
+ * SPDX-License-Identifier: BSD-3-Clause
805
+ */const s=globalThis;class i extends _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__/* .ReactiveElement */ .mN{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=(0,lit_html__WEBPACK_IMPORTED_MODULE_1__/* .render */ .XX)(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return lit_html__WEBPACK_IMPORTED_MODULE_1__/* .noChange */ .c0}}i._$litElement$=!0,i["finalized"]=!0,s.litElementHydrateSupport?.({LitElement:i});const o=s.litElementPolyfillSupport;o?.({LitElement:i});const n={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};(s.litElementVersions??=[]).push("4.2.2");
806
+ //# sourceMappingURL=lit-element.js.map
807
+
808
+
809
+ /***/ },
810
+
811
+ /***/ 752
812
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
813
+
814
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
815
+ /* harmony export */ XX: () => (/* binding */ D),
816
+ /* harmony export */ c0: () => (/* binding */ E),
817
+ /* harmony export */ qy: () => (/* binding */ b),
818
+ /* harmony export */ s6: () => (/* binding */ A)
819
+ /* harmony export */ });
820
+ /* unused harmony exports _$LH, mathml, svg */
821
+ /**
822
+ * @license
823
+ * Copyright 2017 Google LLC
824
+ * SPDX-License-Identifier: BSD-3-Clause
825
+ */
826
+ const t=globalThis,i=t=>t,s=t.trustedTypes,e=s?s.createPolicy("lit-html",{createHTML:t=>t}):void 0,h="$lit$",o=`lit$${Math.random().toFixed(9).slice(2)}$`,n="?"+o,r=`<${n}>`,l=document,c=()=>l.createComment(""),a=t=>null===t||"object"!=typeof t&&"function"!=typeof t,u=Array.isArray,d=t=>u(t)||"function"==typeof t?.[Symbol.iterator],f="[ \t\n\f\r]",v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,$=/"/g,y=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b=x(1),w=x(2),T=x(3),E=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),C=new WeakMap,P=l.createTreeWalker(l,129);function V(t,i){if(!u(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==e?e.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?"<svg>":3===i?"<math>":"",c=v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v?"!--"===u[1]?c=_:void 0!==u[1]?c=m:void 0!==u[2]?(y.test(u[2])&&(n=RegExp("</"+u[2],"g")),c=p):void 0!==u[3]&&(c=p):c===p?">"===u[0]?(c=n??v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p:'"'===u[3]?$:g):c===$||c===g?c=p:c===_||c===m?c=v:(c=p,n=void 0);const x=c===p&&t[i+1].startsWith("/>")?" ":"";l+=c===v?s+r:d>=0?(e.push(a),s.slice(0,d)+h+s.slice(d)+o+x):s+o+(-2===d?i:x)}return[V(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),e]};class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h)){const i=v[a++],s=r.getAttribute(t).split(o),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:"."===e[1]?I:"?"===e[1]?L:"@"===e[1]?z:H}),r.removeAttribute(t)}else t.startsWith(o)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y.test(r.tagName)){const t=r.textContent.split(o),i=t.length-1;if(i>0){r.textContent=s?s.emptyScript:"";for(let s=0;s<i;s++)r.append(t[s],c()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c())}}}else if(8===r.nodeType)if(r.data===n)d.push({type:2,index:l});else{let t=-1;for(;-1!==(t=r.data.indexOf(o,t+1));)d.push({type:7,index:l}),t+=o.length-1}l++}}static createElement(t,i){const s=l.createElement("template");return s.innerHTML=t,s}}function M(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M(t,h._$AS(t,i.values),h,e)),i}class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l).importNode(i,!0);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n]}o!==r?.index&&(h=P.nextNode(),o++)}return P.currentNode=l,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M(this,t,i),a(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==A&&a(this._$AH)?this._$AA.nextSibling.data=t:this.T(l.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new S(t)),i}k(t){u(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c()),this.O(c()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){const s=i(t).nextSibling;i(t).remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=M(this,t,i,0),o=!a(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!a(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??"")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class I extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}class L extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A)}}class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=M(this,t,i,0)??A)===E)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const j={M:h,P:o,A:n,C:1,L:N,R,D:d,V:M,I:k,H,N:L,U:z,B:I,F:Z},B=t.litHtmlPolyfillSupport;B?.(S,k),(t.litHtmlVersions??=[]).push("3.3.2");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k(i.insertBefore(c(),t),t,void 0,s??{})}return h._$AI(t),h};
827
+ //# sourceMappingURL=lit-html.js.map
828
+
829
+
830
+ /***/ },
831
+
832
+ /***/ 161
833
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
834
+
835
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
836
+ /* harmony export */ AH: () => (/* reexport safe */ lit_element_lit_element_js__WEBPACK_IMPORTED_MODULE_2__.AH),
837
+ /* harmony export */ WF: () => (/* reexport safe */ lit_element_lit_element_js__WEBPACK_IMPORTED_MODULE_2__.WF),
838
+ /* harmony export */ qy: () => (/* reexport safe */ lit_element_lit_element_js__WEBPACK_IMPORTED_MODULE_2__.qy)
839
+ /* harmony export */ });
840
+ /* harmony import */ var _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(760);
841
+ /* harmony import */ var lit_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(752);
842
+ /* harmony import */ var lit_element_lit_element_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
843
+
844
+ //# sourceMappingURL=index.js.map
845
+
846
+
847
+ /***/ }
848
+
849
+ /******/ });
850
+ /************************************************************************/
851
+ /******/ // The module cache
852
+ /******/ var __webpack_module_cache__ = {};
853
+ /******/
854
+ /******/ // The require function
855
+ /******/ function __webpack_require__(moduleId) {
856
+ /******/ // Check if module is in cache
857
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
858
+ /******/ if (cachedModule !== undefined) {
859
+ /******/ return cachedModule.exports;
860
+ /******/ }
861
+ /******/ // Create a new module (and put it into the cache)
862
+ /******/ var module = __webpack_module_cache__[moduleId] = {
863
+ /******/ id: moduleId,
864
+ /******/ loaded: false,
865
+ /******/ exports: {}
866
+ /******/ };
867
+ /******/
868
+ /******/ // Execute the module function
869
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
870
+ /******/
871
+ /******/ // Flag the module as loaded
872
+ /******/ module.loaded = true;
873
+ /******/
874
+ /******/ // Return the exports of the module
875
+ /******/ return module.exports;
876
+ /******/ }
877
+ /******/
878
+ /************************************************************************/
879
+ /******/ /* webpack/runtime/define property getters */
880
+ /******/ (() => {
881
+ /******/ // define getter functions for harmony exports
882
+ /******/ __webpack_require__.d = (exports, definition) => {
883
+ /******/ for(var key in definition) {
884
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
885
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
886
+ /******/ }
887
+ /******/ }
888
+ /******/ };
889
+ /******/ })();
890
+ /******/
891
+ /******/ /* webpack/runtime/harmony module decorator */
892
+ /******/ (() => {
893
+ /******/ __webpack_require__.hmd = (module) => {
894
+ /******/ module = Object.create(module);
895
+ /******/ if (!module.children) module.children = [];
896
+ /******/ Object.defineProperty(module, 'exports', {
897
+ /******/ enumerable: true,
898
+ /******/ set: () => {
899
+ /******/ throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);
900
+ /******/ }
901
+ /******/ });
902
+ /******/ return module;
903
+ /******/ };
904
+ /******/ })();
905
+ /******/
906
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
907
+ /******/ (() => {
908
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
909
+ /******/ })();
910
+ /******/
911
+ /************************************************************************/
912
+ var __webpack_exports__ = {};
913
+
914
+ // UNUSED EXPORTS: Header
915
+
916
+ // EXTERNAL MODULE: ./node_modules/lit/index.js
917
+ var lit = __webpack_require__(161);
918
+ // EXTERNAL MODULE: ./src/iconBase.ts
919
+ var iconBase = __webpack_require__(378);
920
+ // EXTERNAL MODULE: external "SolidLogic"
921
+ var external_SolidLogic_ = __webpack_require__(892);
922
+ // EXTERNAL MODULE: ./src/v2/components/loginButton/index.ts + 2 modules
923
+ var loginButton = __webpack_require__(568);
924
+ // EXTERNAL MODULE: ./src/v2/components/signupButton/index.ts + 1 modules
925
+ var signupButton = __webpack_require__(765);
926
+ // EXTERNAL MODULE: ./node_modules/lit-html/lit-html.js
927
+ var lit_html = __webpack_require__(752);
928
+ ;// ./node_modules/lit-html/directives/if-defined.js
929
+
930
+ /**
931
+ * @license
932
+ * Copyright 2018 Google LLC
933
+ * SPDX-License-Identifier: BSD-3-Clause
934
+ */const o=o=>o??lit_html/* nothing */.s6;
935
+ //# sourceMappingURL=if-defined.js.map
936
+
937
+ ;// ./node_modules/lit/directives/if-defined.js
938
+
939
+ //# sourceMappingURL=if-defined.js.map
940
+
941
+ ;// ./src/v2/components/header/Header.ts
942
+
943
+
944
+
945
+
946
+
947
+
948
+ const DEFAULT_HELP_MENU_ICON = '';
949
+ const DEFAULT_SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg';
950
+ const DEFAULT_SIGNUP_URL = 'https://solidproject.org/get_a_pod';
951
+ const DEFAULT_LOGGEDIN_MENU_BUTTON_AVATAR = iconBase/* icons */.Pt.iconBase + 'emptyProfileAvatar.png';
952
+ class Header extends lit/* LitElement */.WF {
953
+ static properties = {
954
+ logo: {
955
+ type: String,
956
+ reflect: true
957
+ },
958
+ helpIcon: {
959
+ type: String,
960
+ attribute: 'help-icon',
961
+ reflect: true
962
+ },
963
+ layout: {
964
+ type: String,
965
+ reflect: true
966
+ },
967
+ theme: {
968
+ type: String,
969
+ reflect: true
970
+ },
971
+ brandLink: {
972
+ type: String,
973
+ attribute: 'brand-link',
974
+ reflect: true
975
+ },
976
+ authState: {
977
+ type: String,
978
+ attribute: 'auth-state',
979
+ reflect: true
980
+ },
981
+ loginAction: {
982
+ type: Object,
983
+ attribute: false
984
+ },
985
+ signUpAction: {
986
+ type: Object,
987
+ attribute: false
988
+ },
989
+ accountMenu: {
990
+ type: Array,
991
+ attribute: false
992
+ },
993
+ logoutLabel: {
994
+ type: String,
995
+ attribute: 'logout-label',
996
+ reflect: true
997
+ },
998
+ logoutIcon: {
999
+ type: String,
1000
+ attribute: 'logout-icon',
1001
+ reflect: true
1002
+ },
1003
+ accountIcon: {
1004
+ type: String,
1005
+ attribute: 'account-icon',
1006
+ reflect: true
1007
+ },
1008
+ accountAvatar: {
1009
+ type: String,
1010
+ attribute: 'account-avatar',
1011
+ reflect: true
1012
+ },
1013
+ accountAvatarFallback: {
1014
+ type: String,
1015
+ attribute: 'account-avatar-fallback',
1016
+ reflect: true
1017
+ },
1018
+ loginIcon: {
1019
+ type: String,
1020
+ attribute: 'login-icon',
1021
+ reflect: true
1022
+ },
1023
+ signUpIcon: {
1024
+ type: String,
1025
+ attribute: 'sign-up-icon',
1026
+ reflect: true
1027
+ },
1028
+ helpMenuList: {
1029
+ type: Array
1030
+ },
1031
+ accountMenuOpen: {
1032
+ state: true
1033
+ },
1034
+ helpMenuOpen: {
1035
+ state: true
1036
+ },
1037
+ hasSlottedAccountMenu: {
1038
+ state: true
1039
+ },
1040
+ hasSlottedHelpMenu: {
1041
+ state: true
1042
+ }
1043
+ };
1044
+ static styles = (0,lit/* css */.AH)`
1045
+ :host { // default theme
1046
+ display: block;
1047
+ --header-bg: var(--color-header-row-bg, #332746);
1048
+ --header-text: var(--color-header-text, #ffffff);
1049
+ --header-border: var(--color-border, #efecf3);
1050
+ --header-line: var(--color-header-menu-separator-line, #5e546d);
1051
+ --header-link: var(--color-text-heading, #000000);
1052
+ --header-menu-item-hover: var(--color-header-menu-item-hover, #e6dcff);
1053
+ --header-menu-item-selected: var(--color-header-menu-item-selected, #cbb9ff);
1054
+ --header-menu-bg: var(--color-menu-bg, #f6f5f9);
1055
+ --header-menu-loggedin-bg: var(--color-header-menu-loggedin-bg, #5e546d);
1056
+ --header-menu-text: var(--color-menu-item-text, #654d6c);
1057
+ --header-border-radius: var(--border-radius-sm, 0.2rem);
1058
+ --header-button-bg: var(--color-menu-bg, #ffffff);
1059
+ --header-button-text: var(--color-header-button-text, #0F172B);
1060
+ --header-button-detail-text: var(--color-header-button-detail-text, #99A1AF);
1061
+ --header-shadow: var(--color-header-shadow, 2px 6px 10px 0 rgba(0, 0, 0, 0.4), 2px 8px 24px 0 rgba(0, 0, 0, 0.19));
1062
+ font-family: var(--font-family-base, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif);
1063
+ }
1064
+
1065
+ // for now light and dark are the same
1066
+ :host([theme='dark']) {
1067
+ display: block;
1068
+ --header-bg: var(--color-header-row-bg, #332746);
1069
+ --header-text: var(--color-header-text, #ffffff);
1070
+ --header-border: var(--color-border, #efecf3);
1071
+ --header-line: var(--color-header-menu-separator-line, #5e546d);
1072
+ --header-link: var(--color-text-heading, #000000);
1073
+ --header-menu-item-hover: var(--color-header-menu-item-hover, #e6dcff);
1074
+ --header-menu-item-selected: var(--color-header-menu-item-selected, #cbb9ff);
1075
+ --header-menu-bg: var(--color-menu-bg, #f6f5f9);
1076
+ --header-menu-loggedin-bg: var(--color-header-menu-loggedin-bg, #5e546d);
1077
+ --header-menu-text: var(--color-menu-item-text, #654d6c);
1078
+ --header-border-radius: var(--border-radius-sm, 0.2rem);
1079
+ --header-button-bg: var(--color-menu-bg, #ffffff);
1080
+ --header-button-text: var(--color-header-button-text, #0f172a);
1081
+ --header-button-detail-text: var(--color-header-button-detail-text, #878192);
1082
+ --header-icon-filter: invert(1) brightness(1.3); /* special way to invert SVG color of icons, from white to black */
1083
+ --header-shadow: var(--color-header-shadow, 2px 6px 10px 0 rgba(0, 0, 0, 0.4), 2px 8px 24px 0 rgba(0, 0, 0, 0.19));
1084
+ font-family: var(--font-family-base, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif);
1085
+ }
1086
+
1087
+ :host([layout='mobile']) .headerInner {
1088
+ flex-wrap: wrap;
1089
+ text-align: center;
1090
+ gap: 0.5rem;
1091
+ }
1092
+
1093
+ .headerInner {
1094
+ display: flex;
1095
+ align-items: center;
1096
+ justify-content: space-between;
1097
+ background: var(--header-bg);
1098
+ color: var(--header-text);
1099
+ padding: 0 1.5rem;
1100
+ height: 3.75rem;
1101
+ }
1102
+
1103
+ ::slotted([slot='navigation-toggle']) {
1104
+ display: inline-flex;
1105
+ align-items: center;
1106
+ justify-content: center;
1107
+ flex-shrink: 0;
1108
+ margin-right: 0.75rem;
1109
+ }
1110
+
1111
+ :host([layout='desktop']) ::slotted([slot='navigation-toggle']) {
1112
+ display: none !important;
1113
+ }
1114
+
1115
+ .brand {
1116
+ display: flex;
1117
+ align-items: center;
1118
+ gap: 0.5rem;
1119
+ text-decoration: none;
1120
+ color: inherit;
1121
+ }
1122
+
1123
+ .brand-not-displayed {
1124
+ display: none;
1125
+ }
1126
+
1127
+ .brand img {
1128
+ height: 50px;
1129
+ width: 55px;
1130
+ object-fit: contain;
1131
+ }
1132
+
1133
+ .menu {
1134
+ display: flex;
1135
+ align-items: center;
1136
+ gap: 0.625rem;
1137
+ margin-left: auto;
1138
+ }
1139
+
1140
+ .auth-actions {
1141
+ display: flex;
1142
+ align-items: center;
1143
+ gap: 0.625rem;
1144
+ }
1145
+
1146
+ .auth-button {
1147
+ display: inline-flex;
1148
+ align-items: center;
1149
+ justify-content: center;
1150
+ gap: 0.5rem;
1151
+ min-height: 2.25rem;
1152
+ padding: 0.5rem 0.875rem;
1153
+ border: 1px solid var(--header-border);
1154
+ border-radius: 999px;
1155
+ background: var(--header-menu-bg);
1156
+ color: var(--header-button-text);
1157
+ cursor: pointer;
1158
+ font: inherit;
1159
+ line-height: 1;
1160
+ text-decoration: none;
1161
+ box-sizing: border-box;
1162
+ transition: border-color 0.2s ease, transform 0.2s ease;
1163
+ }
1164
+
1165
+ .auth-button:hover {
1166
+ border-color: var(--header-menu-item-hover);
1167
+ }
1168
+
1169
+ .auth-button:active {
1170
+ transform: translateY(1px);
1171
+ }
1172
+
1173
+ .auth-button-sign-up {
1174
+ background: color-mix(in srgb, var(--header-menu-bg) 78%, var(--header-menu-item-selected) 22%);
1175
+ }
1176
+
1177
+ .header-menu-separator {
1178
+ background: var(--header-line);
1179
+ width: 1px;
1180
+ height: 2.3rem;
1181
+ }
1182
+
1183
+ .account-menu-container {
1184
+ position: relative;
1185
+ display: flex;
1186
+ align-items: center;
1187
+ }
1188
+
1189
+ .account-menu-trigger {
1190
+ display: inline-flex;
1191
+ align-items: center;
1192
+ gap: 0.625rem;
1193
+ min-height: 2.5rem;
1194
+ border: 1px solid var(--header-menu-loggedin-bg);
1195
+ border-radius: 999px;
1196
+ background: var(--header-menu-loggedin-bg);
1197
+ color: var(--header-button-text);
1198
+ cursor: pointer;
1199
+ font: inherit;
1200
+ line-height: 1;
1201
+ }
1202
+
1203
+ :host([layout='mobile']) .account-menu-trigger {
1204
+ gap: 0;
1205
+ min-height: auto;
1206
+ padding: 0;
1207
+ border: 1.5px solid var(--header-border);
1208
+ background: var(--header-menu-loggedin-bg);
1209
+ }
1210
+
1211
+ :host([layout='mobile']) .account-menu-trigger-label {
1212
+ display: none;
1213
+ }
1214
+
1215
+ .account-menu-trigger:disabled {
1216
+ cursor: default;
1217
+ opacity: 0.7;
1218
+ }
1219
+
1220
+ .account-menu-trigger-icon {
1221
+ width: 1rem;
1222
+ height: 1rem;
1223
+ object-fit: contain;
1224
+ flex-shrink: 0;
1225
+ }
1226
+
1227
+ .account-avatar,
1228
+ .account-menu-avatar {
1229
+ display: inline-flex;
1230
+ align-items: center;
1231
+ justify-content: center;
1232
+ flex-shrink: 0;
1233
+ overflow: hidden;
1234
+ background: color-mix(in srgb, var(--header-bg) 18%, #ded8e7 82%);
1235
+ color: var(--header-button-text);
1236
+ font-size: 0.75rem;
1237
+ font-weight: 600;
1238
+ text-transform: uppercase;
1239
+ }
1240
+
1241
+ .account-avatar {
1242
+ width: 1.75rem;
1243
+ height: 1.75rem;
1244
+ border-radius: 999px;
1245
+ border: 1.5px solid var(--header-border);
1246
+ }
1247
+
1248
+ .account-menu-avatar {
1249
+ width: 2rem;
1250
+ height: 2rem;
1251
+ border-radius: 0.5rem;
1252
+ }
1253
+
1254
+ .account-avatar img,
1255
+ .account-menu-avatar img {
1256
+ width: 100%;
1257
+ height: 100%;
1258
+ object-fit: cover;
1259
+ }
1260
+
1261
+ .account-avatar-img {
1262
+ width: 1.75rem;
1263
+ height: 1.75rem;
1264
+ border-radius: 999px;
1265
+ object-fit: cover;
1266
+ background-color: var(--header-border);
1267
+ }
1268
+
1269
+ .account-dropdown {
1270
+ position: absolute;
1271
+ top: calc(100% + 0.9rem);
1272
+ right: 0;
1273
+ min-width: 15rem;
1274
+ padding: 0.5rem;
1275
+ background: var(--header-button-bg);
1276
+ border: 1px solid var(--header-border);
1277
+ border-radius: var(--header-border-radius);
1278
+ box-shadow: var(--header-shadow);
1279
+ z-index: 10;
1280
+ }
1281
+
1282
+ .account-dropdown[hidden] {
1283
+ display: none;
1284
+ }
1285
+
1286
+ .account-menu-list {
1287
+ list-style: none;
1288
+ margin: 0;
1289
+ padding: 0;
1290
+ display: flex;
1291
+ flex-direction: column;
1292
+ gap: 0.25rem;
1293
+ }
1294
+
1295
+ .account-menu-item-link,
1296
+ .account-menu-item-button,
1297
+ ::slotted([slot='account-menu']) {
1298
+ display: flex;
1299
+ align-items: center;
1300
+ gap: 0.625rem;
1301
+ width: 100%;
1302
+ box-sizing: border-box;
1303
+ color: var(--header-link);
1304
+ text-decoration: none;
1305
+ background: transparent;
1306
+ border: 1px solid transparent;
1307
+ border-radius: 10px;
1308
+ padding: 0.5rem;
1309
+ cursor: pointer;
1310
+ font: inherit;
1311
+ text-align: left;
1312
+ }
1313
+
1314
+ .account-menu-item-link:hover,
1315
+ .account-menu-item-button:hover {
1316
+ color: var(--header-link);
1317
+ background: var(--header-menu-item-hover);
1318
+ border-color: var(--header-menu-item-hover);
1319
+ }
1320
+
1321
+ .account-menu-item-link:active,
1322
+ .account-menu-item-button:active {
1323
+ color: var(--header-link);
1324
+ background: var(--header-menu-item-selected);
1325
+ border-color: var(--header-menu-item-selected);
1326
+ transform: translateY(1px);
1327
+ }
1328
+
1329
+ .account-switch {
1330
+ display: block;
1331
+ width: 100%;
1332
+ color: var(--header-menu-text);
1333
+ text-align: left;
1334
+ text-transform: uppercase;
1335
+ font-size: 80%;
1336
+ }
1337
+
1338
+ .dropdown-menu-separator {
1339
+ display: block;
1340
+ width: calc(100% + 1rem);
1341
+ margin: 0.5rem -0.5rem;
1342
+ border: 0;
1343
+ border-top: 1px solid var(--header-border);
1344
+ }
1345
+
1346
+ .account-menu-copy {
1347
+ display: flex;
1348
+ flex-direction: column;
1349
+ min-width: 0;
1350
+ }
1351
+
1352
+ .account-menu-label {
1353
+ color: var(--header-button-text);
1354
+ overflow: hidden;
1355
+ text-overflow: ellipsis;
1356
+ white-space: nowrap;
1357
+ }
1358
+
1359
+ .account-menu-webid {
1360
+ color: var(--header-button-detail-text);
1361
+ font-size: 0.5rem;
1362
+ overflow: hidden;
1363
+ text-overflow: ellipsis;
1364
+ white-space: nowrap;
1365
+ }
1366
+
1367
+ .help-menu-container {
1368
+ position: relative;
1369
+ display: flex;
1370
+ align-items: center;
1371
+ background: transparent;
1372
+ }
1373
+
1374
+ .help-menu-trigger {
1375
+ display: inline-flex;
1376
+ align-items: center;
1377
+ justify-content: center;
1378
+ padding: 0;
1379
+ border: 0;
1380
+ background: transparent;
1381
+ cursor: pointer;
1382
+ }
1383
+
1384
+ .help-menu-trigger:disabled {
1385
+ cursor: default;
1386
+ }
1387
+
1388
+ .help-dropdown {
1389
+ position: absolute;
1390
+ top: calc(100% + 0.9rem);
1391
+ right: 0;
1392
+ min-width: 12rem;
1393
+ padding: 0.5rem;
1394
+ background: var(--header-button-bg);
1395
+ border: 1px solid var(--header-border);
1396
+ border-radius: var(--header-border-radius);
1397
+ box-shadow: var(--header-shadow);
1398
+ z-index: 10;
1399
+ }
1400
+
1401
+ .help-dropdown[hidden] {
1402
+ display: none;
1403
+ }
1404
+
1405
+ .help-dropdown-content {
1406
+ display: flex;
1407
+ flex-direction: column;
1408
+ gap: 0.25rem;
1409
+ }
1410
+
1411
+ .help-menu-list {
1412
+ list-style: none;
1413
+ margin: 0;
1414
+ padding: 0;
1415
+ display: flex;
1416
+ flex-direction: column;
1417
+ gap: 0.25rem;
1418
+ }
1419
+
1420
+ .help-menu-list a,
1421
+ .help-menu-list button,
1422
+ ::slotted([slot='help-menu']) {
1423
+ display: block;
1424
+ width: 100%;
1425
+ box-sizing: border-box;
1426
+ color: var(--header-link);
1427
+ text-decoration: none;
1428
+ background: transparent;
1429
+ border: 1px solid transparent;
1430
+ border-radius: 4px;
1431
+ padding: 0.375rem 0.5rem;
1432
+ cursor: pointer;
1433
+ font: inherit;
1434
+ text-align: left;
1435
+ }
1436
+
1437
+ .help-menu-list a:hover,
1438
+ .help-menu-list button:hover {
1439
+ color: var(--header-link);
1440
+ background: var(--header-menu-item-hover);
1441
+ border-color: var(--header-menu-item-hover);
1442
+ }
1443
+
1444
+ .help-menu-list a:active,
1445
+ .help-menu-list button:active {
1446
+ color: var(--header-link);
1447
+ background: var(--header-menu-item-selected);
1448
+ border-color: var(--header-menu-item-selected);
1449
+ transform: translateY(1px);
1450
+ }
1451
+
1452
+ ::slotted(a), ::slotted(button) {
1453
+ color: var(--header-link);
1454
+ text-decoration: none;
1455
+ background: var(--header-button-bg);
1456
+ border: 1px solid var(--header-border);
1457
+ border-radius: 4px;
1458
+ padding: 0.25rem 0.5rem;
1459
+ cursor: pointer;
1460
+ font: inherit;
1461
+ }
1462
+
1463
+ .help-icon {
1464
+ width: 35px;
1465
+ height: 35px;
1466
+ cursor: pointer;
1467
+ }
1468
+
1469
+ .help-text {
1470
+ color: var(--header-text, #ffffff);
1471
+ font: inherit;
1472
+ }
1473
+
1474
+ .logout-action-icon {
1475
+ width: 16px;
1476
+ height: 16px;
1477
+ display: inline-block;
1478
+ object-fit: contain;
1479
+ margin-right: 0.5rem;
1480
+ }
1481
+ `;
1482
+ constructor() {
1483
+ super();
1484
+ this.logo = DEFAULT_SOLID_ICON_URL;
1485
+ this.helpIcon = DEFAULT_HELP_MENU_ICON;
1486
+ this.layout = 'desktop';
1487
+ this.theme = 'light';
1488
+ this.brandLink = '#';
1489
+ this.authState = 'logged-out';
1490
+ this.loginAction = {
1491
+ label: 'Log In',
1492
+ action: 'login'
1493
+ };
1494
+ this.signUpAction = {
1495
+ label: 'Sign Up',
1496
+ action: 'sign-up',
1497
+ url: DEFAULT_SIGNUP_URL
1498
+ };
1499
+ this.accountMenu = [];
1500
+ this.logoutLabel = 'Log Out';
1501
+ this.logoutIcon = '';
1502
+ this.accountIcon = '▼';
1503
+ this.accountAvatar = '';
1504
+ this.accountAvatarFallback = '';
1505
+ this.loginIcon = '';
1506
+ this.signUpIcon = '';
1507
+ this.helpMenuList = [];
1508
+ this.accountMenuOpen = false;
1509
+ this.helpMenuOpen = false;
1510
+ this.hasSlottedAccountMenu = false;
1511
+ this.hasSlottedHelpMenu = false;
1512
+ }
1513
+ connectedCallback() {
1514
+ super.connectedCallback();
1515
+ document.addEventListener('click', this.handleDocumentClick);
1516
+ window.addEventListener('keydown', this.handleWindowKeydown);
1517
+ }
1518
+ disconnectedCallback() {
1519
+ document.removeEventListener('click', this.handleDocumentClick);
1520
+ window.removeEventListener('keydown', this.handleWindowKeydown);
1521
+ super.disconnectedCallback();
1522
+ }
1523
+ handleHelpMenuClick(item, event) {
1524
+ event.preventDefault();
1525
+ this.helpMenuOpen = false;
1526
+ this.dispatchEvent(new CustomEvent('help-menu-select', {
1527
+ detail: item,
1528
+ bubbles: true,
1529
+ composed: true
1530
+ }));
1531
+ if (item.url) {
1532
+ const target = item.target || '_blank';
1533
+ const features = target === '_blank' ? 'noopener,noreferrer' : undefined;
1534
+ window.open(item.url, target, features);
1535
+ }
1536
+ }
1537
+ handleAccountMenuClick(item) {
1538
+ this.accountMenuOpen = false;
1539
+ this.dispatchEvent(new CustomEvent('account-menu-select', {
1540
+ detail: item,
1541
+ bubbles: true,
1542
+ composed: true
1543
+ }));
1544
+ }
1545
+ handleDocumentClick = event => {
1546
+ if (!event.composedPath().includes(this)) {
1547
+ this.accountMenuOpen = false;
1548
+ this.helpMenuOpen = false;
1549
+ }
1550
+ };
1551
+ handleWindowKeydown = event => {
1552
+ if (event.key === 'Escape' && (this.accountMenuOpen || this.helpMenuOpen)) {
1553
+ this.accountMenuOpen = false;
1554
+ this.helpMenuOpen = false;
1555
+ }
1556
+ };
1557
+ handleAccountSlotChange(event) {
1558
+ const slot = event.target;
1559
+ this.hasSlottedAccountMenu = slot.assignedElements({
1560
+ flatten: true
1561
+ }).length > 0;
1562
+ }
1563
+ handleHelpSlotChange(event) {
1564
+ const slot = event.target;
1565
+ this.hasSlottedHelpMenu = slot.assignedElements({
1566
+ flatten: true
1567
+ }).length > 0;
1568
+ }
1569
+ toggleAccountMenu(event) {
1570
+ event.preventDefault();
1571
+ if (!this.hasAccountMenuItems()) return;
1572
+ this.helpMenuOpen = false;
1573
+ this.accountMenuOpen = !this.accountMenuOpen;
1574
+ }
1575
+ toggleHelpMenu(event) {
1576
+ event.preventDefault();
1577
+ if (!this.hasHelpMenuItems()) return;
1578
+ this.accountMenuOpen = false;
1579
+ this.helpMenuOpen = !this.helpMenuOpen;
1580
+ }
1581
+ hasAccountMenuItems() {
1582
+ return Boolean(this.accountMenu?.length || this.hasSlottedAccountMenu || this.logoutLabel);
1583
+ }
1584
+ hasHelpMenuItems() {
1585
+ return Boolean(this.helpMenuList?.length || this.hasSlottedHelpMenu);
1586
+ }
1587
+ shouldRenderHelpMenu() {
1588
+ return this.layout !== 'mobile' && this.hasHelpMenuItems();
1589
+ }
1590
+ renderLoggedInAvatar(avatar, wrapperClass = 'account-avatar') {
1591
+ const hasAvatar = Boolean(avatar);
1592
+ const imageSrc = hasAvatar ? avatar : this.accountAvatarFallback || DEFAULT_LOGGEDIN_MENU_BUTTON_AVATAR;
1593
+ const imageAlt = hasAvatar ? 'Profile Avatar' : 'Default Avatar';
1594
+ if (this.layout === 'mobile' && wrapperClass === 'account-avatar') {
1595
+ return (0,lit/* html */.qy)`<img class="account-avatar-img" src="${imageSrc}" alt="${imageAlt}" />`;
1596
+ }
1597
+ return (0,lit/* html */.qy)`
1598
+ <span class="${wrapperClass}" aria-hidden="true">
1599
+ <img src="${imageSrc}" alt="${imageAlt}" />
1600
+ </span>
1601
+ `;
1602
+ }
1603
+ renderLoggedOutActions() {
1604
+ return (0,lit/* html */.qy)`
1605
+ <div class="auth-actions" part="auth-actions">
1606
+ <slot name="login-action">
1607
+ <solid-ui-login-button
1608
+ label="${this.loginAction.label}"
1609
+ icon=${o(this.layout !== 'mobile' ? this.loginIcon || this.loginAction.icon : undefined)}
1610
+ layout="${this.layout}"
1611
+ theme="${this.theme}"
1612
+ part="login-action"
1613
+ @login-success="${() => this.handleLoginSuccess()}"
1614
+ ></solid-ui-login-button>
1615
+ </slot>
1616
+ <slot name="sign-up-action">
1617
+ <solid-ui-signup-button
1618
+ label="${this.signUpAction.label}"
1619
+ signup-url="${o(this.signUpAction.url)}"
1620
+ layout="${this.layout}"
1621
+ .icon=${o(this.layout !== 'mobile' ? this.signUpIcon || this.signUpAction.icon : undefined)}
1622
+ theme="${this.theme}"
1623
+ part="sign-up-action"
1624
+ ></solid-ui-signup-button>
1625
+ </slot>
1626
+ </div>
1627
+ `;
1628
+ }
1629
+ handleLoginSuccess() {
1630
+ this.authState = 'logged-in';
1631
+ this.dispatchEvent(new CustomEvent('auth-action-select', {
1632
+ detail: {
1633
+ role: 'login'
1634
+ },
1635
+ bubbles: true,
1636
+ composed: true
1637
+ }));
1638
+ }
1639
+ async handleLogout() {
1640
+ this.accountMenuOpen = false;
1641
+ try {
1642
+ await external_SolidLogic_.authSession.logout();
1643
+ } catch (_err) {
1644
+ // logout errors are non-fatal — proceed to clear state
1645
+ }
1646
+ this.authState = 'logged-out';
1647
+ this.dispatchEvent(new CustomEvent('logout-select', {
1648
+ detail: {
1649
+ role: 'logout'
1650
+ },
1651
+ bubbles: true,
1652
+ composed: true
1653
+ }));
1654
+ }
1655
+ renderAccountMenuItem(item) {
1656
+ const content = (0,lit/* html */.qy)`
1657
+ ${this.renderLoggedInAvatar(item.avatar, 'account-menu-avatar')}
1658
+ <span class="account-menu-copy">
1659
+ <span class="account-menu-label">${item.label}</span>
1660
+ ${item.webid && this.layout !== 'mobile' ? (0,lit/* html */.qy)`<span class="account-menu-webid">${item.webid}</span>` : ''}
1661
+ </span>
1662
+ `;
1663
+ if (item.url) {
1664
+ return (0,lit/* html */.qy)`
1665
+ <a
1666
+ class="account-menu-item-link"
1667
+ href="${item.url}"
1668
+ @click="${() => this.handleAccountMenuClick(item)}"
1669
+ part="account-menu-item"
1670
+ role="menuitem"
1671
+ >
1672
+ ${content}
1673
+ </a>
1674
+ `;
1675
+ }
1676
+ return (0,lit/* html */.qy)`
1677
+ <button
1678
+ class="account-menu-item-button"
1679
+ type="button"
1680
+ @click="${() => this.handleAccountMenuClick(item)}"
1681
+ part="account-menu-item"
1682
+ role="menuitem"
1683
+ >
1684
+ ${content}
1685
+ </button>
1686
+ `;
1687
+ }
1688
+ renderLoggedInActions() {
1689
+ return (0,lit/* html */.qy)`
1690
+ <div class="account-menu-container" part="account-menu-container">
1691
+ <slot name="account-trigger">
1692
+ <button
1693
+ id="accountMenuTrigger"
1694
+ class="account-menu-trigger"
1695
+ type="button"
1696
+ aria-haspopup="menu"
1697
+ aria-expanded="${this.accountMenuOpen ? 'true' : 'false'}"
1698
+ ?disabled="${!this.hasAccountMenuItems()}"
1699
+ @click="${e => this.toggleAccountMenu(e)}"
1700
+ part="account-menu-trigger"
1701
+ >
1702
+ ${this.renderLoggedInAvatar(this.accountAvatar)}
1703
+ ${this.layout !== 'mobile' && this.accountIcon ? (0,lit/* html */.qy)`
1704
+ <img class="account-menu-trigger-icon" src="${this.accountIcon}" alt="" aria-hidden="true" />` : ''}
1705
+ </button>
1706
+ </slot>
1707
+
1708
+ <nav
1709
+ id="accountMenu"
1710
+ class="account-dropdown"
1711
+ role="menu"
1712
+ ?inert="${!this.accountMenuOpen || !this.hasAccountMenuItems()}"
1713
+ ?hidden="${!this.accountMenuOpen || !this.hasAccountMenuItems()}"
1714
+ part="account-dropdown"
1715
+ >
1716
+ <slot name="account-switch" class="account-switch">Switch account</slot>
1717
+ <hr class="dropdown-menu-separator" />
1718
+ <slot name="account-menu" @slotchange="${e => this.handleAccountSlotChange(e)}"></slot>
1719
+ ${this.accountMenu && this.accountMenu.length ? (0,lit/* html */.qy)`
1720
+ <ul class="account-menu-list">
1721
+ ${this.accountMenu.map(item => (0,lit/* html */.qy)`
1722
+ <li>${this.renderAccountMenuItem(item)}</li>
1723
+ `)}
1724
+ </ul>
1725
+ ` : ''}
1726
+ ${this.logoutLabel ? (0,lit/* html */.qy)`
1727
+ <hr class="dropdown-menu-separator" />
1728
+ <button
1729
+ class="account-menu-item-button"
1730
+ type="button"
1731
+ @click="${() => this.handleLogout()}"
1732
+ part="logout-action"
1733
+ role="menuitem"
1734
+ >
1735
+ ${this.logoutIcon && this.layout !== 'mobile' ? (0,lit/* html */.qy)`<img class="logout-action-icon" src="${this.logoutIcon}" alt="" aria-hidden="true" part="logout-action-icon" />` : ''}
1736
+ ${this.logoutLabel}
1737
+ </button>
1738
+ ` : ''}
1739
+ </nav>
1740
+ </div>
1741
+ `;
1742
+ }
1743
+ renderUserArea() {
1744
+ if (this.authState === 'logged-out') {
1745
+ return this.renderLoggedOutActions();
1746
+ }
1747
+ return this.renderLoggedInActions();
1748
+ }
1749
+ firstUpdated() {
1750
+ const brandLink = this.shadowRoot?.getElementById('brandLink');
1751
+ if (brandLink) {
1752
+ brandLink.classList.toggle('brand-not-displayed', this.layout === 'mobile');
1753
+ }
1754
+ }
1755
+ updated(changedProperties) {
1756
+ if (changedProperties.has('layout')) {
1757
+ const brandLink = this.shadowRoot?.getElementById('brandLink');
1758
+ if (brandLink) {
1759
+ brandLink.classList.toggle('brand-not-displayed', this.layout === 'mobile');
1760
+ }
1761
+ }
1762
+ }
1763
+ render() {
1764
+ return (0,lit/* html */.qy)`
1765
+ <div class="headerInner">
1766
+ <slot name="navigation-toggle"></slot>
1767
+ <a
1768
+ id="brandLink"
1769
+ class="brand"
1770
+ href="${this.brandLink}"
1771
+ part="brand"
1772
+ >
1773
+ <img id="brandImg" src="${this.logo}" alt="Logo" part="logo" />
1774
+ </a>
1775
+
1776
+ <div class="menu" part="menu">
1777
+ ${this.renderUserArea()}
1778
+
1779
+ ${this.shouldRenderHelpMenu() ? (0,lit/* html */.qy)`
1780
+ <div class="header-menu-separator" />` : ''}
1781
+
1782
+ ${this.shouldRenderHelpMenu() ? (0,lit/* html */.qy)`
1783
+ <div class="help-menu-container" part="help-menu-container">
1784
+ <button
1785
+ id="helpMenuTrigger"
1786
+ class="help-menu-trigger"
1787
+ type="button"
1788
+ aria-haspopup="menu"
1789
+ aria-expanded="${this.helpMenuOpen ? 'true' : 'false'}"
1790
+ ?disabled="${!this.hasHelpMenuItems()}"
1791
+ @click="${e => this.toggleHelpMenu(e)}"
1792
+ part="help-menu-trigger"
1793
+ >
1794
+ ${this.helpIcon ? (0,lit/* html */.qy)`<img id="helpIcon" class="help-icon" src="${this.helpIcon}" alt="Help" part="help-icon" />` : (0,lit/* html */.qy)`<span class="help-text" part="help-text">Help</span>`}
1795
+ </button>
1796
+
1797
+ <nav
1798
+ id="helpMenu"
1799
+ class="help-dropdown"
1800
+ role="menu"
1801
+ ?inert="${!this.helpMenuOpen || !this.hasHelpMenuItems()}"
1802
+ ?hidden="${!this.helpMenuOpen || !this.hasHelpMenuItems()}"
1803
+ part="help-dropdown"
1804
+ >
1805
+ <div class="help-dropdown-content" @click="${() => {
1806
+ this.helpMenuOpen = false;
1807
+ }}">
1808
+ <slot name="help-menu" @slotchange="${e => this.handleHelpSlotChange(e)}"></slot>
1809
+ ${this.helpMenuList && this.helpMenuList.length ? (0,lit/* html */.qy)`
1810
+ <ul class="help-menu-list">
1811
+ ${this.helpMenuList.map(item => (0,lit/* html */.qy)`
1812
+ <li>
1813
+ ${item.url ? (0,lit/* html */.qy)`
1814
+ <a
1815
+ href="${item.url}"
1816
+ target="${item.target || '_blank'}"
1817
+ rel="${o((item.target || '_blank') === '_blank' ? 'noopener noreferrer' : undefined)}"
1818
+ @click="${e => this.handleHelpMenuClick(item, e)}"
1819
+ part="help-menu-item"
1820
+ role="menuitem"
1821
+ >
1822
+ ${item.label}
1823
+ </a>
1824
+ ` : (0,lit/* html */.qy)`
1825
+ <button
1826
+ type="button"
1827
+ @click="${e => this.handleHelpMenuClick(item, e)}"
1828
+ part="help-menu-item"
1829
+ role="menuitem"
1830
+ >
1831
+ ${item.label}
1832
+ </button>
1833
+ `}
1834
+ </li>
1835
+ `)}
1836
+ </ul>
1837
+ ` : ''}
1838
+ </div>
1839
+ </nav>
1840
+ </div>` : ''}
1841
+ </div>
1842
+ </div>
1843
+ `;
1844
+ }
1845
+ }
1846
+ ;// ./src/v2/components/header/index.ts
1847
+
1848
+
1849
+ const HEADER_TAG_NAME = 'solid-ui-header';
1850
+ if (!customElements.get(HEADER_TAG_NAME)) {
1851
+ customElements.define(HEADER_TAG_NAME, Header);
1852
+ }
1853
+ /******/ })()
1854
+ ;
1855
+ //# sourceMappingURL=index.js.map