uhc-portal-components-react 0.2.15 → 0.2.17
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 +6 -0
- package/README.md +3 -1
- package/dist/AnimalCardArtifact.d.ts.map +1 -1
- package/dist/AnimalCardArtifact.js +1 -1
- package/dist/OrganizationWorkforceAdministration.d.ts +6 -1
- package/dist/OrganizationWorkforceAdministration.d.ts.map +1 -1
- package/dist/OrganizationWorkforceAdministration.js +7 -3
- package/dist/styles.css +11 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- Require confirmation for employee suspension, reactivation and permanent
|
|
6
|
+
deletion; expose only valid lifecycle actions and distinguish warning,
|
|
7
|
+
constructive and destructive actions with yellow, blue and red treatments.
|
|
5
8
|
- Add the shared two-sided SOSCHAIN Smart Identity Card artifact. Face A keeps
|
|
6
9
|
a DID-only QR and localized subject label; face B formats the seven-digit
|
|
7
10
|
animal species context and 21-digit telephone identifier and renders an
|
|
8
11
|
SHC-like identity QR only when the owning provider supplies it already
|
|
9
12
|
signed.
|
|
13
|
+
- Print both faces vertically at 50 x 80 mm, enlarge each QR to the usable
|
|
14
|
+
card width and remove the unreadable printed DID while preserving it as the
|
|
15
|
+
exact face-A QR payload.
|
|
10
16
|
|
|
11
17
|
## 0.2.14 - 2026-10-15
|
|
12
18
|
|
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,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;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,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
|
}
|
|
@@ -51,7 +51,11 @@ export type OrganizationWorkforceCopy = Readonly<{
|
|
|
51
51
|
accepted: string;
|
|
52
52
|
cancelled: string;
|
|
53
53
|
disable: string;
|
|
54
|
+
reactivate: string;
|
|
54
55
|
purge: string;
|
|
56
|
+
confirmDisable: string;
|
|
57
|
+
confirmReactivate: string;
|
|
58
|
+
confirmPurge: string;
|
|
55
59
|
devicesLater: string;
|
|
56
60
|
}>;
|
|
57
61
|
export type OrganizationWorkforceAdministrationProps = Readonly<{
|
|
@@ -70,6 +74,7 @@ export type OrganizationWorkforceAdministrationProps = Readonly<{
|
|
|
70
74
|
onUnlockSecretChange: (value: string) => void;
|
|
71
75
|
onInvite: () => void | Promise<void>;
|
|
72
76
|
onDisable: (employeeId: string) => void | Promise<void>;
|
|
77
|
+
onReactivate: (employeeId: string) => void | Promise<void>;
|
|
73
78
|
onPurge: (employeeId: string) => void | Promise<void>;
|
|
74
79
|
}>;
|
|
75
80
|
/**
|
|
@@ -78,5 +83,5 @@ export type OrganizationWorkforceAdministrationProps = Readonly<{
|
|
|
78
83
|
* The component never infers authorization or changes GW state. The host owns
|
|
79
84
|
* invitation persistence, license reads and employee lifecycle commands.
|
|
80
85
|
*/
|
|
81
|
-
export declare function OrganizationWorkforceAdministration({ copy, summary, employees, invitations, roles, email, role, unlockSecret, busyAction, error, onEmailChange, onRoleChange, onUnlockSecretChange, onInvite, onDisable, onPurge, }: OrganizationWorkforceAdministrationProps): import("react").JSX.Element;
|
|
86
|
+
export declare function OrganizationWorkforceAdministration({ copy, summary, employees, invitations, roles, email, role, unlockSecret, busyAction, error, onEmailChange, onRoleChange, onUnlockSecretChange, onInvite, onDisable, onReactivate, onPurge, }: OrganizationWorkforceAdministrationProps): import("react").JSX.Element;
|
|
82
87
|
//# sourceMappingURL=OrganizationWorkforceAdministration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrganizationWorkforceAdministration.d.ts","sourceRoot":"","sources":["../src/OrganizationWorkforceAdministration.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb,CAAC,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IACvC,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAC,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IACzC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,CAAA;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAC,CAAA;AAEF,MAAM,MA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AAA;IACvC,WAAW,EAAE,SAAS,mBAAmB,EAAE,CAAA;IAC3C,KAAK,EAAE,SAAS,mBAAmB,EAAE,CAAA;IACrC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,oBAAoB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C,QAAQ,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpC,SAAS,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACvD,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACtD,CAAC,CAAA;AAEF;;;;;GAKG;AACH,wBAAgB,mCAAmC,CAAC,EAClD,IAAI,EACJ,OAAO,EACP,SAAS,EACT,WAAW,EACX,KAAK,EACL,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,KAAK,EACL,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,QAAQ,EACR,SAAS,EACT,OAAO,GACR,EAAE,wCAAwC,+
|
|
1
|
+
{"version":3,"file":"OrganizationWorkforceAdministration.d.ts","sourceRoot":"","sources":["../src/OrganizationWorkforceAdministration.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb,CAAC,CAAA;AAEF,MAAM,MAAM,i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EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1D,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACtD,CAAC,CAAA;AAEF;;;;;GAKG;AACH,wBAAgB,mCAAmC,CAAC,EAClD,IAAI,EACJ,OAAO,EACP,SAAS,EACT,WAAW,EACX,KAAK,EACL,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,KAAK,EACL,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,OAAO,GACR,EAAE,wCAAwC,+BAuE1C"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
3
|
* Controlled organization workforce surface shared by professional portals.
|
|
4
4
|
*
|
|
5
5
|
* The component never infers authorization or changes GW state. The host owns
|
|
6
6
|
* invitation persistence, license reads and employee lifecycle commands.
|
|
7
7
|
*/
|
|
8
|
-
export function OrganizationWorkforceAdministration({ copy, summary, employees, invitations, roles, email, role, unlockSecret, busyAction, error, onEmailChange, onRoleChange, onUnlockSecretChange, onInvite, onDisable, onPurge, }) {
|
|
8
|
+
export function OrganizationWorkforceAdministration({ copy, summary, employees, invitations, roles, email, role, unlockSecret, busyAction, error, onEmailChange, onRoleChange, onUnlockSecretChange, onInvite, onDisable, onReactivate, onPurge, }) {
|
|
9
9
|
const noCapacity = summary.free < 1;
|
|
10
10
|
const inviting = busyAction === 'invite';
|
|
11
11
|
const canInvite = !noCapacity && !inviting && Boolean(email.trim() && role && unlockSecret);
|
|
@@ -14,8 +14,12 @@ export function OrganizationWorkforceAdministration({ copy, summary, employees,
|
|
|
14
14
|
if (canInvite)
|
|
15
15
|
void onInvite();
|
|
16
16
|
}
|
|
17
|
+
function confirmAction(message, action) {
|
|
18
|
+
if (window.confirm(message))
|
|
19
|
+
void action();
|
|
20
|
+
}
|
|
17
21
|
return (_jsxs("section", { className: "uhcp-workforce", "aria-labelledby": "uhcp-workforce-title", children: [_jsxs("header", { children: [_jsxs("div", { children: [_jsx("h1", { id: "uhcp-workforce-title", children: copy.title }), _jsx("p", { children: copy.description })] }), _jsxs("dl", { className: "uhcp-license-summary", children: [_jsxs("div", { children: [_jsx("dt", { children: copy.totalLicenses }), _jsx("dd", { children: summary.total })] }), _jsxs("div", { children: [_jsx("dt", { children: copy.usedLicenses }), _jsx("dd", { children: summary.used })] }), _jsxs("div", { children: [_jsx("dt", { children: copy.freeLicenses }), _jsx("dd", { children: summary.free })] })] })] }), _jsxs("section", { className: "uhcp-workforce-panel", "aria-labelledby": "uhcp-invite-title", children: [_jsx("h2", { id: "uhcp-invite-title", children: copy.inviteTitle }), noCapacity && _jsx("p", { role: "status", className: "uhcp-workforce-warning", children: copy.noFreeLicenses }), _jsxs("form", { onSubmit: submitInvitation, children: [_jsxs("label", { children: [_jsx("span", { children: copy.emailLabel }), _jsx("input", { type: "email", required: true, value: email, onChange: (event) => onEmailChange(event.currentTarget.value) })] }), _jsxs("label", { children: [_jsx("span", { children: copy.roleLabel }), _jsxs("select", { required: true, value: role, onChange: (event) => onRoleChange(event.currentTarget.value), children: [_jsx("option", { value: "" }), roles.map((option) => _jsx("option", { value: option.value, children: option.label }, option.value))] })] }), _jsxs("label", { children: [_jsx("span", { children: copy.unlockSecretLabel }), _jsx("input", { type: "password", required: true, value: unlockSecret, onChange: (event) => onUnlockSecretChange(event.currentTarget.value) })] }), _jsx("button", { type: "submit", disabled: !canInvite, children: inviting ? copy.inviting : copy.invite })] })] }), _jsxs("section", { className: "uhcp-workforce-panel", "aria-labelledby": "uhcp-employees-title", children: [_jsx("h2", { id: "uhcp-employees-title", children: copy.employeesTitle }), employees.length === 0 ? _jsx("p", { children: copy.noEmployees }) : (_jsx("div", { className: "uhcp-table-scroll", children: _jsxs("table", { children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: copy.licenseColumn }), _jsx("th", { children: copy.employeeColumn }), _jsx("th", { children: copy.roleColumn }), _jsx("th", { children: copy.statusColumn }), _jsx("th", { children: copy.devicesColumn }), _jsx("th", { children: copy.actionsColumn })] }) }), _jsx("tbody", { children: employees.map((employee) => {
|
|
18
22
|
const rowBusy = busyAction === employee.id;
|
|
19
|
-
return _jsxs("tr", { children: [_jsx("td", { children: _jsx("code", { children: employee.licenseId }) }), _jsx("td", { children: employee.email }), _jsx("td", { children: employee.role }), _jsx("td", { children: _jsx("span", { className: `uhcp-status uhcp-status-${employee.status}`, children: employee.status === 'active' ? copy.active : copy.inactive }) }), _jsx("td", { children: employee.deviceCount === undefined ? copy.devicesLater : employee.deviceCount }),
|
|
23
|
+
return _jsxs("tr", { children: [_jsx("td", { children: _jsx("code", { children: employee.licenseId }) }), _jsx("td", { children: employee.email }), _jsx("td", { children: employee.role }), _jsx("td", { children: _jsx("span", { className: `uhcp-status uhcp-status-${employee.status}`, children: employee.status === 'active' ? copy.active : copy.inactive }) }), _jsx("td", { children: employee.deviceCount === undefined ? copy.devicesLater : employee.deviceCount }), _jsx("td", { className: "uhcp-row-actions", children: employee.status === 'active' ? (_jsx("button", { type: "button", className: "uhcp-warning-action", disabled: rowBusy, onClick: () => confirmAction(copy.confirmDisable, () => onDisable(employee.id)), children: copy.disable })) : (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", className: "uhcp-primary-action", disabled: rowBusy, onClick: () => confirmAction(copy.confirmReactivate, () => onReactivate(employee.id)), children: copy.reactivate }), _jsx("button", { type: "button", className: "uhcp-danger", disabled: rowBusy, onClick: () => confirmAction(copy.confirmPurge, () => onPurge(employee.id)), children: copy.purge })] })) })] }, employee.id);
|
|
20
24
|
}) })] }) }))] }), _jsxs("section", { className: "uhcp-workforce-panel", "aria-labelledby": "uhcp-invitations-title", children: [_jsx("h2", { id: "uhcp-invitations-title", children: copy.invitationsTitle }), invitations.length === 0 ? _jsx("p", { children: copy.noInvitations }) : _jsx("ul", { className: "uhcp-invitation-list", children: invitations.map((invitation) => _jsxs("li", { children: [_jsxs("span", { children: [_jsx("strong", { children: invitation.email }), _jsx("small", { children: invitation.role })] }), _jsx("span", { className: `uhcp-status uhcp-status-${invitation.status}`, children: copy[invitation.status] })] }, invitation.id)) })] }), error && _jsx("p", { role: "alert", className: "uhcp-error", children: error })] }));
|
|
21
25
|
}
|
package/dist/styles.css
CHANGED
|
@@ -645,6 +645,8 @@ html[data-theme='dark'] .uhcp-brand-artwork-dark { display: block !important; }
|
|
|
645
645
|
.uhcp-workforce-panel input, .uhcp-workforce-panel select { background: var(--uhcp-panel); border: 1px solid var(--uhcp-border); border-radius: .75rem; color: var(--uhcp-text); font: inherit; min-width: 0; padding: .75rem; }
|
|
646
646
|
.uhcp-workforce button { background: linear-gradient(135deg, var(--uhcp-action-start), var(--uhcp-action-end)); border: 0; border-radius: .75rem; color: #fff; cursor: pointer; font: inherit; font-weight: 800; padding: .75rem 1rem; }
|
|
647
647
|
.uhcp-workforce button:disabled { cursor: not-allowed; opacity: .45; }
|
|
648
|
+
.uhcp-workforce button.uhcp-warning-action { background: #facc15; color: #422006; }
|
|
649
|
+
.uhcp-workforce button.uhcp-primary-action { background: #2563eb; color: #fff; }
|
|
648
650
|
.uhcp-workforce button.uhcp-danger { background: #9e3535; }
|
|
649
651
|
.uhcp-workforce-warning { color: var(--uhcp-attention) !important; font-weight: 800; }
|
|
650
652
|
.uhcp-table-scroll { overflow-x: auto; }
|
|
@@ -833,30 +835,28 @@ html[data-theme='dark'] .uhcp-brand-artwork-dark { display: block !important; }
|
|
|
833
835
|
.uhcp-animal-card footer { min-width: 0; }
|
|
834
836
|
.uhcp-animal-card footer code { color: inherit; display: block; font-size: .68rem; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
835
837
|
@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: .
|
|
838
|
+
.uhcp-smart-id-card-set { display: grid; gap: 1rem; width: min(100%, 19rem); }
|
|
839
|
+
.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%; }
|
|
840
|
+
.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
841
|
.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
842
|
.uhcp-smart-id-brand { align-items: center; display: grid; gap: .45rem; grid-template-columns: 2rem auto 1fr; position: relative; z-index: 1; }
|
|
841
843
|
.uhcp-smart-id-brand img { background: #fff; border-radius: .48rem; box-sizing: border-box; height: 2rem; object-fit: contain; padding: .16rem; width: 2rem; }
|
|
842
844
|
.uhcp-smart-id-brand strong { font-size: .85rem; letter-spacing: .08em; }
|
|
843
845
|
.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: .
|
|
846
|
+
.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
847
|
.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
848
|
.uhcp-smart-id-card-back { background: #fff; color: #0f2942; display: grid; gap: .5rem; grid-template-rows: auto 1fr; }
|
|
848
849
|
.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
850
|
.uhcp-smart-id-card-back > header strong { font-size: .68rem; letter-spacing: .08em; }
|
|
850
851
|
.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; }
|
|
852
|
+
.uhcp-smart-id-back-body { align-items: center; display: grid; gap: .7rem; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
|
|
853
|
+
.uhcp-smart-id-back-body dl { display: grid; gap: .5rem; margin: 0; order: 2; }
|
|
853
854
|
.uhcp-smart-id-back-body dt { color: #526174; font-size: .55rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
|
|
854
855
|
.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;
|
|
856
|
+
.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
857
|
.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; } }
|
|
858
|
+
.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); }
|
|
859
|
+
@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
860
|
.uhcp-animal-controller-attestation { border: 1px solid var(--uhcp-border, #d9dee7); border-radius: 1.25rem; display: grid; gap: 1rem; padding: 1rem; }
|
|
861
861
|
.uhcp-animal-controller-attestation header h2, .uhcp-animal-controller-attestation header p { margin: 0; }
|
|
862
862
|
.uhcp-animal-controller-attestation header p { color: var(--uhcp-muted, #5f6875); margin-top: .35rem; }
|
package/package.json
CHANGED