pwa-auth 2.0.5 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +21 -2
  2. package/README.md +51 -133
  3. package/demo/{pwa-styles.css → css/pwa-styles.css} +1 -1
  4. package/demo/images/empty.jpg +0 -0
  5. package/demo/index.html +8 -8
  6. package/deploy/css/default.d.ts +5 -0
  7. package/deploy/css/default.d.ts.map +1 -0
  8. package/deploy/css/default.js +99 -0
  9. package/deploy/css/form/button.js +3 -3
  10. package/deploy/css/form/input.js +1 -1
  11. package/deploy/css/form/label.js +1 -1
  12. package/deploy/custom-elements/drawer/css/drawer.js +5 -5
  13. package/deploy/custom-elements/icon/css/icon.js +11 -11
  14. package/deploy/custom-elements/icon/icon.d.ts +1 -0
  15. package/deploy/custom-elements/icon/icon.d.ts.map +1 -1
  16. package/deploy/custom-elements/icon/icon.js +5 -1
  17. package/deploy/custom-elements/settings/css/navigation.js +2 -2
  18. package/deploy/custom-elements/settings/input/uploader.d.ts +1 -0
  19. package/deploy/custom-elements/settings/input/uploader.d.ts.map +1 -1
  20. package/deploy/custom-elements/settings/input/uploader.js +5 -1
  21. package/deploy/custom-elements/settings/settings.d.ts +1 -0
  22. package/deploy/custom-elements/settings/settings.d.ts.map +1 -1
  23. package/deploy/custom-elements/settings/settings.js +10 -6
  24. package/deploy/firebase/start.js +6 -6
  25. package/deploy/redux/frontend.js +1 -1
  26. package/npm/images/empty.jpg +0 -0
  27. package/npm/pwa-auth.js +1 -1
  28. package/package.json +1 -1
  29. package/source/css/default.ts +111 -0
  30. package/source/css/form/button.ts +3 -3
  31. package/source/css/form/input.ts +1 -1
  32. package/source/css/form/label.ts +1 -1
  33. package/source/custom-elements/drawer/css/drawer.ts +5 -5
  34. package/source/custom-elements/icon/css/icon.ts +11 -11
  35. package/source/custom-elements/icon/icon.ts +5 -2
  36. package/source/custom-elements/settings/css/navigation.ts +2 -2
  37. package/source/custom-elements/settings/input/uploader.ts +4 -1
  38. package/source/custom-elements/settings/settings.ts +9 -6
  39. package/source/firebase/start.ts +6 -6
  40. package/source/redux/frontend.ts +1 -1
  41. package/website/index.html +14 -6
  42. package/website/js/pwa-auth.js +1 -1
  43. /package/demo/{styles.css → css/styles.css} +0 -0
package/CHANGELOG.md CHANGED
@@ -6,9 +6,28 @@ All notable changes to pwa-auth.js will be documented in this file.
6
6
  - Social Login Flow
7
7
  - animated login and data
8
8
 
9
- # [2.0.4] - 2025-09-06
9
+ # [2.0.7] - 2025-09-07
10
10
 
11
- # Changed
11
+ ## Changed
12
+ - CSS Custom Properties Default
13
+
14
+ ## Notes
15
+ * Both - Client-side and Server-side - Object - Libraries
16
+ - in browser: window
17
+ - in node.js: global
18
+ - in web workers: self
19
+ - ECMA Script 2020+: globalThis
20
+
21
+ # [2.0.6] - 2025-09-07
22
+
23
+ ## Changed
24
+ - start.js: default no-image storage, default no-image hyperlink
25
+ - default image changed to svg
26
+ - user-icon, user-settings: Empty Artwork URL, Property
27
+
28
+ # [2.0.5] - 2025-09-06
29
+
30
+ ## Changed
12
31
  - user-icon: login button - line-height configuration
13
32
  - (Public) Folder to (Website) Project Folder
14
33
 
package/README.md CHANGED
@@ -2,7 +2,6 @@ Progressive Website Application - Authentication
2
2
  ======================
3
3
  Jack's Publishing maintains Custom HTML Elements where developers can focus on UX rather than low-level API calls.
4
4
 
5
-
6
5
  pwa-auth.js is a bundle of 3 Custom HTML Elements for Firebase (IAM) Authenication using email and password, with the ability to change username, icon, email, password, or delete your own account and it's content all together.
7
6
 
8
7
  pwa-auth.js (Authentication Components) are for anyone who is looking for a quick and simple way to sign-up, log-in, log-out, modify, or delete a firebase account information from thier own personal domain.
