@akinon/pz-theme 2.0.165-beta.0 → 2.0.165
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/CHANGELOG.md +7 -4
- package/package.json +4 -4
- package/src/__tests__/profile-form-composed.test.tsx +795 -0
- package/src/auth/auth-field-errors.tsx +59 -13
- package/src/auth/form-field-defaults.tsx +74 -0
- package/src/blocks/auth-consent-block.tsx +78 -19
- package/src/blocks/auth-field-block.tsx +212 -50
- package/src/blocks/auth-form-block.tsx +3 -4
- package/src/blocks/birth-date-selects.tsx +206 -0
- package/src/blocks/forgot-password-block.tsx +3 -4
- package/src/blocks/otp-form-block.tsx +3 -4
- package/src/blocks/profile-form-block.tsx +353 -10
- package/src/blocks/register-form-block.tsx +12 -6
- package/src/blocks/reset-password-block.tsx +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# @akinon/pz-theme
|
|
2
2
|
|
|
3
|
-
## 2.0.165
|
|
3
|
+
## 2.0.165
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
-
|
|
7
|
+
- 75fa18b0: The profile-form block composes from child blocks, the way the register form does. With children it draws them — an `auth-field` per input, an `auth-consent` per contact channel, any text, link or group around them — starts each one from the shopper's profile, and saves only what is on screen: the profile is PATCHed, so a field the composition does not show (or hides on a breakpoint) keeps its stored value, a question never answered is not written, a box the shopper emptied is sent as `''`, and a visible tick posts `true` or `false` (a custom tick its own value). Visibility is judged per field, so a brand's own drawn checkbox or radio still counts. The e-mail is drawn disabled, Form State children show only in their state, and a profile that fails to load shows the error message. Without children the fixed rows render exactly as before. New `requiredMessage` / `invalidMessage` properties carry the composed fields' validation copy.
|
|
8
|
+
|
|
9
|
+
`auth-field` gains a radio variant for gender (`choiceControl: radio`) and a day / month / year select variant for the birth date (`dateControl: selects`, with `dayPlaceholder`, `monthPlaceholder`, `yearPlaceholder`, `monthLabels`, `minAge`, `maxAge`); both submit the same values as before. `auth-consent` gains one tick per contact channel (`consentType`: `email`, `sms`, `call`, `whatsapp` → `email_allowed` … `whatsapp_allowed`), never required; a register form reads it in place of its blanket marketing answer for that channel, and a channel tick hidden on the current breakpoint no longer answers there. A compound field's parts are validated and cleared under the field's name in every composed form, and a field hidden behind a brand-drawn control is still validated.
|
|
10
|
+
|
|
11
|
+
- @akinon/next@2.0.165
|
|
12
|
+
- @akinon/theme-contract@2.0.165
|
|
10
13
|
|
|
11
14
|
## 2.0.164
|
|
12
15
|
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/pz-theme",
|
|
3
3
|
"description": "Theme package for Project Zero Next — ThemePlaceholder system and theme editor infrastructure",
|
|
4
|
-
"version": "2.0.165
|
|
4
|
+
"version": "2.0.165",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"test": "jest"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@akinon/next": "2.0.165
|
|
11
|
+
"@akinon/next": "2.0.165",
|
|
12
12
|
"react": "^18.0.0 || ^19.0.0",
|
|
13
13
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@akinon/theme-contract": "2.0.165
|
|
16
|
+
"@akinon/theme-contract": "2.0.165",
|
|
17
17
|
"clsx": "2.1.1",
|
|
18
18
|
"lottie-web": "^5.13.0",
|
|
19
19
|
"react-multi-carousel": "2.8.4",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"zod": "4.4.1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@akinon/next": "2.0.165
|
|
24
|
+
"@akinon/next": "2.0.165",
|
|
25
25
|
"@testing-library/jest-dom": "5.16.4",
|
|
26
26
|
"@testing-library/react": "16.3.2",
|
|
27
27
|
"@testing-library/user-event": "14.1.1",
|