@things-factory/auth-ui 7.0.0-alpha.9 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/client/auth-style-sign.ts +45 -33
  2. package/client/bootstrap.ts +6 -10
  3. package/client/components/abstract-auth-page.ts +48 -24
  4. package/client/components/abstract-password-reset.ts +13 -9
  5. package/client/components/abstract-sign.ts +105 -0
  6. package/client/components/change-password.ts +4 -4
  7. package/client/components/contact-us.ts +20 -26
  8. package/client/components/create-domain-popup.ts +16 -12
  9. package/client/components/create-role.ts +14 -16
  10. package/client/components/create-user.ts +15 -14
  11. package/client/components/credential-manager.ts +64 -0
  12. package/client/components/delete-user-popup.ts +4 -3
  13. package/client/components/domain-switch.ts +18 -15
  14. package/client/components/invite-customer.ts +6 -10
  15. package/client/components/invite-user.ts +5 -8
  16. package/client/components/my-login-history.ts +2 -2
  17. package/client/components/ownership-transfer-popup.ts +7 -7
  18. package/client/components/partner-info-card.ts +6 -6
  19. package/client/components/partner-role-editor.ts +15 -23
  20. package/client/components/profile-component.ts +71 -15
  21. package/client/components/role-edit-form.ts +3 -3
  22. package/client/components/role-privilege-editor.ts +19 -29
  23. package/client/components/role-selector.ts +7 -7
  24. package/client/components/user-role-editor.ts +43 -50
  25. package/client/entries/auth/activate.ts +20 -21
  26. package/client/entries/auth/checkin.ts +29 -31
  27. package/client/entries/auth/forgot-password.ts +15 -9
  28. package/client/entries/auth/result.ts +21 -18
  29. package/client/entries/auth/signin.ts +4 -0
  30. package/client/entries/auth/signup.ts +31 -14
  31. package/client/entries/oauth2/oauth2-decision-error-page.ts +2 -2
  32. package/client/entries/oauth2/oauth2-decision-page.ts +56 -55
  33. package/client/entries/public/home.ts +52 -28
  34. package/client/index.ts +93 -66
  35. package/client/pages/app-binding/app-binding.ts +48 -30
  36. package/client/pages/app-binding/app-bindings.ts +26 -7
  37. package/client/pages/appliance/appliance.ts +85 -26
  38. package/client/pages/appliance/home.ts +28 -6
  39. package/client/pages/appliance/register.ts +7 -7
  40. package/client/pages/application/application.ts +108 -76
  41. package/client/pages/application/applications.ts +29 -15
  42. package/client/pages/application/register.ts +8 -8
  43. package/client/pages/attribute/attribute-set-item-list.ts +13 -19
  44. package/client/pages/attribute/attribute-set-management.ts +14 -20
  45. package/client/pages/auth-provider/auth-provider-management.ts +10 -16
  46. package/client/pages/domain/domain-management.ts +4 -9
  47. package/client/pages/partner/partner-management.ts +2 -2
  48. package/client/pages/profile.ts +1 -1
  49. package/client/pages/role/role-management.ts +14 -12
  50. package/client/pages/user/user-management.ts +7 -5
  51. package/client/themes/auth-theme.css +7 -10
  52. package/dist-client/auth-style-sign.js +45 -33
  53. package/dist-client/auth-style-sign.js.map +1 -1
  54. package/dist-client/bootstrap.d.ts +1 -1
  55. package/dist-client/bootstrap.js +5 -5
  56. package/dist-client/bootstrap.js.map +1 -1
  57. package/dist-client/components/abstract-auth-page.d.ts +5 -4
  58. package/dist-client/components/abstract-auth-page.js +46 -24
  59. package/dist-client/components/abstract-auth-page.js.map +1 -1
  60. package/dist-client/components/abstract-password-reset.d.ts +3 -2
  61. package/dist-client/components/abstract-password-reset.js +12 -9
  62. package/dist-client/components/abstract-password-reset.js.map +1 -1
  63. package/dist-client/components/abstract-sign.d.ts +3 -0
  64. package/dist-client/components/abstract-sign.js +86 -0
  65. package/dist-client/components/abstract-sign.js.map +1 -1
  66. package/dist-client/components/change-password.js +4 -4
  67. package/dist-client/components/change-password.js.map +1 -1
  68. package/dist-client/components/contact-us.d.ts +4 -4
  69. package/dist-client/components/contact-us.js +19 -26
  70. package/dist-client/components/contact-us.js.map +1 -1
  71. package/dist-client/components/create-domain-popup.d.ts +1 -1
  72. package/dist-client/components/create-domain-popup.js +16 -12
  73. package/dist-client/components/create-domain-popup.js.map +1 -1
  74. package/dist-client/components/create-role.d.ts +1 -1
  75. package/dist-client/components/create-role.js +14 -16
  76. package/dist-client/components/create-role.js.map +1 -1
  77. package/dist-client/components/create-user.d.ts +2 -1
  78. package/dist-client/components/create-user.js +14 -14
  79. package/dist-client/components/create-user.js.map +1 -1
  80. package/dist-client/components/credential-manager.d.ts +11 -0
  81. package/dist-client/components/credential-manager.js +64 -0
  82. package/dist-client/components/credential-manager.js.map +1 -0
  83. package/dist-client/components/delete-user-popup.js +4 -3
  84. package/dist-client/components/delete-user-popup.js.map +1 -1
  85. package/dist-client/components/domain-switch.d.ts +2 -0
  86. package/dist-client/components/domain-switch.js +20 -15
  87. package/dist-client/components/domain-switch.js.map +1 -1
  88. package/dist-client/components/invite-customer.d.ts +1 -1
  89. package/dist-client/components/invite-customer.js +6 -9
  90. package/dist-client/components/invite-customer.js.map +1 -1
  91. package/dist-client/components/invite-user.js +5 -8
  92. package/dist-client/components/invite-user.js.map +1 -1
  93. package/dist-client/components/my-login-history.js +2 -2
  94. package/dist-client/components/my-login-history.js.map +1 -1
  95. package/dist-client/components/ownership-transfer-popup.d.ts +1 -1
  96. package/dist-client/components/ownership-transfer-popup.js +7 -7
  97. package/dist-client/components/ownership-transfer-popup.js.map +1 -1
  98. package/dist-client/components/partner-info-card.js +6 -6
  99. package/dist-client/components/partner-info-card.js.map +1 -1
  100. package/dist-client/components/partner-role-editor.d.ts +2 -2
  101. package/dist-client/components/partner-role-editor.js +15 -23
  102. package/dist-client/components/partner-role-editor.js.map +1 -1
  103. package/dist-client/components/profile-component.d.ts +7 -0
  104. package/dist-client/components/profile-component.js +70 -15
  105. package/dist-client/components/profile-component.js.map +1 -1
  106. package/dist-client/components/role-edit-form.js +3 -3
  107. package/dist-client/components/role-edit-form.js.map +1 -1
  108. package/dist-client/components/role-privilege-editor.js +19 -29
  109. package/dist-client/components/role-privilege-editor.js.map +1 -1
  110. package/dist-client/components/role-selector.js +7 -7
  111. package/dist-client/components/role-selector.js.map +1 -1
  112. package/dist-client/components/user-role-editor.d.ts +2 -0
  113. package/dist-client/components/user-role-editor.js +42 -49
  114. package/dist-client/components/user-role-editor.js.map +1 -1
  115. package/dist-client/entries/auth/activate.d.ts +5 -4
  116. package/dist-client/entries/auth/activate.js +19 -21
  117. package/dist-client/entries/auth/activate.js.map +1 -1
  118. package/dist-client/entries/auth/checkin.d.ts +5 -5
  119. package/dist-client/entries/auth/checkin.js +27 -28
  120. package/dist-client/entries/auth/checkin.js.map +1 -1
  121. package/dist-client/entries/auth/forgot-password.d.ts +2 -1
  122. package/dist-client/entries/auth/forgot-password.js +15 -9
  123. package/dist-client/entries/auth/forgot-password.js.map +1 -1
  124. package/dist-client/entries/auth/reset-password.js.map +1 -1
  125. package/dist-client/entries/auth/result.d.ts +5 -5
  126. package/dist-client/entries/auth/result.js +20 -18
  127. package/dist-client/entries/auth/result.js.map +1 -1
  128. package/dist-client/entries/auth/signin.d.ts +1 -0
  129. package/dist-client/entries/auth/signin.js +3 -0
  130. package/dist-client/entries/auth/signin.js.map +1 -1
  131. package/dist-client/entries/auth/signup.js +31 -14
  132. package/dist-client/entries/auth/signup.js.map +1 -1
  133. package/dist-client/entries/auth/unlock-user.js.map +1 -1
  134. package/dist-client/entries/oauth2/oauth2-decision-error-page.d.ts +1 -1
  135. package/dist-client/entries/oauth2/oauth2-decision-error-page.js +2 -2
  136. package/dist-client/entries/oauth2/oauth2-decision-error-page.js.map +1 -1
  137. package/dist-client/entries/oauth2/oauth2-decision-page.d.ts +1 -1
  138. package/dist-client/entries/oauth2/oauth2-decision-page.js +55 -54
  139. package/dist-client/entries/oauth2/oauth2-decision-page.js.map +1 -1
  140. package/dist-client/entries/public/home.d.ts +6 -5
  141. package/dist-client/entries/public/home.js +52 -28
  142. package/dist-client/entries/public/home.js.map +1 -1
  143. package/dist-client/index.d.ts +11 -2
  144. package/dist-client/index.js +74 -66
  145. package/dist-client/index.js.map +1 -1
  146. package/dist-client/pages/app-binding/app-binding.d.ts +1 -1
  147. package/dist-client/pages/app-binding/app-binding.js +47 -30
  148. package/dist-client/pages/app-binding/app-binding.js.map +1 -1
  149. package/dist-client/pages/app-binding/app-bindings.d.ts +2 -1
  150. package/dist-client/pages/app-binding/app-bindings.js +25 -7
  151. package/dist-client/pages/app-binding/app-bindings.js.map +1 -1
  152. package/dist-client/pages/appliance/appliance.d.ts +1 -1
  153. package/dist-client/pages/appliance/appliance.js +84 -26
  154. package/dist-client/pages/appliance/appliance.js.map +1 -1
  155. package/dist-client/pages/appliance/home.d.ts +2 -1
  156. package/dist-client/pages/appliance/home.js +27 -6
  157. package/dist-client/pages/appliance/home.js.map +1 -1
  158. package/dist-client/pages/appliance/register.js +7 -7
  159. package/dist-client/pages/appliance/register.js.map +1 -1
  160. package/dist-client/pages/application/application.d.ts +1 -1
  161. package/dist-client/pages/application/application.js +107 -76
  162. package/dist-client/pages/application/application.js.map +1 -1
  163. package/dist-client/pages/application/applications.d.ts +2 -1
  164. package/dist-client/pages/application/applications.js +28 -15
  165. package/dist-client/pages/application/applications.js.map +1 -1
  166. package/dist-client/pages/application/register.js +8 -8
  167. package/dist-client/pages/application/register.js.map +1 -1
  168. package/dist-client/pages/attribute/attribute-set-item-list.d.ts +1 -1
  169. package/dist-client/pages/attribute/attribute-set-item-list.js +11 -18
  170. package/dist-client/pages/attribute/attribute-set-item-list.js.map +1 -1
  171. package/dist-client/pages/attribute/attribute-set-management.d.ts +11 -2
  172. package/dist-client/pages/attribute/attribute-set-management.js +7 -11
  173. package/dist-client/pages/attribute/attribute-set-management.js.map +1 -1
  174. package/dist-client/pages/auth-provider/auth-provider-management.d.ts +11 -2
  175. package/dist-client/pages/auth-provider/auth-provider-management.js +8 -11
  176. package/dist-client/pages/auth-provider/auth-provider-management.js.map +1 -1
  177. package/dist-client/pages/domain/domain-management.d.ts +1 -0
  178. package/dist-client/pages/domain/domain-management.js +3 -7
  179. package/dist-client/pages/domain/domain-management.js.map +1 -1
  180. package/dist-client/pages/partner/partner-management.js +2 -2
  181. package/dist-client/pages/partner/partner-management.js.map +1 -1
  182. package/dist-client/pages/profile.js +1 -1
  183. package/dist-client/pages/profile.js.map +1 -1
  184. package/dist-client/pages/role/role-management.js +13 -10
  185. package/dist-client/pages/role/role-management.js.map +1 -1
  186. package/dist-client/pages/user/user-management.d.ts +1 -0
  187. package/dist-client/pages/user/user-management.js +6 -5
  188. package/dist-client/pages/user/user-management.js.map +1 -1
  189. package/dist-client/route.js.map +1 -1
  190. package/dist-client/themes/auth-theme.css +7 -10
  191. package/dist-client/tsconfig.tsbuildinfo +1 -1
  192. package/dist-client/utils/password-rule.js.map +1 -1
  193. package/dist-server/index.d.ts +0 -0
  194. package/dist-server/tsconfig.tsbuildinfo +1 -1
  195. package/package.json +14 -18
  196. package/translations/en.json +2 -0
  197. package/translations/ja.json +2 -0
  198. package/translations/ko.json +2 -1
  199. package/translations/ms.json +2 -0
  200. package/translations/zh.json +2 -0
  201. package/views/auth-page.html +5 -3
  202. package/views/oauth2-page.html +3 -2