@@ -12,15 +11,8 @@ pwa-auth.js meets basic user needs with the interplay of:
12
11
  - Drop-down Drawer
13
12
  - Settings Page
14
13
 
15
-
16
-
17
14
  You will learn how to place 3 Custom HTML Tags, reference CSS, and How to Initialize an Firebase Instance. By either <b>Standard</b> or <b>Modular</b> ECMA Script.
18
15
 
19
- <!--
20
- Jack's Publishing is dedicated to maintaining components for this project.
21
-
22
- pwa-auth.js is designed to be simple, by meeting basic user needs with the interplay of an Icon Button, Drop-down Drawer, and a Settings Page.
23
- -->
24
16
  Continue reading to start installing the bundle:
25
17
  - Pick the JavaScript File Type to Reference
26
18
  - Understand the Library Features
@@ -31,7 +23,7 @@ Continue reading to start installing the bundle:
31
23
 
32
24
  Visit: [Live Demo](https://pwa-authentic.firebaseapp.com)
33
25
 
34
- ## pwa-auth.js Features:
26
+ ## Features:
35
27
  - Register through Email and Password
36
28
  - Log-in
37
29
  - Log-out
@@ -45,25 +37,33 @@ Visit: [Live Demo](https://pwa-authentic.firebaseapp.com)
45
37
  - copy the bundle
46
38
  - node_modules/pwa-auth/npm/pwa-auth.js
47
39
  - node_modules/pwa-auth/npm/pwa-styles.css
40
+ - node_modules/pwa-auth/npm/images/empty.jpg
48
41
 
49
42
  ## Modular JavaScript
50
43
  ```javascript
51
44
  import 'pwa-auth';
52
45
  ```
53
-
54
- ## Boilerplate
55
- - 3 Tag Placements (HTML - Custom Elements)
46
+ ## HTML
47
+ - Custom Elements
56
48
  - user-icon
57
49
  - user-drawer
58
50
  - user-settings
59
- - Cascading Style Sheets (CSS - Custom Properties)
60
- - ECMA Script (JavaScript)
61
51
 
62
- ## HTML Custom Elements
63
- ```html
52
+ ## CSS
53
+ - Custom Properties
54
+
55
+ ## JavaScript
56
+ - Google Prerequisites:
57
+ - Google Analytics
58
+ - Firebase Project
59
+ - Firebase Services:
60
+ - Authentication - email login
61
+ - Cloud Storage - storage bucket
64
62
 
63
+ ## Boilerplate
64
+ ```html
65
65
  <head>
66
- <!-- CSS Custom Properties - Choice 1: Link Tag -->
66
+ <!-- pwa-auth.js - CSS Custom Properties - Choice 1: Link Tag -->
67
67
  <link type="stylesheet" href="pwa-styles.css">
68
68
  </head>
69
69
 
@@ -75,7 +75,8 @@ import 'pwa-auth';
75
75
  <!-- Logged-out (State): txt: Login Button -->
76
76
  <!-- Logged-out (State): txt: Subscribe Button -->
77
77
  <!-- Logged-in (State): photo: Icon Button -->
78
- <user-icon subscribe></user-icon>
78
+ <!-- emptyArtwork property: location of empty image -->
79
+ <user-icon subscribe emptyArtwork="images/empty.jpg"></user-icon>
79
80
  </header>
80
81
 
81
82
  <!-- settingsURL property: location of <pwa-settings> Tag -->
@@ -94,11 +95,39 @@ import 'pwa-auth';
94
95
  <!-- Update Email / Verify -->
95
96
  <!-- Update Password -->
96
97
  <!-- Delete Account, Photos, Information -->
97
- <user-settings></user-settings>
98
+ <!-- emptyArtwork property: location of empty image -->
99
+ <user-settings emptyArtwork="images/empty.jpg"></user-settings>
98
100
  </main>
99
101
 
100
- <script>/* Firebase Instance Configuration */</script>
101
- <style>/* CSS Custom Properties - Choice 2: Style Tag */</style>
102
+ <!-- pwa-auth.js - CSS Custom Variables - Choice 2: Style Tag -->
103
+ <style>
104
+ :root {
105
+ --pwa_icon_diameter: 32px;
106
+ /* copy all properties from css/pwa-styles.css */
107
+ }
108
+ </style>
109
+
110
+ <!-- pwa-auth.js - Firebase Instance -->
111
+ <script>
112
+ // Firebase Configuration Object
113
+ window.process = { env: { FIREBASE_CONFIG: JSON.stringify({
114
+ apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
115
+ authDomain: "xxxxxxx.xxxxxxx.xxx",
116
+ databaseURL: "https://xxxxxxx.xxxxxxx.xxx",
117
+ projectId: "xxxxxxx",
118
+ storageBucket: "xxxxxxx.xxxxxxx.xxx",
119
+ messagingSenderId: "xxxxxxxxxxx",
120
+ appId: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
121
+ measurementId: "xxxxxxxxxxx"
122
+ })
123
+ }
124
+ };
125
+
126
+ // Localhost - Firebase Configuratioon Object
127
+ if (lolalhost) { window.process = { env: { FIREBASE_CONFIG: 'etc.' } } }
128
+ </script>
129
+
130
+ <!-- pwa-auth.js - Webcomponent Library -->
102
131
  <script src="pwa-auth.js"></script>
103
132
 
104
133
  </body>
@@ -130,111 +159,6 @@ import 'pwa-auth';
130
159
  | --pwa_action_background_color | Button | #6cc04a | user-settings |
131
160
  | --pwa_action_border_color | Button | #60b23e | user-settings |
132
161
 
133
- ## CSS Design
134
- ```html
135
- <!-- CSS: Custom Variables -->
136
- <style>
137
-
138
- :root {
139
-
140
- /* WebComponent 1 : User Icon
141
- <user-icon>
142
- <button> */
143
- --pwa_icon_hover: lightgrey;
144
- --pwa_icon_background: #6cc04a;
145
- --pwa_icon_border: 2px solid black;
146
-
147
- /* WebComponent 1: logged-out
148
- <user-icon>
149
- <button class="login"> */
150
- --pwa_icon_height: 32px; /* sync to --pwa_icon_diameter */
151
- --pwa_icon_padding: 0px 16px;
152
- --pwa_icon_radius: 6px;
153
- --pwa_icon_font: 'Arial', sans-serif;
154
-
155
- /* WebComponent 1: logged-in
156
- <user-icon>
157
- <button class="icon"> */
158
- --pwa_icon_diameter: 32px; /* sync to --pwa_icon_height */
159
-
160
-
161
-
162
- /* WebComponent 2: Drop-down Drawer
163
- <user-drawer>
164
- <section>
165
- <header></header>
166
- <div class="spec"> */
167
- --pwa_drawer_border: 3px #303030 solid;
168
- --pwa_drawer_z-index: 2;
169
- --pwa_drawer_border-radius: 20px;
170
-
171
- /* WebComponent 2: Drop-down Drawer - logged-out
172
- <div class="spec"> */
173
- --pwa_drawer_text_color: #303030;
174
- --pwa_drawer_background_color: #fff;
175
-
176
-
177
-
178
- /* WebComponent 3: Settings Page
179
- <user-settings>
180
- <nav></nav>
181
- <section></section> */
182
- --pwa_settings_background: white;
183
- --pwa_divider: black;
184
-
185
- /* Navigation */
186
- --pwa_nav_button: grey;
187
- --pwa_nav_select: black;
188
-
189
- /* Section Header */
190
- --pwa_section_header: black;
191
-
192
- /* Label */
193
- --pwa_label_text_color: black;
194
-
195
- /* Input */
196
- --pwa_input_background: #E1E5EB;
197
-
198
- /* Button */
199
- --pwa_action_text_color: #fff;
200
- --pwa_action_background_color: #6cc04a;
201
- --pwa_action_border_color: #60b23e;
202
-
203
- }
204
-
205
- </style>
206
- ```
207
-
208
- ## Google Prerequisites
209
- - Google Analytics
210
- - Firebase Project
211
-
212
- ## Firebase Services
213
- - Authentication - email login
214
- - Cloud Storage - storage bucket
215
-
216
- ## JavaScript, Firebase Instance Configuration
217
- ```html
218
- <script>
219
- // Firebase configuration Object
220
- window.process = { env: { FIREBASE_CONFIG: JSON.stringify({
221
- apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
222
- authDomain: "xxxxxxx.xxxxxxx.xxx",
223
- databaseURL: "https://xxxxxxx.xxxxxxx.xxx",
224
- projectId: "xxxxxxx",
225
- storageBucket: "xxxxxxx.xxxxxxx.xxx",
226
- messagingSenderId: "xxxxxxxxxxx",
227
- appId: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
228
- measurementId: "xxxxxxxxxxx"
229
- })
230
- }
231
- };
232
-
233
- // Localhost - Firebase Configuratioon Object
234
- if (lolalhost) { window.process = { env: { FIREBASE_CONFIG: 'etc.' } } }
235
- </script>
236
- ```
237
-
238
162
  ## Global Namespaced Firebase Instance Configuration
239
163
  pwa-auth.js is built upon the Firebase SDK (Software Development Kit).
240
164
  The entire bundle is one instance of firebase that takes in the configuration information, internally.
@@ -247,15 +171,9 @@ If you are looking for a Namespaced Firebase Configuration, please send it as fe
247
171
  - Predicate State Behavior: [Redux](https://redux.js.org/)
248
172
  - Frontend (Client-side): [Lit](https://lit.dev)
249
173
 
250
- ### Both - Client-side and Server-side - Object - Libraries
251
- - in browser: window
252
- - in node.js: global
253
- - in web workers: self
254
- - ECMA Script 2020+: globalThis
255
-
256
174
  ## Feedback
257
175
  All feedback, comments, bugs, and requests are welcome.
258
176
  * [Jack's Publishing](https://www.jackspublishing.com)
259
177
  * [contractor's centre](https://www.contractorscentre.com)
260
178
  * [Node Package Manager](https://www.npmjs.com/package/pwa-auth)
261
- * [Sponsor Jacek Markiewicz](https://github.com/sponsors/busynest/button)
179
+ * [Sponsor Jacek Markiewicz](https://github.com/sponsors/busynest/button)
@@ -55,7 +55,7 @@
55
55
  --pwa_nav_select: black;
56
56
 
57
57
  /* Section Header */
58
- --pwa_section_header: black;
58
+ --pwa_section_header: black;
59
59
 
60
60
  /* Label */
61
61
  --pwa_label_text_color: black;
Binary file
package/demo/index.html CHANGED
@@ -8,15 +8,15 @@
8
8
 
9
9
  <!-- Preconnect -->
10
10
  <link rel="preconnect" href="https://firebasestorage.googleapis.com">
11
-
11
+
12
12
  <!-- Pre-Fetch -->
13
13
  <link rel="dns-prefetch" href="https://firebasestorage.googleapis.com">
14
14
 
15
15
  <!-- Cascading Style Sheets -->
16
- <link rel="stylesheet" href="styles.css">
16
+ <link rel="stylesheet" href="css/styles.css">
17
17
 
18
- <!-- pwa-auth.js - CSS Custom Variables -->
19
- <link rel="stylesheet" href="pwa-styles.css">
18
+ <!-- pwa-auth.js - CSS Custom Variables - Option 1
19
+ <link rel="stylesheet" href="css/pwa-styles.css"> -->
20
20
 
21
21
  <!-- pwa-auth.js - Module Configuration Objects -->
22
22
  <script>
@@ -40,17 +40,17 @@
40
40
  <header>
41
41
 
42
42
  <!-- Icon Tag -->
43
- <user-icon subscribe></user-icon>
43
+ <user-icon subscribe emptyArtwork="images/empty.jpg"></user-icon>
44
44
 
45
45
  </header>
46
46
 
47
47
  <!-- Drawer Tag-->
48
- <user-drawer subscribe settingsURL="/demo/settings"></user-drawer>
48
+ <user-drawer subscribe settingsURL="settings"></user-drawer>
49
49
 
50
50
  <main>
51
51
 
52
52
  <!-- Settings Tag-->
53
- <user-settings></user-settings>
53
+ <user-settings emptyArtwork="images/empty.jpg"></user-settings>
54
54
 
55
55
  </main>
56
56
 
@@ -64,7 +64,7 @@
64
64
  </footer>
65
65
 
66
66
  <!-- Application Shell -->
67
- <script type="module" src="pwa-auth.js" async></script>
67
+ <script type="module" src="../pwa-auth.js" async></script>
68
68
 
69
69
  </body>
70
70
 
@@ -0,0 +1,5 @@
1
+ export declare const iconRoot: import("lit").CSSResult;
2
+ export declare const drawerRoot: import("lit").CSSResult;
3
+ export declare const settingsRoot: import("lit").CSSResult;
4
+ export declare const themeRoot: import("lit").CSSResult;
5
+ //# sourceMappingURL=default.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../source/css/default.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,yBA4BpB,CAAC;AAEF,eAAO,MAAM,UAAU,yBAyBtB,CAAC;AAEF,eAAO,MAAM,YAAY,yBAiCxB,CAAC;AAUF,eAAO,MAAM,SAAS,yBAQrB,CAAC"}
@@ -0,0 +1,99 @@
1
+ import { css } from "lit";
2
+ export const iconRoot = css `
3
+
4
+ /* CSS: Custom Variables: <head> tag */
5
+
6
+ :root {
7
+
8
+ /* WebComponent 1 : User Icon
9
+ <user-icon>
10
+ <button> */
11
+ --pwa_icon_hover: lightgrey; /* custom-elements Folder > icon Folder > CSS Folder > icon.ts */
12
+ --pwa_icon_background: #6cc04a; /* custom-elements Folder > icon Folder > CSS Folder > icon.ts */
13
+ --pwa_icon_border: 2px solid black; /* custom-elements Folder > icon Folder > CSS Folder > icon.ts */
14
+
15
+ /* WebComponent 1: logged-out
16
+ <user-icon>
17
+ <button class="login"> */
18
+ --pwa_icon_height: 32px; /* sync to --pwa_icon_diameter */ /* custom-elements Folder > icon Folder > CSS Folder > icon.ts */
19
+ --pwa_icon_padding: 0px 16px; /* custom-elements Folder > icon Folder > CSS Folder > icon.ts */
20
+ --pwa_icon_radius: 6px; /* custom-elements Folder > icon Folder > CSS Folder > icon.ts */
21
+ --pwa_icon_font: 'Arial', sans-serif; /* custom-elements Folder > icon Folder > CSS Folder > icon.ts */
22
+
23
+ /* WebComponent 1: logged-in
24
+ <user-icon>
25
+ <button class="icon"> */
26
+ --pwa_icon_diameter: 32px; /* sync to --pwa_icon_height */ /* custom-elements Folder > icon Folder > CSS Folder > icon.ts */
27
+
28
+ }
29
+
30
+ `;
31
+ export const drawerRoot = css `
32
+
33
+ /* CSS: Custom Variables: <head> tag */
34
+
35
+ :root {
36
+
37
+ /* WebComponent 2: Drop-down Drawer
38
+ <user-drawer>
39
+ <section>
40
+ <header></header>
41
+ <div class="spec"> */
42
+ --pwa_drawer_border: 3px #303030 solid; /* custom-elements Folder > drawer Folder > CSS Folder > drawer.ts */
43
+ --pwa_drawer_z-index: 2; /* custom-elements Folder > drawer Folder > CSS Folder > drawer.ts */
44
+ --pwa_drawer_border-radius: 20px; /* custom-elements Folder > drawer Folder > CSS Folder > drawer.ts */
45
+
46
+ /* WebComponent 2: Drop-down Drawer - logged-out
47
+ <div class="spec"> */
48
+ --pwa_drawer_text_color: #303030; /* custom-elements Folder > drawer Folder > CSS Folder > drawer.ts */
49
+ --pwa_drawer_background_color: #fff; /* custom-elements Folder > drawer Folder > CSS Folder > drawer.ts */
50
+
51
+ /* WebComponent 2: Drop-down Drawer - logged-in
52
+ <div class="spec" on> */
53
+
54
+ }
55
+
56
+ `;
57
+ export const settingsRoot = css `
58
+
59
+ /* CSS: Custom Variables: <head> tag */
60
+
61
+ :root {
62
+
63
+ /* WebComponent 3: Settings Page
64
+ <user-settings>
65
+ <nav></nav>
66
+ <section></section> */
67
+ --pwa_settings_background: white; /* custom-elements Folder > settings Folder > settings.ts */
68
+ --pwa_divider: black; /* custom-elements Folder > settings Folder > settings.ts */
69
+
70
+ /* Navigation */
71
+ --pwa_nav_button: grey; /* custom-elements Folder > settings Folder > CSS Folder > navigation.ts */
72
+ --pwa_nav_select: black; /* custom-elements Folder > settings Folder > CSS Folder > navigation.ts */
73
+
74
+ /* Section Header */
75
+ --pwa_section_header: black; /* custom-elements Folder > settings Folder > settings.ts */
76
+
77
+ /* Label */
78
+ --pwa_label_text_color: black; /* Form Folder > label.ts */
79
+
80
+ /* Input */
81
+ --pwa_input_background: #E1E5EB; /* Form Folder > input.ts */
82
+
83
+ /* Button */
84
+ --pwa_action_text_color: #fff; /* Form Folder > button.ts */
85
+ --pwa_action_background_color: #6cc04a; /* Form Folder > button.ts */
86
+ --pwa_action_border_color: #60b23e; /* Form Folder > button.ts */
87
+
88
+ }
89
+
90
+ `;
91
+ export const themeRoot = css `
92
+
93
+ /* Dark Theme */
94
+ @media (prefers-color-scheme: dark) { }
95
+
96
+ /* Light Theme */
97
+ @media (prefers-color-scheme: light) { }
98
+
99
+ `;
@@ -19,9 +19,9 @@ export const buttonStyle = css `
19
19
  line-height: 16px;
20
20
  padding: 10px 16px;
21
21
  border-radius: 6px;
22
- color: var(--pwa_action_text_color);
23
- background-color: var(--pwa_action_background_color);
24
- border-color: var(--pwa_action_border_color);
22
+ color: var(--pwa_action_text_color, #fff);
23
+ background-color: var(--pwa_action_background_color, #6cc04a);
24
+ border-color: var(--pwa_action_border_color, #60b23e);
25
25
  box-shadow: 1px 1px 1px grey;
26
26
  }
27
27
 
@@ -11,7 +11,7 @@ export const inputStyle = css `
11
11
  text-align: left;
12
12
  margin: 0 16px 0 16px;
13
13
  padding: 8px 16px;
14
- background-color: var(--pwa_input_background);
14
+ background-color: var(--pwa_input_background, #E1E5EB);
15
15
  border: 0;
16
16
  border-radius: 4px;
17
17
  -webkit-border-radius: 4px;
@@ -4,7 +4,7 @@ export const labelStyle = css `
4
4
  label { font-size: .9em; }
5
5
  label {
6
6
  display: grid;
7
- color: var(--pwa_label_text_color);
7
+ color: var(--pwa_label_text_color, black);
8
8
  box-sizing: border-box;
9
9
  width: 100%;
10
10
  font-size: smaller;
@@ -25,13 +25,13 @@ export const drawerStyle = css `
25
25
  left: 0;
26
26
  right: 0;
27
27
  transition-duration: 1.4s;
28
- border: var(--pwa_drawer_border);
29
- z-index: var(--pwa_drawer_z-index);
28
+ border: var(--pwa_drawer_border, 3px #303030 solid);
29
+ z-index: var(--pwa_drawer_z-index, 2);
30
30
  overflow: hidden;
31
- background-color: var(--pwa_drawer_background_color);
32
- color: var(--pwa_drawer_text_color);
31
+ background-color: var(--pwa_drawer_background_color, #fff);
32
+ color: var(--pwa_drawer_text_color, #303030);
33
33
  box-sizing: border-box;
34
- border-radius: var(--pwa_drawer_border-radius);
34
+ border-radius: var(--pwa_drawer_border-radius, 20px);
35
35
  height: auto;
36
36
  transition-property: visibility, max-height;
37
37
  }
@@ -11,8 +11,8 @@ export const iconStyles = css `
11
11
  cursor: pointer;
12
12
  margin: auto;
13
13
  overflow: hidden;
14
- border: var(--pwa_icon_border);
15
- background-color: var(--pwa_icon_background);
14
+ border: var(--pwa_icon_border, 2px solid black);
15
+ background-color: var(--pwa_icon_background, #6cc04a);
16
16
  color: white;
17
17
  font-size: 15px;
18
18
  text-decoration: none;
@@ -22,13 +22,13 @@ export const iconStyles = css `
22
22
  /* Hover Styles */
23
23
  .icon:hover,
24
24
  .login:hover {
25
- background-color: var(--pwa_icon_hover);
25
+ background-color: var(--pwa_icon_hover, lightgrey);
26
26
  }
27
27
 
28
28
  /* Logged-in State: The Icon Button */
29
29
  .icon {
30
- height: var(--pwa_icon_diameter);
31
- width: var(--pwa_icon_diameter);
30
+ height: var(--pwa_icon_diameter, 32px);
31
+ width: var(--pwa_icon_diameter, 32px);
32
32
  border-radius: 50%;
33
33
  padding: 0;
34
34
  }
@@ -36,10 +36,10 @@ export const iconStyles = css `
36
36
  /* The Login Button */
37
37
  .login {
38
38
  width: auto;
39
- border-radius: var(--pwa_icon_radius);
40
- height: var(--pwa_icon_height);
41
- padding: var(--pwa_icon_padding);
42
- font-family: var(--pwa_icon_font);
39
+ border-radius: var(--pwa_icon_radius, 6px);
40
+ height: var(--pwa_icon_height, 32px);
41
+ padding: var(--pwa_icon_padding, 0px 16px);
42
+ font-family: var(--pwa_icon_font, 'Arial', sans-serif);
43
43
  font-weight: 500;
44
44
  text-align: center;
45
45
  }
@@ -51,8 +51,8 @@ export const iconStyles = css `
51
51
  transition-duration: 2s;
52
52
  clip-path: circle(50%);
53
53
  overflow: hidden;
54
- width: calc(var(--pwa_icon_diameter) - 2px);
55
- height: calc(var(--pwa_icon_diameter) - 2px);
54
+ width: calc(var(--pwa_icon_diameter, 32px) - 2px);
55
+ height: calc(var(--pwa_icon_diameter, 32px) - 2px);
56
56
  margin: auto;
57
57
  }
58
58
 
@@ -15,6 +15,7 @@ declare const UserIcon_base: (new (...args: any[]) => {
15
15
  }) & typeof LitElement;
16
16
  export declare class UserIcon extends UserIcon_base {
17
17
  subscribe: boolean;
18
+ emptyArtwork: string;
18
19
  private _user;
19
20
  private _photoURL;
20
21
  constructor();
@@ -1 +1 @@
1
- {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../source/custom-elements/icon/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,MAAQ,KAAK,CAAC;AAGzD,OAAO,EAAS,QAAQ,EAAE,MAAyB,aAAa,CAAC;;;;;;;;;;;;;;AAKjE,qBACa,QAAS,SAAQ,aAA0B;IAGL,SAAS,UAAS;IAE1D,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,SAAS,CAAM;;IAKhC,SAAS,CAAC,YAAY;IAOtB,YAAY,CAAC,KAAK,EAAE,QAAQ;IAM5B,MAAM,KAAK,MAAM,IAAG,cAAc,CAA0B;IAE5D,SAAS,CAAC,MAAM;CAyBjB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,WAAW,EAAE,QAAQ,CAAC;KACzB;CACF"}
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../source/custom-elements/icon/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,MAAQ,KAAK,CAAC;AAGzD,OAAO,EAAS,QAAQ,EAAE,MAAyB,aAAa,CAAC;;;;;;;;;;;;;;AAKjE,qBACa,QAAS,SAAQ,aAA0B;IAGL,SAAS,UAAS;IAGnB,YAAY,SAAM;IAEzD,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,SAAS,CAAM;;IAKhC,SAAS,CAAC,YAAY;IAOtB,YAAY,CAAC,KAAK,EAAE,QAAQ;IAM5B,MAAM,KAAK,MAAM,IAAG,cAAc,CAA0B;IAE5D,SAAS,CAAC,MAAM;CAyBjB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,WAAW,EAAE,QAAQ,CAAC;KACzB;CACF"}
@@ -14,6 +14,7 @@ let UserIcon = class UserIcon extends connect(store)(LitElement) {
14
14
  constructor() {
15
15
  super();
16
16
  this.subscribe = false;
17
+ this.emptyArtwork = '';
17
18
  this._user = false;
18
19
  this._photoURL = '';
19
20
  }
@@ -44,7 +45,7 @@ let UserIcon = class UserIcon extends connect(store)(LitElement) {
44
45
  alt = "Login"
45
46
  height = "38px"
46
47
  width = "38px"
47
- src = "${this._photoURL}">
48
+ src = "${this._photoURL ? this._photoURL : this.emptyArtwork}">
48
49
  <!-- </div> -->
49
50
  ` : this.subscribe ? 'Subscribe' : 'Login'}
50
51
 
@@ -56,6 +57,9 @@ let UserIcon = class UserIcon extends connect(store)(LitElement) {
56
57
  __decorate([
57
58
  property({ type: Boolean, reflect: true })
58
59
  ], UserIcon.prototype, "subscribe", void 0);
60
+ __decorate([
61
+ property({ type: String, reflect: true })
62
+ ], UserIcon.prototype, "emptyArtwork", void 0);
59
63
  __decorate([
60
64
  state()
61
65
  ], UserIcon.prototype, "_user", void 0);
@@ -18,7 +18,7 @@ export const navigation = css `
18
18
  /* Navigation Button */
19
19
  nav > ul > li > button {
20
20
 
21
- color: var(--pwa_nav_button);
21
+ color: var(--pwa_nav_button, grey);
22
22
  border: 0;
23
23
  width: 100%;
24
24
  height: 36px;
@@ -34,7 +34,7 @@ export const navigation = css `
34
34
  /* Navigation Button - Active */
35
35
  nav > ul > li > button[on] {
36
36
 
37
- color: var(--pwa_nav_select);
37
+ color: var(--pwa_nav_select, black);
38
38
 
39
39
  }
40
40
 
@@ -15,6 +15,7 @@ declare const ContactPhoto_base: (new (...args: any[]) => {
15
15
  }) & typeof LitElement;
16
16
  export declare class ContactPhoto extends ContactPhoto_base {
17
17
  photo: string | void | any;
18
+ emptyArtwork: string;
18
19
  private user;
19
20
  private login;
20
21
  private progress;
@@ -1 +1 @@
1
- {"version":3,"file":"uploader.d.ts","sourceRoot":"","sources":["../../../../source/custom-elements/settings/input/uploader.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,UAAU,EAAE,cAAc,EAAE,MAAQ,KAAK,CAAC;AAE9D,OAAO,EAAS,QAAQ,EAAE,MAAe,gBAAgB,CAAC;;;;;;;;;;;;;;AAQ1D,qBAAa,YAAa,SAAQ,iBAA0B;IAGvC,KAAK,EAAG,MAAM,GAAG,IAAI,GAAG,GAAG,CAAM;IAE3C,OAAO,CAAC,IAAI,CAAsB;IAClC,OAAO,CAAC,KAAK,CAAmB;IAIhC,OAAO,CAAC,QAAQ,CAAa;IAE7B,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,MAAM,CAAc;;IAWrC,YAAY,CAAC,KAAK,EAAE,QAAQ;IAU5B,MAAM,KAAK,MAAM,IAAG,cAAc,CAwBjC;IAED,SAAS,CAAC,MAAM;YA6FF,SAAS;IA0IvB,OAAO,CAAC,aAAa,CAYpB;CAEF;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,eAAe,EAAE,YAAY,CAAC;KACjC;CACF"}
1
+ {"version":3,"file":"uploader.d.ts","sourceRoot":"","sources":["../../../../source/custom-elements/settings/input/uploader.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,UAAU,EAAE,cAAc,EAAE,MAAQ,KAAK,CAAC;AAE9D,OAAO,EAAS,QAAQ,EAAE,MAAe,gBAAgB,CAAC;;;;;;;;;;;;;;AAQ1D,qBAAa,YAAa,SAAQ,iBAA0B;IAGvC,KAAK,EAAG,MAAM,GAAG,IAAI,GAAG,GAAG,CAAM;IAGJ,YAAY,SAAM;IAEzD,OAAO,CAAC,IAAI,CAAsB;IAClC,OAAO,CAAC,KAAK,CAAmB;IAIhC,OAAO,CAAC,QAAQ,CAAa;IAE7B,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,MAAM,CAAc;;IAWrC,YAAY,CAAC,KAAK,EAAE,QAAQ;IAU5B,MAAM,KAAK,MAAM,IAAG,cAAc,CAwBjC;IAED,SAAS,CAAC,MAAM;YA6FF,SAAS;IA0IvB,OAAO,CAAC,aAAa,CAYpB;CAEF;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC3B,eAAe,EAAE,YAAY,CAAC;KACjC;CACF"}
@@ -17,6 +17,7 @@ export class ContactPhoto extends connect(store)(LitElement) {
17
17
  constructor() {
18
18
  super();
19
19
  this.photo = '';
20
+ this.emptyArtwork = '';
20
21
  this.user = '';
21
22
  this.login = false;
22
23
  this.progress = 0;
@@ -115,7 +116,7 @@ export class ContactPhoto extends connect(store)(LitElement) {
115
116
  margin: auto;
116
117
  height: 200px;
117
118
  width: 100%;
118
- background-image: url(${this.photo});
119
+ background-image: url(${this.photo ? this.photo : this.emptyArtwork});
119
120
  background-size: contain;
120
121
  background-repeat: no-repeat;
121
122
  background-position: center;
@@ -202,6 +203,9 @@ export class ContactPhoto extends connect(store)(LitElement) {
202
203
  __decorate([
203
204
  property()
204
205
  ], ContactPhoto.prototype, "photo", void 0);
206
+ __decorate([
207
+ property({ type: String, reflect: true })
208
+ ], ContactPhoto.prototype, "emptyArtwork", void 0);
205
209
  __decorate([
206
210
  state()
207
211
  ], ContactPhoto.prototype, "user", void 0);