@akinon/pz-theme 2.0.76-rc.0 → 2.0.76

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 CHANGED
@@ -1,37 +1,12 @@
1
1
  # @akinon/pz-theme
2
2
 
3
- ## 2.0.76-rc.0
4
-
5
- ### Patch Changes
6
-
7
- - Updated dependencies [0cf9ea239]
8
- - Updated dependencies [324f97d55]
9
- - Updated dependencies [51ea06888]
10
- - Updated dependencies
11
- - Updated dependencies [2fea4143]
12
- - Updated dependencies [b55acb768]
13
- - Updated dependencies [760258c1c]
14
- - Updated dependencies [143be2b9d]
15
- - Updated dependencies [7889b08fe]
16
- - Updated dependencies [9f8cd3bc5]
17
- - Updated dependencies [bfafa3f49]
18
- - Updated dependencies [57d7eb305]
19
- - Updated dependencies [d99a6a7d5]
20
- - Updated dependencies [9db81a714]
21
- - Updated dependencies [591e345e1]
22
- - Updated dependencies [4de5303c5]
23
- - Updated dependencies [95b139dc1]
24
- - Updated dependencies [1d00f2d06]
25
- - Updated dependencies [4ac7b2a1e]
26
- - Updated dependencies [e9598c71]
27
- - Updated dependencies [4998a9631]
28
- - Updated dependencies [804d2bd6c]
29
- - Updated dependencies [3909d3224]
30
- - Updated dependencies [6a3d8a631]
31
- - Updated dependencies [e18836b20]
32
- - Updated dependencies [b1111d7b]
33
- - @akinon/next@2.0.76-rc.0
34
- - @akinon/theme-contract@2.0.76-rc.0
3
+ ## 2.0.76
4
+
5
+ ### Patch Changes
6
+
7
+ - 7197203d: ZERO-4830: Add account.user.birthDate to the account page context and a showName toggle to the profile-form block
8
+ - @akinon/next@2.0.76
9
+ - @akinon/theme-contract@2.0.76
35
10
 
36
11
  ## 2.0.75
37
12
 
package/package.json CHANGED
@@ -1,26 +1,26 @@
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.76-rc.0",
4
+ "version": "2.0.76",
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.76-rc.0",
11
+ "@akinon/next": "2.0.76",
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.76-rc.0",
16
+ "@akinon/theme-contract": "2.0.76",
17
17
  "clsx": "2.1.1",
18
18
  "lottie-web": "^5.13.0",
19
19
  "tailwind-merge": "^2.5.4",
20
20
  "zod": "4.4.1"
21
21
  },
22
22
  "devDependencies": {
23
- "@akinon/next": "2.0.76-rc.0",
23
+ "@akinon/next": "2.0.76",
24
24
  "@testing-library/jest-dom": "5.16.4",
25
25
  "@testing-library/react": "16.3.2",
26
26
  "@testing-library/user-event": "14.1.1",
@@ -76,6 +76,14 @@ const ProfileFormBlock = ({
76
76
  'successMessage',
77
77
  'Your profile has been saved.'
78
78
  );
79
+ // Lets a composition scope the form to one field (e.g. a birth-date-only
80
+ // drawer). The hidden name fields still submit their loaded values, so the
81
+ // whole-record PUT keeps them untouched.
82
+ const showName = readToggle(
83
+ block.properties?.showName,
84
+ currentBreakpoint,
85
+ true
86
+ );
79
87
  const showPhone = readToggle(
80
88
  block.properties?.showPhone,
81
89
  currentBreakpoint,
@@ -221,8 +229,8 @@ const ProfileFormBlock = ({
221
229
  gap: 'var(--profile-form-gap, 12px)'
222
230
  }}
223
231
  >
224
- {field('first_name', firstNameLabel, 'text', 'given-name')}
225
- {field('last_name', lastNameLabel, 'text', 'family-name')}
232
+ {showName && field('first_name', firstNameLabel, 'text', 'given-name')}
233
+ {showName && field('last_name', lastNameLabel, 'text', 'family-name')}
226
234
 
227
235
  {showEmail && (
228
236
  <label
@@ -393,7 +393,12 @@ export const buildAccountPageContext = ({
393
393
  toStringValue(sessionUser?.phone),
394
394
  gender:
395
395
  toStringValue(profileInfo?.gender) ||
396
- toStringValue(sessionUser?.gender)
396
+ toStringValue(sessionUser?.gender),
397
+ // Raw commerce value (ISO 8601, e.g. "1996-04-02") — display
398
+ // formatting belongs to the composition, not the context.
399
+ birthDate:
400
+ toStringValue(profileInfo?.date_of_birth) ||
401
+ toStringValue(sessionUser?.birthDate)
397
402
  }
398
403
  }
399
404
  };