@phygitallabs/phygital-consent 1.0.22 → 1.0.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phygitallabs/phygital-consent",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/api/docs.json CHANGED
@@ -276,7 +276,9 @@
276
276
  "version": { "type": "string" },
277
277
  "effective_date": { "type": "string", "format": "date-time" },
278
278
  "last_updated": { "type": "string", "format": "date-time" },
279
- "meta_data": { "type": "object" }
279
+ "meta_data": { "type": "object" },
280
+ "id": { "type": "string" },
281
+ "content": { "type": "string" }
280
282
  }
281
283
  },
282
284
  "PolicyPreference": {
@@ -73,20 +73,31 @@ export function PolicyPopup({
73
73
  <>
74
74
  {/* Policy modal */}
75
75
  <div
76
+ role="dialog"
77
+ aria-modal="true"
78
+ aria-label="Chính sách bảo mật"
76
79
  style={{
77
80
  display: "flex",
78
81
  alignItems: "center",
79
82
  justifyContent: "center",
83
+ backgroundColor: "rgba(0,0,0,0.5)",
84
+ padding: "1rem",
80
85
  }}
81
86
  >
82
87
  <div
83
- className="consent:overflow-hidden consent:flex consent:flex-col"
88
+ className="consent:bg-white consent:rounded-xl consent:border consent:border-gray-200 consent:shadow-lg consent:max-h-[90vh] consent:overflow-hidden consent:flex consent:flex-col"
84
89
  style={{
90
+ backgroundColor: "#fff",
91
+ borderRadius: "0.75rem",
92
+ border: "1px solid #e5e7eb",
93
+ boxShadow: "0 10px 15px -3px rgb(0 0 0 / 0.1)",
94
+ maxWidth: "28rem",
85
95
  width: "100%",
86
- height: "100%",
96
+ maxHeight: "90vh",
87
97
  overflow: "hidden",
88
98
  display: "flex",
89
99
  flexDirection: "column",
100
+ position: "relative",
90
101
  }}
91
102
  onClick={(e) => e.stopPropagation()}
92
103
  >
@@ -113,7 +124,7 @@ export function PolicyPopup({
113
124
  </button> */}
114
125
  <h2
115
126
  style={{
116
- fontSize: "20px",
127
+ fontSize: "18px",
117
128
  fontWeight: 600,
118
129
  color: "#000",
119
130
  padding: "20px 2.5rem 12px 20px",
@@ -199,7 +210,7 @@ export function PolicyPopup({
199
210
  borderRadius: "0.5rem",
200
211
  background: agreed ? "#111827" : "#e5e7eb",
201
212
  padding: "0.5rem 1rem",
202
- fontSize: "1rem",
213
+ fontSize: "0.875rem",
203
214
  fontWeight: 500,
204
215
  color: agreed ? "#fff" : "#9ca3af",
205
216
  border: "none",
@@ -212,7 +223,7 @@ export function PolicyPopup({
212
223
  {createUserConsent.isError && (
213
224
  <p
214
225
  className="consent:text-sm consent:text-red-600"
215
- style={{ fontSize: "1rem", color: "#dc2626", margin: 0 }}
226
+ style={{ fontSize: "0.875rem", color: "#dc2626", margin: 0 }}
216
227
  >
217
228
  Đã xảy ra lỗi. Vui lòng thử lại.
218
229
  </p>
@@ -255,7 +266,7 @@ export function PolicyPopup({
255
266
  <p
256
267
  className="consent:text-sm consent:text-gray-700"
257
268
  style={{
258
- fontSize: "1rem",
269
+ fontSize: "0.875rem",
259
270
  color: "#374151",
260
271
  margin: "0 0 1rem 0",
261
272
  lineHeight: 1.5,
@@ -15,6 +15,8 @@ export interface PolicyDocument {
15
15
  effective_date?: string;
16
16
  last_updated?: string;
17
17
  meta_data?: Record<string, unknown>;
18
+ id?: string;
19
+ content?: string;
18
20
  }
19
21
 
20
22
  export interface PolicyPreference {