@gopherium/react-auth 0.12.0 → 0.14.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 +39 -1
- package/dist/account.d.ts +12 -0
- package/dist/account.js +11 -0
- package/dist/admin/index.d.ts +2 -9
- package/dist/admin/index.js +3 -10
- package/dist/api.d.ts +23 -4
- package/dist/api.js +21 -8
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1 -0
- package/dist/languages/es-ES.json +1 -1
- package/dist/languages/languages/es-ES.json +1 -1
- package/dist/setup.d.ts +46 -0
- package/dist/setup.js +132 -0
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.js +1 -0
- package/dist/testing/setup.d.ts +63 -0
- package/dist/testing/setup.js +119 -0
- package/dist/transport.d.ts +4 -0
- package/dist/wpds/LoginScreen.js +5 -5
- package/dist/wpds/SetupAccountStep.d.ts +35 -0
- package/dist/wpds/SetupAccountStep.js +367 -0
- package/dist/wpds/SetupCodeStep.d.ts +18 -0
- package/dist/wpds/SetupCodeStep.js +72 -0
- package/dist/wpds/index.d.ts +2 -0
- package/dist/wpds/index.js +2 -0
- package/dist/wpds/password.d.ts +6 -0
- package/dist/wpds/password.js +35 -0
- package/dist/wpds/setupWords.d.ts +13 -0
- package/dist/wpds/setupWords.js +39 -0
- package/dist/wpds/strength.d.ts +26 -0
- package/dist/wpds/strength.js +45 -0
- package/dist/wpds/style.css +236 -0
- package/package.json +4 -2
package/dist/wpds/index.d.ts
CHANGED
|
@@ -5,4 +5,6 @@ export { NewUserScreen } from './NewUserScreen.js';
|
|
|
5
5
|
export { RequestResetScreen } from './RequestResetScreen.js';
|
|
6
6
|
export { ResetPasswordScreen } from './ResetPasswordScreen.js';
|
|
7
7
|
export { SetPasswordScreen } from './SetPasswordScreen.js';
|
|
8
|
+
export { SetupAccountStep } from './SetupAccountStep.js';
|
|
9
|
+
export { SetupCodeStep } from './SetupCodeStep.js';
|
|
8
10
|
export { UsersScreen } from './UsersScreen.js';
|
package/dist/wpds/index.js
CHANGED
|
@@ -6,4 +6,6 @@ export { NewUserScreen } from './NewUserScreen.js';
|
|
|
6
6
|
export { RequestResetScreen } from './RequestResetScreen.js';
|
|
7
7
|
export { ResetPasswordScreen } from './ResetPasswordScreen.js';
|
|
8
8
|
export { SetPasswordScreen } from './SetPasswordScreen.js';
|
|
9
|
+
export { SetupAccountStep } from './SetupAccountStep.js';
|
|
10
|
+
export { SetupCodeStep } from './SetupCodeStep.js';
|
|
9
11
|
export { UsersScreen } from './UsersScreen.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a random password from the generator's characters, each equally likely.
|
|
3
|
+
* @param length - The number of characters the password holds, a whole number from 1 to 65536.
|
|
4
|
+
* @returns The password.
|
|
5
|
+
*/
|
|
6
|
+
export declare function generatePassword(length: number): string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
/** The letters, digits and ten symbols a generated password draws from. */
|
|
3
|
+
const CHARACTERS = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()';
|
|
4
|
+
/** The first byte value that would make some characters likelier than others. */
|
|
5
|
+
const UNBIASED_BOUND = 256 - (256 % CHARACTERS.length);
|
|
6
|
+
/** The most bytes crypto.getRandomValues fills in one draw, so the longest password the generator makes. */
|
|
7
|
+
const LONGEST_PASSWORD = 65536;
|
|
8
|
+
/**
|
|
9
|
+
* Reports whether the generator makes a password this long.
|
|
10
|
+
* @param length - The number of characters asked for.
|
|
11
|
+
* @returns True for a whole number from 1 to 65536.
|
|
12
|
+
*/
|
|
13
|
+
function isAllowedLength(length) {
|
|
14
|
+
return Number.isInteger(length) && length >= 1 && length <= LONGEST_PASSWORD;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns a random password from the generator's characters, each equally likely.
|
|
18
|
+
* @param length - The number of characters the password holds, a whole number from 1 to 65536.
|
|
19
|
+
* @returns The password.
|
|
20
|
+
*/
|
|
21
|
+
export function generatePassword(length) {
|
|
22
|
+
if (!isAllowedLength(length)) {
|
|
23
|
+
throw new RangeError(`generatedPasswordLength must be a whole number from 1 to ${LONGEST_PASSWORD}, not ${length}`);
|
|
24
|
+
}
|
|
25
|
+
const bytes = new Uint8Array(length);
|
|
26
|
+
let password = '';
|
|
27
|
+
while (password.length < length) {
|
|
28
|
+
crypto.getRandomValues(bytes);
|
|
29
|
+
const kept = bytes.filter((byte) => byte < UNBIASED_BOUND);
|
|
30
|
+
for (const byte of kept.slice(0, length - password.length)) {
|
|
31
|
+
password += CHARACTERS[byte % CHARACTERS.length];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return password;
|
|
35
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SetupCodeError } from '../setup.js';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the sentence for a refused setup code.
|
|
4
|
+
* @param reason - Why the site refused the code.
|
|
5
|
+
* @returns The sentence to show.
|
|
6
|
+
*/
|
|
7
|
+
export declare function codeRefusal(reason: SetupCodeError['reason']): string;
|
|
8
|
+
/**
|
|
9
|
+
* Returns the sentence both setup steps show for a refusal they share.
|
|
10
|
+
* @param error - The error the setup call threw.
|
|
11
|
+
* @returns The sentence to show, or undefined for an error the steps do not share.
|
|
12
|
+
*/
|
|
13
|
+
export declare function setupRefusal(error: unknown): string | undefined;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
import { __ } from '@wordpress/i18n';
|
|
3
|
+
import { RateLimitedError } from '../api.js';
|
|
4
|
+
import { DOMAIN } from '../domain.js';
|
|
5
|
+
import { SetupClosedError, SetupCodeError, SiteStartingError } from '../setup.js';
|
|
6
|
+
/** The sentence each reason for a refused setup code shows. */
|
|
7
|
+
const codeWords = {
|
|
8
|
+
invalid: () => __('Your setup code appears to be invalid. Please copy it again from the setup code file.', DOMAIN),
|
|
9
|
+
expired: () => __('Your setup code has expired. A new one is waiting in the setup code file.', DOMAIN),
|
|
10
|
+
file: () => __('The setup code file cannot be used. Please check it and try again.', DOMAIN),
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Returns the sentence for a refused setup code.
|
|
14
|
+
* @param reason - Why the site refused the code.
|
|
15
|
+
* @returns The sentence to show.
|
|
16
|
+
*/
|
|
17
|
+
export function codeRefusal(reason) {
|
|
18
|
+
return codeWords[reason]();
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Returns the sentence both setup steps show for a refusal they share.
|
|
22
|
+
* @param error - The error the setup call threw.
|
|
23
|
+
* @returns The sentence to show, or undefined for an error the steps do not share.
|
|
24
|
+
*/
|
|
25
|
+
export function setupRefusal(error) {
|
|
26
|
+
if (error instanceof SetupCodeError) {
|
|
27
|
+
return codeRefusal(error.reason);
|
|
28
|
+
}
|
|
29
|
+
if (error instanceof SetupClosedError) {
|
|
30
|
+
return __('You appear to have already set up this site.', DOMAIN);
|
|
31
|
+
}
|
|
32
|
+
if (error instanceof SiteStartingError) {
|
|
33
|
+
return __('The site is starting. Please wait a moment and try again.', DOMAIN);
|
|
34
|
+
}
|
|
35
|
+
if (error instanceof RateLimitedError) {
|
|
36
|
+
return __('Too many attempts. Please try again later.', DOMAIN);
|
|
37
|
+
}
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** A meter answers a password's strength score, 0 to 4. */
|
|
2
|
+
export type Meter = (password: string, words: string[]) => number;
|
|
3
|
+
/** The tone a strength shows in, named after the class it sets. */
|
|
4
|
+
export type Tone = 'short' | 'bad' | 'good' | 'strong';
|
|
5
|
+
/** The word and tone the meter shows for a score. */
|
|
6
|
+
export interface Level {
|
|
7
|
+
word: string;
|
|
8
|
+
tone: Tone;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Loads zxcvbn on demand as its own chunk.
|
|
12
|
+
* @returns The meter scoring a password against the given words.
|
|
13
|
+
*/
|
|
14
|
+
export declare function loadMeter(): Promise<Meter>;
|
|
15
|
+
/**
|
|
16
|
+
* Splits values into the words the meter treats as easy to guess.
|
|
17
|
+
* @param values - The values the person typed or the page shows.
|
|
18
|
+
* @returns The distinct words of four characters or more.
|
|
19
|
+
*/
|
|
20
|
+
export declare function disallowedWords(values: string[]): string[];
|
|
21
|
+
/**
|
|
22
|
+
* Returns the word and tone the meter shows for a score.
|
|
23
|
+
* @param score - The meter's score, or -1 while it is unknown.
|
|
24
|
+
* @returns The word and tone.
|
|
25
|
+
*/
|
|
26
|
+
export declare function levelOf(score: number): Level;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
import { _x } from '@wordpress/i18n';
|
|
3
|
+
import { DOMAIN } from '../domain.js';
|
|
4
|
+
/** The number of leading characters the meter scores. */
|
|
5
|
+
const SCORED_LENGTH = 64;
|
|
6
|
+
/** The fewest characters a word needs to reach the meter. */
|
|
7
|
+
const SHORTEST_WORD = 4;
|
|
8
|
+
/**
|
|
9
|
+
* Returns the level for every score without one of its own, the lowest two included.
|
|
10
|
+
* @returns The very weak level.
|
|
11
|
+
*/
|
|
12
|
+
function veryWeak() {
|
|
13
|
+
return { word: _x('Very weak', 'password strength', DOMAIN), tone: 'short' };
|
|
14
|
+
}
|
|
15
|
+
const levels = new Map([
|
|
16
|
+
[-1, () => ({ word: _x('Password strength unknown', 'password strength', DOMAIN), tone: 'bad' })],
|
|
17
|
+
[2, () => ({ word: _x('Weak', 'password strength', DOMAIN), tone: 'bad' })],
|
|
18
|
+
[3, () => ({ word: _x('Medium', 'password strength', DOMAIN), tone: 'good' })],
|
|
19
|
+
[4, () => ({ word: _x('Strong', 'password strength', DOMAIN), tone: 'strong' })],
|
|
20
|
+
]);
|
|
21
|
+
/**
|
|
22
|
+
* Loads zxcvbn on demand as its own chunk.
|
|
23
|
+
* @returns The meter scoring a password against the given words.
|
|
24
|
+
*/
|
|
25
|
+
export async function loadMeter() {
|
|
26
|
+
const { default: zxcvbn } = await import('zxcvbn');
|
|
27
|
+
return (password, words) => zxcvbn(password.slice(0, SCORED_LENGTH), words).score;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Splits values into the words the meter treats as easy to guess.
|
|
31
|
+
* @param values - The values the person typed or the page shows.
|
|
32
|
+
* @returns The distinct words of four characters or more.
|
|
33
|
+
*/
|
|
34
|
+
export function disallowedWords(values) {
|
|
35
|
+
const words = values.flatMap((value) => value.replace(/\W/g, ' ').split(' '));
|
|
36
|
+
return words.filter((word, index) => word.length >= SHORTEST_WORD && words.indexOf(word) === index);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Returns the word and tone the meter shows for a score.
|
|
40
|
+
* @param score - The meter's score, or -1 while it is unknown.
|
|
41
|
+
* @returns The word and tone.
|
|
42
|
+
*/
|
|
43
|
+
export function levelOf(score) {
|
|
44
|
+
return (levels.get(score) ?? veryWeak)();
|
|
45
|
+
}
|
package/dist/wpds/style.css
CHANGED
|
@@ -9,11 +9,247 @@
|
|
|
9
9
|
box-sizing: border-box;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
.gopherium-login__column {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
width: 100%;
|
|
16
|
+
max-width: 360px;
|
|
17
|
+
}
|
|
18
|
+
|
|
12
19
|
.gopherium-login__card {
|
|
13
20
|
width: 100%;
|
|
14
21
|
max-width: 360px;
|
|
15
22
|
}
|
|
16
23
|
|
|
24
|
+
.gopherium-login__nav {
|
|
25
|
+
margin: 24px 0 0;
|
|
26
|
+
padding: 0 24px;
|
|
27
|
+
font-size: var(--wpds-typography-font-size-md);
|
|
28
|
+
line-height: var(--wpds-typography-line-height-sm);
|
|
29
|
+
text-align: start;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.gopherium-login__nav button {
|
|
33
|
+
padding: 0;
|
|
34
|
+
border: 0;
|
|
35
|
+
background: none;
|
|
36
|
+
font: inherit;
|
|
37
|
+
line-height: normal;
|
|
38
|
+
text-align: inherit;
|
|
39
|
+
text-decoration-line: underline;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.gopherium-login__nav button:hover,
|
|
44
|
+
.gopherium-login__nav button:focus-visible {
|
|
45
|
+
text-decoration-color: currentColor;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.gopherium-setup .gopherium-setup__heading {
|
|
49
|
+
margin: 0 0 0.67em;
|
|
50
|
+
padding-bottom: 7px;
|
|
51
|
+
border-bottom: 1px solid var(--wpds-color-stroke-surface-neutral);
|
|
52
|
+
font-size: 24px;
|
|
53
|
+
font-weight: var(--wpds-typography-font-weight-default);
|
|
54
|
+
line-height: var(--wpds-typography-line-height-xl);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.gopherium-setup .gopherium-setup__text,
|
|
58
|
+
.gopherium-setup .gopherium-setup__file,
|
|
59
|
+
.gopherium-setup .gopherium-setup__message {
|
|
60
|
+
margin: 14px 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.gopherium-setup .gopherium-setup__text,
|
|
64
|
+
.gopherium-setup .gopherium-setup__message,
|
|
65
|
+
.gopherium-setup .gopherium-setup__help {
|
|
66
|
+
font-size: 14px;
|
|
67
|
+
line-height: 1.5;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.gopherium-setup__file {
|
|
71
|
+
font-size: var(--wpds-typography-font-size-sm);
|
|
72
|
+
overflow-wrap: anywhere;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.gopherium-setup__message {
|
|
76
|
+
padding: 0.7em 0.6em;
|
|
77
|
+
border-inline-start: 4px solid var(--wpds-color-stroke-surface-error-strong);
|
|
78
|
+
background-color: var(--wpds-color-background-surface-error-weak);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.gopherium-setup__row {
|
|
82
|
+
display: grid;
|
|
83
|
+
grid-template-columns: 115px minmax(0, 1fr);
|
|
84
|
+
column-gap: 20px;
|
|
85
|
+
padding: 10px 20px 10px 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.gopherium-setup__label {
|
|
89
|
+
font-size: 14px;
|
|
90
|
+
font-weight: var(--wpds-typography-font-weight-emphasis);
|
|
91
|
+
line-height: 1.3;
|
|
92
|
+
text-transform: none;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.gopherium-setup__row input {
|
|
96
|
+
font-size: var(--wpds-typography-font-size-lg);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.gopherium-setup .gopherium-setup__help {
|
|
100
|
+
margin: 4px 0 0;
|
|
101
|
+
color: var(--wpds-color-foreground-content-neutral-weak);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.gopherium-setup__checkbox {
|
|
105
|
+
--_wp-ui-checkbox-control-label-line-height: max(var(--_wp-ui-checkbox-control-checkbox-height), 14px * 1.3);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.gopherium-setup__checkbox label {
|
|
109
|
+
font-size: 14px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.gopherium-setup__checkbox [role="checkbox"] > svg {
|
|
113
|
+
width: calc(100% + 2 * var(--wpds-border-width-xs));
|
|
114
|
+
height: calc(100% + 2 * var(--wpds-border-width-xs));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.gopherium-setup__password {
|
|
118
|
+
display: flex;
|
|
119
|
+
column-gap: 4px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.gopherium-setup__password-field {
|
|
123
|
+
width: 100%;
|
|
124
|
+
min-width: 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.gopherium-setup__toggle {
|
|
128
|
+
flex: none;
|
|
129
|
+
flex-direction: column;
|
|
130
|
+
align-self: flex-start;
|
|
131
|
+
gap: 0;
|
|
132
|
+
white-space: nowrap;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.gopherium-setup__toggle::after {
|
|
136
|
+
content: attr(data-other-word);
|
|
137
|
+
height: 0;
|
|
138
|
+
overflow: hidden;
|
|
139
|
+
visibility: hidden;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.gopherium-setup__meter {
|
|
143
|
+
box-sizing: border-box;
|
|
144
|
+
width: 100%;
|
|
145
|
+
margin: -1px 0 5px;
|
|
146
|
+
padding: 3px 5px;
|
|
147
|
+
border: var(--wpds-border-width-xs) solid var(--wpds-color-stroke-surface-neutral);
|
|
148
|
+
border-radius: var(--wpds-border-radius-sm);
|
|
149
|
+
color: var(--wpds-color-foreground-content-neutral);
|
|
150
|
+
font-size: 14px;
|
|
151
|
+
font-weight: normal;
|
|
152
|
+
line-height: 1.3;
|
|
153
|
+
text-align: center;
|
|
154
|
+
opacity: 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.gopherium-setup__meter--short {
|
|
158
|
+
border-color: var(--wpds-color-stroke-surface-error-strong);
|
|
159
|
+
background-color: var(--wpds-color-background-surface-error);
|
|
160
|
+
opacity: 1;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.gopherium-setup__meter--bad {
|
|
164
|
+
border-color: var(--wpds-color-stroke-surface-error);
|
|
165
|
+
background-color: var(--wpds-color-background-surface-error-weak);
|
|
166
|
+
opacity: 1;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.gopherium-setup__meter--good {
|
|
170
|
+
border-color: var(--wpds-color-stroke-surface-caution);
|
|
171
|
+
background-color: var(--wpds-color-background-surface-caution-weak);
|
|
172
|
+
opacity: 1;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.gopherium-setup__meter--strong {
|
|
176
|
+
border-color: var(--wpds-color-stroke-surface-success);
|
|
177
|
+
background-color: var(--wpds-color-background-surface-success-weak);
|
|
178
|
+
opacity: 1;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.gopherium-setup__input input {
|
|
182
|
+
font-family: var(--wpds-typography-font-family-mono);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.gopherium-setup__input--short:not(:focus-within) {
|
|
186
|
+
border-color: var(--wpds-color-stroke-surface-error-strong);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.gopherium-setup__input--bad:not(:focus-within) {
|
|
190
|
+
border-color: var(--wpds-color-stroke-surface-error);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.gopherium-setup__input--good:not(:focus-within) {
|
|
194
|
+
border-color: var(--wpds-color-stroke-surface-caution);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.gopherium-setup__input--strong:not(:focus-within) {
|
|
198
|
+
border-color: var(--wpds-color-stroke-surface-success);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.gopherium-setup__caps:empty {
|
|
202
|
+
display: none;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.gopherium-setup__caps {
|
|
206
|
+
position: relative;
|
|
207
|
+
top: -8px;
|
|
208
|
+
display: flex;
|
|
209
|
+
align-items: flex-start;
|
|
210
|
+
padding: 6px 10px;
|
|
211
|
+
border: var(--wpds-border-width-xs) solid var(--wpds-color-stroke-surface-caution);
|
|
212
|
+
background-color: var(--wpds-color-background-surface-caution-weak);
|
|
213
|
+
color: var(--wpds-color-foreground-content-neutral);
|
|
214
|
+
font-size: 14px;
|
|
215
|
+
line-height: 1.3;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.gopherium-setup__caps-icon {
|
|
219
|
+
display: flex;
|
|
220
|
+
flex: none;
|
|
221
|
+
justify-content: center;
|
|
222
|
+
width: 20px;
|
|
223
|
+
height: 20px;
|
|
224
|
+
margin-inline-end: 5px;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.gopherium-setup__step {
|
|
228
|
+
margin: 20px 0 15px;
|
|
229
|
+
padding: 0;
|
|
230
|
+
text-align: start;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@media screen and (max-width: 782px) {
|
|
234
|
+
.gopherium-setup__row {
|
|
235
|
+
grid-template-columns: minmax(0, 1fr);
|
|
236
|
+
row-gap: 5px;
|
|
237
|
+
padding: 20px 0 5px;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.gopherium-setup__row input {
|
|
241
|
+
font-size: 16px;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.gopherium-setup__meter {
|
|
245
|
+
padding: 8px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.gopherium-setup__checkbox {
|
|
249
|
+
--_wp-ui-checkbox-control-checkbox-height: 25px;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
17
253
|
.gopherium-users {
|
|
18
254
|
width: 100%;
|
|
19
255
|
border-collapse: collapse;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gopherium/react-auth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Session authentication for React apps backed by gouncer's authkit.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"zod": "^4.4.3"
|
|
47
|
+
"zod": "^4.4.3",
|
|
48
|
+
"zxcvbn": "4.4.1"
|
|
48
49
|
},
|
|
49
50
|
"peerDependencies": {
|
|
50
51
|
"@tanstack/react-query": "^5.101.2",
|
|
@@ -84,6 +85,7 @@
|
|
|
84
85
|
"@testing-library/user-event": "^14.6.1",
|
|
85
86
|
"@types/gettext-parser": "9.0.0",
|
|
86
87
|
"@types/react": "^19.2.17",
|
|
88
|
+
"@types/zxcvbn": "4.4.5",
|
|
87
89
|
"@vitejs/plugin-react": "^6.0.3",
|
|
88
90
|
"@vitest/coverage-v8": "^5.0.3",
|
|
89
91
|
"@wordpress/i18n": "6.30.0",
|