solid-ui 3.1.0 → 3.1.1
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.
- package/README.md +22 -4
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button/index.esm.js +546 -0
- package/dist/components/button/index.esm.js.map +1 -0
- package/dist/components/button/index.esm.min.js +268 -0
- package/dist/components/button/index.esm.min.js.map +1 -0
- package/dist/components/button/index.js +428 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/button/index.min.js +257 -0
- package/dist/components/button/index.min.js.map +1 -0
- package/dist/components/combobox/index.d.ts +1 -0
- package/dist/components/combobox/index.esm.js +953 -0
- package/dist/components/combobox/index.esm.js.map +1 -0
- package/dist/components/combobox/index.esm.min.js +339 -0
- package/dist/components/combobox/index.esm.min.js.map +1 -0
- package/dist/components/combobox/index.js +782 -0
- package/dist/components/combobox/index.js.map +1 -0
- package/dist/components/combobox/index.min.js +328 -0
- package/dist/components/combobox/index.min.js.map +1 -0
- package/dist/components/footer/index.d.ts +1 -1
- package/dist/components/footer/index.esm.js +105 -63
- package/dist/components/footer/index.esm.js.map +1 -1
- package/dist/components/footer/index.esm.min.js +4 -4
- package/dist/components/footer/index.esm.min.js.map +1 -1
- package/dist/components/footer/index.js +103 -52
- package/dist/components/footer/index.js.map +1 -1
- package/dist/components/footer/index.min.js +8 -8
- package/dist/components/footer/index.min.js.map +1 -1
- package/dist/components/header/index.d.ts +1 -1
- package/dist/components/header/index.esm.js +1405 -1363
- package/dist/components/header/index.esm.js.map +1 -1
- package/dist/components/header/index.esm.min.js +857 -815
- package/dist/components/header/index.esm.min.js.map +1 -1
- package/dist/components/header/index.js +61 -19
- package/dist/components/header/index.js.map +1 -1
- package/dist/components/header/index.min.js +53 -11
- package/dist/components/header/index.min.js.map +1 -1
- package/dist/components/loginButton/index.d.ts +1 -1
- package/dist/components/loginButton/index.esm.js +50 -8
- package/dist/components/loginButton/index.esm.js.map +1 -1
- package/dist/components/loginButton/index.esm.min.js +60 -18
- package/dist/components/loginButton/index.esm.min.js.map +1 -1
- package/dist/components/loginButton/index.js +49 -7
- package/dist/components/loginButton/index.js.map +1 -1
- package/dist/components/loginButton/index.min.js +58 -16
- package/dist/components/loginButton/index.min.js.map +1 -1
- package/dist/components/photoCapture/index.d.ts +1 -0
- package/dist/components/photoCapture/index.esm.js +966 -0
- package/dist/components/photoCapture/index.esm.js.map +1 -0
- package/dist/components/photoCapture/index.esm.min.js +304 -0
- package/dist/components/photoCapture/index.esm.min.js.map +1 -0
- package/dist/components/photoCapture/index.js +848 -0
- package/dist/components/photoCapture/index.js.map +1 -0
- package/dist/components/photoCapture/index.min.js +293 -0
- package/dist/components/photoCapture/index.min.js.map +1 -0
- package/dist/components/select/index.d.ts +1 -0
- package/dist/components/select/index.esm.js +939 -0
- package/dist/components/select/index.esm.js.map +1 -0
- package/dist/components/select/index.esm.min.js +370 -0
- package/dist/components/select/index.esm.min.js.map +1 -0
- package/dist/components/select/index.js +771 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/select/index.min.js +359 -0
- package/dist/components/select/index.min.js.map +1 -0
- package/dist/components/signupButton/index.d.ts +1 -1
- package/dist/components/signupButton/index.esm.js +2 -2
- package/dist/components/signupButton/index.esm.js.map +1 -1
- package/dist/components/signupButton/index.esm.min.js +2 -2
- package/dist/components/signupButton/index.esm.min.js.map +1 -1
- package/dist/components/signupButton/index.js +2 -2
- package/dist/components/signupButton/index.js.map +1 -1
- package/dist/components/signupButton/index.min.js.map +1 -1
- package/dist/login/login.d.ts.map +1 -1
- package/dist/login/login.js +12 -2
- package/dist/login/login.js.map +1 -1
- package/dist/matrix/matrix.js.map +1 -1
- package/dist/solid-ui.esm.js +103 -61
- package/dist/solid-ui.esm.js.map +1 -1
- package/dist/solid-ui.esm.min.js +6 -6
- package/dist/solid-ui.esm.min.js.map +1 -1
- package/dist/solid-ui.js +102 -51
- package/dist/solid-ui.js.map +1 -1
- package/dist/solid-ui.min.js +9 -9
- package/dist/solid-ui.min.js.map +1 -1
- package/dist/tabs.js +2 -2
- package/dist/tabs.js.map +1 -1
- package/dist/v2/components/actions/button/Button.d.ts +97 -0
- package/dist/v2/components/actions/button/Button.d.ts.map +1 -0
- package/dist/v2/components/actions/button/Button.js +325 -0
- package/dist/v2/components/actions/button/Button.js.map +1 -0
- package/dist/v2/components/actions/button/Button.test.d.ts +2 -0
- package/dist/v2/components/actions/button/Button.test.d.ts.map +1 -0
- package/dist/v2/components/actions/button/Button.test.js +117 -0
- package/dist/v2/components/actions/button/Button.test.js.map +1 -0
- package/dist/v2/components/actions/button/index.d.ts +8 -0
- package/dist/v2/components/actions/button/index.d.ts.map +1 -0
- package/dist/v2/components/actions/button/index.js +7 -0
- package/dist/v2/components/actions/button/index.js.map +1 -0
- package/dist/v2/components/auth/loginButton/LoginButton.d.ts.map +1 -0
- package/dist/v2/components/{loginButton → auth/loginButton}/LoginButton.js +46 -4
- package/dist/v2/components/auth/loginButton/LoginButton.js.map +1 -0
- package/dist/v2/components/auth/loginButton/LoginButton.test.d.ts.map +1 -0
- package/dist/v2/components/auth/loginButton/LoginButton.test.js.map +1 -0
- package/dist/v2/components/auth/loginButton/downArrow.d.ts.map +1 -0
- package/dist/v2/components/auth/loginButton/downArrow.js.map +1 -0
- package/dist/v2/components/auth/loginButton/index.d.ts.map +1 -0
- package/dist/v2/components/auth/loginButton/index.js.map +1 -0
- package/dist/v2/components/auth/signupButton/SignupButton.d.ts.map +1 -0
- package/dist/v2/components/auth/signupButton/SignupButton.js.map +1 -0
- package/dist/v2/components/auth/signupButton/SignupButton.test.d.ts.map +1 -0
- package/dist/v2/components/auth/signupButton/SignupButton.test.js.map +1 -0
- package/dist/v2/components/auth/signupButton/index.d.ts.map +1 -0
- package/dist/v2/components/auth/signupButton/index.js.map +1 -0
- package/dist/v2/components/forms/combobox/Combobox.d.ts +82 -0
- package/dist/v2/components/forms/combobox/Combobox.d.ts.map +1 -0
- package/dist/v2/components/forms/combobox/Combobox.js +506 -0
- package/dist/v2/components/forms/combobox/Combobox.js.map +1 -0
- package/dist/v2/components/forms/combobox/Combobox.test.d.ts +2 -0
- package/dist/v2/components/forms/combobox/Combobox.test.d.ts.map +1 -0
- package/dist/v2/components/forms/combobox/Combobox.test.js +201 -0
- package/dist/v2/components/forms/combobox/Combobox.test.js.map +1 -0
- package/dist/v2/components/forms/combobox/comboboxTypes.d.ts +6 -0
- package/dist/v2/components/forms/combobox/comboboxTypes.d.ts.map +1 -0
- package/dist/v2/components/forms/combobox/comboboxTypes.js +2 -0
- package/dist/v2/components/forms/combobox/comboboxTypes.js.map +1 -0
- package/dist/v2/components/forms/combobox/index.d.ts +3 -0
- package/dist/v2/components/forms/combobox/index.d.ts.map +1 -0
- package/dist/v2/components/forms/combobox/index.js +7 -0
- package/dist/v2/components/forms/combobox/index.js.map +1 -0
- package/dist/v2/components/forms/select/Select.d.ts +68 -0
- package/dist/v2/components/forms/select/Select.d.ts.map +1 -0
- package/dist/v2/components/forms/select/Select.js +499 -0
- package/dist/v2/components/forms/select/Select.js.map +1 -0
- package/dist/v2/components/forms/select/Select.test.d.ts +2 -0
- package/dist/v2/components/forms/select/Select.test.d.ts.map +1 -0
- package/dist/v2/components/forms/select/Select.test.js +168 -0
- package/dist/v2/components/forms/select/Select.test.js.map +1 -0
- package/dist/v2/components/forms/select/index.d.ts +3 -0
- package/dist/v2/components/forms/select/index.d.ts.map +1 -0
- package/dist/v2/components/forms/select/index.js +7 -0
- package/dist/v2/components/forms/select/index.js.map +1 -0
- package/dist/v2/components/forms/shared/downArrow.d.ts +2 -0
- package/dist/v2/components/forms/shared/downArrow.d.ts.map +1 -0
- package/dist/v2/components/forms/shared/downArrow.js +10 -0
- package/dist/v2/components/forms/shared/downArrow.js.map +1 -0
- package/dist/v2/components/forms/shared/keyboard.d.ts +7 -0
- package/dist/v2/components/forms/shared/keyboard.d.ts.map +1 -0
- package/dist/v2/components/forms/shared/keyboard.js +56 -0
- package/dist/v2/components/forms/shared/keyboard.js.map +1 -0
- package/dist/v2/components/forms/shared/listboxStyles.d.ts +2 -0
- package/dist/v2/components/forms/shared/listboxStyles.d.ts.map +1 -0
- package/dist/v2/components/forms/shared/listboxStyles.js +96 -0
- package/dist/v2/components/forms/shared/listboxStyles.js.map +1 -0
- package/dist/v2/components/forms/shared/listboxTemplate.d.ts +11 -0
- package/dist/v2/components/forms/shared/listboxTemplate.d.ts.map +1 -0
- package/dist/v2/components/forms/shared/listboxTemplate.js +37 -0
- package/dist/v2/components/forms/shared/listboxTemplate.js.map +1 -0
- package/dist/v2/components/forms/shared/optionTypes.d.ts +6 -0
- package/dist/v2/components/forms/shared/optionTypes.d.ts.map +1 -0
- package/dist/v2/components/forms/shared/optionTypes.js +2 -0
- package/dist/v2/components/forms/shared/optionTypes.js.map +1 -0
- package/dist/v2/components/layout/footer/Footer.d.ts.map +1 -0
- package/dist/v2/components/{footer → layout/footer}/Footer.js +1 -1
- package/dist/v2/components/layout/footer/Footer.js.map +1 -0
- package/dist/v2/components/layout/footer/Footer.test.d.ts.map +1 -0
- package/dist/v2/components/layout/footer/Footer.test.js.map +1 -0
- package/dist/v2/components/layout/footer/index.d.ts.map +1 -0
- package/dist/v2/components/layout/footer/index.js.map +1 -0
- package/dist/v2/components/{header → layout/header}/Header.d.ts +2 -2
- package/dist/v2/components/layout/header/Header.d.ts.map +1 -0
- package/dist/v2/components/{header → layout/header}/Header.js +5 -5
- package/dist/v2/components/layout/header/Header.js.map +1 -0
- package/dist/v2/components/layout/header/header.test.d.ts.map +1 -0
- package/dist/v2/components/layout/header/header.test.js.map +1 -0
- package/dist/v2/components/layout/header/index.d.ts.map +1 -0
- package/dist/v2/components/layout/header/index.js.map +1 -0
- package/dist/v2/components/media/photoCapture/PhotoCapture.d.ts +200 -0
- package/dist/v2/components/media/photoCapture/PhotoCapture.d.ts.map +1 -0
- package/dist/v2/components/media/photoCapture/PhotoCapture.js +723 -0
- package/dist/v2/components/media/photoCapture/PhotoCapture.js.map +1 -0
- package/dist/v2/components/media/photoCapture/PhotoCapture.test.d.ts +2 -0
- package/dist/v2/components/media/photoCapture/PhotoCapture.test.d.ts.map +1 -0
- package/dist/v2/components/media/photoCapture/PhotoCapture.test.js +157 -0
- package/dist/v2/components/media/photoCapture/PhotoCapture.test.js.map +1 -0
- package/dist/v2/components/media/photoCapture/index.d.ts +3 -0
- package/dist/v2/components/media/photoCapture/index.d.ts.map +1 -0
- package/dist/v2/components/media/photoCapture/index.js +7 -0
- package/dist/v2/components/media/photoCapture/index.js.map +1 -0
- package/dist/versionInfo.js +14 -14
- package/dist/widgets/buttons.d.ts +1 -0
- package/dist/widgets/buttons.d.ts.map +1 -1
- package/dist/widgets/buttons.js +15 -2
- package/dist/widgets/buttons.js.map +1 -1
- package/package.json +223 -157
- package/dist/v2/components/footer/Footer.d.ts.map +0 -1
- package/dist/v2/components/footer/Footer.js.map +0 -1
- package/dist/v2/components/footer/Footer.test.d.ts.map +0 -1
- package/dist/v2/components/footer/Footer.test.js.map +0 -1
- package/dist/v2/components/footer/index.d.ts.map +0 -1
- package/dist/v2/components/footer/index.js.map +0 -1
- package/dist/v2/components/header/Header.d.ts.map +0 -1
- package/dist/v2/components/header/Header.js.map +0 -1
- package/dist/v2/components/header/header.test.d.ts.map +0 -1
- package/dist/v2/components/header/header.test.js.map +0 -1
- package/dist/v2/components/header/index.d.ts.map +0 -1
- package/dist/v2/components/header/index.js.map +0 -1
- package/dist/v2/components/loginButton/LoginButton.d.ts.map +0 -1
- package/dist/v2/components/loginButton/LoginButton.js.map +0 -1
- package/dist/v2/components/loginButton/LoginButton.test.d.ts.map +0 -1
- package/dist/v2/components/loginButton/LoginButton.test.js.map +0 -1
- package/dist/v2/components/loginButton/downArrow.d.ts.map +0 -1
- package/dist/v2/components/loginButton/downArrow.js.map +0 -1
- package/dist/v2/components/loginButton/index.d.ts.map +0 -1
- package/dist/v2/components/loginButton/index.js.map +0 -1
- package/dist/v2/components/signupButton/SignupButton.d.ts.map +0 -1
- package/dist/v2/components/signupButton/SignupButton.js.map +0 -1
- package/dist/v2/components/signupButton/SignupButton.test.d.ts.map +0 -1
- package/dist/v2/components/signupButton/SignupButton.test.js.map +0 -1
- package/dist/v2/components/signupButton/index.d.ts.map +0 -1
- package/dist/v2/components/signupButton/index.js.map +0 -1
- /package/dist/v2/components/{loginButton → auth/loginButton}/LoginButton.d.ts +0 -0
- /package/dist/v2/components/{loginButton → auth/loginButton}/LoginButton.test.d.ts +0 -0
- /package/dist/v2/components/{loginButton → auth/loginButton}/LoginButton.test.js +0 -0
- /package/dist/v2/components/{loginButton → auth/loginButton}/downArrow.d.ts +0 -0
- /package/dist/v2/components/{loginButton → auth/loginButton}/downArrow.js +0 -0
- /package/dist/v2/components/{loginButton → auth/loginButton}/index.d.ts +0 -0
- /package/dist/v2/components/{loginButton → auth/loginButton}/index.js +0 -0
- /package/dist/v2/components/{signupButton → auth/signupButton}/SignupButton.d.ts +0 -0
- /package/dist/v2/components/{signupButton → auth/signupButton}/SignupButton.js +0 -0
- /package/dist/v2/components/{signupButton → auth/signupButton}/SignupButton.test.d.ts +0 -0
- /package/dist/v2/components/{signupButton → auth/signupButton}/SignupButton.test.js +0 -0
- /package/dist/v2/components/{signupButton → auth/signupButton}/index.d.ts +0 -0
- /package/dist/v2/components/{signupButton → auth/signupButton}/index.js +0 -0
- /package/dist/v2/components/{footer → layout/footer}/Footer.d.ts +0 -0
- /package/dist/v2/components/{footer → layout/footer}/Footer.test.d.ts +0 -0
- /package/dist/v2/components/{footer → layout/footer}/Footer.test.js +0 -0
- /package/dist/v2/components/{footer → layout/footer}/index.d.ts +0 -0
- /package/dist/v2/components/{footer → layout/footer}/index.js +0 -0
- /package/dist/v2/components/{header → layout/header}/header.test.d.ts +0 -0
- /package/dist/v2/components/{header → layout/header}/header.test.js +0 -0
- /package/dist/v2/components/{header → layout/header}/index.d.ts +0 -0
- /package/dist/v2/components/{header → layout/header}/index.js +0 -0
|
@@ -72,40 +72,21 @@ const originalIconBase = icons.originalIconBase;
|
|
|
72
72
|
|
|
73
73
|
/***/ },
|
|
74
74
|
|
|
75
|
-
/***/
|
|
75
|
+
/***/ 4614
|
|
76
76
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
77
77
|
|
|
78
78
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
79
|
-
/* harmony export */
|
|
79
|
+
/* harmony export */ M: () => (/* binding */ LoginButton)
|
|
80
80
|
/* harmony export */ });
|
|
81
81
|
/* harmony import */ var lit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6161);
|
|
82
|
-
/* harmony import */ var
|
|
83
|
-
/* harmony import */ var
|
|
84
|
-
/* harmony import */ var _loginButton_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9140);
|
|
85
|
-
/* harmony import */ var _signupButton_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1291);
|
|
86
|
-
/* harmony import */ var lit_directives_if_defined_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1413);
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
82
|
+
/* harmony import */ var solid_logic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3138);
|
|
83
|
+
/* harmony import */ var _downArrow__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6454);
|
|
90
84
|
|
|
91
85
|
|
|
92
86
|
|
|
93
|
-
|
|
94
|
-
const DEFAULT_SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg';
|
|
95
|
-
const DEFAULT_SIGNUP_URL = 'https://solidproject.org/get_a_pod';
|
|
96
|
-
const DEFAULT_LOGGEDIN_MENU_BUTTON_AVATAR = _iconBase__WEBPACK_IMPORTED_MODULE_1__/* .icons */ .Pt.iconBase + 'emptyProfileAvatar.png';
|
|
97
|
-
class Header extends lit__WEBPACK_IMPORTED_MODULE_0__/* .LitElement */ .WF {
|
|
87
|
+
class LoginButton extends lit__WEBPACK_IMPORTED_MODULE_0__/* .LitElement */ .WF {
|
|
98
88
|
static properties = {
|
|
99
|
-
|
|
100
|
-
type: String,
|
|
101
|
-
reflect: true
|
|
102
|
-
},
|
|
103
|
-
helpIcon: {
|
|
104
|
-
type: String,
|
|
105
|
-
attribute: 'help-icon',
|
|
106
|
-
reflect: true
|
|
107
|
-
},
|
|
108
|
-
layout: {
|
|
89
|
+
label: {
|
|
109
90
|
type: String,
|
|
110
91
|
reflect: true
|
|
111
92
|
},
|
|
@@ -113,897 +94,595 @@ class Header extends lit__WEBPACK_IMPORTED_MODULE_0__/* .LitElement */ .WF {
|
|
|
113
94
|
type: String,
|
|
114
95
|
reflect: true
|
|
115
96
|
},
|
|
116
|
-
|
|
117
|
-
type: String,
|
|
118
|
-
attribute: 'brand-link',
|
|
119
|
-
reflect: true
|
|
120
|
-
},
|
|
121
|
-
authState: {
|
|
122
|
-
type: String,
|
|
123
|
-
attribute: 'auth-state',
|
|
124
|
-
reflect: true
|
|
125
|
-
},
|
|
126
|
-
loginAction: {
|
|
127
|
-
type: Object,
|
|
128
|
-
attribute: false
|
|
129
|
-
},
|
|
130
|
-
signUpAction: {
|
|
131
|
-
type: Object,
|
|
132
|
-
attribute: false
|
|
133
|
-
},
|
|
134
|
-
accountMenu: {
|
|
135
|
-
type: Array,
|
|
136
|
-
attribute: false
|
|
137
|
-
},
|
|
138
|
-
logoutLabel: {
|
|
139
|
-
type: String,
|
|
140
|
-
attribute: 'logout-label',
|
|
141
|
-
reflect: true
|
|
142
|
-
},
|
|
143
|
-
logoutIcon: {
|
|
144
|
-
type: String,
|
|
145
|
-
attribute: 'logout-icon',
|
|
146
|
-
reflect: true
|
|
147
|
-
},
|
|
148
|
-
accountIcon: {
|
|
149
|
-
type: String,
|
|
150
|
-
attribute: 'account-icon',
|
|
151
|
-
reflect: true
|
|
152
|
-
},
|
|
153
|
-
accountAvatar: {
|
|
154
|
-
type: String,
|
|
155
|
-
attribute: 'account-avatar',
|
|
156
|
-
reflect: true
|
|
157
|
-
},
|
|
158
|
-
accountAvatarFallback: {
|
|
97
|
+
issuerUrl: {
|
|
159
98
|
type: String,
|
|
160
|
-
attribute: '
|
|
99
|
+
attribute: 'issuer-url',
|
|
161
100
|
reflect: true
|
|
162
101
|
},
|
|
163
|
-
|
|
102
|
+
icon: {
|
|
164
103
|
type: String,
|
|
165
|
-
attribute: 'login-icon',
|
|
166
104
|
reflect: true
|
|
167
105
|
},
|
|
168
|
-
|
|
106
|
+
layout: {
|
|
169
107
|
type: String,
|
|
170
|
-
attribute: 'sign-up-icon',
|
|
171
108
|
reflect: true
|
|
172
109
|
},
|
|
173
|
-
|
|
174
|
-
type: Array
|
|
175
|
-
},
|
|
176
|
-
accountMenuOpen: {
|
|
177
|
-
state: true
|
|
178
|
-
},
|
|
179
|
-
helpMenuOpen: {
|
|
110
|
+
_popupOpen: {
|
|
180
111
|
state: true
|
|
181
112
|
},
|
|
182
|
-
|
|
113
|
+
_issuerInputValue: {
|
|
183
114
|
state: true
|
|
184
115
|
},
|
|
185
|
-
|
|
116
|
+
_dropdownOpen: {
|
|
186
117
|
state: true
|
|
187
118
|
}
|
|
188
119
|
};
|
|
189
120
|
static styles = (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .css */ .AH)`
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
display: block;
|
|
213
|
-
--header-bg: var(--color-header-row-bg, #332746);
|
|
214
|
-
--header-text: var(--color-header-text, #ffffff);
|
|
215
|
-
--header-border: var(--color-border, #efecf3);
|
|
216
|
-
--header-line: var(--color-header-menu-separator-line, #5e546d);
|
|
217
|
-
--header-link: var(--color-text-heading, #000000);
|
|
218
|
-
--header-menu-item-hover: var(--color-header-menu-item-hover, #e6dcff);
|
|
219
|
-
--header-menu-item-selected: var(--color-header-menu-item-selected, #cbb9ff);
|
|
220
|
-
--header-menu-bg: var(--color-menu-bg, #f6f5f9);
|
|
221
|
-
--header-menu-loggedin-bg: var(--color-header-menu-loggedin-bg, #5e546d);
|
|
222
|
-
--header-menu-text: var(--color-menu-item-text, #654d6c);
|
|
223
|
-
--header-border-radius: var(--border-radius-sm, 0.2rem);
|
|
224
|
-
--header-button-bg: var(--color-menu-bg, #ffffff);
|
|
225
|
-
--header-button-text: var(--color-header-button-text, #0f172a);
|
|
226
|
-
--header-button-detail-text: var(--color-header-button-detail-text, #878192);
|
|
227
|
-
--header-icon-filter: invert(1) brightness(1.3); /* special way to invert SVG color of icons, from white to black */
|
|
228
|
-
--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));
|
|
229
|
-
font-family: var(--font-family-base, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif);
|
|
230
|
-
}
|
|
121
|
+
:host { /* default theme */
|
|
122
|
+
display: inline-block;
|
|
123
|
+
position: relative;
|
|
124
|
+
z-index: 400;
|
|
125
|
+
--login-button-background: var(--lavender-900, #7c4cff);
|
|
126
|
+
--login-button-text: var(--color-header-text, #ffffff);
|
|
127
|
+
--popup-background: var(--color-background, #F8F9FB);
|
|
128
|
+
--popup-text: var(--color-text, #1A1A1A);
|
|
129
|
+
--popup-border: var(--color-border, #E5E7EB);
|
|
130
|
+
--popup-shadow: var(--box-shadow-sm, 0 1px 4px rgba(124,77,255,0.12));
|
|
131
|
+
--popup-overlay-background: rgba(0, 0, 0, 0.6);
|
|
132
|
+
--issuer-input-background: var(--color-background, #F8F9FB);
|
|
133
|
+
--issuer-input-text: var(--color-text, #1A1A1A);
|
|
134
|
+
--issuer-input-border: var(--color-text, #1A1A1A);
|
|
135
|
+
--issuer-button-background: var(--color-background, #F8F9FB);
|
|
136
|
+
--issuer-button-text: var(--color-text, #1A1A1A);
|
|
137
|
+
--issuer-button-border: var(--color-border, #E5E7EB);
|
|
138
|
+
--issuer-button-hover-background: var(--lavender-900, #7c4cff);
|
|
139
|
+
--issuer-label-color: var(--grey-purple-700, #1A1A1A);
|
|
140
|
+
--issuer-placeholder-color: var(--grey-purple-700, #5e546d);;
|
|
141
|
+
--error-text-color: var(--color-error, #B00020);
|
|
142
|
+
}
|
|
231
143
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
144
|
+
:host([theme='dark']) {
|
|
145
|
+
display: inline-block;
|
|
146
|
+
position: relative;
|
|
147
|
+
z-index: 900;
|
|
148
|
+
--login-button-background: var(--lavender-900, #7c4cff);
|
|
149
|
+
--login-button-text: var(--color-header-text, #ffffff);
|
|
150
|
+
--popup-background: var(--color-background, #F8F9FB);
|
|
151
|
+
--popup-text: var(--color-text, #1A1A1A);
|
|
152
|
+
--popup-border: var(--color-border, #E5E7EB);
|
|
153
|
+
--popup-shadow: var(--box-shadow-sm, 0 1px 4px rgba(124,77,255,0.12));
|
|
154
|
+
--popup-overlay-background: rgba(0, 0, 0, 0.6);
|
|
155
|
+
--issuer-input-background: var(--color-background, #F8F9FB);
|
|
156
|
+
--issuer-input-text: var(--color-text, #1A1A1A);
|
|
157
|
+
--issuer-input-border: var(--color-text, #1A1A1A);
|
|
158
|
+
--issuer-button-background: var(--color-background, #F8F9FB);
|
|
159
|
+
--issuer-button-text: var(--color-text, #1A1A1A);
|
|
160
|
+
--issuer-button-border: var(--color-text, #1A1A1A);
|
|
161
|
+
--issuer-button-hover-background: var(--lavender-900, #7c4cff);
|
|
162
|
+
--issuer-label-color: var(--grey-purple-700, #1A1A1A);
|
|
163
|
+
--issuer-placeholder-color: var(--grey-purple-700, #5e546d);;
|
|
164
|
+
--error-text-color: var(--color-error, #B00020);
|
|
165
|
+
}
|
|
237
166
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
167
|
+
.login-button {
|
|
168
|
+
display: flex;
|
|
169
|
+
height: 35px;
|
|
170
|
+
padding: var(--spacing-xxs, 0.3125rem) var(--spacing-xs, 0.75rem);
|
|
171
|
+
align-items: center;
|
|
172
|
+
gap: var(--spacing-xxs, 0.3125rem);
|
|
173
|
+
border-radius: var(--border-radius-base, 0.3125rem);
|
|
174
|
+
background: var(--login-button-background);
|
|
175
|
+
border: none;
|
|
176
|
+
color: var(--login-button-text);
|
|
177
|
+
cursor: pointer;
|
|
178
|
+
font: inherit;
|
|
179
|
+
line-height: 1;
|
|
180
|
+
white-space: nowrap;
|
|
181
|
+
text-decoration: none;
|
|
182
|
+
box-sizing: border-box;
|
|
183
|
+
transition: transform 0.2s ease;
|
|
184
|
+
}
|
|
247
185
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
}
|
|
186
|
+
.login-button-icon {
|
|
187
|
+
width: 16px;
|
|
188
|
+
height: 16px;
|
|
189
|
+
display: inline-block;
|
|
190
|
+
object-fit: contain;
|
|
191
|
+
}
|
|
255
192
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
193
|
+
.login-button:active {
|
|
194
|
+
transform: translateY(1px);
|
|
195
|
+
}
|
|
259
196
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
197
|
+
.popup-dialog {
|
|
198
|
+
border: none;
|
|
199
|
+
padding: 0;
|
|
200
|
+
background: transparent;
|
|
201
|
+
outline: none;
|
|
202
|
+
overflow: visible;
|
|
203
|
+
width: min(30rem, calc(100vw - 2rem));
|
|
204
|
+
max-width: calc(100vw - 2rem);
|
|
205
|
+
max-height: calc(100dvh - 2rem);
|
|
206
|
+
}
|
|
267
207
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
208
|
+
.popup-dialog::backdrop {
|
|
209
|
+
background: var(--popup-overlay-background, rgba(0, 0, 0, 0.6));
|
|
210
|
+
}
|
|
271
211
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
212
|
+
.popup-box {
|
|
213
|
+
background: var(--popup-background);
|
|
214
|
+
color: var(--popup-text);
|
|
215
|
+
box-shadow: var(--popup-shadow);
|
|
216
|
+
border: 1px solid var(--popup-border);
|
|
217
|
+
border-radius: var(--border-radius-md, 0.5rem);
|
|
218
|
+
width: min(30rem, calc(100vw - 2rem));
|
|
219
|
+
min-width: min(30rem, calc(100vw - 2rem));
|
|
220
|
+
max-width: calc(100vw - 2rem);
|
|
221
|
+
max-height: calc(100dvh - 2rem);
|
|
222
|
+
overflow: auto;
|
|
223
|
+
z-index: 1001;
|
|
224
|
+
}
|
|
277
225
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
226
|
+
.popup-top-menu {
|
|
227
|
+
border-bottom: 1px solid #DDD;
|
|
228
|
+
display: flex;
|
|
229
|
+
flex-direction: row;
|
|
230
|
+
align-items: center;
|
|
231
|
+
justify-content: space-between;
|
|
232
|
+
padding-bottom: 8px;
|
|
233
|
+
margin-bottom: 8px;
|
|
234
|
+
padding: 1rem;
|
|
235
|
+
background: var(--gray-200, #E5E7EB);
|
|
236
|
+
}
|
|
284
237
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
gap: 0.625rem;
|
|
289
|
-
}
|
|
238
|
+
.popup-title {
|
|
239
|
+
font-weight: 800;
|
|
240
|
+
}
|
|
290
241
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
border-radius: 999px;
|
|
300
|
-
background: var(--header-menu-bg);
|
|
301
|
-
color: var(--header-button-text);
|
|
302
|
-
cursor: pointer;
|
|
303
|
-
font: inherit;
|
|
304
|
-
line-height: 1;
|
|
305
|
-
text-decoration: none;
|
|
306
|
-
box-sizing: border-box;
|
|
307
|
-
transition: border-color 0.2s ease, transform 0.2s ease;
|
|
308
|
-
}
|
|
242
|
+
.popup-close {
|
|
243
|
+
background: transparent;
|
|
244
|
+
border: none;
|
|
245
|
+
cursor: pointer;
|
|
246
|
+
font-size: 1.25rem;
|
|
247
|
+
line-height: 1;
|
|
248
|
+
padding: 0 0.25rem;
|
|
249
|
+
}
|
|
309
250
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
251
|
+
.issuer-text-section {
|
|
252
|
+
display: flex;
|
|
253
|
+
flex-direction: column;
|
|
254
|
+
padding: 1rem 1rem 1.75rem;
|
|
255
|
+
}
|
|
313
256
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
257
|
+
.issuer-text-label {
|
|
258
|
+
color: var(--issuer-label-color);
|
|
259
|
+
margin-bottom: 6px;
|
|
260
|
+
}
|
|
317
261
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
262
|
+
.issuer-text-row {
|
|
263
|
+
display: flex;
|
|
264
|
+
flex-direction: row;
|
|
265
|
+
gap: 6px;
|
|
266
|
+
align-items: flex-start;
|
|
267
|
+
}
|
|
321
268
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
269
|
+
.issuer-input-wrapper {
|
|
270
|
+
flex: 1;
|
|
271
|
+
display: flex;
|
|
272
|
+
flex-direction: column;
|
|
273
|
+
min-width: 0;
|
|
274
|
+
position: relative;
|
|
275
|
+
}
|
|
327
276
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
277
|
+
.issuer-input-field-row {
|
|
278
|
+
display: flex;
|
|
279
|
+
flex-direction: row;
|
|
280
|
+
position: relative;
|
|
281
|
+
}
|
|
333
282
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
font: inherit;
|
|
345
|
-
line-height: 1;
|
|
346
|
-
}
|
|
283
|
+
.issuer-text-input {
|
|
284
|
+
flex: 1;
|
|
285
|
+
padding: 0.375rem 2.75rem 0.375rem 0.5rem;
|
|
286
|
+
border: 1px solid var(--issuer-input-border);
|
|
287
|
+
border-radius: var(--border-radius-base, 0.3125rem);
|
|
288
|
+
background: var(--issuer-input-background);
|
|
289
|
+
color: var(--issuer-input-text);
|
|
290
|
+
font: inherit;
|
|
291
|
+
min-width: 0;
|
|
292
|
+
}
|
|
347
293
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
padding: 0;
|
|
352
|
-
border: 1.5px solid var(--header-border);
|
|
353
|
-
background: var(--header-menu-loggedin-bg);
|
|
354
|
-
}
|
|
294
|
+
.issuer-text-input::placeholder {
|
|
295
|
+
color: var(--issuer-placeholder-color);
|
|
296
|
+
}
|
|
355
297
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
298
|
+
.issuer-dropdown-toggle {
|
|
299
|
+
position: absolute;
|
|
300
|
+
right: 6px;
|
|
301
|
+
top: 50%;
|
|
302
|
+
transform: translateY(-50%);
|
|
303
|
+
width: 26px;
|
|
304
|
+
height: 26px;
|
|
305
|
+
padding: 0;
|
|
306
|
+
border: none;
|
|
307
|
+
background: transparent;
|
|
308
|
+
cursor: pointer;
|
|
309
|
+
display: flex;
|
|
310
|
+
align-items: center;
|
|
311
|
+
justify-content: center;
|
|
312
|
+
flex-shrink: 0;
|
|
313
|
+
border-radius: var(--border-radius-base, 0.3125rem);
|
|
314
|
+
}
|
|
359
315
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
}
|
|
316
|
+
.issuer-dropdown-toggle:hover {
|
|
317
|
+
background: var(--color-header-menu-item-hover, #e6dcff);
|
|
318
|
+
}
|
|
364
319
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
}
|
|
320
|
+
.issuer-dropdown-toggle svg {
|
|
321
|
+
width: 14px;
|
|
322
|
+
height: 14px;
|
|
323
|
+
display: block;
|
|
324
|
+
}
|
|
371
325
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
326
|
+
.issuer-dropdown-list {
|
|
327
|
+
position: absolute;
|
|
328
|
+
top: calc(100% + 6px);
|
|
329
|
+
left: 0;
|
|
330
|
+
right: 0;
|
|
331
|
+
border: 1px solid var(--color-border, #E5E7EB);
|
|
332
|
+
border-top: none;
|
|
333
|
+
border-radius: 0 0 var(--border-radius-base, 0.3125rem) var(--border-radius-base, 0.3125rem);
|
|
334
|
+
background: var(--issuer-input-background);
|
|
335
|
+
overflow: visible;
|
|
336
|
+
z-index: 10;
|
|
337
|
+
box-shadow: 0 4px 12px rgba(124, 77, 255, 0.12);
|
|
338
|
+
}
|
|
385
339
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
340
|
+
.issuer-dropdown-item {
|
|
341
|
+
display: block;
|
|
342
|
+
width: 100%;
|
|
343
|
+
padding: 0.625rem 0.75rem;
|
|
344
|
+
border: none;
|
|
345
|
+
border-bottom: 1px solid var(--color-border, #E5E7EB);
|
|
346
|
+
background: transparent;
|
|
347
|
+
color: var(--issuer-button-text);
|
|
348
|
+
cursor: pointer;
|
|
349
|
+
font: inherit;
|
|
350
|
+
text-align: left;
|
|
351
|
+
box-sizing: border-box;
|
|
352
|
+
}
|
|
392
353
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
border-radius: 0.5rem;
|
|
397
|
-
}
|
|
354
|
+
.issuer-dropdown-item:last-child {
|
|
355
|
+
border-bottom: none;
|
|
356
|
+
}
|
|
398
357
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
object-fit: cover;
|
|
404
|
-
}
|
|
358
|
+
.issuer-dropdown-item:hover {
|
|
359
|
+
background: var(--color-header-menu-item-hover, #e6dcff);
|
|
360
|
+
border-radius: var(--border-radius-base-md, 0.5rem);
|
|
361
|
+
}
|
|
405
362
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
363
|
+
.popup-footer {
|
|
364
|
+
display: flex;
|
|
365
|
+
flex-direction: row;
|
|
366
|
+
justify-content: center;
|
|
367
|
+
gap: 8px;
|
|
368
|
+
padding: 0.75rem 1rem 1rem;
|
|
369
|
+
}
|
|
413
370
|
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
padding: 0.5rem;
|
|
420
|
-
background: var(--header-button-bg);
|
|
421
|
-
border: 1px solid var(--header-border);
|
|
422
|
-
border-radius: var(--header-border-radius);
|
|
423
|
-
box-shadow: var(--header-shadow);
|
|
424
|
-
z-index: 10;
|
|
425
|
-
}
|
|
371
|
+
.popup-footer-hr {
|
|
372
|
+
margin: 0;
|
|
373
|
+
border: none;
|
|
374
|
+
border-top: 1px solid var(--popup-border, #E5E7EB);
|
|
375
|
+
}
|
|
426
376
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
377
|
+
.popup-cancel-button {
|
|
378
|
+
padding: 0.5rem 1.25rem;
|
|
379
|
+
border: 1px solid #C0BFC7;
|
|
380
|
+
border-radius: var(--border-radius-base, 0.3125rem);
|
|
381
|
+
background: var(--popup-background);
|
|
382
|
+
color: #314158;
|
|
383
|
+
cursor: pointer;
|
|
384
|
+
font: inherit;
|
|
385
|
+
}
|
|
430
386
|
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
padding: 0;
|
|
435
|
-
display: flex;
|
|
436
|
-
flex-direction: column;
|
|
437
|
-
gap: 0.25rem;
|
|
438
|
-
}
|
|
387
|
+
.popup-cancel-button:hover {
|
|
388
|
+
background: #D1D5DB;
|
|
389
|
+
}
|
|
439
390
|
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
text-decoration: none;
|
|
450
|
-
background: transparent;
|
|
451
|
-
border: 1px solid transparent;
|
|
452
|
-
border-radius: 10px;
|
|
453
|
-
padding: 0.5rem;
|
|
454
|
-
cursor: pointer;
|
|
455
|
-
font: inherit;
|
|
456
|
-
text-align: left;
|
|
457
|
-
}
|
|
391
|
+
.popup-login-button {
|
|
392
|
+
padding: 0.5rem 1.25rem;
|
|
393
|
+
border: none;
|
|
394
|
+
border-radius: var(--border-radius-base, 0.3125rem);
|
|
395
|
+
background: var(--lavender-900, #7c4cff);
|
|
396
|
+
color: #ffffff;
|
|
397
|
+
cursor: pointer;
|
|
398
|
+
font: inherit;
|
|
399
|
+
}
|
|
458
400
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
background: var(--header-menu-item-hover);
|
|
463
|
-
border-color: var(--header-menu-item-hover);
|
|
464
|
-
}
|
|
401
|
+
.popup-login-button:hover {
|
|
402
|
+
background: #6a3de8;
|
|
403
|
+
}
|
|
465
404
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
border-color: var(--header-menu-item-selected);
|
|
471
|
-
transform: translateY(1px);
|
|
472
|
-
}
|
|
405
|
+
.popup-login-button:disabled {
|
|
406
|
+
opacity: 0.5;
|
|
407
|
+
cursor: not-allowed;
|
|
408
|
+
}
|
|
473
409
|
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
text-transform: uppercase;
|
|
480
|
-
font-size: 80%;
|
|
481
|
-
}
|
|
410
|
+
.error-msg {
|
|
411
|
+
color: var(--error-text-color);
|
|
412
|
+
font-size: 0.875rem;
|
|
413
|
+
margin-top: 8px;
|
|
414
|
+
}
|
|
482
415
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
}
|
|
416
|
+
@media (max-width: 40rem) {
|
|
417
|
+
.popup-dialog {
|
|
418
|
+
width: calc(100vw - 1rem);
|
|
419
|
+
max-width: calc(100vw - 1rem);
|
|
420
|
+
max-height: calc(100dvh - 1rem);
|
|
421
|
+
}
|
|
490
422
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
423
|
+
.popup-box {
|
|
424
|
+
width: calc(100vw - 1rem);
|
|
425
|
+
min-width: 0;
|
|
426
|
+
max-width: calc(100vw - 1rem);
|
|
427
|
+
max-height: calc(100dvh - 1rem);
|
|
428
|
+
border-radius: var(--border-radius-base, 0.3125rem);
|
|
429
|
+
}
|
|
496
430
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
431
|
+
.popup-top-menu,
|
|
432
|
+
.issuer-text-section,
|
|
433
|
+
.popup-footer {
|
|
434
|
+
padding-left: 0.75rem;
|
|
435
|
+
padding-right: 0.75rem;
|
|
436
|
+
}
|
|
503
437
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
text-overflow: ellipsis;
|
|
509
|
-
white-space: nowrap;
|
|
510
|
-
}
|
|
438
|
+
.popup-footer {
|
|
439
|
+
flex-wrap: wrap;
|
|
440
|
+
gap: 0.625rem;
|
|
441
|
+
}
|
|
511
442
|
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
align-items: center;
|
|
516
|
-
background: transparent;
|
|
517
|
-
}
|
|
443
|
+
.popup-footer > button {
|
|
444
|
+
flex: 1 1 100%;
|
|
445
|
+
}
|
|
518
446
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
447
|
+
.issuer-text-row,
|
|
448
|
+
.issuer-input-field-row {
|
|
449
|
+
width: 100%;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
`;
|
|
453
|
+
_issuerInputId = `issuer-url-input-${Math.random().toString(36).slice(2, 10)}`;
|
|
454
|
+
_errorMsg = '';
|
|
455
|
+
constructor() {
|
|
456
|
+
super();
|
|
457
|
+
this.label = 'Log In';
|
|
458
|
+
this.theme = 'light';
|
|
459
|
+
this.issuerUrl = '';
|
|
460
|
+
this.icon = '';
|
|
461
|
+
this.layout = 'desktop';
|
|
462
|
+
this._popupOpen = false;
|
|
463
|
+
this._issuerInputValue = '';
|
|
464
|
+
this._dropdownOpen = false;
|
|
527
465
|
}
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
cursor: default;
|
|
466
|
+
connectedCallback() {
|
|
467
|
+
super.connectedCallback();
|
|
531
468
|
}
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
position: absolute;
|
|
535
|
-
top: calc(100% + 0.9rem);
|
|
536
|
-
right: 0;
|
|
537
|
-
min-width: 12rem;
|
|
538
|
-
padding: 0.5rem;
|
|
539
|
-
background: var(--header-button-bg);
|
|
540
|
-
border: 1px solid var(--header-border);
|
|
541
|
-
border-radius: var(--header-border-radius);
|
|
542
|
-
box-shadow: var(--header-shadow);
|
|
543
|
-
z-index: 10;
|
|
469
|
+
disconnectedCallback() {
|
|
470
|
+
super.disconnectedCallback();
|
|
544
471
|
}
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
472
|
+
_openPopup() {
|
|
473
|
+
const offline = (0,solid_logic__WEBPACK_IMPORTED_MODULE_1__.offlineTestID)();
|
|
474
|
+
if (offline) {
|
|
475
|
+
this._loginComplete(offline.uri);
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
this._issuerInputValue = typeof localStorage !== 'undefined' && localStorage.getItem('loginIssuer') || this.issuerUrl || '';
|
|
479
|
+
this._errorMsg = '';
|
|
480
|
+
this._popupOpen = true;
|
|
548
481
|
}
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
display: flex;
|
|
552
|
-
flex-direction: column;
|
|
553
|
-
gap: 0.25rem;
|
|
482
|
+
_closePopup() {
|
|
483
|
+
this._popupOpen = false;
|
|
554
484
|
}
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
485
|
+
updated() {
|
|
486
|
+
const dialog = this.shadowRoot?.querySelector('dialog');
|
|
487
|
+
if (!dialog) return;
|
|
488
|
+
if (this._popupOpen && !dialog.open) {
|
|
489
|
+
dialog.showModal();
|
|
490
|
+
} else if (!this._popupOpen && dialog.open) {
|
|
491
|
+
dialog.close();
|
|
492
|
+
}
|
|
563
493
|
}
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
494
|
+
async _loginToIssuer(issuerUri) {
|
|
495
|
+
if (!issuerUri) return;
|
|
496
|
+
try {
|
|
497
|
+
// clear authorization metadata from store
|
|
498
|
+
;
|
|
499
|
+
solid_logic__WEBPACK_IMPORTED_MODULE_1__.solidLogicSingleton.store.updater.flagAuthorizationMetadata();
|
|
500
|
+
const preLoginRedirectHash = new URL(window.location.href).hash;
|
|
501
|
+
if (preLoginRedirectHash) {
|
|
502
|
+
window.localStorage.setItem('preLoginRedirectHash', preLoginRedirectHash);
|
|
503
|
+
}
|
|
504
|
+
window.localStorage.setItem('loginIssuer', issuerUri);
|
|
505
|
+
const locationUrl = new URL(window.location.href);
|
|
506
|
+
locationUrl.hash = '';
|
|
507
|
+
await solid_logic__WEBPACK_IMPORTED_MODULE_1__.authSession.login({
|
|
508
|
+
redirectUrl: locationUrl.href,
|
|
509
|
+
oidcIssuer: issuerUri
|
|
510
|
+
});
|
|
511
|
+
} catch (err) {
|
|
512
|
+
this._errorMsg = err.message || String(err);
|
|
513
|
+
this.requestUpdate();
|
|
514
|
+
}
|
|
580
515
|
}
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
516
|
+
_loginComplete(webIdUri) {
|
|
517
|
+
solid_logic__WEBPACK_IMPORTED_MODULE_1__.authn.saveUser(webIdUri);
|
|
518
|
+
this.dispatchEvent(new CustomEvent('login-success', {
|
|
519
|
+
detail: {
|
|
520
|
+
webId: webIdUri
|
|
521
|
+
},
|
|
522
|
+
bubbles: true,
|
|
523
|
+
composed: true
|
|
524
|
+
}));
|
|
587
525
|
}
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
color: var(--header-link);
|
|
592
|
-
background: var(--header-menu-item-selected);
|
|
593
|
-
border-color: var(--header-menu-item-selected);
|
|
594
|
-
transform: translateY(1px);
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
::slotted(a), ::slotted(button) {
|
|
598
|
-
color: var(--header-link);
|
|
599
|
-
text-decoration: none;
|
|
600
|
-
background: var(--header-button-bg);
|
|
601
|
-
border: 1px solid var(--header-border);
|
|
602
|
-
border-radius: 4px;
|
|
603
|
-
padding: 0.25rem 0.5rem;
|
|
604
|
-
cursor: pointer;
|
|
605
|
-
font: inherit;
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
.help-icon {
|
|
609
|
-
width: 35px;
|
|
610
|
-
height: 35px;
|
|
611
|
-
cursor: pointer;
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
.help-text {
|
|
615
|
-
color: var(--header-text, #ffffff);
|
|
616
|
-
font: inherit;
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
.logout-action-icon {
|
|
620
|
-
width: 16px;
|
|
621
|
-
height: 16px;
|
|
622
|
-
display: inline-block;
|
|
623
|
-
object-fit: contain;
|
|
624
|
-
margin-right: 0.5rem;
|
|
625
|
-
}
|
|
626
|
-
`;
|
|
627
|
-
constructor() {
|
|
628
|
-
super();
|
|
629
|
-
this.logo = DEFAULT_SOLID_ICON_URL;
|
|
630
|
-
this.helpIcon = DEFAULT_HELP_MENU_ICON;
|
|
631
|
-
this.layout = 'desktop';
|
|
632
|
-
this.theme = 'light';
|
|
633
|
-
this.brandLink = '#';
|
|
634
|
-
this.authState = 'logged-out';
|
|
635
|
-
this.loginAction = {
|
|
636
|
-
label: 'Log In',
|
|
637
|
-
action: 'login'
|
|
638
|
-
};
|
|
639
|
-
this.signUpAction = {
|
|
640
|
-
label: 'Sign Up',
|
|
641
|
-
action: 'sign-up',
|
|
642
|
-
url: DEFAULT_SIGNUP_URL
|
|
643
|
-
};
|
|
644
|
-
this.accountMenu = [];
|
|
645
|
-
this.logoutLabel = 'Log Out';
|
|
646
|
-
this.logoutIcon = '';
|
|
647
|
-
this.accountIcon = '▼';
|
|
648
|
-
this.accountAvatar = '';
|
|
649
|
-
this.accountAvatarFallback = '';
|
|
650
|
-
this.loginIcon = '';
|
|
651
|
-
this.signUpIcon = '';
|
|
652
|
-
this.helpMenuList = [];
|
|
653
|
-
this.accountMenuOpen = false;
|
|
654
|
-
this.helpMenuOpen = false;
|
|
655
|
-
this.hasSlottedAccountMenu = false;
|
|
656
|
-
this.hasSlottedHelpMenu = false;
|
|
657
|
-
}
|
|
658
|
-
connectedCallback() {
|
|
659
|
-
super.connectedCallback();
|
|
660
|
-
document.addEventListener('click', this.handleDocumentClick);
|
|
661
|
-
window.addEventListener('keydown', this.handleWindowKeydown);
|
|
662
|
-
}
|
|
663
|
-
disconnectedCallback() {
|
|
664
|
-
document.removeEventListener('click', this.handleDocumentClick);
|
|
665
|
-
window.removeEventListener('keydown', this.handleWindowKeydown);
|
|
666
|
-
super.disconnectedCallback();
|
|
667
|
-
}
|
|
668
|
-
handleHelpMenuClick(item, event) {
|
|
669
|
-
event.preventDefault();
|
|
670
|
-
this.helpMenuOpen = false;
|
|
671
|
-
this.dispatchEvent(new CustomEvent('help-menu-select', {
|
|
672
|
-
detail: item,
|
|
673
|
-
bubbles: true,
|
|
674
|
-
composed: true
|
|
675
|
-
}));
|
|
676
|
-
if (item.url) {
|
|
677
|
-
const target = item.target || '_blank';
|
|
678
|
-
const features = target === '_blank' ? 'noopener,noreferrer' : undefined;
|
|
679
|
-
window.open(item.url, target, features);
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
handleAccountMenuClick(item) {
|
|
683
|
-
this.accountMenuOpen = false;
|
|
684
|
-
this.dispatchEvent(new CustomEvent('account-menu-select', {
|
|
685
|
-
detail: item,
|
|
686
|
-
bubbles: true,
|
|
687
|
-
composed: true
|
|
688
|
-
}));
|
|
689
|
-
}
|
|
690
|
-
handleDocumentClick = event => {
|
|
691
|
-
if (!event.composedPath().includes(this)) {
|
|
692
|
-
this.accountMenuOpen = false;
|
|
693
|
-
this.helpMenuOpen = false;
|
|
694
|
-
}
|
|
695
|
-
};
|
|
696
|
-
handleWindowKeydown = event => {
|
|
697
|
-
if (event.key === 'Escape' && (this.accountMenuOpen || this.helpMenuOpen)) {
|
|
698
|
-
this.accountMenuOpen = false;
|
|
699
|
-
this.helpMenuOpen = false;
|
|
700
|
-
}
|
|
701
|
-
};
|
|
702
|
-
handleAccountSlotChange(event) {
|
|
703
|
-
const slot = event.target;
|
|
704
|
-
this.hasSlottedAccountMenu = slot.assignedElements({
|
|
705
|
-
flatten: true
|
|
706
|
-
}).length > 0;
|
|
707
|
-
}
|
|
708
|
-
handleHelpSlotChange(event) {
|
|
709
|
-
const slot = event.target;
|
|
710
|
-
this.hasSlottedHelpMenu = slot.assignedElements({
|
|
711
|
-
flatten: true
|
|
712
|
-
}).length > 0;
|
|
713
|
-
}
|
|
714
|
-
toggleAccountMenu(event) {
|
|
715
|
-
event.preventDefault();
|
|
716
|
-
if (!this.hasAccountMenuItems()) return;
|
|
717
|
-
this.helpMenuOpen = false;
|
|
718
|
-
this.accountMenuOpen = !this.accountMenuOpen;
|
|
719
|
-
}
|
|
720
|
-
toggleHelpMenu(event) {
|
|
721
|
-
event.preventDefault();
|
|
722
|
-
if (!this.hasHelpMenuItems()) return;
|
|
723
|
-
this.accountMenuOpen = false;
|
|
724
|
-
this.helpMenuOpen = !this.helpMenuOpen;
|
|
725
|
-
}
|
|
726
|
-
hasAccountMenuItems() {
|
|
727
|
-
return Boolean(this.accountMenu?.length || this.hasSlottedAccountMenu || this.logoutLabel);
|
|
728
|
-
}
|
|
729
|
-
hasHelpMenuItems() {
|
|
730
|
-
return Boolean(this.helpMenuList?.length || this.hasSlottedHelpMenu);
|
|
731
|
-
}
|
|
732
|
-
shouldRenderHelpMenu() {
|
|
733
|
-
return this.layout !== 'mobile' && this.hasHelpMenuItems();
|
|
734
|
-
}
|
|
735
|
-
renderLoggedInAvatar(avatar, wrapperClass = 'account-avatar') {
|
|
736
|
-
const hasAvatar = Boolean(avatar);
|
|
737
|
-
const imageSrc = hasAvatar ? avatar : this.accountAvatarFallback || DEFAULT_LOGGEDIN_MENU_BUTTON_AVATAR;
|
|
738
|
-
const imageAlt = hasAvatar ? 'Profile Avatar' : 'Default Avatar';
|
|
739
|
-
if (this.layout === 'mobile' && wrapperClass === 'account-avatar') {
|
|
740
|
-
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`<img class="account-avatar-img" src="${imageSrc}" alt="${imageAlt}" />`;
|
|
741
|
-
}
|
|
742
|
-
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
743
|
-
<span class="${wrapperClass}" aria-hidden="true">
|
|
744
|
-
<img src="${imageSrc}" alt="${imageAlt}" />
|
|
745
|
-
</span>
|
|
746
|
-
`;
|
|
747
|
-
}
|
|
748
|
-
renderLoggedOutActions() {
|
|
749
|
-
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
750
|
-
<div class="auth-actions" part="auth-actions">
|
|
751
|
-
<slot name="login-action">
|
|
752
|
-
<solid-ui-login-button
|
|
753
|
-
label="${this.loginAction.label}"
|
|
754
|
-
icon=${(0,lit_directives_if_defined_js__WEBPACK_IMPORTED_MODULE_5__/* .ifDefined */ .J)(this.layout !== 'mobile' ? this.loginIcon || this.loginAction.icon : undefined)}
|
|
755
|
-
layout="${this.layout}"
|
|
756
|
-
theme="${this.theme}"
|
|
757
|
-
part="login-action"
|
|
758
|
-
@login-success="${() => this.handleLoginSuccess()}"
|
|
759
|
-
></solid-ui-login-button>
|
|
760
|
-
</slot>
|
|
761
|
-
<slot name="sign-up-action">
|
|
762
|
-
<solid-ui-signup-button
|
|
763
|
-
label="${this.signUpAction.label}"
|
|
764
|
-
signup-url="${(0,lit_directives_if_defined_js__WEBPACK_IMPORTED_MODULE_5__/* .ifDefined */ .J)(this.signUpAction.url)}"
|
|
765
|
-
layout="${this.layout}"
|
|
766
|
-
.icon=${(0,lit_directives_if_defined_js__WEBPACK_IMPORTED_MODULE_5__/* .ifDefined */ .J)(this.layout !== 'mobile' ? this.signUpIcon || this.signUpAction.icon : undefined)}
|
|
767
|
-
theme="${this.theme}"
|
|
768
|
-
part="sign-up-action"
|
|
769
|
-
></solid-ui-signup-button>
|
|
770
|
-
</slot>
|
|
771
|
-
</div>
|
|
772
|
-
`;
|
|
773
|
-
}
|
|
774
|
-
handleLoginSuccess() {
|
|
775
|
-
this.authState = 'logged-in';
|
|
776
|
-
this.dispatchEvent(new CustomEvent('auth-action-select', {
|
|
777
|
-
detail: {
|
|
778
|
-
role: 'login'
|
|
779
|
-
},
|
|
780
|
-
bubbles: true,
|
|
781
|
-
composed: true
|
|
782
|
-
}));
|
|
783
|
-
}
|
|
784
|
-
async handleLogout() {
|
|
785
|
-
this.accountMenuOpen = false;
|
|
786
|
-
try {
|
|
787
|
-
await solid_logic__WEBPACK_IMPORTED_MODULE_2__.authSession.logout();
|
|
788
|
-
} catch (_err) {
|
|
789
|
-
// logout errors are non-fatal — proceed to clear state
|
|
790
|
-
}
|
|
791
|
-
this.authState = 'logged-out';
|
|
792
|
-
this.dispatchEvent(new CustomEvent('logout-select', {
|
|
793
|
-
detail: {
|
|
794
|
-
role: 'logout'
|
|
795
|
-
},
|
|
796
|
-
bubbles: true,
|
|
797
|
-
composed: true
|
|
798
|
-
}));
|
|
526
|
+
_handleGoClick() {
|
|
527
|
+
this._dropdownOpen = false;
|
|
528
|
+
this._loginToIssuer(this._issuerInputValue);
|
|
799
529
|
}
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
${this.renderLoggedInAvatar(item.avatar, 'account-menu-avatar')}
|
|
803
|
-
<span class="account-menu-copy">
|
|
804
|
-
<span class="account-menu-label">${item.label}</span>
|
|
805
|
-
${item.webid && this.layout !== 'mobile' ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`<span class="account-menu-webid">${item.webid}</span>` : ''}
|
|
806
|
-
</span>
|
|
807
|
-
`;
|
|
808
|
-
if (item.url) {
|
|
809
|
-
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
810
|
-
<a
|
|
811
|
-
class="account-menu-item-link"
|
|
812
|
-
href="${item.url}"
|
|
813
|
-
@click="${() => this.handleAccountMenuClick(item)}"
|
|
814
|
-
part="account-menu-item"
|
|
815
|
-
role="menuitem"
|
|
816
|
-
>
|
|
817
|
-
${content}
|
|
818
|
-
</a>
|
|
819
|
-
`;
|
|
820
|
-
}
|
|
821
|
-
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
822
|
-
<button
|
|
823
|
-
class="account-menu-item-button"
|
|
824
|
-
type="button"
|
|
825
|
-
@click="${() => this.handleAccountMenuClick(item)}"
|
|
826
|
-
part="account-menu-item"
|
|
827
|
-
role="menuitem"
|
|
828
|
-
>
|
|
829
|
-
${content}
|
|
830
|
-
</button>
|
|
831
|
-
`;
|
|
530
|
+
_toggleDropdown() {
|
|
531
|
+
this._dropdownOpen = !this._dropdownOpen;
|
|
832
532
|
}
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
<slot name="account-trigger">
|
|
837
|
-
<button
|
|
838
|
-
id="accountMenuTrigger"
|
|
839
|
-
class="account-menu-trigger"
|
|
840
|
-
type="button"
|
|
841
|
-
aria-haspopup="menu"
|
|
842
|
-
aria-expanded="${this.accountMenuOpen ? 'true' : 'false'}"
|
|
843
|
-
?disabled="${!this.hasAccountMenuItems()}"
|
|
844
|
-
@click="${e => this.toggleAccountMenu(e)}"
|
|
845
|
-
part="account-menu-trigger"
|
|
846
|
-
>
|
|
847
|
-
${this.renderLoggedInAvatar(this.accountAvatar)}
|
|
848
|
-
${this.layout !== 'mobile' && this.accountIcon ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
849
|
-
<img class="account-menu-trigger-icon" src="${this.accountIcon}" alt="" aria-hidden="true" />` : ''}
|
|
850
|
-
</button>
|
|
851
|
-
</slot>
|
|
852
|
-
|
|
853
|
-
<nav
|
|
854
|
-
id="accountMenu"
|
|
855
|
-
class="account-dropdown"
|
|
856
|
-
role="menu"
|
|
857
|
-
?inert="${!this.accountMenuOpen || !this.hasAccountMenuItems()}"
|
|
858
|
-
?hidden="${!this.accountMenuOpen || !this.hasAccountMenuItems()}"
|
|
859
|
-
part="account-dropdown"
|
|
860
|
-
>
|
|
861
|
-
<slot name="account-switch" class="account-switch">Switch account</slot>
|
|
862
|
-
<hr class="dropdown-menu-separator" />
|
|
863
|
-
<slot name="account-menu" @slotchange="${e => this.handleAccountSlotChange(e)}"></slot>
|
|
864
|
-
${this.accountMenu && this.accountMenu.length ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
865
|
-
<ul class="account-menu-list">
|
|
866
|
-
${this.accountMenu.map(item => (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
867
|
-
<li>${this.renderAccountMenuItem(item)}</li>
|
|
868
|
-
`)}
|
|
869
|
-
</ul>
|
|
870
|
-
` : ''}
|
|
871
|
-
${this.logoutLabel ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
872
|
-
<hr class="dropdown-menu-separator" />
|
|
873
|
-
<button
|
|
874
|
-
class="account-menu-item-button"
|
|
875
|
-
type="button"
|
|
876
|
-
@click="${() => this.handleLogout()}"
|
|
877
|
-
part="logout-action"
|
|
878
|
-
role="menuitem"
|
|
879
|
-
>
|
|
880
|
-
${this.logoutIcon && this.layout !== 'mobile' ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`<img class="logout-action-icon" src="${this.logoutIcon}" alt="" aria-hidden="true" part="logout-action-icon" />` : ''}
|
|
881
|
-
${this.logoutLabel}
|
|
882
|
-
</button>
|
|
883
|
-
` : ''}
|
|
884
|
-
</nav>
|
|
885
|
-
</div>
|
|
886
|
-
`;
|
|
533
|
+
_selectIssuerFromDropdown(uri) {
|
|
534
|
+
this._issuerInputValue = uri;
|
|
535
|
+
this._dropdownOpen = false;
|
|
887
536
|
}
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
return this.renderLoggedOutActions();
|
|
891
|
-
}
|
|
892
|
-
return this.renderLoggedInActions();
|
|
537
|
+
_handleInputChange(e) {
|
|
538
|
+
this._issuerInputValue = e.target.value;
|
|
893
539
|
}
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
brandLink.classList.toggle('brand-not-displayed', this.layout === 'mobile');
|
|
540
|
+
_handleInputKeydown(e) {
|
|
541
|
+
if (e.key === 'Enter') {
|
|
542
|
+
this._loginToIssuer(this._issuerInputValue);
|
|
898
543
|
}
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
if (changedProperties.has('layout')) {
|
|
902
|
-
const brandLink = this.shadowRoot?.getElementById('brandLink');
|
|
903
|
-
if (brandLink) {
|
|
904
|
-
brandLink.classList.toggle('brand-not-displayed', this.layout === 'mobile');
|
|
905
|
-
}
|
|
544
|
+
if (e.key === 'Escape') {
|
|
545
|
+
this._closePopup();
|
|
906
546
|
}
|
|
907
547
|
}
|
|
908
|
-
|
|
548
|
+
_renderPopup() {
|
|
549
|
+
const suggestedIssuers = (0,solid_logic__WEBPACK_IMPORTED_MODULE_1__.getSuggestedIssuers)();
|
|
909
550
|
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
910
|
-
<div class="
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
<div class="help-dropdown-content" @click="${() => {
|
|
951
|
-
this.helpMenuOpen = false;
|
|
952
|
-
}}">
|
|
953
|
-
<slot name="help-menu" @slotchange="${e => this.handleHelpSlotChange(e)}"></slot>
|
|
954
|
-
${this.helpMenuList && this.helpMenuList.length ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
955
|
-
<ul class="help-menu-list">
|
|
956
|
-
${this.helpMenuList.map(item => (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
957
|
-
<li>
|
|
958
|
-
${item.url ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
959
|
-
<a
|
|
960
|
-
href="${item.url}"
|
|
961
|
-
target="${item.target || '_blank'}"
|
|
962
|
-
rel="${(0,lit_directives_if_defined_js__WEBPACK_IMPORTED_MODULE_5__/* .ifDefined */ .J)((item.target || '_blank') === '_blank' ? 'noopener noreferrer' : undefined)}"
|
|
963
|
-
@click="${e => this.handleHelpMenuClick(item, e)}"
|
|
964
|
-
part="help-menu-item"
|
|
965
|
-
role="menuitem"
|
|
966
|
-
>
|
|
967
|
-
${item.label}
|
|
968
|
-
</a>
|
|
969
|
-
` : (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
970
|
-
<button
|
|
971
|
-
type="button"
|
|
972
|
-
@click="${e => this.handleHelpMenuClick(item, e)}"
|
|
973
|
-
part="help-menu-item"
|
|
974
|
-
role="menuitem"
|
|
975
|
-
>
|
|
976
|
-
${item.label}
|
|
977
|
-
</button>
|
|
978
|
-
`}
|
|
979
|
-
</li>
|
|
551
|
+
<div class="popup-box">
|
|
552
|
+
<div class="popup-top-menu">
|
|
553
|
+
<span class="popup-title">Select an identity provider</span>
|
|
554
|
+
<button class="popup-close" type="button" aria-label="Close" @click="${() => this._closePopup()}">✕</button>
|
|
555
|
+
</div>
|
|
556
|
+
|
|
557
|
+
<div class="issuer-text-section">
|
|
558
|
+
<label class="issuer-text-label" for="${this._issuerInputId}">Solid Identity Provider</label>
|
|
559
|
+
<div class="issuer-text-row">
|
|
560
|
+
<div class="issuer-input-wrapper">
|
|
561
|
+
<div class="issuer-input-field-row">
|
|
562
|
+
<input
|
|
563
|
+
id="${this._issuerInputId}"
|
|
564
|
+
class="issuer-text-input"
|
|
565
|
+
type="text"
|
|
566
|
+
placeholder="https://example.com"
|
|
567
|
+
.value="${this._issuerInputValue}"
|
|
568
|
+
@input="${this._handleInputChange}"
|
|
569
|
+
@keydown="${this._handleInputKeydown}"
|
|
570
|
+
autocomplete="url"
|
|
571
|
+
/>
|
|
572
|
+
${suggestedIssuers.length ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
573
|
+
<button
|
|
574
|
+
class="issuer-dropdown-toggle"
|
|
575
|
+
type="button"
|
|
576
|
+
aria-label="Show identity provider suggestions"
|
|
577
|
+
aria-expanded="${this._dropdownOpen}"
|
|
578
|
+
@click="${() => this._toggleDropdown()}"
|
|
579
|
+
>${_downArrow__WEBPACK_IMPORTED_MODULE_2__/* .phoneIcon */ .S}</button>
|
|
580
|
+
` : ''}
|
|
581
|
+
</div>
|
|
582
|
+
${this._dropdownOpen && suggestedIssuers.length ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
583
|
+
<div class="issuer-dropdown-list" role="listbox">
|
|
584
|
+
${suggestedIssuers.map(issuerInfo => (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
585
|
+
<button
|
|
586
|
+
class="issuer-dropdown-item"
|
|
587
|
+
type="button"
|
|
588
|
+
role="option"
|
|
589
|
+
@click="${() => this._selectIssuerFromDropdown(issuerInfo.uri)}"
|
|
590
|
+
>${issuerInfo.name}</button>
|
|
980
591
|
`)}
|
|
981
|
-
</
|
|
592
|
+
</div>
|
|
982
593
|
` : ''}
|
|
983
594
|
</div>
|
|
984
|
-
</
|
|
985
|
-
|
|
595
|
+
</div>
|
|
596
|
+
${this._errorMsg ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`<div class="error-msg">${this._errorMsg}</div>` : ''}
|
|
597
|
+
</div>
|
|
598
|
+
<hr class="popup-footer-hr" />
|
|
599
|
+
<div class="popup-footer">
|
|
600
|
+
<button class="popup-cancel-button" type="button" @click="${() => this._closePopup()}">Cancel</button>
|
|
601
|
+
<button
|
|
602
|
+
class="popup-login-button"
|
|
603
|
+
type="button"
|
|
604
|
+
?disabled="${!this._issuerInputValue}"
|
|
605
|
+
@click="${() => this._handleGoClick()}"
|
|
606
|
+
>Log In</button>
|
|
607
|
+
</div>
|
|
986
608
|
</div>
|
|
987
|
-
|
|
609
|
+
`;
|
|
610
|
+
}
|
|
611
|
+
render() {
|
|
612
|
+
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
613
|
+
<button
|
|
614
|
+
class="login-button"
|
|
615
|
+
type="button"
|
|
616
|
+
part="login-button"
|
|
617
|
+
@click="${() => this._openPopup()}"
|
|
618
|
+
>
|
|
619
|
+
${this.icon ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`<img class="login-button-icon" src="${this.icon}" alt="" aria-hidden="true" part="login-button-icon" />` : ''}
|
|
620
|
+
<slot>${this.label}</slot>
|
|
621
|
+
</button>
|
|
622
|
+
|
|
623
|
+
<dialog
|
|
624
|
+
class="popup-dialog"
|
|
625
|
+
role="dialog"
|
|
626
|
+
aria-modal="true"
|
|
627
|
+
aria-label="Select an identity provider"
|
|
628
|
+
@cancel="${e => {
|
|
629
|
+
e.preventDefault();
|
|
630
|
+
this._closePopup();
|
|
631
|
+
}}"
|
|
632
|
+
@click="${e => {
|
|
633
|
+
if (e.target === e.currentTarget) this._closePopup();
|
|
634
|
+
}}"
|
|
635
|
+
>
|
|
636
|
+
${this._popupOpen ? this._renderPopup() : ''}
|
|
637
|
+
</dialog>
|
|
988
638
|
`;
|
|
989
639
|
}
|
|
990
640
|
}
|
|
991
641
|
|
|
992
642
|
/***/ },
|
|
993
643
|
|
|
994
|
-
/***/
|
|
644
|
+
/***/ 6454
|
|
995
645
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
996
646
|
|
|
997
647
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
998
|
-
/* harmony export */
|
|
648
|
+
/* harmony export */ S: () => (/* binding */ phoneIcon)
|
|
999
649
|
/* harmony export */ });
|
|
1000
|
-
/* harmony import */ var
|
|
1001
|
-
|
|
1002
|
-
|
|
650
|
+
/* harmony import */ var lit_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6752);
|
|
651
|
+
|
|
652
|
+
const phoneIcon = (0,lit_html__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
653
|
+
<svg xmlns="http://www.w3.org/2000/svg"
|
|
654
|
+
viewBox="0 0 12 7"
|
|
655
|
+
fill="none"
|
|
656
|
+
>
|
|
657
|
+
<path d="M0.679688 0.678955L5.50729 5.50656L10.3349 0.678955" stroke="#6A7282" stroke-width="1.35776" stroke-linecap="round" stroke-linejoin="round"/>
|
|
658
|
+
</svg>
|
|
659
|
+
`;
|
|
1003
660
|
|
|
661
|
+
/***/ },
|
|
1004
662
|
|
|
663
|
+
/***/ 2167
|
|
664
|
+
(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
1005
665
|
|
|
1006
|
-
|
|
666
|
+
/* harmony import */ var _LoginButton__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4614);
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
const LOGIN_BUTTON_TAG_NAME = 'solid-ui-login-button';
|
|
670
|
+
if (!customElements.get(LOGIN_BUTTON_TAG_NAME)) {
|
|
671
|
+
customElements.define(LOGIN_BUTTON_TAG_NAME, _LoginButton__WEBPACK_IMPORTED_MODULE_0__/* .LoginButton */ .M);
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
/***/ },
|
|
675
|
+
|
|
676
|
+
/***/ 8228
|
|
677
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
678
|
+
|
|
679
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
680
|
+
/* harmony export */ X: () => (/* binding */ SignupButton)
|
|
681
|
+
/* harmony export */ });
|
|
682
|
+
/* harmony import */ var lit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6161);
|
|
683
|
+
|
|
684
|
+
const DEFAULT_SIGNUP_URL = 'https://solidproject.org/get_a_pod';
|
|
685
|
+
class SignupButton extends lit__WEBPACK_IMPORTED_MODULE_0__/* .LitElement */ .WF {
|
|
1007
686
|
static properties = {
|
|
1008
687
|
label: {
|
|
1009
688
|
type: String,
|
|
@@ -1013,9 +692,9 @@ class LoginButton extends lit__WEBPACK_IMPORTED_MODULE_0__/* .LitElement */ .WF
|
|
|
1013
692
|
type: String,
|
|
1014
693
|
reflect: true
|
|
1015
694
|
},
|
|
1016
|
-
|
|
695
|
+
signupUrl: {
|
|
1017
696
|
type: String,
|
|
1018
|
-
attribute: '
|
|
697
|
+
attribute: 'signup-url',
|
|
1019
698
|
reflect: true
|
|
1020
699
|
},
|
|
1021
700
|
icon: {
|
|
@@ -1025,74 +704,32 @@ class LoginButton extends lit__WEBPACK_IMPORTED_MODULE_0__/* .LitElement */ .WF
|
|
|
1025
704
|
layout: {
|
|
1026
705
|
type: String,
|
|
1027
706
|
reflect: true
|
|
1028
|
-
},
|
|
1029
|
-
_popupOpen: {
|
|
1030
|
-
state: true
|
|
1031
|
-
},
|
|
1032
|
-
_issuerInputValue: {
|
|
1033
|
-
state: true
|
|
1034
|
-
},
|
|
1035
|
-
_dropdownOpen: {
|
|
1036
|
-
state: true
|
|
1037
707
|
}
|
|
1038
708
|
};
|
|
1039
709
|
static styles = (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .css */ .AH)`
|
|
1040
|
-
:host {
|
|
710
|
+
:host {
|
|
1041
711
|
display: inline-block;
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
--
|
|
1045
|
-
--login-button-text: var(--color-header-text, #ffffff);
|
|
1046
|
-
--popup-background: var(--color-background, #F8F9FB);
|
|
1047
|
-
--popup-text: var(--color-text, #1A1A1A);
|
|
1048
|
-
--popup-border: var(--color-border, #E5E7EB);
|
|
1049
|
-
--popup-shadow: var(--box-shadow-sm, 0 1px 4px rgba(124,77,255,0.12));
|
|
1050
|
-
--popup-overlay-background: rgba(0, 0, 0, 0.6);
|
|
1051
|
-
--issuer-input-background: var(--color-background, #F8F9FB);
|
|
1052
|
-
--issuer-input-text: var(--color-text, #1A1A1A);
|
|
1053
|
-
--issuer-input-border: var(--color-text, #1A1A1A);
|
|
1054
|
-
--issuer-button-background: var(--color-background, #F8F9FB);
|
|
1055
|
-
--issuer-button-text: var(--color-text, #1A1A1A);
|
|
1056
|
-
--issuer-button-border: var(--color-border, #E5E7EB);
|
|
1057
|
-
--issuer-button-hover-background: var(--lavender-900, #7c4cff);
|
|
1058
|
-
--issuer-label-color: var(--grey-purple-700, #1A1A1A);
|
|
1059
|
-
--issuer-placeholder-color: var(--grey-purple-700, #5e546d);;
|
|
1060
|
-
--error-text-color: var(--color-error, #B00020);
|
|
712
|
+
--signup-button-background: transparent;
|
|
713
|
+
--signup-button-border: var(--color-border, #E5E7EB);
|
|
714
|
+
--signup-button-text: var(--color-header-text, #ffffff);
|
|
1061
715
|
}
|
|
1062
716
|
|
|
1063
717
|
:host([theme='dark']) {
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
--login-button-background: var(--lavender-900, #7c4cff);
|
|
1068
|
-
--login-button-text: var(--color-header-text, #ffffff);
|
|
1069
|
-
--popup-background: var(--color-background, #F8F9FB);
|
|
1070
|
-
--popup-text: var(--color-text, #1A1A1A);
|
|
1071
|
-
--popup-border: var(--color-border, #E5E7EB);
|
|
1072
|
-
--popup-shadow: var(--box-shadow-sm, 0 1px 4px rgba(124,77,255,0.12));
|
|
1073
|
-
--popup-overlay-background: rgba(0, 0, 0, 0.6);
|
|
1074
|
-
--issuer-input-background: var(--color-background, #F8F9FB);
|
|
1075
|
-
--issuer-input-text: var(--color-text, #1A1A1A);
|
|
1076
|
-
--issuer-input-border: var(--color-text, #1A1A1A);
|
|
1077
|
-
--issuer-button-background: var(--color-background, #F8F9FB);
|
|
1078
|
-
--issuer-button-text: var(--color-text, #1A1A1A);
|
|
1079
|
-
--issuer-button-border: var(--color-text, #1A1A1A);
|
|
1080
|
-
--issuer-button-hover-background: var(--lavender-900, #7c4cff);
|
|
1081
|
-
--issuer-label-color: var(--grey-purple-700, #1A1A1A);
|
|
1082
|
-
--issuer-placeholder-color: var(--grey-purple-700, #5e546d);;
|
|
1083
|
-
--error-text-color: var(--color-error, #B00020);
|
|
718
|
+
--signup-button-background: transparent;
|
|
719
|
+
--signup-button-border: var(--color-border, #E5E7EB);
|
|
720
|
+
--signup-button-text: var(--color-header-text, #ffffff);
|
|
1084
721
|
}
|
|
1085
722
|
|
|
1086
|
-
.
|
|
723
|
+
.signup-button {
|
|
1087
724
|
display: flex;
|
|
1088
725
|
height: 35px;
|
|
1089
726
|
padding: var(--spacing-xxs, 0.3125rem) var(--spacing-xs, 0.75rem);
|
|
1090
727
|
align-items: center;
|
|
1091
728
|
gap: var(--spacing-xxs, 0.3125rem);
|
|
1092
729
|
border-radius: var(--border-radius-base, 0.3125rem);
|
|
1093
|
-
background: var(--
|
|
1094
|
-
border:
|
|
1095
|
-
color: var(--
|
|
730
|
+
background: var(--signup-button-background);
|
|
731
|
+
border: 1px solid var(--signup-button-border);
|
|
732
|
+
color: var(--signup-button-text);
|
|
1096
733
|
cursor: pointer;
|
|
1097
734
|
font: inherit;
|
|
1098
735
|
line-height: 1;
|
|
@@ -1102,572 +739,977 @@ class LoginButton extends lit__WEBPACK_IMPORTED_MODULE_0__/* .LitElement */ .WF
|
|
|
1102
739
|
transition: transform 0.2s ease;
|
|
1103
740
|
}
|
|
1104
741
|
|
|
1105
|
-
.
|
|
742
|
+
:host([layout='mobile']) .signup-button {
|
|
743
|
+
border: none;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
.signup-button-icon {
|
|
1106
747
|
width: 16px;
|
|
1107
748
|
height: 16px;
|
|
1108
749
|
display: inline-block;
|
|
1109
750
|
object-fit: contain;
|
|
1110
751
|
}
|
|
1111
752
|
|
|
1112
|
-
.
|
|
753
|
+
.signup-button:active {
|
|
1113
754
|
transform: translateY(1px);
|
|
1114
755
|
}
|
|
756
|
+
`;
|
|
757
|
+
constructor() {
|
|
758
|
+
super();
|
|
759
|
+
this.label = 'Sign Up';
|
|
760
|
+
this.signupUrl = DEFAULT_SIGNUP_URL;
|
|
761
|
+
this.theme = 'light';
|
|
762
|
+
this.icon = '';
|
|
763
|
+
this.layout = 'desktop';
|
|
764
|
+
}
|
|
765
|
+
_handleClick() {
|
|
766
|
+
window.open(this.signupUrl, '_blank', 'noopener,noreferrer');
|
|
767
|
+
}
|
|
768
|
+
render() {
|
|
769
|
+
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
770
|
+
<button
|
|
771
|
+
class="signup-button"
|
|
772
|
+
type="button"
|
|
773
|
+
part="signup-button"
|
|
774
|
+
@click="${() => this._handleClick()}"
|
|
775
|
+
>
|
|
776
|
+
${this.icon ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`<img class="signup-button-icon" src="${this.icon}" alt="" aria-hidden="true" part="signup-button-icon" />` : ''}
|
|
777
|
+
<slot>${this.label}</slot>
|
|
778
|
+
</button>
|
|
779
|
+
`;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
1115
782
|
|
|
1116
|
-
|
|
1117
|
-
border: none;
|
|
1118
|
-
padding: 0;
|
|
1119
|
-
background: transparent;
|
|
1120
|
-
outline: none;
|
|
1121
|
-
overflow: visible;
|
|
1122
|
-
max-height: none;
|
|
1123
|
-
max-width: none;
|
|
1124
|
-
}
|
|
783
|
+
/***/ },
|
|
1125
784
|
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
}
|
|
785
|
+
/***/ 8005
|
|
786
|
+
(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
1129
787
|
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
788
|
+
/* harmony import */ var _SignupButton__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8228);
|
|
789
|
+
|
|
790
|
+
|
|
791
|
+
const SIGNUP_BUTTON_TAG_NAME = 'solid-ui-signup-button';
|
|
792
|
+
if (!customElements.get(SIGNUP_BUTTON_TAG_NAME)) {
|
|
793
|
+
customElements.define(SIGNUP_BUTTON_TAG_NAME, _SignupButton__WEBPACK_IMPORTED_MODULE_0__/* .SignupButton */ .X);
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
/***/ },
|
|
797
|
+
|
|
798
|
+
/***/ 1166
|
|
799
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
800
|
+
|
|
801
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
802
|
+
/* harmony export */ Y: () => (/* binding */ Header)
|
|
803
|
+
/* harmony export */ });
|
|
804
|
+
/* harmony import */ var lit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6161);
|
|
805
|
+
/* harmony import */ var _iconBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3378);
|
|
806
|
+
/* harmony import */ var solid_logic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3138);
|
|
807
|
+
/* harmony import */ var _auth_loginButton_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2167);
|
|
808
|
+
/* harmony import */ var _auth_signupButton_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8005);
|
|
809
|
+
/* harmony import */ var lit_directives_if_defined_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1413);
|
|
1139
810
|
|
|
1140
|
-
.popup-top-menu {
|
|
1141
|
-
border-bottom: 1px solid #DDD;
|
|
1142
|
-
display: flex;
|
|
1143
|
-
flex-direction: row;
|
|
1144
|
-
align-items: center;
|
|
1145
|
-
justify-content: space-between;
|
|
1146
|
-
padding-bottom: 8px;
|
|
1147
|
-
margin-bottom: 8px;
|
|
1148
|
-
padding: 1rem;
|
|
1149
|
-
background: var(--gray-200, #E5E7EB);
|
|
1150
|
-
}
|
|
1151
811
|
|
|
1152
|
-
.popup-title {
|
|
1153
|
-
font-weight: 800;
|
|
1154
|
-
}
|
|
1155
812
|
|
|
1156
|
-
.popup-close {
|
|
1157
|
-
background: transparent;
|
|
1158
|
-
border: none;
|
|
1159
|
-
cursor: pointer;
|
|
1160
|
-
font-size: 1.25rem;
|
|
1161
|
-
line-height: 1;
|
|
1162
|
-
padding: 0 0.25rem;
|
|
1163
|
-
}
|
|
1164
813
|
|
|
1165
|
-
.issuer-text-section {
|
|
1166
|
-
display: flex;
|
|
1167
|
-
flex-direction: column;
|
|
1168
|
-
padding: 1rem 1rem 1.75rem;
|
|
1169
|
-
}
|
|
1170
814
|
|
|
1171
|
-
.issuer-text-label {
|
|
1172
|
-
color: var(--issuer-label-color);
|
|
1173
|
-
margin-bottom: 6px;
|
|
1174
|
-
}
|
|
1175
815
|
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
816
|
+
const DEFAULT_HELP_MENU_ICON = '';
|
|
817
|
+
const DEFAULT_SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg';
|
|
818
|
+
const DEFAULT_SIGNUP_URL = 'https://solidproject.org/get_a_pod';
|
|
819
|
+
const DEFAULT_LOGGEDIN_MENU_BUTTON_AVATAR = _iconBase__WEBPACK_IMPORTED_MODULE_1__/* .icons */ .Pt.iconBase + 'emptyProfileAvatar.png';
|
|
820
|
+
class Header extends lit__WEBPACK_IMPORTED_MODULE_0__/* .LitElement */ .WF {
|
|
821
|
+
static properties = {
|
|
822
|
+
logo: {
|
|
823
|
+
type: String,
|
|
824
|
+
reflect: true
|
|
825
|
+
},
|
|
826
|
+
helpIcon: {
|
|
827
|
+
type: String,
|
|
828
|
+
attribute: 'help-icon',
|
|
829
|
+
reflect: true
|
|
830
|
+
},
|
|
831
|
+
layout: {
|
|
832
|
+
type: String,
|
|
833
|
+
reflect: true
|
|
834
|
+
},
|
|
835
|
+
theme: {
|
|
836
|
+
type: String,
|
|
837
|
+
reflect: true
|
|
838
|
+
},
|
|
839
|
+
brandLink: {
|
|
840
|
+
type: String,
|
|
841
|
+
attribute: 'brand-link',
|
|
842
|
+
reflect: true
|
|
843
|
+
},
|
|
844
|
+
authState: {
|
|
845
|
+
type: String,
|
|
846
|
+
attribute: 'auth-state',
|
|
847
|
+
reflect: true
|
|
848
|
+
},
|
|
849
|
+
loginAction: {
|
|
850
|
+
type: Object,
|
|
851
|
+
attribute: false
|
|
852
|
+
},
|
|
853
|
+
signUpAction: {
|
|
854
|
+
type: Object,
|
|
855
|
+
attribute: false
|
|
856
|
+
},
|
|
857
|
+
accountMenu: {
|
|
858
|
+
type: Array,
|
|
859
|
+
attribute: false
|
|
860
|
+
},
|
|
861
|
+
logoutLabel: {
|
|
862
|
+
type: String,
|
|
863
|
+
attribute: 'logout-label',
|
|
864
|
+
reflect: true
|
|
865
|
+
},
|
|
866
|
+
logoutIcon: {
|
|
867
|
+
type: String,
|
|
868
|
+
attribute: 'logout-icon',
|
|
869
|
+
reflect: true
|
|
870
|
+
},
|
|
871
|
+
accountIcon: {
|
|
872
|
+
type: String,
|
|
873
|
+
attribute: 'account-icon',
|
|
874
|
+
reflect: true
|
|
875
|
+
},
|
|
876
|
+
accountAvatar: {
|
|
877
|
+
type: String,
|
|
878
|
+
attribute: 'account-avatar',
|
|
879
|
+
reflect: true
|
|
880
|
+
},
|
|
881
|
+
accountAvatarFallback: {
|
|
882
|
+
type: String,
|
|
883
|
+
attribute: 'account-avatar-fallback',
|
|
884
|
+
reflect: true
|
|
885
|
+
},
|
|
886
|
+
loginIcon: {
|
|
887
|
+
type: String,
|
|
888
|
+
attribute: 'login-icon',
|
|
889
|
+
reflect: true
|
|
890
|
+
},
|
|
891
|
+
signUpIcon: {
|
|
892
|
+
type: String,
|
|
893
|
+
attribute: 'sign-up-icon',
|
|
894
|
+
reflect: true
|
|
895
|
+
},
|
|
896
|
+
helpMenuList: {
|
|
897
|
+
type: Array
|
|
898
|
+
},
|
|
899
|
+
accountMenuOpen: {
|
|
900
|
+
state: true
|
|
901
|
+
},
|
|
902
|
+
helpMenuOpen: {
|
|
903
|
+
state: true
|
|
904
|
+
},
|
|
905
|
+
hasSlottedAccountMenu: {
|
|
906
|
+
state: true
|
|
907
|
+
},
|
|
908
|
+
hasSlottedHelpMenu: {
|
|
909
|
+
state: true
|
|
1181
910
|
}
|
|
911
|
+
};
|
|
912
|
+
static styles = (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .css */ .AH)`
|
|
913
|
+
:host { /* default theme */
|
|
914
|
+
display: block;
|
|
915
|
+
--header-bg: var(--color-header-row-bg, #332746);
|
|
916
|
+
--header-text: var(--color-header-text, #ffffff);
|
|
917
|
+
--header-border: var(--color-border, #efecf3);
|
|
918
|
+
--header-line: var(--color-header-menu-separator-line, #5e546d);
|
|
919
|
+
--header-link: var(--color-text-heading, #000000);
|
|
920
|
+
--header-menu-item-hover: var(--color-header-menu-item-hover, #e6dcff);
|
|
921
|
+
--header-menu-item-selected: var(--color-header-menu-item-selected, #cbb9ff);
|
|
922
|
+
--header-menu-bg: var(--color-menu-bg, #f6f5f9);
|
|
923
|
+
--header-menu-loggedin-bg: var(--color-header-menu-loggedin-bg, #5e546d);
|
|
924
|
+
--header-menu-text: var(--color-menu-item-text, #654d6c);
|
|
925
|
+
--header-border-radius: var(--border-radius-sm, 0.2rem);
|
|
926
|
+
--header-button-bg: var(--color-menu-bg, #ffffff);
|
|
927
|
+
--header-button-text: var(--color-header-button-text, #0F172B);
|
|
928
|
+
--header-button-detail-text: var(--color-header-button-detail-text, #99A1AF);
|
|
929
|
+
--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));
|
|
930
|
+
font-family: var(--font-family-base, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif);
|
|
931
|
+
}
|
|
1182
932
|
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
933
|
+
/* for now light and dark are the same */
|
|
934
|
+
:host([theme='dark']) {
|
|
935
|
+
display: block;
|
|
936
|
+
--header-bg: var(--color-header-row-bg, #332746);
|
|
937
|
+
--header-text: var(--color-header-text, #ffffff);
|
|
938
|
+
--header-border: var(--color-border, #efecf3);
|
|
939
|
+
--header-line: var(--color-header-menu-separator-line, #5e546d);
|
|
940
|
+
--header-link: var(--color-text-heading, #000000);
|
|
941
|
+
--header-menu-item-hover: var(--color-header-menu-item-hover, #e6dcff);
|
|
942
|
+
--header-menu-item-selected: var(--color-header-menu-item-selected, #cbb9ff);
|
|
943
|
+
--header-menu-bg: var(--color-menu-bg, #f6f5f9);
|
|
944
|
+
--header-menu-loggedin-bg: var(--color-header-menu-loggedin-bg, #5e546d);
|
|
945
|
+
--header-menu-text: var(--color-menu-item-text, #654d6c);
|
|
946
|
+
--header-border-radius: var(--border-radius-sm, 0.2rem);
|
|
947
|
+
--header-button-bg: var(--color-menu-bg, #ffffff);
|
|
948
|
+
--header-button-text: var(--color-header-button-text, #0f172a);
|
|
949
|
+
--header-button-detail-text: var(--color-header-button-detail-text, #878192);
|
|
950
|
+
--header-icon-filter: invert(1) brightness(1.3); /* special way to invert SVG color of icons, from white to black */
|
|
951
|
+
--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));
|
|
952
|
+
font-family: var(--font-family-base, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif);
|
|
953
|
+
}
|
|
1190
954
|
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
955
|
+
:host([layout='mobile']) .headerInner {
|
|
956
|
+
flex-wrap: wrap;
|
|
957
|
+
text-align: center;
|
|
958
|
+
gap: 0.5rem;
|
|
959
|
+
}
|
|
1196
960
|
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
}
|
|
961
|
+
.headerInner {
|
|
962
|
+
display: flex;
|
|
963
|
+
align-items: center;
|
|
964
|
+
justify-content: space-between;
|
|
965
|
+
background: var(--header-bg);
|
|
966
|
+
color: var(--header-text);
|
|
967
|
+
padding: 0 1.5rem;
|
|
968
|
+
height: 3.75rem;
|
|
969
|
+
}
|
|
1207
970
|
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
971
|
+
::slotted([slot='navigation-toggle']) {
|
|
972
|
+
display: inline-flex;
|
|
973
|
+
align-items: center;
|
|
974
|
+
justify-content: center;
|
|
975
|
+
flex-shrink: 0;
|
|
976
|
+
margin-right: 0.75rem;
|
|
977
|
+
}
|
|
1211
978
|
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
top: 50%;
|
|
1216
|
-
transform: translateY(-50%);
|
|
1217
|
-
width: 26px;
|
|
1218
|
-
height: 26px;
|
|
1219
|
-
padding: 0;
|
|
1220
|
-
border: none;
|
|
1221
|
-
background: transparent;
|
|
1222
|
-
cursor: pointer;
|
|
1223
|
-
display: flex;
|
|
1224
|
-
align-items: center;
|
|
1225
|
-
justify-content: center;
|
|
1226
|
-
flex-shrink: 0;
|
|
1227
|
-
border-radius: var(--border-radius-base, 0.3125rem);
|
|
1228
|
-
}
|
|
979
|
+
:host([layout='desktop']) ::slotted([slot='navigation-toggle']) {
|
|
980
|
+
display: none !important;
|
|
981
|
+
}
|
|
1229
982
|
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
983
|
+
.brand {
|
|
984
|
+
display: flex;
|
|
985
|
+
align-items: center;
|
|
986
|
+
gap: 0.5rem;
|
|
987
|
+
text-decoration: none;
|
|
988
|
+
color: inherit;
|
|
989
|
+
}
|
|
1233
990
|
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
display: block;
|
|
1238
|
-
}
|
|
991
|
+
.brand-not-displayed {
|
|
992
|
+
display: none;
|
|
993
|
+
}
|
|
1239
994
|
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
border: 1px solid var(--color-border, #E5E7EB);
|
|
1246
|
-
border-top: none;
|
|
1247
|
-
border-radius: 0 0 var(--border-radius-base, 0.3125rem) var(--border-radius-base, 0.3125rem);
|
|
1248
|
-
background: var(--issuer-input-background);
|
|
1249
|
-
overflow: visible;
|
|
1250
|
-
z-index: 10;
|
|
1251
|
-
box-shadow: 0 4px 12px rgba(124, 77, 255, 0.12);
|
|
1252
|
-
}
|
|
995
|
+
.brand img {
|
|
996
|
+
height: 50px;
|
|
997
|
+
width: 55px;
|
|
998
|
+
object-fit: contain;
|
|
999
|
+
}
|
|
1253
1000
|
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
background: transparent;
|
|
1261
|
-
color: var(--issuer-button-text);
|
|
1262
|
-
cursor: pointer;
|
|
1263
|
-
font: inherit;
|
|
1264
|
-
text-align: left;
|
|
1265
|
-
box-sizing: border-box;
|
|
1266
|
-
}
|
|
1001
|
+
.menu {
|
|
1002
|
+
display: flex;
|
|
1003
|
+
align-items: center;
|
|
1004
|
+
gap: 0.625rem;
|
|
1005
|
+
margin-left: auto;
|
|
1006
|
+
}
|
|
1267
1007
|
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1008
|
+
.auth-actions {
|
|
1009
|
+
display: flex;
|
|
1010
|
+
align-items: center;
|
|
1011
|
+
gap: 0.625rem;
|
|
1012
|
+
}
|
|
1271
1013
|
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1014
|
+
.auth-button {
|
|
1015
|
+
display: inline-flex;
|
|
1016
|
+
align-items: center;
|
|
1017
|
+
justify-content: center;
|
|
1018
|
+
gap: 0.5rem;
|
|
1019
|
+
min-height: 2.25rem;
|
|
1020
|
+
padding: 0.5rem 0.875rem;
|
|
1021
|
+
border: 1px solid var(--header-border);
|
|
1022
|
+
border-radius: 999px;
|
|
1023
|
+
background: var(--header-menu-bg);
|
|
1024
|
+
color: var(--header-button-text);
|
|
1025
|
+
cursor: pointer;
|
|
1026
|
+
font: inherit;
|
|
1027
|
+
line-height: 1;
|
|
1028
|
+
text-decoration: none;
|
|
1029
|
+
box-sizing: border-box;
|
|
1030
|
+
transition: border-color 0.2s ease, transform 0.2s ease;
|
|
1031
|
+
}
|
|
1276
1032
|
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
justify-content: center;
|
|
1281
|
-
gap: 8px;
|
|
1282
|
-
padding: 0.75rem 1rem 1rem;
|
|
1283
|
-
}
|
|
1033
|
+
.auth-button:hover {
|
|
1034
|
+
border-color: var(--header-menu-item-hover);
|
|
1035
|
+
}
|
|
1284
1036
|
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
border-top: 1px solid var(--popup-border, #E5E7EB);
|
|
1289
|
-
}
|
|
1037
|
+
.auth-button:active {
|
|
1038
|
+
transform: translateY(1px);
|
|
1039
|
+
}
|
|
1290
1040
|
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
border-radius: var(--border-radius-base, 0.3125rem);
|
|
1295
|
-
background: var(--popup-background);
|
|
1296
|
-
color: #314158;
|
|
1297
|
-
cursor: pointer;
|
|
1298
|
-
font: inherit;
|
|
1299
|
-
}
|
|
1041
|
+
.auth-button-sign-up {
|
|
1042
|
+
background: color-mix(in srgb, var(--header-menu-bg) 78%, var(--header-menu-item-selected) 22%);
|
|
1043
|
+
}
|
|
1300
1044
|
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1045
|
+
.header-menu-separator {
|
|
1046
|
+
background: var(--header-line);
|
|
1047
|
+
width: 1px;
|
|
1048
|
+
height: 2.3rem;
|
|
1049
|
+
}
|
|
1304
1050
|
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
color: #ffffff;
|
|
1311
|
-
cursor: pointer;
|
|
1312
|
-
font: inherit;
|
|
1313
|
-
}
|
|
1051
|
+
.account-menu-container {
|
|
1052
|
+
position: relative;
|
|
1053
|
+
display: flex;
|
|
1054
|
+
align-items: center;
|
|
1055
|
+
}
|
|
1314
1056
|
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1057
|
+
.account-menu-trigger {
|
|
1058
|
+
display: inline-flex;
|
|
1059
|
+
align-items: center;
|
|
1060
|
+
gap: 0.625rem;
|
|
1061
|
+
min-height: 2.5rem;
|
|
1062
|
+
border: 1px solid var(--header-menu-loggedin-bg);
|
|
1063
|
+
border-radius: 999px;
|
|
1064
|
+
background: var(--header-menu-loggedin-bg);
|
|
1065
|
+
color: var(--header-button-text);
|
|
1066
|
+
cursor: pointer;
|
|
1067
|
+
font: inherit;
|
|
1068
|
+
line-height: 1;
|
|
1069
|
+
}
|
|
1318
1070
|
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1071
|
+
:host([layout='mobile']) .account-menu-trigger {
|
|
1072
|
+
gap: 0;
|
|
1073
|
+
min-height: auto;
|
|
1074
|
+
padding: 0;
|
|
1075
|
+
border: 1.5px solid var(--header-border);
|
|
1076
|
+
background: var(--header-menu-loggedin-bg);
|
|
1077
|
+
}
|
|
1323
1078
|
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
font-size: 0.875rem;
|
|
1327
|
-
margin-top: 8px;
|
|
1328
|
-
}
|
|
1329
|
-
`;
|
|
1330
|
-
_issuerInputId = `issuer-url-input-${Math.random().toString(36).slice(2, 10)}`;
|
|
1331
|
-
_errorMsg = '';
|
|
1332
|
-
constructor() {
|
|
1333
|
-
super();
|
|
1334
|
-
this.label = 'Log In';
|
|
1335
|
-
this.theme = 'light';
|
|
1336
|
-
this.issuerUrl = '';
|
|
1337
|
-
this.icon = '';
|
|
1338
|
-
this.layout = 'desktop';
|
|
1339
|
-
this._popupOpen = false;
|
|
1340
|
-
this._issuerInputValue = '';
|
|
1341
|
-
this._dropdownOpen = false;
|
|
1079
|
+
:host([layout='mobile']) .account-menu-trigger-label {
|
|
1080
|
+
display: none;
|
|
1342
1081
|
}
|
|
1343
|
-
|
|
1344
|
-
|
|
1082
|
+
|
|
1083
|
+
.account-menu-trigger:disabled {
|
|
1084
|
+
cursor: default;
|
|
1085
|
+
opacity: 0.7;
|
|
1345
1086
|
}
|
|
1346
|
-
|
|
1347
|
-
|
|
1087
|
+
|
|
1088
|
+
.account-menu-trigger-icon {
|
|
1089
|
+
width: 1rem;
|
|
1090
|
+
height: 1rem;
|
|
1091
|
+
object-fit: contain;
|
|
1092
|
+
flex-shrink: 0;
|
|
1348
1093
|
}
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1094
|
+
|
|
1095
|
+
.account-avatar,
|
|
1096
|
+
.account-menu-avatar {
|
|
1097
|
+
display: inline-flex;
|
|
1098
|
+
align-items: center;
|
|
1099
|
+
justify-content: center;
|
|
1100
|
+
flex-shrink: 0;
|
|
1101
|
+
overflow: hidden;
|
|
1102
|
+
background: color-mix(in srgb, var(--header-bg) 18%, #ded8e7 82%);
|
|
1103
|
+
color: var(--header-button-text);
|
|
1104
|
+
font-size: 0.75rem;
|
|
1105
|
+
font-weight: 600;
|
|
1106
|
+
text-transform: uppercase;
|
|
1358
1107
|
}
|
|
1359
|
-
|
|
1360
|
-
|
|
1108
|
+
|
|
1109
|
+
.account-avatar {
|
|
1110
|
+
width: 1.75rem;
|
|
1111
|
+
height: 1.75rem;
|
|
1112
|
+
border-radius: 999px;
|
|
1113
|
+
border: 1.5px solid var(--header-border);
|
|
1361
1114
|
}
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
} else if (!this._popupOpen && dialog.open) {
|
|
1368
|
-
dialog.close();
|
|
1369
|
-
}
|
|
1115
|
+
|
|
1116
|
+
.account-menu-avatar {
|
|
1117
|
+
width: 2rem;
|
|
1118
|
+
height: 2rem;
|
|
1119
|
+
border-radius: 0.5rem;
|
|
1370
1120
|
}
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
redirectUrl: locationUrl.href,
|
|
1386
|
-
oidcIssuer: issuerUri
|
|
1387
|
-
});
|
|
1388
|
-
} catch (err) {
|
|
1389
|
-
this._errorMsg = err.message || String(err);
|
|
1390
|
-
this.requestUpdate();
|
|
1391
|
-
}
|
|
1121
|
+
|
|
1122
|
+
.account-avatar img,
|
|
1123
|
+
.account-menu-avatar img {
|
|
1124
|
+
width: 100%;
|
|
1125
|
+
height: 100%;
|
|
1126
|
+
object-fit: cover;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
.account-avatar-img {
|
|
1130
|
+
width: 1.75rem;
|
|
1131
|
+
height: 1.75rem;
|
|
1132
|
+
border-radius: 999px;
|
|
1133
|
+
object-fit: cover;
|
|
1134
|
+
background-color: var(--header-border);
|
|
1392
1135
|
}
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1136
|
+
|
|
1137
|
+
.account-dropdown {
|
|
1138
|
+
position: absolute;
|
|
1139
|
+
top: calc(100% + 0.9rem);
|
|
1140
|
+
right: 0;
|
|
1141
|
+
min-width: 15rem;
|
|
1142
|
+
padding: 0.5rem;
|
|
1143
|
+
background: var(--header-button-bg);
|
|
1144
|
+
border: 1px solid var(--header-border);
|
|
1145
|
+
border-radius: var(--header-border-radius);
|
|
1146
|
+
box-shadow: var(--header-shadow);
|
|
1147
|
+
z-index: 10;
|
|
1402
1148
|
}
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1149
|
+
|
|
1150
|
+
.account-dropdown[hidden] {
|
|
1151
|
+
display: none;
|
|
1406
1152
|
}
|
|
1407
|
-
|
|
1408
|
-
|
|
1153
|
+
|
|
1154
|
+
.account-menu-list {
|
|
1155
|
+
list-style: none;
|
|
1156
|
+
margin: 0;
|
|
1157
|
+
padding: 0;
|
|
1158
|
+
display: flex;
|
|
1159
|
+
flex-direction: column;
|
|
1160
|
+
gap: 0.25rem;
|
|
1409
1161
|
}
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1162
|
+
|
|
1163
|
+
.account-menu-item-link,
|
|
1164
|
+
.account-menu-item-button,
|
|
1165
|
+
::slotted([slot='account-menu']) {
|
|
1166
|
+
display: flex;
|
|
1167
|
+
align-items: center;
|
|
1168
|
+
gap: 0.625rem;
|
|
1169
|
+
width: 100%;
|
|
1170
|
+
box-sizing: border-box;
|
|
1171
|
+
color: var(--header-link);
|
|
1172
|
+
text-decoration: none;
|
|
1173
|
+
background: transparent;
|
|
1174
|
+
border: 1px solid transparent;
|
|
1175
|
+
border-radius: 10px;
|
|
1176
|
+
padding: 0.5rem;
|
|
1177
|
+
cursor: pointer;
|
|
1178
|
+
font: inherit;
|
|
1179
|
+
text-align: left;
|
|
1413
1180
|
}
|
|
1414
|
-
|
|
1415
|
-
|
|
1181
|
+
|
|
1182
|
+
.account-menu-item-link:hover,
|
|
1183
|
+
.account-menu-item-button:hover {
|
|
1184
|
+
color: var(--header-link);
|
|
1185
|
+
background: var(--header-menu-item-hover);
|
|
1186
|
+
border-color: var(--header-menu-item-hover);
|
|
1416
1187
|
}
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1188
|
+
|
|
1189
|
+
.account-menu-item-link:active,
|
|
1190
|
+
.account-menu-item-button:active {
|
|
1191
|
+
color: var(--header-link);
|
|
1192
|
+
background: var(--header-menu-item-selected);
|
|
1193
|
+
border-color: var(--header-menu-item-selected);
|
|
1194
|
+
transform: translateY(1px);
|
|
1424
1195
|
}
|
|
1425
|
-
_renderPopup() {
|
|
1426
|
-
const suggestedIssuers = (0,solid_logic__WEBPACK_IMPORTED_MODULE_1__.getSuggestedIssuers)();
|
|
1427
|
-
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1428
|
-
<div class="popup-box">
|
|
1429
|
-
<div class="popup-top-menu">
|
|
1430
|
-
<span class="popup-title">Select an identity provider</span>
|
|
1431
|
-
<button class="popup-close" type="button" aria-label="Close" @click="${() => this._closePopup()}">✕</button>
|
|
1432
|
-
</div>
|
|
1433
1196
|
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
class="issuer-text-input"
|
|
1442
|
-
type="text"
|
|
1443
|
-
placeholder="https://example.com"
|
|
1444
|
-
.value="${this._issuerInputValue}"
|
|
1445
|
-
@input="${this._handleInputChange}"
|
|
1446
|
-
@keydown="${this._handleInputKeydown}"
|
|
1447
|
-
autocomplete="url"
|
|
1448
|
-
/>
|
|
1449
|
-
${suggestedIssuers.length ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1450
|
-
<button
|
|
1451
|
-
class="issuer-dropdown-toggle"
|
|
1452
|
-
type="button"
|
|
1453
|
-
aria-label="Show identity provider suggestions"
|
|
1454
|
-
aria-expanded="${this._dropdownOpen}"
|
|
1455
|
-
@click="${() => this._toggleDropdown()}"
|
|
1456
|
-
>${_downArrow__WEBPACK_IMPORTED_MODULE_2__/* .phoneIcon */ .S}</button>
|
|
1457
|
-
` : ''}
|
|
1458
|
-
</div>
|
|
1459
|
-
${this._dropdownOpen && suggestedIssuers.length ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1460
|
-
<div class="issuer-dropdown-list" role="listbox">
|
|
1461
|
-
${suggestedIssuers.map(issuerInfo => (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1462
|
-
<button
|
|
1463
|
-
class="issuer-dropdown-item"
|
|
1464
|
-
type="button"
|
|
1465
|
-
role="option"
|
|
1466
|
-
@click="${() => this._selectIssuerFromDropdown(issuerInfo.uri)}"
|
|
1467
|
-
>${issuerInfo.name}</button>
|
|
1468
|
-
`)}
|
|
1469
|
-
</div>
|
|
1470
|
-
` : ''}
|
|
1471
|
-
</div>
|
|
1472
|
-
</div>
|
|
1473
|
-
${this._errorMsg ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`<div class="error-msg">${this._errorMsg}</div>` : ''}
|
|
1474
|
-
</div>
|
|
1475
|
-
<hr class="popup-footer-hr" />
|
|
1476
|
-
<div class="popup-footer">
|
|
1477
|
-
<button class="popup-cancel-button" type="button" @click="${() => this._closePopup()}">Cancel</button>
|
|
1478
|
-
<button
|
|
1479
|
-
class="popup-login-button"
|
|
1480
|
-
type="button"
|
|
1481
|
-
?disabled="${!this._issuerInputValue}"
|
|
1482
|
-
@click="${() => this._handleGoClick()}"
|
|
1483
|
-
>Log In</button>
|
|
1484
|
-
</div>
|
|
1485
|
-
</div>
|
|
1486
|
-
`;
|
|
1197
|
+
.account-switch {
|
|
1198
|
+
display: block;
|
|
1199
|
+
width: 100%;
|
|
1200
|
+
color: var(--header-menu-text);
|
|
1201
|
+
text-align: left;
|
|
1202
|
+
text-transform: uppercase;
|
|
1203
|
+
font-size: 80%;
|
|
1487
1204
|
}
|
|
1488
|
-
render() {
|
|
1489
|
-
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1490
|
-
<button
|
|
1491
|
-
class="login-button"
|
|
1492
|
-
type="button"
|
|
1493
|
-
part="login-button"
|
|
1494
|
-
@click="${() => this._openPopup()}"
|
|
1495
|
-
>
|
|
1496
|
-
${this.icon ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`<img class="login-button-icon" src="${this.icon}" alt="" aria-hidden="true" part="login-button-icon" />` : ''}
|
|
1497
|
-
<slot>${this.label}</slot>
|
|
1498
|
-
</button>
|
|
1499
1205
|
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
e.preventDefault();
|
|
1507
|
-
this._closePopup();
|
|
1508
|
-
}}"
|
|
1509
|
-
@click="${e => {
|
|
1510
|
-
if (e.target === e.currentTarget) this._closePopup();
|
|
1511
|
-
}}"
|
|
1512
|
-
>
|
|
1513
|
-
${this._popupOpen ? this._renderPopup() : ''}
|
|
1514
|
-
</dialog>
|
|
1515
|
-
`;
|
|
1206
|
+
.dropdown-menu-separator {
|
|
1207
|
+
display: block;
|
|
1208
|
+
width: calc(100% + 1rem);
|
|
1209
|
+
margin: 0.5rem -0.5rem;
|
|
1210
|
+
border: 0;
|
|
1211
|
+
border-top: 1px solid var(--header-border);
|
|
1516
1212
|
}
|
|
1517
|
-
}
|
|
1518
1213
|
|
|
1519
|
-
|
|
1214
|
+
.account-menu-copy {
|
|
1215
|
+
display: flex;
|
|
1216
|
+
flex-direction: column;
|
|
1217
|
+
min-width: 0;
|
|
1218
|
+
}
|
|
1520
1219
|
|
|
1521
|
-
|
|
1522
|
-
(
|
|
1220
|
+
.account-menu-label {
|
|
1221
|
+
color: var(--header-button-text);
|
|
1222
|
+
overflow: hidden;
|
|
1223
|
+
text-overflow: ellipsis;
|
|
1224
|
+
white-space: nowrap;
|
|
1225
|
+
}
|
|
1523
1226
|
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1227
|
+
.account-menu-webid {
|
|
1228
|
+
color: var(--header-button-detail-text);
|
|
1229
|
+
font-size: 0.5rem;
|
|
1230
|
+
overflow: hidden;
|
|
1231
|
+
text-overflow: ellipsis;
|
|
1232
|
+
white-space: nowrap;
|
|
1233
|
+
}
|
|
1528
1234
|
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
</svg>
|
|
1536
|
-
`;
|
|
1235
|
+
.help-menu-container {
|
|
1236
|
+
position: relative;
|
|
1237
|
+
display: flex;
|
|
1238
|
+
align-items: center;
|
|
1239
|
+
background: transparent;
|
|
1240
|
+
}
|
|
1537
1241
|
|
|
1538
|
-
|
|
1242
|
+
.help-menu-trigger {
|
|
1243
|
+
display: inline-flex;
|
|
1244
|
+
align-items: center;
|
|
1245
|
+
justify-content: center;
|
|
1246
|
+
padding: 0;
|
|
1247
|
+
border: 0;
|
|
1248
|
+
background: transparent;
|
|
1249
|
+
cursor: pointer;
|
|
1250
|
+
}
|
|
1539
1251
|
|
|
1540
|
-
|
|
1541
|
-
|
|
1252
|
+
.help-menu-trigger:disabled {
|
|
1253
|
+
cursor: default;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
.help-dropdown {
|
|
1257
|
+
position: absolute;
|
|
1258
|
+
top: calc(100% + 0.9rem);
|
|
1259
|
+
right: 0;
|
|
1260
|
+
min-width: 12rem;
|
|
1261
|
+
padding: 0.5rem;
|
|
1262
|
+
background: var(--header-button-bg);
|
|
1263
|
+
border: 1px solid var(--header-border);
|
|
1264
|
+
border-radius: var(--header-border-radius);
|
|
1265
|
+
box-shadow: var(--header-shadow);
|
|
1266
|
+
z-index: 10;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
.help-dropdown[hidden] {
|
|
1270
|
+
display: none;
|
|
1271
|
+
}
|
|
1542
1272
|
|
|
1543
|
-
|
|
1273
|
+
.help-dropdown-content {
|
|
1274
|
+
display: flex;
|
|
1275
|
+
flex-direction: column;
|
|
1276
|
+
gap: 0.25rem;
|
|
1277
|
+
}
|
|
1544
1278
|
|
|
1279
|
+
.help-menu-list {
|
|
1280
|
+
list-style: none;
|
|
1281
|
+
margin: 0;
|
|
1282
|
+
padding: 0;
|
|
1283
|
+
display: flex;
|
|
1284
|
+
flex-direction: column;
|
|
1285
|
+
gap: 0.25rem;
|
|
1286
|
+
}
|
|
1545
1287
|
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1288
|
+
.help-menu-list a,
|
|
1289
|
+
.help-menu-list button,
|
|
1290
|
+
::slotted([slot='help-menu']) {
|
|
1291
|
+
display: block;
|
|
1292
|
+
width: 100%;
|
|
1293
|
+
box-sizing: border-box;
|
|
1294
|
+
color: var(--header-link);
|
|
1295
|
+
text-decoration: none;
|
|
1296
|
+
background: transparent;
|
|
1297
|
+
border: 1px solid transparent;
|
|
1298
|
+
border-radius: 4px;
|
|
1299
|
+
padding: 0.375rem 0.5rem;
|
|
1300
|
+
cursor: pointer;
|
|
1301
|
+
font: inherit;
|
|
1302
|
+
text-align: left;
|
|
1303
|
+
}
|
|
1550
1304
|
|
|
1551
|
-
|
|
1305
|
+
.help-menu-list a:hover,
|
|
1306
|
+
.help-menu-list button:hover {
|
|
1307
|
+
color: var(--header-link);
|
|
1308
|
+
background: var(--header-menu-item-hover);
|
|
1309
|
+
border-color: var(--header-menu-item-hover);
|
|
1310
|
+
}
|
|
1552
1311
|
|
|
1553
|
-
|
|
1554
|
-
|
|
1312
|
+
.help-menu-list a:active,
|
|
1313
|
+
.help-menu-list button:active {
|
|
1314
|
+
color: var(--header-link);
|
|
1315
|
+
background: var(--header-menu-item-selected);
|
|
1316
|
+
border-color: var(--header-menu-item-selected);
|
|
1317
|
+
transform: translateY(1px);
|
|
1318
|
+
}
|
|
1555
1319
|
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1320
|
+
::slotted(a), ::slotted(button) {
|
|
1321
|
+
color: var(--header-link);
|
|
1322
|
+
text-decoration: none;
|
|
1323
|
+
background: var(--header-button-bg);
|
|
1324
|
+
border: 1px solid var(--header-border);
|
|
1325
|
+
border-radius: 4px;
|
|
1326
|
+
padding: 0.25rem 0.5rem;
|
|
1327
|
+
cursor: pointer;
|
|
1328
|
+
font: inherit;
|
|
1329
|
+
}
|
|
1560
1330
|
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
reflect: true
|
|
1567
|
-
},
|
|
1568
|
-
theme: {
|
|
1569
|
-
type: String,
|
|
1570
|
-
reflect: true
|
|
1571
|
-
},
|
|
1572
|
-
signupUrl: {
|
|
1573
|
-
type: String,
|
|
1574
|
-
attribute: 'signup-url',
|
|
1575
|
-
reflect: true
|
|
1576
|
-
},
|
|
1577
|
-
icon: {
|
|
1578
|
-
type: String,
|
|
1579
|
-
reflect: true
|
|
1580
|
-
},
|
|
1581
|
-
layout: {
|
|
1582
|
-
type: String,
|
|
1583
|
-
reflect: true
|
|
1584
|
-
}
|
|
1585
|
-
};
|
|
1586
|
-
static styles = (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .css */ .AH)`
|
|
1587
|
-
:host {
|
|
1588
|
-
display: inline-block;
|
|
1589
|
-
--signup-button-background: transparent;
|
|
1590
|
-
--signup-button-border: var(--color-border, #E5E7EB);
|
|
1591
|
-
--signup-button-text: var(--color-header-text, #ffffff);
|
|
1592
|
-
}
|
|
1331
|
+
.help-icon {
|
|
1332
|
+
width: 35px;
|
|
1333
|
+
height: 35px;
|
|
1334
|
+
cursor: pointer;
|
|
1335
|
+
}
|
|
1593
1336
|
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
}
|
|
1337
|
+
.help-text {
|
|
1338
|
+
color: var(--header-text, #ffffff);
|
|
1339
|
+
font: inherit;
|
|
1340
|
+
}
|
|
1599
1341
|
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1342
|
+
.logout-action-icon {
|
|
1343
|
+
width: 16px;
|
|
1344
|
+
height: 16px;
|
|
1345
|
+
display: inline-block;
|
|
1346
|
+
object-fit: contain;
|
|
1347
|
+
margin-right: 0.5rem;
|
|
1348
|
+
}
|
|
1349
|
+
`;
|
|
1350
|
+
constructor() {
|
|
1351
|
+
super();
|
|
1352
|
+
this.logo = DEFAULT_SOLID_ICON_URL;
|
|
1353
|
+
this.helpIcon = DEFAULT_HELP_MENU_ICON;
|
|
1354
|
+
this.layout = 'desktop';
|
|
1355
|
+
this.theme = 'light';
|
|
1356
|
+
this.brandLink = '#';
|
|
1357
|
+
this.authState = 'logged-out';
|
|
1358
|
+
this.loginAction = {
|
|
1359
|
+
label: 'Log In',
|
|
1360
|
+
action: 'login'
|
|
1361
|
+
};
|
|
1362
|
+
this.signUpAction = {
|
|
1363
|
+
label: 'Sign Up',
|
|
1364
|
+
action: 'sign-up',
|
|
1365
|
+
url: DEFAULT_SIGNUP_URL
|
|
1366
|
+
};
|
|
1367
|
+
this.accountMenu = [];
|
|
1368
|
+
this.logoutLabel = 'Log Out';
|
|
1369
|
+
this.logoutIcon = '';
|
|
1370
|
+
this.accountIcon = '▼';
|
|
1371
|
+
this.accountAvatar = '';
|
|
1372
|
+
this.accountAvatarFallback = '';
|
|
1373
|
+
this.loginIcon = '';
|
|
1374
|
+
this.signUpIcon = '';
|
|
1375
|
+
this.helpMenuList = [];
|
|
1376
|
+
this.accountMenuOpen = false;
|
|
1377
|
+
this.helpMenuOpen = false;
|
|
1378
|
+
this.hasSlottedAccountMenu = false;
|
|
1379
|
+
this.hasSlottedHelpMenu = false;
|
|
1380
|
+
}
|
|
1381
|
+
connectedCallback() {
|
|
1382
|
+
super.connectedCallback();
|
|
1383
|
+
document.addEventListener('click', this.handleDocumentClick);
|
|
1384
|
+
window.addEventListener('keydown', this.handleWindowKeydown);
|
|
1385
|
+
}
|
|
1386
|
+
disconnectedCallback() {
|
|
1387
|
+
document.removeEventListener('click', this.handleDocumentClick);
|
|
1388
|
+
window.removeEventListener('keydown', this.handleWindowKeydown);
|
|
1389
|
+
super.disconnectedCallback();
|
|
1390
|
+
}
|
|
1391
|
+
handleHelpMenuClick(item, event) {
|
|
1392
|
+
event.preventDefault();
|
|
1393
|
+
this.helpMenuOpen = false;
|
|
1394
|
+
this.dispatchEvent(new CustomEvent('help-menu-select', {
|
|
1395
|
+
detail: item,
|
|
1396
|
+
bubbles: true,
|
|
1397
|
+
composed: true
|
|
1398
|
+
}));
|
|
1399
|
+
if (item.url) {
|
|
1400
|
+
const target = item.target || '_blank';
|
|
1401
|
+
const features = target === '_blank' ? 'noopener,noreferrer' : undefined;
|
|
1402
|
+
window.open(item.url, target, features);
|
|
1617
1403
|
}
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1404
|
+
}
|
|
1405
|
+
handleAccountMenuClick(item) {
|
|
1406
|
+
this.accountMenuOpen = false;
|
|
1407
|
+
this.dispatchEvent(new CustomEvent('account-menu-select', {
|
|
1408
|
+
detail: item,
|
|
1409
|
+
bubbles: true,
|
|
1410
|
+
composed: true
|
|
1411
|
+
}));
|
|
1412
|
+
}
|
|
1413
|
+
handleDocumentClick = event => {
|
|
1414
|
+
if (!event.composedPath().includes(this)) {
|
|
1415
|
+
this.accountMenuOpen = false;
|
|
1416
|
+
this.helpMenuOpen = false;
|
|
1621
1417
|
}
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
object-fit: contain;
|
|
1418
|
+
};
|
|
1419
|
+
handleWindowKeydown = event => {
|
|
1420
|
+
if (event.key === 'Escape' && (this.accountMenuOpen || this.helpMenuOpen)) {
|
|
1421
|
+
this.accountMenuOpen = false;
|
|
1422
|
+
this.helpMenuOpen = false;
|
|
1628
1423
|
}
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1424
|
+
};
|
|
1425
|
+
handleAccountSlotChange(event) {
|
|
1426
|
+
const slot = event.target;
|
|
1427
|
+
this.hasSlottedAccountMenu = slot.assignedElements({
|
|
1428
|
+
flatten: true
|
|
1429
|
+
}).length > 0;
|
|
1430
|
+
}
|
|
1431
|
+
handleHelpSlotChange(event) {
|
|
1432
|
+
const slot = event.target;
|
|
1433
|
+
this.hasSlottedHelpMenu = slot.assignedElements({
|
|
1434
|
+
flatten: true
|
|
1435
|
+
}).length > 0;
|
|
1436
|
+
}
|
|
1437
|
+
toggleAccountMenu(event) {
|
|
1438
|
+
event.preventDefault();
|
|
1439
|
+
if (!this.hasAccountMenuItems()) return;
|
|
1440
|
+
this.helpMenuOpen = false;
|
|
1441
|
+
this.accountMenuOpen = !this.accountMenuOpen;
|
|
1442
|
+
}
|
|
1443
|
+
toggleHelpMenu(event) {
|
|
1444
|
+
event.preventDefault();
|
|
1445
|
+
if (!this.hasHelpMenuItems()) return;
|
|
1446
|
+
this.accountMenuOpen = false;
|
|
1447
|
+
this.helpMenuOpen = !this.helpMenuOpen;
|
|
1448
|
+
}
|
|
1449
|
+
hasAccountMenuItems() {
|
|
1450
|
+
return Boolean(this.accountMenu?.length || this.hasSlottedAccountMenu || this.logoutLabel);
|
|
1451
|
+
}
|
|
1452
|
+
hasHelpMenuItems() {
|
|
1453
|
+
return Boolean(this.helpMenuList?.length || this.hasSlottedHelpMenu);
|
|
1454
|
+
}
|
|
1455
|
+
shouldRenderHelpMenu() {
|
|
1456
|
+
return this.layout !== 'mobile' && this.hasHelpMenuItems();
|
|
1457
|
+
}
|
|
1458
|
+
renderLoggedInAvatar(avatar, wrapperClass = 'account-avatar') {
|
|
1459
|
+
const hasAvatar = Boolean(avatar);
|
|
1460
|
+
const imageSrc = hasAvatar ? avatar : this.accountAvatarFallback || DEFAULT_LOGGEDIN_MENU_BUTTON_AVATAR;
|
|
1461
|
+
const imageAlt = hasAvatar ? 'Profile Avatar' : 'Default Avatar';
|
|
1462
|
+
if (this.layout === 'mobile' && wrapperClass === 'account-avatar') {
|
|
1463
|
+
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`<img class="account-avatar-img" src="${imageSrc}" alt="${imageAlt}" />`;
|
|
1632
1464
|
}
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
this.theme = 'light';
|
|
1639
|
-
this.icon = '';
|
|
1640
|
-
this.layout = 'desktop';
|
|
1465
|
+
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1466
|
+
<span class="${wrapperClass}" aria-hidden="true">
|
|
1467
|
+
<img src="${imageSrc}" alt="${imageAlt}" />
|
|
1468
|
+
</span>
|
|
1469
|
+
`;
|
|
1641
1470
|
}
|
|
1642
|
-
|
|
1643
|
-
|
|
1471
|
+
renderLoggedOutActions() {
|
|
1472
|
+
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1473
|
+
<div class="auth-actions" part="auth-actions">
|
|
1474
|
+
<slot name="login-action">
|
|
1475
|
+
<solid-ui-login-button
|
|
1476
|
+
label="${this.loginAction.label}"
|
|
1477
|
+
icon=${(0,lit_directives_if_defined_js__WEBPACK_IMPORTED_MODULE_5__/* .ifDefined */ .J)(this.layout !== 'mobile' ? this.loginIcon || this.loginAction.icon : undefined)}
|
|
1478
|
+
layout="${this.layout}"
|
|
1479
|
+
theme="${this.theme}"
|
|
1480
|
+
part="login-action"
|
|
1481
|
+
@login-success="${() => this.handleLoginSuccess()}"
|
|
1482
|
+
></solid-ui-login-button>
|
|
1483
|
+
</slot>
|
|
1484
|
+
<slot name="sign-up-action">
|
|
1485
|
+
<solid-ui-signup-button
|
|
1486
|
+
label="${this.signUpAction.label}"
|
|
1487
|
+
signup-url="${(0,lit_directives_if_defined_js__WEBPACK_IMPORTED_MODULE_5__/* .ifDefined */ .J)(this.signUpAction.url)}"
|
|
1488
|
+
layout="${this.layout}"
|
|
1489
|
+
.icon=${(0,lit_directives_if_defined_js__WEBPACK_IMPORTED_MODULE_5__/* .ifDefined */ .J)(this.layout !== 'mobile' ? this.signUpIcon || this.signUpAction.icon : undefined)}
|
|
1490
|
+
theme="${this.theme}"
|
|
1491
|
+
part="sign-up-action"
|
|
1492
|
+
></solid-ui-signup-button>
|
|
1493
|
+
</slot>
|
|
1494
|
+
</div>
|
|
1495
|
+
`;
|
|
1644
1496
|
}
|
|
1645
|
-
|
|
1497
|
+
handleLoginSuccess() {
|
|
1498
|
+
this.authState = 'logged-in';
|
|
1499
|
+
this.dispatchEvent(new CustomEvent('auth-action-select', {
|
|
1500
|
+
detail: {
|
|
1501
|
+
role: 'login'
|
|
1502
|
+
},
|
|
1503
|
+
bubbles: true,
|
|
1504
|
+
composed: true
|
|
1505
|
+
}));
|
|
1506
|
+
}
|
|
1507
|
+
async handleLogout() {
|
|
1508
|
+
this.accountMenuOpen = false;
|
|
1509
|
+
try {
|
|
1510
|
+
await solid_logic__WEBPACK_IMPORTED_MODULE_2__.authSession.logout();
|
|
1511
|
+
} catch (_err) {
|
|
1512
|
+
// logout errors are non-fatal — proceed to clear state
|
|
1513
|
+
}
|
|
1514
|
+
this.authState = 'logged-out';
|
|
1515
|
+
this.dispatchEvent(new CustomEvent('logout-select', {
|
|
1516
|
+
detail: {
|
|
1517
|
+
role: 'logout'
|
|
1518
|
+
},
|
|
1519
|
+
bubbles: true,
|
|
1520
|
+
composed: true
|
|
1521
|
+
}));
|
|
1522
|
+
}
|
|
1523
|
+
renderAccountMenuItem(item) {
|
|
1524
|
+
const content = (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1525
|
+
${this.renderLoggedInAvatar(item.avatar, 'account-menu-avatar')}
|
|
1526
|
+
<span class="account-menu-copy">
|
|
1527
|
+
<span class="account-menu-label">${item.label}</span>
|
|
1528
|
+
${item.webid && this.layout !== 'mobile' ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`<span class="account-menu-webid">${item.webid}</span>` : ''}
|
|
1529
|
+
</span>
|
|
1530
|
+
`;
|
|
1531
|
+
if (item.url) {
|
|
1532
|
+
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1533
|
+
<a
|
|
1534
|
+
class="account-menu-item-link"
|
|
1535
|
+
href="${item.url}"
|
|
1536
|
+
@click="${() => this.handleAccountMenuClick(item)}"
|
|
1537
|
+
part="account-menu-item"
|
|
1538
|
+
role="menuitem"
|
|
1539
|
+
>
|
|
1540
|
+
${content}
|
|
1541
|
+
</a>
|
|
1542
|
+
`;
|
|
1543
|
+
}
|
|
1646
1544
|
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1647
1545
|
<button
|
|
1648
|
-
class="
|
|
1546
|
+
class="account-menu-item-button"
|
|
1649
1547
|
type="button"
|
|
1650
|
-
|
|
1651
|
-
|
|
1548
|
+
@click="${() => this.handleAccountMenuClick(item)}"
|
|
1549
|
+
part="account-menu-item"
|
|
1550
|
+
role="menuitem"
|
|
1652
1551
|
>
|
|
1653
|
-
${
|
|
1654
|
-
<slot>${this.label}</slot>
|
|
1552
|
+
${content}
|
|
1655
1553
|
</button>
|
|
1656
1554
|
`;
|
|
1657
1555
|
}
|
|
1658
|
-
|
|
1556
|
+
renderLoggedInActions() {
|
|
1557
|
+
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1558
|
+
<div class="account-menu-container" part="account-menu-container">
|
|
1559
|
+
<slot name="account-trigger">
|
|
1560
|
+
<button
|
|
1561
|
+
id="accountMenuTrigger"
|
|
1562
|
+
class="account-menu-trigger"
|
|
1563
|
+
type="button"
|
|
1564
|
+
aria-haspopup="menu"
|
|
1565
|
+
aria-expanded="${this.accountMenuOpen ? 'true' : 'false'}"
|
|
1566
|
+
?disabled="${!this.hasAccountMenuItems()}"
|
|
1567
|
+
@click="${e => this.toggleAccountMenu(e)}"
|
|
1568
|
+
part="account-menu-trigger"
|
|
1569
|
+
>
|
|
1570
|
+
${this.renderLoggedInAvatar(this.accountAvatar)}
|
|
1571
|
+
${this.layout !== 'mobile' && this.accountIcon ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1572
|
+
<img class="account-menu-trigger-icon" src="${this.accountIcon}" alt="" aria-hidden="true" />` : ''}
|
|
1573
|
+
</button>
|
|
1574
|
+
</slot>
|
|
1659
1575
|
|
|
1660
|
-
|
|
1576
|
+
<nav
|
|
1577
|
+
id="accountMenu"
|
|
1578
|
+
class="account-dropdown"
|
|
1579
|
+
role="menu"
|
|
1580
|
+
?inert="${!this.accountMenuOpen || !this.hasAccountMenuItems()}"
|
|
1581
|
+
?hidden="${!this.accountMenuOpen || !this.hasAccountMenuItems()}"
|
|
1582
|
+
part="account-dropdown"
|
|
1583
|
+
>
|
|
1584
|
+
<slot name="account-switch" class="account-switch">Switch account</slot>
|
|
1585
|
+
<hr class="dropdown-menu-separator" />
|
|
1586
|
+
<slot name="account-menu" @slotchange="${e => this.handleAccountSlotChange(e)}"></slot>
|
|
1587
|
+
${this.accountMenu && this.accountMenu.length ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1588
|
+
<ul class="account-menu-list">
|
|
1589
|
+
${this.accountMenu.map(item => (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1590
|
+
<li>${this.renderAccountMenuItem(item)}</li>
|
|
1591
|
+
`)}
|
|
1592
|
+
</ul>
|
|
1593
|
+
` : ''}
|
|
1594
|
+
${this.logoutLabel ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1595
|
+
<hr class="dropdown-menu-separator" />
|
|
1596
|
+
<button
|
|
1597
|
+
class="account-menu-item-button"
|
|
1598
|
+
type="button"
|
|
1599
|
+
@click="${() => this.handleLogout()}"
|
|
1600
|
+
part="logout-action"
|
|
1601
|
+
role="menuitem"
|
|
1602
|
+
>
|
|
1603
|
+
${this.logoutIcon && this.layout !== 'mobile' ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`<img class="logout-action-icon" src="${this.logoutIcon}" alt="" aria-hidden="true" part="logout-action-icon" />` : ''}
|
|
1604
|
+
${this.logoutLabel}
|
|
1605
|
+
</button>
|
|
1606
|
+
` : ''}
|
|
1607
|
+
</nav>
|
|
1608
|
+
</div>
|
|
1609
|
+
`;
|
|
1610
|
+
}
|
|
1611
|
+
renderUserArea() {
|
|
1612
|
+
if (this.authState === 'logged-out') {
|
|
1613
|
+
return this.renderLoggedOutActions();
|
|
1614
|
+
}
|
|
1615
|
+
return this.renderLoggedInActions();
|
|
1616
|
+
}
|
|
1617
|
+
firstUpdated() {
|
|
1618
|
+
const brandLink = this.shadowRoot?.getElementById('brandLink');
|
|
1619
|
+
if (brandLink) {
|
|
1620
|
+
brandLink.classList.toggle('brand-not-displayed', this.layout === 'mobile');
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
updated(changedProperties) {
|
|
1624
|
+
if (changedProperties.has('layout')) {
|
|
1625
|
+
const brandLink = this.shadowRoot?.getElementById('brandLink');
|
|
1626
|
+
if (brandLink) {
|
|
1627
|
+
brandLink.classList.toggle('brand-not-displayed', this.layout === 'mobile');
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
render() {
|
|
1632
|
+
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1633
|
+
<div class="headerInner">
|
|
1634
|
+
<slot name="navigation-toggle"></slot>
|
|
1635
|
+
<a
|
|
1636
|
+
id="brandLink"
|
|
1637
|
+
class="brand"
|
|
1638
|
+
href="${this.brandLink}"
|
|
1639
|
+
part="brand"
|
|
1640
|
+
>
|
|
1641
|
+
<img id="brandImg" src="${this.logo}" alt="Logo" part="logo" />
|
|
1642
|
+
</a>
|
|
1661
1643
|
|
|
1662
|
-
|
|
1663
|
-
(
|
|
1644
|
+
<div class="menu" part="menu">
|
|
1645
|
+
${this.renderUserArea()}
|
|
1664
1646
|
|
|
1665
|
-
/*
|
|
1647
|
+
${this.shouldRenderHelpMenu() ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1648
|
+
<div class="header-menu-separator" />` : ''}
|
|
1666
1649
|
|
|
1650
|
+
${this.shouldRenderHelpMenu() ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1651
|
+
<div class="help-menu-container" part="help-menu-container">
|
|
1652
|
+
<button
|
|
1653
|
+
id="helpMenuTrigger"
|
|
1654
|
+
class="help-menu-trigger"
|
|
1655
|
+
type="button"
|
|
1656
|
+
aria-haspopup="menu"
|
|
1657
|
+
aria-expanded="${this.helpMenuOpen ? 'true' : 'false'}"
|
|
1658
|
+
?disabled="${!this.hasHelpMenuItems()}"
|
|
1659
|
+
@click="${e => this.toggleHelpMenu(e)}"
|
|
1660
|
+
part="help-menu-trigger"
|
|
1661
|
+
>
|
|
1662
|
+
${this.helpIcon ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`<img id="helpIcon" class="help-icon" src="${this.helpIcon}" alt="Help" part="help-icon" />` : (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`<span class="help-text" part="help-text">Help</span>`}
|
|
1663
|
+
</button>
|
|
1667
1664
|
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1665
|
+
<nav
|
|
1666
|
+
id="helpMenu"
|
|
1667
|
+
class="help-dropdown"
|
|
1668
|
+
role="menu"
|
|
1669
|
+
?inert="${!this.helpMenuOpen || !this.hasHelpMenuItems()}"
|
|
1670
|
+
?hidden="${!this.helpMenuOpen || !this.hasHelpMenuItems()}"
|
|
1671
|
+
part="help-dropdown"
|
|
1672
|
+
>
|
|
1673
|
+
<div class="help-dropdown-content" @click="${() => {
|
|
1674
|
+
this.helpMenuOpen = false;
|
|
1675
|
+
}}">
|
|
1676
|
+
<slot name="help-menu" @slotchange="${e => this.handleHelpSlotChange(e)}"></slot>
|
|
1677
|
+
${this.helpMenuList && this.helpMenuList.length ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1678
|
+
<ul class="help-menu-list">
|
|
1679
|
+
${this.helpMenuList.map(item => (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1680
|
+
<li>
|
|
1681
|
+
${item.url ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1682
|
+
<a
|
|
1683
|
+
href="${item.url}"
|
|
1684
|
+
target="${item.target || '_blank'}"
|
|
1685
|
+
rel="${(0,lit_directives_if_defined_js__WEBPACK_IMPORTED_MODULE_5__/* .ifDefined */ .J)((item.target || '_blank') === '_blank' ? 'noopener noreferrer' : undefined)}"
|
|
1686
|
+
@click="${e => this.handleHelpMenuClick(item, e)}"
|
|
1687
|
+
part="help-menu-item"
|
|
1688
|
+
role="menuitem"
|
|
1689
|
+
>
|
|
1690
|
+
${item.label}
|
|
1691
|
+
</a>
|
|
1692
|
+
` : (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
1693
|
+
<button
|
|
1694
|
+
type="button"
|
|
1695
|
+
@click="${e => this.handleHelpMenuClick(item, e)}"
|
|
1696
|
+
part="help-menu-item"
|
|
1697
|
+
role="menuitem"
|
|
1698
|
+
>
|
|
1699
|
+
${item.label}
|
|
1700
|
+
</button>
|
|
1701
|
+
`}
|
|
1702
|
+
</li>
|
|
1703
|
+
`)}
|
|
1704
|
+
</ul>
|
|
1705
|
+
` : ''}
|
|
1706
|
+
</div>
|
|
1707
|
+
</nav>
|
|
1708
|
+
</div>` : ''}
|
|
1709
|
+
</div>
|
|
1710
|
+
</div>
|
|
1711
|
+
`;
|
|
1712
|
+
}
|
|
1671
1713
|
}
|
|
1672
1714
|
|
|
1673
1715
|
/***/ },
|
|
@@ -1881,7 +1923,7 @@ var __webpack_exports__ = {};
|
|
|
1881
1923
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1882
1924
|
/* harmony export */ Y: () => (/* reexport safe */ _Header__WEBPACK_IMPORTED_MODULE_0__.Y)
|
|
1883
1925
|
/* harmony export */ });
|
|
1884
|
-
/* harmony import */ var _Header__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1926
|
+
/* harmony import */ var _Header__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1166);
|
|
1885
1927
|
|
|
1886
1928
|
|
|
1887
1929
|
const HEADER_TAG_NAME = 'solid-ui-header';
|