uhc-portal-components-react 0.2.15 → 0.2.16
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 +3 -0
- package/README.md +3 -1
- package/dist/AnimalCardArtifact.d.ts.map +1 -1
- package/dist/AnimalCardArtifact.js +1 -1
- package/dist/styles.css +9 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
animal species context and 21-digit telephone identifier and renders an
|
|
8
8
|
SHC-like identity QR only when the owning provider supplies it already
|
|
9
9
|
signed.
|
|
10
|
+
- Print both faces vertically at 50 x 80 mm, enlarge each QR to the usable
|
|
11
|
+
card width and remove the unreadable printed DID while preserving it as the
|
|
12
|
+
exact face-A QR payload.
|
|
10
13
|
|
|
11
14
|
## 0.2.14 - 2026-10-15
|
|
12
15
|
|
package/README.md
CHANGED
|
@@ -204,4 +204,6 @@ SOSChain, PetChain and VetChain. The host supplies both QR nodes: face A must
|
|
|
204
204
|
encode only the canonical card `did:web`; face B may encode only an already
|
|
205
205
|
signed provider-issued identity credential. Presentation code never issues or
|
|
206
206
|
signs the credential. When no signed value is available, the reverse side
|
|
207
|
-
fails closed with an explicit unavailable state.
|
|
207
|
+
fails closed with an explicit unavailable state. Both faces use the vertical
|
|
208
|
+
50 x 80 mm label format. The QR fills the usable width; the long `did:web` is
|
|
209
|
+
not repeated as unreadable microtext.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimalCardArtifact.d.ts","sourceRoot":"","sources":["../src/AnimalCardArtifact.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,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KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAC,CAAA;AAEF;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,KAAK,EACL,QAAQ,EACR,OAAO,EACP,OAAO,EACP,UAAU,EACV,OAAO,EACP,UAAU,EACV,OAAO,GACR,EAAE,uBAAuB,+BAsBzB;AAED,MAAM,MAAM,sCAAsC,GAAG,QAAQ,CAAC;IAC5D,gHAAgH;IAChH,WAAW,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAA;IACnC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,yDAAyD;IACzD,KAAK,EAAE,SAAS,CAAA;IAChB,oFAAoF;IACpF,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,8BAA8B,CAAC,EAAE,MAAM,CAAA;CACxC,CAAC,CAAA;AAEF,8EAA8E;AAC9E,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhE;AAED;;;;GAIG;AACH,wBAAgB,iCAAiC,CAAC,EAChD,WAAsB,EACtB,YAAY,EACZ,OAAO,EACP,UAAU,EACV,YAAY,EACZ,KAAK,EACL,UAAU,EACV,OAAO,EACP,8BAA8D,GAC/D,EAAE,sCAAsC,+BA8BxC"}
|
|
@@ -21,7 +21,7 @@ export function formatSoschainCardNumber21(value) {
|
|
|
21
21
|
export function SoschainSmartIdentityCardArtifact({ subjectKind = 'animal', subjectLabel, cardDid, speciesId7, cardNumber21, didQr, identityQr, logoUrl, signedIdentityUnavailableLabel = 'Signed identity unavailable', }) {
|
|
22
22
|
const publicLabel = subjectKind === 'personal' ? 'Personal' : String(subjectLabel || 'Animal').trim();
|
|
23
23
|
const formattedCardNumber = cardNumber21 ? formatSoschainCardNumber21(cardNumber21) : undefined;
|
|
24
|
-
return _jsxs("div", { className: "uhcp-smart-id-card-set", "aria-label": `SOSCHAIN Smart Identity Card: ${publicLabel}`, children: [_jsxs("article", { className: "uhcp-smart-id-card uhcp-smart-id-card-front", "data-card-face": "front", children: [_jsxs("header", { className: "uhcp-smart-id-brand", children: [_jsx("img", { src: logoUrl, alt: "" }), _jsx("strong", { children: "SOSCHAIN" }), _jsx("span", { children: publicLabel })] }), _jsx("div", { className: "uhcp-smart-id-front-qr", "aria-label": "DID QR code", children: didQr })
|
|
24
|
+
return _jsxs("div", { className: "uhcp-smart-id-card-set", "aria-label": `SOSCHAIN Smart Identity Card: ${publicLabel}`, children: [_jsxs("article", { className: "uhcp-smart-id-card uhcp-smart-id-card-front", "data-card-face": "front", children: [_jsxs("header", { className: "uhcp-smart-id-brand", children: [_jsx("img", { src: logoUrl, alt: "" }), _jsx("strong", { children: "SOSCHAIN" }), _jsx("span", { children: publicLabel })] }), _jsx("div", { className: "uhcp-smart-id-front-qr", "aria-label": "DID QR code", children: didQr })] }), _jsxs("article", { className: "uhcp-smart-id-card uhcp-smart-id-card-back", "data-card-face": "back", children: [_jsxs("header", { children: [_jsx("strong", { children: "SOSCHAIN SMART IDENTITY CARD" }), _jsx("span", { children: publicLabel })] }), _jsxs("div", { className: "uhcp-smart-id-back-body", children: [_jsxs("dl", { children: [speciesId7 ? _jsxs("div", { children: [_jsx("dt", { children: "Species" }), _jsx("dd", { children: speciesId7 })] }) : null, formattedCardNumber ? _jsxs("div", { children: [_jsx("dt", { children: "Card" }), _jsx("dd", { children: formattedCardNumber })] }) : null] }), identityQr
|
|
25
25
|
? _jsx("div", { className: "uhcp-smart-id-identity-qr", "aria-label": "Signed identity QR code", children: identityQr })
|
|
26
26
|
: _jsx("p", { className: "uhcp-smart-id-unavailable", role: "status", children: signedIdentityUnavailableLabel })] })] })] });
|
|
27
27
|
}
|
package/dist/styles.css
CHANGED
|
@@ -833,30 +833,28 @@ html[data-theme='dark'] .uhcp-brand-artwork-dark { display: block !important; }
|
|
|
833
833
|
.uhcp-animal-card footer { min-width: 0; }
|
|
834
834
|
.uhcp-animal-card footer code { color: inherit; display: block; font-size: .68rem; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
835
835
|
@media(max-width: 480px) { .uhcp-animal-card { aspect-ratio: auto; min-height: 17rem; } .uhcp-animal-card-qr { height: 6.25rem; width: 6.25rem; } }
|
|
836
|
-
.uhcp-smart-id-card-set { display: grid; gap: 1rem; width: min(100%,
|
|
837
|
-
.uhcp-smart-id-card { aspect-ratio:
|
|
838
|
-
.uhcp-smart-id-card-front { background: linear-gradient(145deg, #061c35 0%, #0a4169 58%, #087f8d 100%); color: #fff; display: grid; gap: .
|
|
836
|
+
.uhcp-smart-id-card-set { display: grid; gap: 1rem; width: min(100%, 19rem); }
|
|
837
|
+
.uhcp-smart-id-card { aspect-ratio: 5 / 8; border: 1px solid #cbd5e1; border-radius: 1.15rem; box-shadow: 0 1rem 2.5rem rgb(2 30 51 / 18%); box-sizing: border-box; overflow: hidden; padding: .75rem; position: relative; width: 100%; }
|
|
838
|
+
.uhcp-smart-id-card-front { background: linear-gradient(145deg, #061c35 0%, #0a4169 58%, #087f8d 100%); color: #fff; display: grid; gap: .75rem; grid-template-rows: auto 1fr; }
|
|
839
839
|
.uhcp-smart-id-card-front::after { background: radial-gradient(circle, rgb(255 255 255 / 16%), transparent 70%); content: ''; height: 18rem; inset: -8rem -7rem auto auto; pointer-events: none; position: absolute; width: 18rem; }
|
|
840
840
|
.uhcp-smart-id-brand { align-items: center; display: grid; gap: .45rem; grid-template-columns: 2rem auto 1fr; position: relative; z-index: 1; }
|
|
841
841
|
.uhcp-smart-id-brand img { background: #fff; border-radius: .48rem; box-sizing: border-box; height: 2rem; object-fit: contain; padding: .16rem; width: 2rem; }
|
|
842
842
|
.uhcp-smart-id-brand strong { font-size: .85rem; letter-spacing: .08em; }
|
|
843
843
|
.uhcp-smart-id-brand span { font-size: .72rem; font-weight: 800; justify-self: end; text-align: end; }
|
|
844
|
-
.uhcp-smart-id-front-qr { align-self: center; background: #fff; border: .35rem solid #fff; border-radius: .
|
|
844
|
+
.uhcp-smart-id-front-qr { align-self: center; aspect-ratio: 1; background: #fff; border: .35rem solid #fff; border-radius: .7rem; box-sizing: border-box; justify-self: center; width: calc(100% - .5rem); }
|
|
845
845
|
.uhcp-smart-id-front-qr > * { display: block; height: 100%; width: 100%; }
|
|
846
|
-
.uhcp-smart-id-card-front code { color: inherit; display: block; font-size: .5rem; opacity: .82; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
|
|
847
846
|
.uhcp-smart-id-card-back { background: #fff; color: #0f2942; display: grid; gap: .5rem; grid-template-rows: auto 1fr; }
|
|
848
847
|
.uhcp-smart-id-card-back > header { align-items: baseline; border-bottom: 2px solid #0f9ca8; display: flex; gap: .5rem; justify-content: space-between; padding-bottom: .35rem; }
|
|
849
848
|
.uhcp-smart-id-card-back > header strong { font-size: .68rem; letter-spacing: .08em; }
|
|
850
849
|
.uhcp-smart-id-card-back > header span { color: #087f8d; font-size: .68rem; font-weight: 850; text-align: end; }
|
|
851
|
-
.uhcp-smart-id-back-body { align-items: center; display: grid; gap: .
|
|
852
|
-
.uhcp-smart-id-back-body dl { display: grid; gap: .5rem; margin: 0; }
|
|
850
|
+
.uhcp-smart-id-back-body { align-items: center; display: grid; gap: .7rem; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
|
|
851
|
+
.uhcp-smart-id-back-body dl { display: grid; gap: .5rem; margin: 0; order: 2; }
|
|
853
852
|
.uhcp-smart-id-back-body dt { color: #526174; font-size: .55rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
|
|
854
853
|
.uhcp-smart-id-back-body dd { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .72rem; font-weight: 850; margin: .12rem 0 0; overflow-wrap: anywhere; }
|
|
855
|
-
.uhcp-smart-id-identity-qr { background: #fff; box-sizing: border-box;
|
|
854
|
+
.uhcp-smart-id-identity-qr { align-self: center; aspect-ratio: 1; background: #fff; box-sizing: border-box; justify-self: center; order: 1; width: calc(100% - .5rem); }
|
|
856
855
|
.uhcp-smart-id-identity-qr > * { display: block; height: 100%; width: 100%; }
|
|
857
|
-
.uhcp-smart-id-unavailable { align-items: center; background: #f1f5f9; border: 1px dashed #94a3b8; border-radius: .
|
|
858
|
-
@media
|
|
859
|
-
@media print { .uhcp-smart-id-card-set { gap: 0; } .uhcp-smart-id-card { break-after: page; box-shadow: none; height: 53.98mm; width: 85.6mm; } .uhcp-smart-id-card:last-child { break-after: auto; } }
|
|
856
|
+
.uhcp-smart-id-unavailable { align-items: center; align-self: center; aspect-ratio: 1; background: #f1f5f9; border: 1px dashed #94a3b8; border-radius: .7rem; box-sizing: border-box; color: #526174; display: flex; font-size: .72rem; justify-content: center; justify-self: center; margin: 0; order: 1; padding: 1rem; text-align: center; width: calc(100% - .5rem); }
|
|
857
|
+
@media print { .uhcp-smart-id-card-set { gap: 0; width: 50mm; } .uhcp-smart-id-card { break-after: page; border-radius: 3mm; box-shadow: none; height: 80mm; padding: 2mm; width: 50mm; } .uhcp-smart-id-front-qr, .uhcp-smart-id-identity-qr, .uhcp-smart-id-unavailable { width: 46mm; } .uhcp-smart-id-card:last-child { break-after: auto; } }
|
|
860
858
|
.uhcp-animal-controller-attestation { border: 1px solid var(--uhcp-border, #d9dee7); border-radius: 1.25rem; display: grid; gap: 1rem; padding: 1rem; }
|
|
861
859
|
.uhcp-animal-controller-attestation header h2, .uhcp-animal-controller-attestation header p { margin: 0; }
|
|
862
860
|
.uhcp-animal-controller-attestation header p { color: var(--uhcp-muted, #5f6875); margin-top: .35rem; }
|
package/package.json
CHANGED