@@ -1,5 +1,6 @@
1
- import '@material/mwc-button'
2
- import '@material/mwc-icon'
1
+ import '@material/web/icon/icon.js'
2
+ import '@material/web/button/elevated-button.js'
3
+
3
4
  import '@operato/lottie-player'
4
5
 
5
6
  import { css, html, LitElement } from 'lit'
@@ -20,12 +21,14 @@ export class AuthCheckIn extends localize(i18next)(LitElement) {
20
21
  display: flex;
21
22
  flex-direction: column;
22
23
  margin: auto;
23
- background-color: var(--auth-background);
24
+ background-color: var(--md-sys-color-primary);
25
+ color: var(--md-sys-color-on-primary);
24
26
  height: 100vh;
25
27
  height: 100dvh;
26
28
  }
27
29
  .header {
28
- background-color: var(--primary-color);
30
+ background-color: var(--md-sys-color-primary);
31
+ color: var(--md-sys-color-on-primary);
29
32
  height: var(--checkin-header-height);
30
33
  }
31
34
  .content {
@@ -34,32 +37,32 @@ export class AuthCheckIn extends localize(i18next)(LitElement) {
34
37
  }
35
38
 
36
39
  .domains {
37
- margin: var(--margin-wide) 0;
40
+ margin: var(--spacing-large) 0;
38
41
  padding: 0;
39
- background-color: var(--theme-white-color);
42
+ background-color: var(--md-sys-color-surface);
43
+ color: var(--md-sys-color-on-surface);
40
44
  border-radius: var(--border-radius);
41
- border: var(--border-dark-color);
45
+ border: var(--border-dim-color);
42
46
  list-style: none;
43
47
  }
44
48
  li {
45
- border-bottom: var(--border-dark-color);
49
+ border-bottom: var(--border-dim-color);
46
50
  margin-bottom: -1px;
47
- padding: var(--padding-default) var(--padding-wide);
51
+ padding: var(--spacing-medium) var(--spacing-large);
48
52
  font-size: 18px;
49
- color: var(--secondary-color);
50
53
  text-align: left;
51
54
 
52
55
  cursor: pointer;
53
56
  }
54
57
  li:hover {
55
- background-color: rgba(var(--primary-color-rgb), 0.2);
58
+ background-color: var(--md-sys-color-primary-container);
59
+ color: var(--md-sys-color-on-primary-container);
56
60
  }
57
61
  li span {
58
62
  display: block;
59
63
  font: normal var(--fontsize-default) var(--theme-font);
60
- color: var(--secondary-text-color);
61
64
  }
62
- li mwc-icon {
65
+ li md-icon {
63
66
  float: right;
64
67
  margin: 2px 0 0 0;
65
68
  opacity: 0.5;
@@ -67,14 +70,14 @@ export class AuthCheckIn extends localize(i18next)(LitElement) {
67
70
  .button-container {
68
71
  text-align: center;
69
72
  }
70
- .button-container mwc-button {
71
- margin-left: var(--margin-narrow);
73
+ .button-container md-elevated-button {
74
+ margin-left: var(--spacing-small);
72
75
  }
73
76
 
74
77
  @media (max-width: 450px) {
75
- .button-container mwc-button {
78
+ .button-container md-elevated-button {
76
79
  width: 100%;
77
- margin: var(--margin-default) 0 0 0;
80
+ margin: var(--spacing-medium) 0 0 0;
78
81
  }
79
82
  }
80
83
  `,
@@ -93,7 +96,7 @@ export class AuthCheckIn extends localize(i18next)(LitElement) {
93
96
  var { icon, title, description } = this.applicationMeta
94
97
 
95
98
  return html`
96
- <div class="content">
99
+ <div class="content md-typescale-display-medium">
97
100
  <div class="wrap">
98
101
  <div class="auth-brand">
99
102
  <img src=${icon || ''} />
@@ -110,11 +113,9 @@ export class AuthCheckIn extends localize(i18next)(LitElement) {
110
113
  domain => html`
111
114
  <li
112
115
  @click=${() =>
113
- (location.href = `/auth/checkin/${domain.subdomain}?redirect_to=${encodeURIComponent(
114
- this.redirectTo || '/'
115
- )}`)}
116
+ (location.href = `/auth/checkin/${domain.subdomain}?redirect_to=${encodeURIComponent(this.redirectTo || '/')}`)}
116
117
  >
117
- <mwc-icon>keyboard_arrow_right</mwc-icon>
118
+ <md-icon>keyboard_arrow_right</md-icon>
118
119
  <strong>${domain.name}</strong>
119
120
  <span>${domain.description}</span>
120
121
  </li>
@@ -125,18 +126,15 @@ export class AuthCheckIn extends localize(i18next)(LitElement) {
125
126
  : html` <h3>${i18next.t('text.no domain available')}</h3> `}
126
127
 
127
128
  <div class="button-container">
128
- <mwc-button
129
- raised
130
- label=${String(i18next.t('button.logout'))}
131
- @click="${() => (location.pathname = '/auth/signout')}"
132
- ></mwc-button>
129
+ <md-elevated-button @click=${() => (location.pathname = '/auth/signout')}
130
+ >${String(i18next.t('button.logout'))}</md-elevated-button
131
+ >
133
132
 
134
133
  ${this.domainType?.toLowerCase() === 'company'
135
- ? html`<mwc-button
136
- raised
137
- label=${String(i18next.t('button.register business domain'))}
134
+ ? html`<md-elevated-button
138
135
  @click=${e => (location.href = `/public/business-register?email=${this.user?.email}`)}
139
- ></mwc-button> `
136
+ >${String(i18next.t('button.register business domain'))}</md-elevated-button
137
+ > `
140
138
  : ''}
141
139
  </div>
142
140
 
@@ -1,4 +1,6 @@
1
- import '@material/mwc-button'
1
+ import '@material/web/button/elevated-button.js'
2
+ import '@material/web/button/text-button.js'
3
+
2
4
  import '@operato/i18n/ox-i18n.js'
3
5
  import '../../components/profile-component'
4
6
 
@@ -26,29 +28,33 @@ export class ForgotPassword extends AbstractAuthPage {
26
28
  const email = this.data?.email || ''
27
29
 
28
30
  return html`
29
- <input id="email" name="email" type="hidden" required .value=${email} />
30
31
  <div class="field">
31
- <mwc-textfield
32
+ <md-filled-text-field
32
33
  name="email"
33
34
  type="email"
34
35
  label=${String(i18next.t('label.email'))}
35
36
  .value=${email}
36
37
  required
37
- @input=${e => {
38
- this.emailInput.value = e.target.value
38
+ @input=${(e: Event) => {
39
+ const target = e.target as HTMLInputElement
40
+ if (target.validity.typeMismatch) {
41
+ target.setCustomValidity(i18next.t('text.invalid-email'))
42
+ } else {
43
+ target.setCustomValidity('')
44
+ }
39
45
  }}
40
- ></mwc-textfield>
46
+ ></md-filled-text-field>
41
47
  </div>
42
- <mwc-button id="submit-button" class="ui button" type="submit" raised @click=${e => this._onSubmit(e)}>
48
+ <md-elevated-button id="submit-button" class="ui button" type="submit" @click=${e => this._onSubmit(e)}>
43
49
  <ox-i18n msgid="button.submit"></ox-i18n>
44
- </mwc-button>
50
+ </md-elevated-button>
45
51
  `
46
52
  }
47
53
 
48
54
  get links() {
49
55
  return html`
50
56
  <a class="link" href="/auth/signin">
51
- <mwc-button><ox-i18n msgid="field.sign in"></ox-i18n></mwc-button>
57
+ <md-text-button><ox-i18n msgid="field.sign in"></ox-i18n></md-text-button>
52
58
  </a>
53
59
  `
54
60
  }
@@ -1,6 +1,7 @@
1
- import '@material/mwc-button'
2
- import '../../components/profile-component'
1
+ import '@material/web/button/elevated-button.js'
2
+
3
3
  import '@operato/lottie-player'
4
+ import '../../components/profile-component'
4
5
 
5
6
  import { css, html, LitElement } from 'lit'
6
7
  import { customElement, property } from 'lit/decorators.js'
@@ -17,7 +18,8 @@ export class AuthResult extends localize(i18next)(LitElement) {
17
18
  width: 100vw;
18
19
  height: 100vh;
19
20
  height: 100dvh;
20
- background-color: var(--auth-background);
21
+ background-color: var(--md-sys-color-primary);
22
+ color: var(--md-sys-color-on-primary);
21
23
  }
22
24
  .wrap {
23
25
  display: block;
@@ -32,7 +34,7 @@ export class AuthResult extends localize(i18next)(LitElement) {
32
34
  .auth-brand img {
33
35
  margin: 15% auto 5px auto;
34
36
  width: 100px;
35
- border: 3px solid var(--theme-white-color);
37
+ border: 3px solid var(--md-sys-color-on-primary);
36
38
  border-radius: 25px;
37
39
  box-shadow: var(--box-shadow);
38
40
  }
@@ -45,13 +47,13 @@ export class AuthResult extends localize(i18next)(LitElement) {
45
47
  margin: 50px 0 0 0;
46
48
  padding: 0;
47
49
  font-size: 24px;
48
- color: var(--auth-title-color);
50
+ color: var(--auth-title-color, var(--md-sys-color-on-primary));
49
51
  }
50
52
  p {
51
53
  margin: 0;
52
54
  padding: var(--auth-description-padding);
53
55
  font: var(--auth-description-font);
54
- color: var(--auth-description-color);
56
+ color: var(--auth-description-color, var(--md-sys-color-on-secondary));
55
57
  }
56
58
  :host *:focus {
57
59
  outline: none;
@@ -60,25 +62,26 @@ export class AuthResult extends localize(i18next)(LitElement) {
60
62
  background: url(/assets/images/icon-profile.png) center top no-repeat;
61
63
  margin: var(--profile-icon-margin);
62
64
  padding: 180px 20px 20px 20px;
63
- color: var(--secondary-color);
65
+ color: var(--md-sys-color-secondary);
64
66
  font: var(--header-bar-title);
65
67
  text-align: center;
66
68
  }
67
69
 
68
70
  label {
69
71
  font: bold 14px var(--theme-font);
70
- color: var(--primary-color);
72
+ color: var(--md-sys-color-primary);
71
73
  }
74
+
72
75
  #button-area {
73
76
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
74
77
  padding-top: 10px;
75
78
  }
76
- mwc-button {
77
- --mdc-theme-primary: var(--auth-button-background-color);
78
- --mdc-theme-on-primary: var(--primary-color);
79
- --mdc-button-horizontal-padding: var(--padding-default);
80
- --mdc-button-ink-color: var(--primary-color);
79
+
80
+ md-elevated-button {
81
+ --md-button-horizontal-padding: var(--spacing-medium);
82
+ --md-button-ink-color: var(--md-sys-color-primary);
81
83
  }
84
+
82
85
  .lottie-container {
83
86
  width: 100%;
84
87
  height: 300px;
@@ -151,14 +154,14 @@ export class AuthResult extends localize(i18next)(LitElement) {
151
154
  <p></p>
152
155
  </div>
153
156
  <div id="button-area">
154
- <mwc-button
155
- icon="home"
156
- raised
157
- label="${i18next.t('button.go to home')}"
157
+ <md-elevated-button
158
158
  @click=${e => {
159
159
  window.location.replace('/auth/signin')
160
160
  }}
161
- ></mwc-button>
161
+ >
162
+ <md-icon slot="icon">home</md-icon>
163
+ ${i18next.t('button.go to home')}
164
+ </md-elevated-button>
162
165
  </div>
163
166
 
164
167
  ${isSafari()
@@ -11,4 +11,8 @@ export class AuthSignin extends AbstractSign {
11
11
  get actionUrl() {
12
12
  return '/auth/signin'
13
13
  }
14
+
15
+ get autocompletable() {
16
+ return true
17
+ }
14
18
  }
@@ -26,28 +26,41 @@ export class AuthSignup extends AbstractSign {
26
26
  get formfields() {
27
27
  const { name = '', email = '' } = this.data || {}
28
28
 
29
+ // .validationMessage=${this.passwordHelp || ''}
30
+ // .validationMessage=${String(i18next.t('text.passwords do not match'))}
31
+
29
32
  return html`
30
33
  <div class="field">
31
- <mwc-textfield
34
+ <md-filled-text-field
32
35
  name="name"
33
36
  type="text"
34
37
  label=${String(i18next.t('field.name'))}
35
38
  .value=${name}
36
39
  required
37
- ></mwc-textfield>
40
+ ></md-filled-text-field>
38
41
  </div>
39
42
  <div class="field">
40
- <mwc-textfield
43
+ <md-filled-text-field
41
44
  name="email"
42
45
  type="email"
43
46
  label=${String(i18next.t('field.email'))}
44
47
  required
45
48
  .value=${email}
46
- .validationMessage=${String(i18next.t('text.invalid-email'))}
47
- ></mwc-textfield>
49
+ autocapitalize="off"
50
+ autocomplete="off"
51
+ @input=${(e: Event) => {
52
+ const target = e.target as HTMLInputElement
53
+ if (target.validity.typeMismatch) {
54
+ target.setCustomValidity(i18next.t('text.invalid-email'))
55
+ } else {
56
+ target.setCustomValidity('')
57
+ }
58
+ }}
59
+ ><md-icon slot="leading-icon">mail</md-icon></md-filled-text-field
60
+ >
48
61
  </div>
49
62
  <div class="field">
50
- <mwc-textfield
63
+ <md-filled-text-field
51
64
  name="password"
52
65
  type="password"
53
66
  label=${String(i18next.t('field.password'))}
@@ -55,26 +68,30 @@ export class AuthSignup extends AbstractSign {
55
68
  helper=${this.passwordHelp || ''}
56
69
  helperPersistent
57
70
  required
71
+ autocomplete="off"
58
72
  @input=${e => {
59
73
  var val = e.target.value
60
74
  this.confirmPass.setAttribute('pattern', val.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '[$&]'))
61
75
  }}
62
- .validationMessage=${this.passwordHelp || ''}
63
- ></mwc-textfield>
76
+ >
77
+ ></md-filled-text-field
78
+ >
64
79
  </div>
65
80
  <div class="field">
66
- <mwc-textfield
81
+ <md-filled-text-field
67
82
  id="confirm-password"
68
83
  name="confirm-password"
69
84
  type="password"
85
+ autocomplete="off"
70
86
  label=${String(i18next.t('field.confirm password'))}
71
87
  required
72
- .validationMessage=${String(i18next.t('text.passwords do not match'))}
73
- ></mwc-textfield>
88
+ >
89
+ ></md-filled-text-field
90
+ >
74
91
  </div>
75
- <mwc-button class="ui button" raised @click=${e => this._onSubmit(e)}>
92
+ <md-elevated-button class="ui button" @click=${e => this._onSubmit(e)}>
76
93
  <ox-i18n msgid="field.${this.pageName}"></ox-i18n>
77
- </mwc-button>
94
+ </md-elevated-button>
78
95
  `
79
96
  }
80
97
 
@@ -86,7 +103,7 @@ export class AuthSignup extends AbstractSign {
86
103
  get links() {
87
104
  return html`
88
105
  <a class="link" href="/auth/signin">
89
- <mwc-button><ox-i18n msgid="field.sign in"></ox-i18n></mwc-button>
106
+ <md-text-button><ox-i18n msgid="field.sign in"></ox-i18n></md-text-button>
90
107
  </a>
91
108
  `
92
109
  }
@@ -1,4 +1,4 @@
1
- import '@material/mwc-button'
1
+ import '@material/web/button/elevated-button.js'
2
2
 
3
3
  import { html, LitElement } from 'lit'
4
4
  import { customElement, property } from 'lit/decorators.js'
@@ -33,7 +33,7 @@ class OAuth2DecisionErrorPage extends LitElement {
33
33
  <input name="state" type="text" value="${this.req.state}" hidden />
34
34
  <input name="email" type="text" value="${this.user.email}" hidden />
35
35
 
36
- <mwc-button raised @click="${() => history.back()}">Move back</mwc-button>
36
+ <md-elevated-button raised @click="${() => history.back()}">Move back</md-elevated-button>
37
37
  </form>
38
38
  `
39
39
  }
@@ -1,4 +1,4 @@
1
- import '@material/mwc-button'
1
+ import '@material/web/button/elevated-button.js'
2
2
  import '../../components/role-selector'
3
3
 
4
4
  import gql from 'graphql-tag'
@@ -8,60 +8,61 @@ import { customElement, property, query } from 'lit/decorators.js'
8
8
  import { client } from '@operato/graphql'
9
9
  import { i18next } from '@operato/i18n'
10
10
  import { OxPrompt } from '@operato/popup/ox-prompt.js'
11
+ import { ButtonContainerStyles } from '@operato/styles'
11
12
 
12
13
  @customElement('oauth2-decision')
13
14
  class OAuth2DecisionPage extends LitElement {
14
- static styles = css`
15
- :host {
16
- display: flex;
17
- flex-direction: column;
18
-
19
- border: 1px solid var(--primary-color);
20
- margin: var(--margin-default);
21
- padding: var(--padding-default);
22
- font: normal 15px var(--theme-font);
23
- color: var(--secondary-color);
24
- }
25
- [field-2column] {
26
- border-radius: var(--border-radius);
27
- display: grid;
28
- grid-template-columns: 1fr 1fr;
29
- gap: 5px 15px;
30
- clear: both;
31
- max-width: var(--input-container-max-width);
32
- }
33
- [field] {
34
- display: flex;
35
- flex-direction: column;
36
- padding-bottom: var(--padding-default);
37
- }
38
- input {
39
- border: var(--border-dark-color);
40
- border-radius: var(--border-radius);
41
- margin: var(--input-margin);
42
- padding: var(--input-padding);
43
- min-width: 250px;
44
- font: var(--input-font);
45
- }
46
- label {
47
- display: flex;
48
- flex-direction: column;
49
- font: var(--label-font);
50
- color: var(--label-color);
51
- text-transform: var(--label-text-transform);
52
- }
53
- [buttons] {
54
- margin: 0;
55
- padding: var(--padding-default);
56
- background-color: rgba(var(--primary-color-rgb), 0.2);
57
- }
58
- mwc-button {
59
- margin-right: var(--padding-narrow);
60
- }
61
- [danger] {
62
- --mdc-theme-primary: var(--mdc-danger-button-primary-color);
63
- }
64
- `
15
+ static styles = [
16
+ ButtonContainerStyles,
17
+ css`
18
+ :host {
19
+ display: flex;
20
+ flex-direction: column;
21
+
22
+ border: 1px solid var(--md-sys-color-primary);
23
+ margin: var(--spacing-medium);
24
+ padding: var(--spacing-medium);
25
+ font: normal 15px var(--theme-font);
26
+ color: var(--md-sys-color-secondary);
27
+ }
28
+
29
+ [field-2column] {
30
+ border-radius: var(--border-radius);
31
+ display: grid;
32
+ grid-template-columns: 1fr 1fr;
33
+ gap: 5px 15px;
34
+ clear: both;
35
+ max-width: var(--input-container-max-width);
36
+ }
37
+
38
+ [field] {
39
+ display: flex;
40
+ flex-direction: column;
41
+ padding-bottom: var(--spacing-medium);
42
+ }
43
+
44
+ input {
45
+ border: var(--border-dim-color);
46
+ border-radius: var(--border-radius);
47
+ margin: var(--input-margin);
48
+ padding: var(--input-padding);
49
+ min-width: 250px;
50
+ font: var(--input-font);
51
+ }
52
+
53
+ label {
54
+ display: flex;
55
+ flex-direction: column;
56
+ font: var(--label-font);
57
+ color: var(--label-color, var(--md-sys-color-on-surface));
58
+ text-transform: var(--label-text-transform);
59
+ }
60
+
61
+ md-elevated-button {
62
+ margin-right: var(--spacing-small);
63
+ }
64
+ `
65
+ ]
65
66
 
66
67
  @property({ type: Object }) data: any = {}
67
68
  @property({ type: Object }) user: any = {}
@@ -109,9 +110,9 @@ class OAuth2DecisionPage extends LitElement {
109
110
 
110
111
  <role-selector .roleCategory="${this.domain.name}" .roles="${this.roles}"></role-selector>
111
112
 
112
- <div buttons>
113
- <mwc-button @click="${() => this.decision(true)}" raised label="Allow"></mwc-button>
114
- <mwc-button @click="${() => this.decision(false)}" raised danger label="Deny"></mwc-button>
113
+ <div class="button-container">
114
+ <md-elevated-button @click="${() => this.decision(true)}" raised label="Allow"></md-elevated-button>
115
+ <md-elevated-button @click="${() => this.decision(false)}" raised danger label="Deny"></md-elevated-button>
115
116
  </div>
116
117
  `
117
118
  }