solid-ui 3.0.6 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +128 -2
- package/dist/acl/access-groups.js +1 -1
- package/dist/components/footer/index.d.ts +1 -0
- package/dist/components/footer/index.esm.js +24364 -0
- package/dist/components/footer/index.esm.js.map +1 -0
- package/dist/components/footer/index.esm.min.js +137 -0
- package/dist/components/footer/index.esm.min.js.map +1 -0
- package/dist/components/footer/index.js +23252 -0
- package/dist/components/footer/index.js.map +1 -0
- package/dist/components/footer/index.min.js +125 -0
- package/dist/components/footer/index.min.js.map +1 -0
- package/dist/components/header/index.d.ts +1 -0
- package/dist/components/header/index.esm.js +1894 -0
- package/dist/components/header/index.esm.js.map +1 -0
- package/dist/components/header/index.esm.min.js +1083 -0
- package/dist/components/header/index.esm.min.js.map +1 -0
- package/dist/components/header/index.js +1855 -0
- package/dist/components/header/index.js.map +1 -0
- package/dist/components/header/index.min.js +1084 -0
- package/dist/components/header/index.min.js.map +1 -0
- package/dist/components/loginButton/index.d.ts +1 -0
- package/dist/components/loginButton/index.esm.js +719 -0
- package/dist/components/loginButton/index.esm.js.map +1 -0
- package/dist/components/loginButton/index.esm.min.js +402 -0
- package/dist/components/loginButton/index.esm.min.js.map +1 -0
- package/dist/components/loginButton/index.js +701 -0
- package/dist/components/loginButton/index.js.map +1 -0
- package/dist/components/loginButton/index.min.js +402 -0
- package/dist/components/loginButton/index.min.js.map +1 -0
- package/dist/components/signupButton/index.d.ts +1 -0
- package/dist/components/signupButton/index.esm.js +270 -0
- package/dist/components/signupButton/index.esm.js.map +1 -0
- package/dist/components/signupButton/index.esm.min.js +82 -0
- package/dist/components/signupButton/index.esm.min.js.map +1 -0
- package/dist/components/signupButton/index.js +264 -0
- package/dist/components/signupButton/index.js.map +1 -0
- package/dist/components/signupButton/index.min.js +82 -0
- package/dist/components/signupButton/index.min.js.map +1 -0
- package/dist/footer/index.d.ts.map +1 -1
- package/dist/footer/index.js +8 -4
- package/dist/footer/index.js.map +1 -1
- package/dist/icons/v2/icons-svg/contactIcons.d.ts +3 -0
- package/dist/icons/v2/icons-svg/contactIcons.d.ts.map +1 -0
- package/dist/icons/v2/icons-svg/contactIcons.js +27 -0
- package/dist/icons/v2/icons-svg/contactIcons.js.map +1 -0
- package/dist/icons/v2/icons-svg/headerIcons.d.ts +18 -0
- package/dist/icons/v2/icons-svg/headerIcons.d.ts.map +1 -0
- package/dist/icons/v2/icons-svg/headerIcons.js +245 -0
- package/dist/icons/v2/icons-svg/headerIcons.js.map +1 -0
- package/dist/icons/v2/icons-svg/pngIcons.d.ts +3 -0
- package/dist/icons/v2/icons-svg/pngIcons.d.ts.map +1 -0
- package/dist/icons/v2/icons-svg/pngIcons.js +4 -0
- package/dist/icons/v2/icons-svg/pngIcons.js.map +1 -0
- package/dist/icons/v2/icons-svg/profileIcons.d.ts +23 -0
- package/dist/icons/v2/icons-svg/profileIcons.d.ts.map +1 -0
- package/dist/icons/v2/icons-svg/profileIcons.js +317 -0
- package/dist/icons/v2/icons-svg/profileIcons.js.map +1 -0
- package/dist/pad.d.ts.map +1 -1
- package/dist/pad.js +13 -13
- package/dist/pad.js.map +1 -1
- package/dist/solid-ui.esm.js +9560 -12181
- package/dist/solid-ui.esm.js.map +1 -1
- package/dist/solid-ui.esm.min.js +15 -14
- package/dist/solid-ui.esm.min.js.map +1 -1
- package/dist/solid-ui.js +12531 -14794
- package/dist/solid-ui.js.map +1 -1
- package/dist/solid-ui.min.js +23 -22
- package/dist/solid-ui.min.js.map +1 -1
- package/dist/utils/headerFooterHelpers.d.ts.map +1 -1
- package/dist/utils/headerFooterHelpers.js +11 -2
- package/dist/utils/headerFooterHelpers.js.map +1 -1
- package/dist/v2/components/footer/Footer.d.ts +60 -0
- package/dist/v2/components/footer/Footer.d.ts.map +1 -0
- package/dist/v2/components/footer/Footer.js +148 -0
- package/dist/v2/components/footer/Footer.js.map +1 -0
- package/dist/v2/components/footer/Footer.test.d.ts +2 -0
- package/dist/v2/components/footer/Footer.test.d.ts.map +1 -0
- package/dist/v2/components/footer/Footer.test.js +53 -0
- package/dist/v2/components/footer/Footer.test.js.map +1 -0
- package/dist/v2/components/footer/index.d.ts +3 -0
- package/dist/v2/components/footer/index.d.ts.map +1 -0
- package/dist/v2/components/footer/index.js +7 -0
- package/dist/v2/components/footer/index.js.map +1 -0
- package/dist/v2/components/header/Header.d.ts +155 -0
- package/dist/v2/components/header/Header.d.ts.map +1 -0
- package/dist/v2/components/header/Header.js +845 -0
- package/dist/v2/components/header/Header.js.map +1 -0
- package/dist/v2/components/header/header.test.d.ts +2 -0
- package/dist/v2/components/header/header.test.d.ts.map +1 -0
- package/dist/v2/components/header/header.test.js +242 -0
- package/dist/v2/components/header/header.test.js.map +1 -0
- package/dist/v2/components/header/index.d.ts +4 -0
- package/dist/v2/components/header/index.d.ts.map +1 -0
- package/dist/v2/components/header/index.js +7 -0
- package/dist/v2/components/header/index.js.map +1 -0
- package/dist/v2/components/loginButton/LoginButton.d.ts +62 -0
- package/dist/v2/components/loginButton/LoginButton.d.ts.map +1 -0
- package/dist/v2/components/loginButton/LoginButton.js +497 -0
- package/dist/v2/components/loginButton/LoginButton.js.map +1 -0
- package/dist/v2/components/loginButton/LoginButton.test.d.ts +2 -0
- package/dist/v2/components/loginButton/LoginButton.test.d.ts.map +1 -0
- package/dist/v2/components/loginButton/LoginButton.test.js +53 -0
- package/dist/v2/components/loginButton/LoginButton.test.js.map +1 -0
- package/dist/v2/components/loginButton/downArrow.d.ts +2 -0
- package/dist/v2/components/loginButton/downArrow.d.ts.map +1 -0
- package/dist/v2/components/loginButton/downArrow.js +10 -0
- package/dist/v2/components/loginButton/downArrow.js.map +1 -0
- package/dist/v2/components/loginButton/index.d.ts +3 -0
- package/dist/v2/components/loginButton/index.d.ts.map +1 -0
- package/dist/v2/components/loginButton/index.js +7 -0
- package/dist/v2/components/loginButton/index.js.map +1 -0
- package/dist/v2/components/signupButton/SignupButton.d.ts +36 -0
- package/dist/v2/components/signupButton/SignupButton.d.ts.map +1 -0
- package/dist/v2/components/signupButton/SignupButton.js +84 -0
- package/dist/v2/components/signupButton/SignupButton.js.map +1 -0
- package/dist/v2/components/signupButton/SignupButton.test.d.ts +2 -0
- package/dist/v2/components/signupButton/SignupButton.test.d.ts.map +1 -0
- package/dist/v2/components/signupButton/SignupButton.test.js +49 -0
- package/dist/v2/components/signupButton/SignupButton.test.js.map +1 -0
- package/dist/v2/components/signupButton/index.d.ts +3 -0
- package/dist/v2/components/signupButton/index.d.ts.map +1 -0
- package/dist/v2/components/signupButton/index.js +7 -0
- package/dist/v2/components/signupButton/index.js.map +1 -0
- package/dist/versionInfo.js +7 -7
- package/dist/widgets/buttons.d.ts +9 -3
- package/dist/widgets/buttons.d.ts.map +1 -1
- package/dist/widgets/buttons.js +68 -7
- package/dist/widgets/buttons.js.map +1 -1
- package/package.json +34 -7
|
@@ -0,0 +1,701 @@
|
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ "use strict";
|
|
3
|
+
/******/ var __webpack_modules__ = ({
|
|
4
|
+
|
|
5
|
+
/***/ 892
|
|
6
|
+
(module) {
|
|
7
|
+
|
|
8
|
+
module.exports = SolidLogic;
|
|
9
|
+
|
|
10
|
+
/***/ },
|
|
11
|
+
|
|
12
|
+
/***/ 826
|
|
13
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
14
|
+
|
|
15
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16
|
+
/* harmony export */ AH: () => (/* binding */ i),
|
|
17
|
+
/* harmony export */ Rf: () => (/* binding */ S),
|
|
18
|
+
/* harmony export */ sk: () => (/* binding */ c)
|
|
19
|
+
/* harmony export */ });
|
|
20
|
+
/* unused harmony exports CSSResult, supportsAdoptingStyleSheets, unsafeCSS */
|
|
21
|
+
/**
|
|
22
|
+
* @license
|
|
23
|
+
* Copyright 2019 Google LLC
|
|
24
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
+
*/
|
|
26
|
+
const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n("string"==typeof t?t:t+"",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1],t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement("style"),n=t.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;
|
|
27
|
+
//# sourceMappingURL=css-tag.js.map
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
/***/ },
|
|
31
|
+
|
|
32
|
+
/***/ 760
|
|
33
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
34
|
+
|
|
35
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
/* harmony export */ AH: () => (/* reexport safe */ _css_tag_js__WEBPACK_IMPORTED_MODULE_0__.AH),
|
|
37
|
+
/* harmony export */ mN: () => (/* binding */ y)
|
|
38
|
+
/* harmony export */ });
|
|
39
|
+
/* unused harmony exports defaultConverter, notEqual */
|
|
40
|
+
/* harmony import */ var _css_tag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(826);
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @license
|
|
44
|
+
* Copyright 2017 Google LLC
|
|
45
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
46
|
+
*/const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:"",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol("metadata"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d("elementProperties")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d("properties"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift((0,_css_tag_js__WEBPACK_IMPORTED_MODULE_0__/* .getCompatibleStyle */ .sk)(s))}else void 0!==s&&i.push((0,_css_tag_js__WEBPACK_IMPORTED_MODULE_0__/* .getCompatibleStyle */ .sk)(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return (0,_css_tag_js__WEBPACK_IMPORTED_MODULE_0__/* .adoptStyles */ .Rf)(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i,e=!1,h){if(void 0!==t){const r=this.constructor;if(!1===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[d("elementProperties")]=new Map,y[d("finalized")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push("2.1.2");
|
|
47
|
+
//# sourceMappingURL=reactive-element.js.map
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
/***/ },
|
|
51
|
+
|
|
52
|
+
/***/ 228
|
|
53
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
54
|
+
|
|
55
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
56
|
+
/* harmony export */ AH: () => (/* reexport safe */ _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__.AH),
|
|
57
|
+
/* harmony export */ WF: () => (/* binding */ i),
|
|
58
|
+
/* harmony export */ qy: () => (/* reexport safe */ lit_html__WEBPACK_IMPORTED_MODULE_1__.qy)
|
|
59
|
+
/* harmony export */ });
|
|
60
|
+
/* unused harmony export _$LE */
|
|
61
|
+
/* harmony import */ var _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(760);
|
|
62
|
+
/* harmony import */ var lit_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(752);
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @license
|
|
66
|
+
* Copyright 2017 Google LLC
|
|
67
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
68
|
+
*/const s=globalThis;class i extends _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__/* .ReactiveElement */ .mN{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=(0,lit_html__WEBPACK_IMPORTED_MODULE_1__/* .render */ .XX)(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return lit_html__WEBPACK_IMPORTED_MODULE_1__/* .noChange */ .c0}}i._$litElement$=!0,i["finalized"]=!0,s.litElementHydrateSupport?.({LitElement:i});const o=s.litElementPolyfillSupport;o?.({LitElement:i});const n={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};(s.litElementVersions??=[]).push("4.2.2");
|
|
69
|
+
//# sourceMappingURL=lit-element.js.map
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/***/ },
|
|
73
|
+
|
|
74
|
+
/***/ 752
|
|
75
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
76
|
+
|
|
77
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
78
|
+
/* harmony export */ XX: () => (/* binding */ D),
|
|
79
|
+
/* harmony export */ c0: () => (/* binding */ E),
|
|
80
|
+
/* harmony export */ qy: () => (/* binding */ b)
|
|
81
|
+
/* harmony export */ });
|
|
82
|
+
/* unused harmony exports _$LH, mathml, nothing, svg */
|
|
83
|
+
/**
|
|
84
|
+
* @license
|
|
85
|
+
* Copyright 2017 Google LLC
|
|
86
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
87
|
+
*/
|
|
88
|
+
const t=globalThis,i=t=>t,s=t.trustedTypes,e=s?s.createPolicy("lit-html",{createHTML:t=>t}):void 0,h="$lit$",o=`lit$${Math.random().toFixed(9).slice(2)}$`,n="?"+o,r=`<${n}>`,l=document,c=()=>l.createComment(""),a=t=>null===t||"object"!=typeof t&&"function"!=typeof t,u=Array.isArray,d=t=>u(t)||"function"==typeof t?.[Symbol.iterator],f="[ \t\n\f\r]",v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,$=/"/g,y=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b=x(1),w=x(2),T=x(3),E=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),C=new WeakMap,P=l.createTreeWalker(l,129);function V(t,i){if(!u(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==e?e.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?"<svg>":3===i?"<math>":"",c=v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v?"!--"===u[1]?c=_:void 0!==u[1]?c=m:void 0!==u[2]?(y.test(u[2])&&(n=RegExp("</"+u[2],"g")),c=p):void 0!==u[3]&&(c=p):c===p?">"===u[0]?(c=n??v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p:'"'===u[3]?$:g):c===$||c===g?c=p:c===_||c===m?c=v:(c=p,n=void 0);const x=c===p&&t[i+1].startsWith("/>")?" ":"";l+=c===v?s+r:d>=0?(e.push(a),s.slice(0,d)+h+s.slice(d)+o+x):s+o+(-2===d?i:x)}return[V(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),e]};class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h)){const i=v[a++],s=r.getAttribute(t).split(o),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:"."===e[1]?I:"?"===e[1]?L:"@"===e[1]?z:H}),r.removeAttribute(t)}else t.startsWith(o)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y.test(r.tagName)){const t=r.textContent.split(o),i=t.length-1;if(i>0){r.textContent=s?s.emptyScript:"";for(let s=0;s<i;s++)r.append(t[s],c()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c())}}}else if(8===r.nodeType)if(r.data===n)d.push({type:2,index:l});else{let t=-1;for(;-1!==(t=r.data.indexOf(o,t+1));)d.push({type:7,index:l}),t+=o.length-1}l++}}static createElement(t,i){const s=l.createElement("template");return s.innerHTML=t,s}}function M(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M(t,h._$AS(t,i.values),h,e)),i}class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l).importNode(i,!0);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n]}o!==r?.index&&(h=P.nextNode(),o++)}return P.currentNode=l,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M(this,t,i),a(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==A&&a(this._$AH)?this._$AA.nextSibling.data=t:this.T(l.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new S(t)),i}k(t){u(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c()),this.O(c()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){const s=i(t).nextSibling;i(t).remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=M(this,t,i,0),o=!a(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!a(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??"")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class I extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}class L extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A)}}class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=M(this,t,i,0)??A)===E)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const j={M:h,P:o,A:n,C:1,L:N,R,D:d,V:M,I:k,H,N:L,U:z,B:I,F:Z},B=t.litHtmlPolyfillSupport;B?.(S,k),(t.litHtmlVersions??=[]).push("3.3.2");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k(i.insertBefore(c(),t),t,void 0,s??{})}return h._$AI(t),h};
|
|
89
|
+
//# sourceMappingURL=lit-html.js.map
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
/***/ },
|
|
93
|
+
|
|
94
|
+
/***/ 161
|
|
95
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
96
|
+
|
|
97
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
98
|
+
/* harmony export */ AH: () => (/* reexport safe */ lit_element_lit_element_js__WEBPACK_IMPORTED_MODULE_2__.AH),
|
|
99
|
+
/* harmony export */ WF: () => (/* reexport safe */ lit_element_lit_element_js__WEBPACK_IMPORTED_MODULE_2__.WF),
|
|
100
|
+
/* harmony export */ qy: () => (/* reexport safe */ lit_element_lit_element_js__WEBPACK_IMPORTED_MODULE_2__.qy)
|
|
101
|
+
/* harmony export */ });
|
|
102
|
+
/* harmony import */ var _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(760);
|
|
103
|
+
/* harmony import */ var lit_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(752);
|
|
104
|
+
/* harmony import */ var lit_element_lit_element_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(228);
|
|
105
|
+
|
|
106
|
+
//# sourceMappingURL=index.js.map
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
/***/ }
|
|
110
|
+
|
|
111
|
+
/******/ });
|
|
112
|
+
/************************************************************************/
|
|
113
|
+
/******/ // The module cache
|
|
114
|
+
/******/ var __webpack_module_cache__ = {};
|
|
115
|
+
/******/
|
|
116
|
+
/******/ // The require function
|
|
117
|
+
/******/ function __webpack_require__(moduleId) {
|
|
118
|
+
/******/ // Check if module is in cache
|
|
119
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
120
|
+
/******/ if (cachedModule !== undefined) {
|
|
121
|
+
/******/ return cachedModule.exports;
|
|
122
|
+
/******/ }
|
|
123
|
+
/******/ // Create a new module (and put it into the cache)
|
|
124
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
125
|
+
/******/ // no module.id needed
|
|
126
|
+
/******/ // no module.loaded needed
|
|
127
|
+
/******/ exports: {}
|
|
128
|
+
/******/ };
|
|
129
|
+
/******/
|
|
130
|
+
/******/ // Execute the module function
|
|
131
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
132
|
+
/******/
|
|
133
|
+
/******/ // Return the exports of the module
|
|
134
|
+
/******/ return module.exports;
|
|
135
|
+
/******/ }
|
|
136
|
+
/******/
|
|
137
|
+
/************************************************************************/
|
|
138
|
+
/******/ /* webpack/runtime/define property getters */
|
|
139
|
+
/******/ (() => {
|
|
140
|
+
/******/ // define getter functions for harmony exports
|
|
141
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
142
|
+
/******/ for(var key in definition) {
|
|
143
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
144
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
145
|
+
/******/ }
|
|
146
|
+
/******/ }
|
|
147
|
+
/******/ };
|
|
148
|
+
/******/ })();
|
|
149
|
+
/******/
|
|
150
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
151
|
+
/******/ (() => {
|
|
152
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
153
|
+
/******/ })();
|
|
154
|
+
/******/
|
|
155
|
+
/************************************************************************/
|
|
156
|
+
var __webpack_exports__ = {};
|
|
157
|
+
|
|
158
|
+
// UNUSED EXPORTS: LoginButton
|
|
159
|
+
|
|
160
|
+
// EXTERNAL MODULE: ./node_modules/lit/index.js
|
|
161
|
+
var lit = __webpack_require__(161);
|
|
162
|
+
// EXTERNAL MODULE: external "SolidLogic"
|
|
163
|
+
var external_SolidLogic_ = __webpack_require__(892);
|
|
164
|
+
// EXTERNAL MODULE: ./node_modules/lit-html/lit-html.js
|
|
165
|
+
var lit_html = __webpack_require__(752);
|
|
166
|
+
;// ./src/v2/components/loginButton/downArrow.ts
|
|
167
|
+
|
|
168
|
+
const phoneIcon = (0,lit_html/* html */.qy)`
|
|
169
|
+
<svg xmlns="http://www.w3.org/2000/svg"
|
|
170
|
+
viewBox="0 0 12 7"
|
|
171
|
+
fill="none"
|
|
172
|
+
>
|
|
173
|
+
<path d="M0.679688 0.678955L5.50729 5.50656L10.3349 0.678955" stroke="#6A7282" stroke-width="1.35776" stroke-linecap="round" stroke-linejoin="round"/>
|
|
174
|
+
</svg>
|
|
175
|
+
`;
|
|
176
|
+
;// ./src/v2/components/loginButton/LoginButton.ts
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
class LoginButton extends lit/* LitElement */.WF {
|
|
181
|
+
static properties = {
|
|
182
|
+
label: {
|
|
183
|
+
type: String,
|
|
184
|
+
reflect: true
|
|
185
|
+
},
|
|
186
|
+
theme: {
|
|
187
|
+
type: String,
|
|
188
|
+
reflect: true
|
|
189
|
+
},
|
|
190
|
+
issuerUrl: {
|
|
191
|
+
type: String,
|
|
192
|
+
attribute: 'issuer-url',
|
|
193
|
+
reflect: true
|
|
194
|
+
},
|
|
195
|
+
icon: {
|
|
196
|
+
type: String,
|
|
197
|
+
reflect: true
|
|
198
|
+
},
|
|
199
|
+
layout: {
|
|
200
|
+
type: String,
|
|
201
|
+
reflect: true
|
|
202
|
+
},
|
|
203
|
+
_popupOpen: {
|
|
204
|
+
state: true
|
|
205
|
+
},
|
|
206
|
+
_issuerInputValue: {
|
|
207
|
+
state: true
|
|
208
|
+
},
|
|
209
|
+
_dropdownOpen: {
|
|
210
|
+
state: true
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
static styles = (0,lit/* css */.AH)`
|
|
214
|
+
:host { // default theme
|
|
215
|
+
display: inline-block;
|
|
216
|
+
position: relative;
|
|
217
|
+
z-index: 400;
|
|
218
|
+
--login-button-background: var(--lavender-900, #7c4cff);
|
|
219
|
+
--login-button-text: var(--color-header-text, #ffffff);
|
|
220
|
+
--popup-background: var(--color-background, #F8F9FB);
|
|
221
|
+
--popup-text: var(--color-text, #1A1A1A);
|
|
222
|
+
--popup-border: var(--color-border, #E5E7EB);
|
|
223
|
+
--popup-shadow: var(--box-shadow-sm, 0 1px 4px rgba(124,77,255,0.12));
|
|
224
|
+
--popup-overlay-background: rgba(0, 0, 0, 0.6);
|
|
225
|
+
--issuer-input-background: var(--color-background, #F8F9FB);
|
|
226
|
+
--issuer-input-text: var(--color-text, #1A1A1A);
|
|
227
|
+
--issuer-input-border: var(--color-text, #1A1A1A);
|
|
228
|
+
--issuer-button-background: var(--color-background, #F8F9FB);
|
|
229
|
+
--issuer-button-text: var(--color-text, #1A1A1A);
|
|
230
|
+
--issuer-button-border: var(--color-border, #E5E7EB);
|
|
231
|
+
--issuer-button-hover-background: var(--lavender-900, #7c4cff);
|
|
232
|
+
--issuer-label-color: var(--grey-purple-700, #1A1A1A);
|
|
233
|
+
--issuer-placeholder-color: var(--grey-purple-700, #5e546d);;
|
|
234
|
+
--error-text-color: var(--color-error, #B00020);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
:host([theme='dark']) {
|
|
238
|
+
display: inline-block;
|
|
239
|
+
position: relative;
|
|
240
|
+
z-index: 900;
|
|
241
|
+
--login-button-background: var(--lavender-900, #7c4cff);
|
|
242
|
+
--login-button-text: var(--color-header-text, #ffffff);
|
|
243
|
+
--popup-background: var(--color-background, #F8F9FB);
|
|
244
|
+
--popup-text: var(--color-text, #1A1A1A);
|
|
245
|
+
--popup-border: var(--color-border, #E5E7EB);
|
|
246
|
+
--popup-shadow: var(--box-shadow-sm, 0 1px 4px rgba(124,77,255,0.12));
|
|
247
|
+
--popup-overlay-background: rgba(0, 0, 0, 0.6);
|
|
248
|
+
--issuer-input-background: var(--color-background, #F8F9FB);
|
|
249
|
+
--issuer-input-text: var(--color-text, #1A1A1A);
|
|
250
|
+
--issuer-input-border: var(--color-text, #1A1A1A);
|
|
251
|
+
--issuer-button-background: var(--color-background, #F8F9FB);
|
|
252
|
+
--issuer-button-text: var(--color-text, #1A1A1A);
|
|
253
|
+
--issuer-button-border: var(--color-text, #1A1A1A);
|
|
254
|
+
--issuer-button-hover-background: var(--lavender-900, #7c4cff);
|
|
255
|
+
--issuer-label-color: var(--grey-purple-700, #1A1A1A);
|
|
256
|
+
--issuer-placeholder-color: var(--grey-purple-700, #5e546d);;
|
|
257
|
+
--error-text-color: var(--color-error, #B00020);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.login-button {
|
|
261
|
+
display: flex;
|
|
262
|
+
height: 35px;
|
|
263
|
+
padding: var(--spacing-xxs, 0.3125rem) var(--spacing-xs, 0.75rem);
|
|
264
|
+
align-items: center;
|
|
265
|
+
gap: var(--spacing-xxs, 0.3125rem);
|
|
266
|
+
border-radius: var(--border-radius-base, 0.3125rem);
|
|
267
|
+
background: var(--login-button-background);
|
|
268
|
+
border: none;
|
|
269
|
+
color: var(--login-button-text);
|
|
270
|
+
cursor: pointer;
|
|
271
|
+
font: inherit;
|
|
272
|
+
line-height: 1;
|
|
273
|
+
white-space: nowrap;
|
|
274
|
+
text-decoration: none;
|
|
275
|
+
box-sizing: border-box;
|
|
276
|
+
transition: transform 0.2s ease;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.login-button-icon {
|
|
280
|
+
width: 16px;
|
|
281
|
+
height: 16px;
|
|
282
|
+
display: inline-block;
|
|
283
|
+
object-fit: contain;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.login-button:active {
|
|
287
|
+
transform: translateY(1px);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.popup-dialog {
|
|
291
|
+
border: none;
|
|
292
|
+
padding: 0;
|
|
293
|
+
background: transparent;
|
|
294
|
+
outline: none;
|
|
295
|
+
overflow: visible;
|
|
296
|
+
max-height: none;
|
|
297
|
+
max-width: none;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.popup-dialog::backdrop {
|
|
301
|
+
background: var(--popup-overlay-background, rgba(0, 0, 0, 0.6));
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.popup-box {
|
|
305
|
+
background: var(--popup-background);
|
|
306
|
+
color: var(--popup-text);
|
|
307
|
+
box-shadow: var(--popup-shadow);
|
|
308
|
+
border: 1px solid var(--popup-border);
|
|
309
|
+
border-radius: var(--border-radius-md, 0.5rem);
|
|
310
|
+
min-width: 480px;
|
|
311
|
+
z-index: 1001;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.popup-top-menu {
|
|
315
|
+
border-bottom: 1px solid #DDD;
|
|
316
|
+
display: flex;
|
|
317
|
+
flex-direction: row;
|
|
318
|
+
align-items: center;
|
|
319
|
+
justify-content: space-between;
|
|
320
|
+
padding-bottom: 8px;
|
|
321
|
+
margin-bottom: 8px;
|
|
322
|
+
padding: 1rem;
|
|
323
|
+
background: var(--gray-200, #E5E7EB);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.popup-title {
|
|
327
|
+
font-weight: 800;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.popup-close {
|
|
331
|
+
background: transparent;
|
|
332
|
+
border: none;
|
|
333
|
+
cursor: pointer;
|
|
334
|
+
font-size: 1.25rem;
|
|
335
|
+
line-height: 1;
|
|
336
|
+
padding: 0 0.25rem;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.issuer-text-section {
|
|
340
|
+
display: flex;
|
|
341
|
+
flex-direction: column;
|
|
342
|
+
padding: 1rem 1rem 1.75rem;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.issuer-text-label {
|
|
346
|
+
color: var(--issuer-label-color);
|
|
347
|
+
margin-bottom: 6px;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.issuer-text-row {
|
|
351
|
+
display: flex;
|
|
352
|
+
flex-direction: row;
|
|
353
|
+
gap: 6px;
|
|
354
|
+
align-items: flex-start;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.issuer-input-wrapper {
|
|
358
|
+
flex: 1;
|
|
359
|
+
display: flex;
|
|
360
|
+
flex-direction: column;
|
|
361
|
+
min-width: 0;
|
|
362
|
+
position: relative;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.issuer-input-field-row {
|
|
366
|
+
display: flex;
|
|
367
|
+
flex-direction: row;
|
|
368
|
+
position: relative;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.issuer-text-input {
|
|
372
|
+
flex: 1;
|
|
373
|
+
padding: 0.375rem 2.75rem 0.375rem 0.5rem;
|
|
374
|
+
border: 1px solid var(--issuer-input-border);
|
|
375
|
+
border-radius: var(--border-radius-base, 0.3125rem);
|
|
376
|
+
background: var(--issuer-input-background);
|
|
377
|
+
color: var(--issuer-input-text);
|
|
378
|
+
font: inherit;
|
|
379
|
+
min-width: 0;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.issuer-text-input::placeholder {
|
|
383
|
+
color: var(--issuer-placeholder-color);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.issuer-dropdown-toggle {
|
|
387
|
+
position: absolute;
|
|
388
|
+
right: 6px;
|
|
389
|
+
top: 50%;
|
|
390
|
+
transform: translateY(-50%);
|
|
391
|
+
width: 26px;
|
|
392
|
+
height: 26px;
|
|
393
|
+
padding: 0;
|
|
394
|
+
border: none;
|
|
395
|
+
background: transparent;
|
|
396
|
+
cursor: pointer;
|
|
397
|
+
display: flex;
|
|
398
|
+
align-items: center;
|
|
399
|
+
justify-content: center;
|
|
400
|
+
flex-shrink: 0;
|
|
401
|
+
border-radius: var(--border-radius-base, 0.3125rem);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.issuer-dropdown-toggle:hover {
|
|
405
|
+
background: var(--color-header-menu-item-hover, #e6dcff);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.issuer-dropdown-toggle svg {
|
|
409
|
+
width: 14px;
|
|
410
|
+
height: 14px;
|
|
411
|
+
display: block;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.issuer-dropdown-list {
|
|
415
|
+
position: absolute;
|
|
416
|
+
top: calc(100% + 6px);
|
|
417
|
+
left: 0;
|
|
418
|
+
right: 0;
|
|
419
|
+
border: 1px solid var(--color-border, #E5E7EB);
|
|
420
|
+
border-top: none;
|
|
421
|
+
border-radius: 0 0 var(--border-radius-base, 0.3125rem) var(--border-radius-base, 0.3125rem);
|
|
422
|
+
background: var(--issuer-input-background);
|
|
423
|
+
overflow: visible;
|
|
424
|
+
z-index: 10;
|
|
425
|
+
box-shadow: 0 4px 12px rgba(124, 77, 255, 0.12);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.issuer-dropdown-item {
|
|
429
|
+
display: block;
|
|
430
|
+
width: 100%;
|
|
431
|
+
padding: 0.625rem 0.75rem;
|
|
432
|
+
border: none;
|
|
433
|
+
border-bottom: 1px solid var(--color-border, #E5E7EB);
|
|
434
|
+
background: transparent;
|
|
435
|
+
color: var(--issuer-button-text);
|
|
436
|
+
cursor: pointer;
|
|
437
|
+
font: inherit;
|
|
438
|
+
text-align: left;
|
|
439
|
+
box-sizing: border-box;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.issuer-dropdown-item:last-child {
|
|
443
|
+
border-bottom: none;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.issuer-dropdown-item:hover {
|
|
447
|
+
background: var(--color-header-menu-item-hover, #e6dcff);
|
|
448
|
+
border-radius: var(--border-radius-base-md, 0.5rem);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.popup-footer {
|
|
452
|
+
display: flex;
|
|
453
|
+
flex-direction: row;
|
|
454
|
+
justify-content: center;
|
|
455
|
+
gap: 8px;
|
|
456
|
+
padding: 0.75rem 1rem 1rem;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.popup-footer-hr {
|
|
460
|
+
margin: 0;
|
|
461
|
+
border: none;
|
|
462
|
+
border-top: 1px solid var(--popup-border, #E5E7EB);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.popup-cancel-button {
|
|
466
|
+
padding: 0.5rem 1.25rem;
|
|
467
|
+
border: 1px solid #C0BFC7;
|
|
468
|
+
border-radius: var(--border-radius-base, 0.3125rem);
|
|
469
|
+
background: var(--popup-background);
|
|
470
|
+
color: #314158;
|
|
471
|
+
cursor: pointer;
|
|
472
|
+
font: inherit;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.popup-cancel-button:hover {
|
|
476
|
+
background: #D1D5DB;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.popup-login-button {
|
|
480
|
+
padding: 0.5rem 1.25rem;
|
|
481
|
+
border: none;
|
|
482
|
+
border-radius: var(--border-radius-base, 0.3125rem);
|
|
483
|
+
background: var(--lavender-900, #7c4cff);
|
|
484
|
+
color: #ffffff;
|
|
485
|
+
cursor: pointer;
|
|
486
|
+
font: inherit;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.popup-login-button:hover {
|
|
490
|
+
background: #6a3de8;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.popup-login-button:disabled {
|
|
494
|
+
opacity: 0.5;
|
|
495
|
+
cursor: not-allowed;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.error-msg {
|
|
499
|
+
color: var(--error-text-color);
|
|
500
|
+
font-size: 0.875rem;
|
|
501
|
+
margin-top: 8px;
|
|
502
|
+
}
|
|
503
|
+
`;
|
|
504
|
+
_issuerInputId = `issuer-url-input-${Math.random().toString(36).slice(2, 10)}`;
|
|
505
|
+
_errorMsg = '';
|
|
506
|
+
constructor() {
|
|
507
|
+
super();
|
|
508
|
+
this.label = 'Log In';
|
|
509
|
+
this.theme = 'light';
|
|
510
|
+
this.issuerUrl = '';
|
|
511
|
+
this.icon = '';
|
|
512
|
+
this.layout = 'desktop';
|
|
513
|
+
this._popupOpen = false;
|
|
514
|
+
this._issuerInputValue = '';
|
|
515
|
+
this._dropdownOpen = false;
|
|
516
|
+
}
|
|
517
|
+
connectedCallback() {
|
|
518
|
+
super.connectedCallback();
|
|
519
|
+
}
|
|
520
|
+
disconnectedCallback() {
|
|
521
|
+
super.disconnectedCallback();
|
|
522
|
+
}
|
|
523
|
+
_openPopup() {
|
|
524
|
+
const offline = (0,external_SolidLogic_.offlineTestID)();
|
|
525
|
+
if (offline) {
|
|
526
|
+
this._loginComplete(offline.uri);
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
this._issuerInputValue = typeof localStorage !== 'undefined' && localStorage.getItem('loginIssuer') || this.issuerUrl || '';
|
|
530
|
+
this._errorMsg = '';
|
|
531
|
+
this._popupOpen = true;
|
|
532
|
+
}
|
|
533
|
+
_closePopup() {
|
|
534
|
+
this._popupOpen = false;
|
|
535
|
+
}
|
|
536
|
+
updated() {
|
|
537
|
+
const dialog = this.shadowRoot?.querySelector('dialog');
|
|
538
|
+
if (!dialog) return;
|
|
539
|
+
if (this._popupOpen && !dialog.open) {
|
|
540
|
+
dialog.showModal();
|
|
541
|
+
} else if (!this._popupOpen && dialog.open) {
|
|
542
|
+
dialog.close();
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
async _loginToIssuer(issuerUri) {
|
|
546
|
+
if (!issuerUri) return;
|
|
547
|
+
try {
|
|
548
|
+
// clear authorization metadata from store
|
|
549
|
+
;
|
|
550
|
+
external_SolidLogic_.solidLogicSingleton.store.updater.flagAuthorizationMetadata();
|
|
551
|
+
const preLoginRedirectHash = new URL(window.location.href).hash;
|
|
552
|
+
if (preLoginRedirectHash) {
|
|
553
|
+
window.localStorage.setItem('preLoginRedirectHash', preLoginRedirectHash);
|
|
554
|
+
}
|
|
555
|
+
window.localStorage.setItem('loginIssuer', issuerUri);
|
|
556
|
+
const locationUrl = new URL(window.location.href);
|
|
557
|
+
locationUrl.hash = '';
|
|
558
|
+
await external_SolidLogic_.authSession.login({
|
|
559
|
+
redirectUrl: locationUrl.href,
|
|
560
|
+
oidcIssuer: issuerUri
|
|
561
|
+
});
|
|
562
|
+
} catch (err) {
|
|
563
|
+
this._errorMsg = err.message || String(err);
|
|
564
|
+
this.requestUpdate();
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
_loginComplete(webIdUri) {
|
|
568
|
+
external_SolidLogic_.authn.saveUser(webIdUri);
|
|
569
|
+
this.dispatchEvent(new CustomEvent('login-success', {
|
|
570
|
+
detail: {
|
|
571
|
+
webId: webIdUri
|
|
572
|
+
},
|
|
573
|
+
bubbles: true,
|
|
574
|
+
composed: true
|
|
575
|
+
}));
|
|
576
|
+
}
|
|
577
|
+
_handleGoClick() {
|
|
578
|
+
this._dropdownOpen = false;
|
|
579
|
+
this._loginToIssuer(this._issuerInputValue);
|
|
580
|
+
}
|
|
581
|
+
_toggleDropdown() {
|
|
582
|
+
this._dropdownOpen = !this._dropdownOpen;
|
|
583
|
+
}
|
|
584
|
+
_selectIssuerFromDropdown(uri) {
|
|
585
|
+
this._issuerInputValue = uri;
|
|
586
|
+
this._dropdownOpen = false;
|
|
587
|
+
}
|
|
588
|
+
_handleInputChange(e) {
|
|
589
|
+
this._issuerInputValue = e.target.value;
|
|
590
|
+
}
|
|
591
|
+
_handleInputKeydown(e) {
|
|
592
|
+
if (e.key === 'Enter') {
|
|
593
|
+
this._loginToIssuer(this._issuerInputValue);
|
|
594
|
+
}
|
|
595
|
+
if (e.key === 'Escape') {
|
|
596
|
+
this._closePopup();
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
_renderPopup() {
|
|
600
|
+
const suggestedIssuers = (0,external_SolidLogic_.getSuggestedIssuers)();
|
|
601
|
+
return (0,lit/* html */.qy)`
|
|
602
|
+
<div class="popup-box">
|
|
603
|
+
<div class="popup-top-menu">
|
|
604
|
+
<span class="popup-title">Select an identity provider</span>
|
|
605
|
+
<button class="popup-close" type="button" aria-label="Close" @click="${() => this._closePopup()}">✕</button>
|
|
606
|
+
</div>
|
|
607
|
+
|
|
608
|
+
<div class="issuer-text-section">
|
|
609
|
+
<label class="issuer-text-label" for="${this._issuerInputId}">Solid Identity Provider</label>
|
|
610
|
+
<div class="issuer-text-row">
|
|
611
|
+
<div class="issuer-input-wrapper">
|
|
612
|
+
<div class="issuer-input-field-row">
|
|
613
|
+
<input
|
|
614
|
+
id="${this._issuerInputId}"
|
|
615
|
+
class="issuer-text-input"
|
|
616
|
+
type="text"
|
|
617
|
+
placeholder="https://example.com"
|
|
618
|
+
.value="${this._issuerInputValue}"
|
|
619
|
+
@input="${this._handleInputChange}"
|
|
620
|
+
@keydown="${this._handleInputKeydown}"
|
|
621
|
+
autocomplete="url"
|
|
622
|
+
/>
|
|
623
|
+
${suggestedIssuers.length ? (0,lit/* html */.qy)`
|
|
624
|
+
<button
|
|
625
|
+
class="issuer-dropdown-toggle"
|
|
626
|
+
type="button"
|
|
627
|
+
aria-label="Show identity provider suggestions"
|
|
628
|
+
aria-expanded="${this._dropdownOpen}"
|
|
629
|
+
@click="${() => this._toggleDropdown()}"
|
|
630
|
+
>${phoneIcon}</button>
|
|
631
|
+
` : ''}
|
|
632
|
+
</div>
|
|
633
|
+
${this._dropdownOpen && suggestedIssuers.length ? (0,lit/* html */.qy)`
|
|
634
|
+
<div class="issuer-dropdown-list" role="listbox">
|
|
635
|
+
${suggestedIssuers.map(issuerInfo => (0,lit/* html */.qy)`
|
|
636
|
+
<button
|
|
637
|
+
class="issuer-dropdown-item"
|
|
638
|
+
type="button"
|
|
639
|
+
role="option"
|
|
640
|
+
@click="${() => this._selectIssuerFromDropdown(issuerInfo.uri)}"
|
|
641
|
+
>${issuerInfo.name}</button>
|
|
642
|
+
`)}
|
|
643
|
+
</div>
|
|
644
|
+
` : ''}
|
|
645
|
+
</div>
|
|
646
|
+
</div>
|
|
647
|
+
${this._errorMsg ? (0,lit/* html */.qy)`<div class="error-msg">${this._errorMsg}</div>` : ''}
|
|
648
|
+
</div>
|
|
649
|
+
<hr class="popup-footer-hr" />
|
|
650
|
+
<div class="popup-footer">
|
|
651
|
+
<button class="popup-cancel-button" type="button" @click="${() => this._closePopup()}">Cancel</button>
|
|
652
|
+
<button
|
|
653
|
+
class="popup-login-button"
|
|
654
|
+
type="button"
|
|
655
|
+
?disabled="${!this._issuerInputValue}"
|
|
656
|
+
@click="${() => this._handleGoClick()}"
|
|
657
|
+
>Log In</button>
|
|
658
|
+
</div>
|
|
659
|
+
</div>
|
|
660
|
+
`;
|
|
661
|
+
}
|
|
662
|
+
render() {
|
|
663
|
+
return (0,lit/* html */.qy)`
|
|
664
|
+
<button
|
|
665
|
+
class="login-button"
|
|
666
|
+
type="button"
|
|
667
|
+
part="login-button"
|
|
668
|
+
@click="${() => this._openPopup()}"
|
|
669
|
+
>
|
|
670
|
+
${this.icon ? (0,lit/* html */.qy)`<img class="login-button-icon" src="${this.icon}" alt="" aria-hidden="true" part="login-button-icon" />` : ''}
|
|
671
|
+
<slot>${this.label}</slot>
|
|
672
|
+
</button>
|
|
673
|
+
|
|
674
|
+
<dialog
|
|
675
|
+
class="popup-dialog"
|
|
676
|
+
role="dialog"
|
|
677
|
+
aria-modal="true"
|
|
678
|
+
aria-label="Select an identity provider"
|
|
679
|
+
@cancel="${e => {
|
|
680
|
+
e.preventDefault();
|
|
681
|
+
this._closePopup();
|
|
682
|
+
}}"
|
|
683
|
+
@click="${e => {
|
|
684
|
+
if (e.target === e.currentTarget) this._closePopup();
|
|
685
|
+
}}"
|
|
686
|
+
>
|
|
687
|
+
${this._popupOpen ? this._renderPopup() : ''}
|
|
688
|
+
</dialog>
|
|
689
|
+
`;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
;// ./src/v2/components/loginButton/index.ts
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
const LOGIN_BUTTON_TAG_NAME = 'solid-ui-login-button';
|
|
696
|
+
if (!customElements.get(LOGIN_BUTTON_TAG_NAME)) {
|
|
697
|
+
customElements.define(LOGIN_BUTTON_TAG_NAME, LoginButton);
|
|
698
|
+
}
|
|
699
|
+
/******/ })()
|
|
700
|
+
;
|
|
701
|
+
//# sourceMappingURL=index.js.map
|