@kya-os/consent 0.1.21 → 0.1.23
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/dist/bundle/inline.d.ts.map +1 -1
- package/dist/bundle/inline.js +2 -2
- package/dist/bundle/inline.js.map +1 -1
- package/dist/cjs/bundle/inline.js +2 -2
- package/dist/cjs/bundle/inline.js.map +1 -1
- package/dist/cjs/components/mcp-consent.js +0 -14
- package/dist/cjs/components/mcp-consent.js.map +1 -1
- package/dist/cjs/templates/modes/oauth.template.js +0 -28
- package/dist/cjs/templates/modes/oauth.template.js.map +1 -1
- package/dist/components/mcp-consent.d.ts.map +1 -1
- package/dist/components/mcp-consent.js +0 -14
- package/dist/components/mcp-consent.js.map +1 -1
- package/dist/consent.js +0 -14
- package/dist/consent.min.js +11 -25
- package/dist/templates/modes/oauth.template.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/bundle/index.d.ts +0 -44
- package/dist/bundle/shell.d.ts +0 -126
- package/dist/bundle/shell.js +0 -295
- package/dist/bundle/shell.js.map +0 -1
- package/dist/components/consent-button.d.ts +0 -61
- package/dist/components/consent-button.js +0 -177
- package/dist/components/consent-button.js.map +0 -1
- package/dist/components/consent-checkbox.d.ts +0 -61
- package/dist/components/consent-checkbox.js +0 -220
- package/dist/components/consent-checkbox.js.map +0 -1
- package/dist/components/consent-input.d.ts +0 -91
- package/dist/components/consent-input.js +0 -332
- package/dist/components/consent-input.js.map +0 -1
- package/dist/components/consent-oauth-button.d.ts +0 -87
- package/dist/components/consent-oauth-button.js +0 -389
- package/dist/components/consent-oauth-button.js.map +0 -1
- package/dist/components/consent-otp-input.d.ts +0 -92
- package/dist/components/consent-otp-input.js +0 -385
- package/dist/components/consent-otp-input.js.map +0 -1
- package/dist/components/consent-permissions.d.ts +0 -104
- package/dist/components/consent-permissions.js +0 -430
- package/dist/components/consent-permissions.js.map +0 -1
- package/dist/components/consent-shell.d.ts +0 -72
- package/dist/components/consent-shell.js +0 -231
- package/dist/components/consent-shell.js.map +0 -1
- package/dist/components/consent-terms.d.ts +0 -89
- package/dist/components/consent-terms.js +0 -284
- package/dist/components/consent-terms.js.map +0 -1
- package/dist/components/index.d.ts +0 -19
- package/dist/constants/auth-modes.d.ts +0 -59
- package/dist/constants/auth-modes.js +0 -120
- package/dist/constants/auth-modes.js.map +0 -1
- package/dist/constants/colors.d.ts +0 -38
- package/dist/constants/colors.js +0 -37
- package/dist/constants/colors.js.map +0 -1
- package/dist/constants/defaults.d.ts +0 -112
- package/dist/constants/defaults.js +0 -143
- package/dist/constants/defaults.js.map +0 -1
- package/dist/constants/index.d.ts +0 -12
- package/dist/constants/index.js +0 -16
- package/dist/constants/index.js.map +0 -1
- package/dist/index.d.ts +0 -19
- package/dist/index.js +0 -28
- package/dist/index.js.map +0 -1
- package/dist/react/index.d.ts +0 -123
- package/dist/resolution/index.d.ts +0 -12
- package/dist/resolution/index.js +0 -12
- package/dist/resolution/index.js.map +0 -1
- package/dist/resolution/resolve-branding.d.ts +0 -70
- package/dist/resolution/resolve-branding.js +0 -149
- package/dist/resolution/resolve-branding.js.map +0 -1
- package/dist/resolution/resolve-config.d.ts +0 -81
- package/dist/resolution/resolve-config.js +0 -258
- package/dist/resolution/resolve-config.js.map +0 -1
- package/dist/resolution/resolve-copy.d.ts +0 -53
- package/dist/resolution/resolve-copy.js +0 -128
- package/dist/resolution/resolve-copy.js.map +0 -1
- package/dist/schemas/api.schemas.js +0 -162
- package/dist/schemas/api.schemas.js.map +0 -1
- package/dist/schemas/branding.schemas.d.ts +0 -100
- package/dist/schemas/branding.schemas.js +0 -54
- package/dist/schemas/branding.schemas.js.map +0 -1
- package/dist/schemas/config.schemas.js +0 -141
- package/dist/schemas/config.schemas.js.map +0 -1
- package/dist/schemas/index.d.ts +0 -13
- package/dist/schemas/index.js +0 -13
- package/dist/schemas/index.js.map +0 -1
- package/dist/schemas/modes.schemas.js +0 -104
- package/dist/schemas/modes.schemas.js.map +0 -1
- package/dist/security/escape.d.ts +0 -114
- package/dist/security/escape.js +0 -197
- package/dist/security/escape.js.map +0 -1
- package/dist/security/index.d.ts +0 -10
- package/dist/security/index.js +0 -10
- package/dist/security/index.js.map +0 -1
- package/dist/security/validators.d.ts +0 -98
- package/dist/security/validators.js +0 -199
- package/dist/security/validators.js.map +0 -1
- package/dist/styles/css-variables.d.ts +0 -78
- package/dist/styles/css-variables.js +0 -120
- package/dist/styles/css-variables.js.map +0 -1
- package/dist/styles/index.d.ts +0 -12
- package/dist/styles/index.js +0 -12
- package/dist/styles/index.js.map +0 -1
- package/dist/styles/stylesheet.d.ts +0 -57
- package/dist/styles/stylesheet.js +0 -197
- package/dist/styles/stylesheet.js.map +0 -1
- package/dist/styles/tokens.d.ts +0 -141
- package/dist/styles/tokens.js +0 -180
- package/dist/styles/tokens.js.map +0 -1
- package/dist/templates/base/base-template.d.ts +0 -81
- package/dist/templates/base/base-template.js +0 -278
- package/dist/templates/base/base-template.js.map +0 -1
- package/dist/templates/base/components.d.ts +0 -120
- package/dist/templates/base/components.js +0 -279
- package/dist/templates/base/components.js.map +0 -1
- package/dist/templates/base/index.d.ts +0 -8
- package/dist/templates/base/index.js +0 -8
- package/dist/templates/base/index.js.map +0 -1
- package/dist/templates/index.d.ts +0 -18
- package/dist/templates/index.js +0 -18
- package/dist/templates/index.js.map +0 -1
- package/dist/templates/modes/consent-only.template.d.ts +0 -36
- package/dist/templates/modes/consent-only.template.js +0 -70
- package/dist/templates/modes/consent-only.template.js.map +0 -1
- package/dist/templates/modes/credentials.template.d.ts +0 -65
- package/dist/templates/modes/credentials.template.js +0 -410
- package/dist/templates/modes/credentials.template.js.map +0 -1
- package/dist/templates/modes/index.d.ts +0 -14
- package/dist/templates/modes/index.js +0 -14
- package/dist/templates/modes/index.js.map +0 -1
- package/dist/templates/modes/magic-link.template.d.ts +0 -33
- package/dist/templates/modes/magic-link.template.js +0 -192
- package/dist/templates/modes/magic-link.template.js.map +0 -1
- package/dist/templates/modes/oauth.template.d.ts +0 -40
- package/dist/templates/modes/oauth.template.js +0 -149
- package/dist/templates/modes/oauth.template.js.map +0 -1
- package/dist/templates/modes/otp.template.d.ts +0 -35
- package/dist/templates/modes/otp.template.js +0 -312
- package/dist/templates/modes/otp.template.js.map +0 -1
- package/dist/templates/modes/success.template.d.ts +0 -41
- package/dist/templates/registry.d.ts +0 -68
- package/dist/templates/registry.js +0 -125
- package/dist/templates/registry.js.map +0 -1
- package/dist/types/api.types.d.ts +0 -147
- package/dist/types/api.types.js +0 -9
- package/dist/types/api.types.js.map +0 -1
- package/dist/types/branding.types.d.ts +0 -53
- package/dist/types/branding.types.js +0 -9
- package/dist/types/branding.types.js.map +0 -1
- package/dist/types/config.types.d.ts +0 -201
- package/dist/types/config.types.js +0 -9
- package/dist/types/config.types.js.map +0 -1
- package/dist/types/copy.types.d.ts +0 -109
- package/dist/types/copy.types.js +0 -9
- package/dist/types/copy.types.js.map +0 -1
- package/dist/types/index.d.ts +0 -15
- package/dist/types/index.js +0 -15
- package/dist/types/index.js.map +0 -1
- package/dist/types/modes.types.d.ts +0 -287
- package/dist/types/modes.types.js +0 -136
- package/dist/types/modes.types.js.map +0 -1
- package/dist/types/page.types.d.ts +0 -120
- package/dist/types/page.types.js +0 -9
- package/dist/types/page.types.js.map +0 -1
|
@@ -1,332 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Consent Input Web Component
|
|
3
|
-
*
|
|
4
|
-
* A styled text input for consent pages with label and error support.
|
|
5
|
-
* Implements Form Associated Custom Elements for proper form participation.
|
|
6
|
-
*
|
|
7
|
-
* @module components/consent-input
|
|
8
|
-
*/
|
|
9
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
10
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
11
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
12
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
13
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
|
-
};
|
|
15
|
-
import { LitElement, html, css } from 'lit';
|
|
16
|
-
import { customElement, property, state } from 'lit/decorators.js';
|
|
17
|
-
/**
|
|
18
|
-
* ConsentInput - A themed input component with label
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```html
|
|
22
|
-
* <consent-input
|
|
23
|
-
* type="email"
|
|
24
|
-
* name="email"
|
|
25
|
-
* label="Email Address"
|
|
26
|
-
* placeholder="you@example.com"
|
|
27
|
-
* required
|
|
28
|
-
* ></consent-input>
|
|
29
|
-
* ```
|
|
30
|
-
*
|
|
31
|
-
* @fires input - Fired when input value changes
|
|
32
|
-
* @fires change - Fired when input loses focus after change
|
|
33
|
-
* @csspart input - The input element
|
|
34
|
-
* @csspart label - The label element
|
|
35
|
-
* @cssprop --consent-primary - Primary brand color for focus state
|
|
36
|
-
*/
|
|
37
|
-
let ConsentInput = class ConsentInput extends LitElement {
|
|
38
|
-
constructor() {
|
|
39
|
-
super();
|
|
40
|
-
/**
|
|
41
|
-
* Input type
|
|
42
|
-
*/
|
|
43
|
-
this.type = 'text';
|
|
44
|
-
/**
|
|
45
|
-
* Form field name
|
|
46
|
-
*/
|
|
47
|
-
this.name = '';
|
|
48
|
-
/**
|
|
49
|
-
* Input value
|
|
50
|
-
*/
|
|
51
|
-
this.value = '';
|
|
52
|
-
/**
|
|
53
|
-
* Label text
|
|
54
|
-
*/
|
|
55
|
-
this.label = '';
|
|
56
|
-
/**
|
|
57
|
-
* Placeholder text
|
|
58
|
-
*/
|
|
59
|
-
this.placeholder = '';
|
|
60
|
-
/**
|
|
61
|
-
* Required for form validation
|
|
62
|
-
*/
|
|
63
|
-
this.required = false;
|
|
64
|
-
/**
|
|
65
|
-
* Disabled state
|
|
66
|
-
*/
|
|
67
|
-
this.disabled = false;
|
|
68
|
-
/**
|
|
69
|
-
* Autocomplete attribute
|
|
70
|
-
*/
|
|
71
|
-
this.autocomplete = '';
|
|
72
|
-
/**
|
|
73
|
-
* Show password toggle for password inputs
|
|
74
|
-
*/
|
|
75
|
-
this.showPassword = false;
|
|
76
|
-
this.internals = this.attachInternals();
|
|
77
|
-
}
|
|
78
|
-
// Update form value when properties change
|
|
79
|
-
updated(changedProperties) {
|
|
80
|
-
if (changedProperties.has('value')) {
|
|
81
|
-
this.internals.setFormValue(this.value || null);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
handleInput(e) {
|
|
85
|
-
const input = e.target;
|
|
86
|
-
this.value = input.value;
|
|
87
|
-
this.internals.setFormValue(this.value || null);
|
|
88
|
-
this.dispatchEvent(new CustomEvent('input', {
|
|
89
|
-
detail: { value: this.value },
|
|
90
|
-
bubbles: true,
|
|
91
|
-
composed: true,
|
|
92
|
-
}));
|
|
93
|
-
}
|
|
94
|
-
handleChange(e) {
|
|
95
|
-
const input = e.target;
|
|
96
|
-
this.value = input.value;
|
|
97
|
-
this.dispatchEvent(new CustomEvent('change', {
|
|
98
|
-
detail: { value: this.value },
|
|
99
|
-
bubbles: true,
|
|
100
|
-
composed: true,
|
|
101
|
-
}));
|
|
102
|
-
}
|
|
103
|
-
togglePasswordVisibility() {
|
|
104
|
-
this.showPassword = !this.showPassword;
|
|
105
|
-
}
|
|
106
|
-
renderPasswordToggle() {
|
|
107
|
-
if (this.type !== 'password')
|
|
108
|
-
return null;
|
|
109
|
-
const icon = this.showPassword
|
|
110
|
-
? html `
|
|
111
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
112
|
-
<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"/>
|
|
113
|
-
<line x1="1" y1="1" x2="23" y2="23"/>
|
|
114
|
-
</svg>
|
|
115
|
-
`
|
|
116
|
-
: html `
|
|
117
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
118
|
-
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/>
|
|
119
|
-
<circle cx="12" cy="12" r="3"/>
|
|
120
|
-
</svg>
|
|
121
|
-
`;
|
|
122
|
-
return html `
|
|
123
|
-
<button
|
|
124
|
-
type="button"
|
|
125
|
-
class="password-toggle"
|
|
126
|
-
@click=${this.togglePasswordVisibility}
|
|
127
|
-
tabindex="-1"
|
|
128
|
-
aria-label=${this.showPassword ? 'Hide password' : 'Show password'}
|
|
129
|
-
>
|
|
130
|
-
${icon}
|
|
131
|
-
</button>
|
|
132
|
-
`;
|
|
133
|
-
}
|
|
134
|
-
render() {
|
|
135
|
-
const inputType = this.type === 'password' && this.showPassword ? 'text' : this.type;
|
|
136
|
-
return html `
|
|
137
|
-
<div class="field">
|
|
138
|
-
${this.label
|
|
139
|
-
? html `
|
|
140
|
-
<label part="label" for="input">
|
|
141
|
-
${this.label}${this.required ? html `<span class="required">*</span>` : null}
|
|
142
|
-
</label>
|
|
143
|
-
`
|
|
144
|
-
: null}
|
|
145
|
-
<div class="input-wrapper${this.error ? ' has-error' : ''}">
|
|
146
|
-
<input
|
|
147
|
-
part="input"
|
|
148
|
-
id="input"
|
|
149
|
-
type=${inputType}
|
|
150
|
-
name=${this.name}
|
|
151
|
-
.value=${this.value}
|
|
152
|
-
placeholder=${this.placeholder}
|
|
153
|
-
?required=${this.required}
|
|
154
|
-
?disabled=${this.disabled}
|
|
155
|
-
autocomplete=${this.autocomplete || 'off'}
|
|
156
|
-
@input=${this.handleInput}
|
|
157
|
-
@change=${this.handleChange}
|
|
158
|
-
/>
|
|
159
|
-
${this.renderPasswordToggle()}
|
|
160
|
-
</div>
|
|
161
|
-
${this.error ? html `<div class="error-message">${this.error}</div>` : null}
|
|
162
|
-
</div>
|
|
163
|
-
`;
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
// Enable form association
|
|
167
|
-
ConsentInput.formAssociated = true;
|
|
168
|
-
ConsentInput.styles = css `
|
|
169
|
-
:host {
|
|
170
|
-
display: block;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.field {
|
|
174
|
-
display: flex;
|
|
175
|
-
flex-direction: column;
|
|
176
|
-
gap: 0.375rem;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
label {
|
|
180
|
-
font-size: 0.875rem;
|
|
181
|
-
font-weight: 500;
|
|
182
|
-
color: #374151;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.input-wrapper {
|
|
186
|
-
position: relative;
|
|
187
|
-
display: flex;
|
|
188
|
-
align-items: center;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/* Base input styles - use .input-wrapper for higher specificity */
|
|
192
|
-
.input-wrapper input {
|
|
193
|
-
width: 100%;
|
|
194
|
-
padding: 0.625rem 0.75rem;
|
|
195
|
-
font-size: 0.875rem;
|
|
196
|
-
font-family: inherit;
|
|
197
|
-
color: #111827;
|
|
198
|
-
background-color: white;
|
|
199
|
-
border: 1px solid #d1d5db;
|
|
200
|
-
border-radius: 0.5rem;
|
|
201
|
-
outline: none;
|
|
202
|
-
box-shadow: none;
|
|
203
|
-
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.input-wrapper input:focus {
|
|
207
|
-
border-color: var(--consent-primary, #2563eb);
|
|
208
|
-
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.input-wrapper input:disabled {
|
|
212
|
-
background-color: #f9fafb;
|
|
213
|
-
cursor: not-allowed;
|
|
214
|
-
opacity: 0.6;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.input-wrapper input::placeholder {
|
|
218
|
-
color: #9ca3af;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/* Prevent browser validation styling before user interaction */
|
|
222
|
-
.input-wrapper input:invalid {
|
|
223
|
-
border-color: #d1d5db;
|
|
224
|
-
box-shadow: none;
|
|
225
|
-
outline: none;
|
|
226
|
-
background-color: white;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/* Override browser autofill styling */
|
|
230
|
-
.input-wrapper input:-webkit-autofill,
|
|
231
|
-
.input-wrapper input:-webkit-autofill:hover,
|
|
232
|
-
.input-wrapper input:-webkit-autofill:focus {
|
|
233
|
-
-webkit-box-shadow: 0 0 0 1000px white inset;
|
|
234
|
-
-webkit-text-fill-color: #111827;
|
|
235
|
-
border-color: #d1d5db;
|
|
236
|
-
transition: background-color 5000s ease-in-out 0s;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/* Only show validation styling after user interaction */
|
|
240
|
-
.input-wrapper input:user-invalid {
|
|
241
|
-
border-color: #ef4444;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.input-wrapper input:user-invalid:focus {
|
|
245
|
-
border-color: #ef4444;
|
|
246
|
-
box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/* Password toggle */
|
|
250
|
-
.input-wrapper input[type='password'] {
|
|
251
|
-
padding-right: 2.5rem;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.password-toggle {
|
|
255
|
-
position: absolute;
|
|
256
|
-
right: 0.5rem;
|
|
257
|
-
padding: 0.375rem;
|
|
258
|
-
background: none;
|
|
259
|
-
border: none;
|
|
260
|
-
cursor: pointer;
|
|
261
|
-
color: #6b7280;
|
|
262
|
-
display: flex;
|
|
263
|
-
align-items: center;
|
|
264
|
-
justify-content: center;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
.password-toggle:hover {
|
|
268
|
-
color: #374151;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
.password-toggle svg {
|
|
272
|
-
width: 1.25rem;
|
|
273
|
-
height: 1.25rem;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/* Error state - use class instead of attribute for proper specificity */
|
|
277
|
-
.input-wrapper.has-error input {
|
|
278
|
-
border-color: #ef4444;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.input-wrapper.has-error input:focus {
|
|
282
|
-
border-color: #ef4444;
|
|
283
|
-
box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.error-message {
|
|
287
|
-
font-size: 0.75rem;
|
|
288
|
-
color: #ef4444;
|
|
289
|
-
margin-top: 0.25rem;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
/* Required indicator */
|
|
293
|
-
.required {
|
|
294
|
-
color: #ef4444;
|
|
295
|
-
margin-left: 0.125rem;
|
|
296
|
-
}
|
|
297
|
-
`;
|
|
298
|
-
__decorate([
|
|
299
|
-
property({ type: String })
|
|
300
|
-
], ConsentInput.prototype, "type", void 0);
|
|
301
|
-
__decorate([
|
|
302
|
-
property({ type: String })
|
|
303
|
-
], ConsentInput.prototype, "name", void 0);
|
|
304
|
-
__decorate([
|
|
305
|
-
property({ type: String })
|
|
306
|
-
], ConsentInput.prototype, "value", void 0);
|
|
307
|
-
__decorate([
|
|
308
|
-
property({ type: String })
|
|
309
|
-
], ConsentInput.prototype, "label", void 0);
|
|
310
|
-
__decorate([
|
|
311
|
-
property({ type: String })
|
|
312
|
-
], ConsentInput.prototype, "placeholder", void 0);
|
|
313
|
-
__decorate([
|
|
314
|
-
property({ type: Boolean })
|
|
315
|
-
], ConsentInput.prototype, "required", void 0);
|
|
316
|
-
__decorate([
|
|
317
|
-
property({ type: Boolean, reflect: true })
|
|
318
|
-
], ConsentInput.prototype, "disabled", void 0);
|
|
319
|
-
__decorate([
|
|
320
|
-
property({ type: String })
|
|
321
|
-
], ConsentInput.prototype, "autocomplete", void 0);
|
|
322
|
-
__decorate([
|
|
323
|
-
property({ type: String })
|
|
324
|
-
], ConsentInput.prototype, "error", void 0);
|
|
325
|
-
__decorate([
|
|
326
|
-
state()
|
|
327
|
-
], ConsentInput.prototype, "showPassword", void 0);
|
|
328
|
-
ConsentInput = __decorate([
|
|
329
|
-
customElement('consent-input')
|
|
330
|
-
], ConsentInput);
|
|
331
|
-
export { ConsentInput };
|
|
332
|
-
//# sourceMappingURL=consent-input.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"consent-input.js","sourceRoot":"","sources":["../../src/components/consent-input.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAOnE;;;;;;;;;;;;;;;;;;;GAmBG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU;IAM1C;QACE,KAAK,EAAE,CAAC;QAIV;;WAEG;QAEH,SAAI,GAAc,MAAM,CAAC;QAEzB;;WAEG;QAEH,SAAI,GAAG,EAAE,CAAC;QAEV;;WAEG;QAEH,UAAK,GAAG,EAAE,CAAC;QAEX;;WAEG;QAEH,UAAK,GAAG,EAAE,CAAC;QAEX;;WAEG;QAEH,gBAAW,GAAG,EAAE,CAAC;QAEjB;;WAEG;QAEH,aAAQ,GAAG,KAAK,CAAC;QAEjB;;WAEG;QAEH,aAAQ,GAAG,KAAK,CAAC;QAEjB;;WAEG;QAEH,iBAAY,GAAG,EAAE,CAAC;QAQlB;;WAEG;QAEK,iBAAY,GAAG,KAAK,CAAC;QA7D3B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;IAC1C,CAAC;IAiMD,2C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiI3B,AAjIqB,CAiIpB;AAzLF;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CACF;AAMzB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CACjB;AAMV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAChB;AAMX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAChB;AAMX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDACV;AAMjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;8CACX;AAMjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAC1B;AAMjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDACT;AAMlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACZ;AAMP;IADP,KAAK,EAAE;kDACqB;AArElB,YAAY;IADxB,aAAa,CAAC,eAAe,CAAC;GAClB,YAAY,CA8SxB"}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Consent OAuth Button Web Component
|
|
3
|
-
*
|
|
4
|
-
* A styled button for OAuth provider authentication with provider branding.
|
|
5
|
-
* Supports common OAuth providers with built-in icons.
|
|
6
|
-
*
|
|
7
|
-
* @module components/consent-oauth-button
|
|
8
|
-
*/
|
|
9
|
-
import { LitElement, TemplateResult } from 'lit';
|
|
10
|
-
/**
|
|
11
|
-
* Supported OAuth providers with built-in styling
|
|
12
|
-
*/
|
|
13
|
-
export type OAuthProvider = 'google' | 'microsoft' | 'apple' | 'github' | 'twitter' | 'facebook' | 'custom';
|
|
14
|
-
/**
|
|
15
|
-
* ConsentOAuthButton - OAuth provider sign-in button
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```html
|
|
19
|
-
* <consent-oauth-button
|
|
20
|
-
* provider="google"
|
|
21
|
-
* url="/auth/google"
|
|
22
|
-
* ></consent-oauth-button>
|
|
23
|
-
*
|
|
24
|
-
* <consent-oauth-button
|
|
25
|
-
* provider="custom"
|
|
26
|
-
* provider-name="Acme Corp"
|
|
27
|
-
* url="/auth/acme"
|
|
28
|
-
* ></consent-oauth-button>
|
|
29
|
-
* ```
|
|
30
|
-
*
|
|
31
|
-
* @fires oauth-click - When button is clicked (includes provider and url in detail)
|
|
32
|
-
* @csspart button - The button element
|
|
33
|
-
* @csspart icon - The provider icon
|
|
34
|
-
* @csspart text - The button text
|
|
35
|
-
*/
|
|
36
|
-
export declare class ConsentOAuthButton extends LitElement {
|
|
37
|
-
/**
|
|
38
|
-
* OAuth provider type
|
|
39
|
-
*/
|
|
40
|
-
provider: OAuthProvider;
|
|
41
|
-
/**
|
|
42
|
-
* Custom provider name (used when provider='custom')
|
|
43
|
-
*/
|
|
44
|
-
providerName?: string;
|
|
45
|
-
/**
|
|
46
|
-
* OAuth authorization URL
|
|
47
|
-
*/
|
|
48
|
-
url: string;
|
|
49
|
-
/**
|
|
50
|
-
* Custom button text (overrides default)
|
|
51
|
-
*/
|
|
52
|
-
buttonText?: string;
|
|
53
|
-
/**
|
|
54
|
-
* Loading state
|
|
55
|
-
*/
|
|
56
|
-
loading: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Disabled state
|
|
59
|
-
*/
|
|
60
|
-
disabled: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Full width mode
|
|
63
|
-
*/
|
|
64
|
-
fullWidth: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Custom icon SVG string (for custom providers)
|
|
67
|
-
*/
|
|
68
|
-
customIcon?: string;
|
|
69
|
-
/**
|
|
70
|
-
* Internal state for tracking redirect
|
|
71
|
-
*/
|
|
72
|
-
private redirecting;
|
|
73
|
-
static styles: import("lit").CSSResult;
|
|
74
|
-
private get config();
|
|
75
|
-
private get displayName();
|
|
76
|
-
private get displayText();
|
|
77
|
-
private handleClick;
|
|
78
|
-
private renderProviderIcon;
|
|
79
|
-
protected updated(changedProperties: Map<string, unknown>): void;
|
|
80
|
-
render(): TemplateResult<1>;
|
|
81
|
-
}
|
|
82
|
-
declare global {
|
|
83
|
-
interface HTMLElementTagNameMap {
|
|
84
|
-
'consent-oauth-button': ConsentOAuthButton;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
//# sourceMappingURL=consent-oauth-button.d.ts.map
|