@alfadocs/ui-kit 1.133.0 → 1.135.0
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/dist/_chunks/{agenda-card-B8hV3dZV.js → agenda-card-B9wgX_Ed.js} +2 -2
- package/dist/_chunks/{agenda-tray-Bu46s3dI.js → agenda-tray-CGcS_qoM.js} +2 -2
- package/dist/_chunks/ai-summary-panel-B70S2lgC.js +455 -0
- package/dist/_chunks/{alia-sidebar-CK1zw_Bc.js → alia-sidebar-CtwhdASP.js} +3 -3
- package/dist/_chunks/appointment-card-BT1cMZIX.js +504 -0
- package/dist/_chunks/{appointment-peek-DZa6xyUb.js → appointment-peek-BP_ACFz5.js} +3 -3
- package/dist/_chunks/{appointment-timeline-DQePqpyH.js → appointment-timeline-Dy4YQJ17.js} +2 -2
- package/dist/_chunks/appointment-tray-B3gSHL1j.js +200 -0
- package/dist/_chunks/{appointment-workflow-status-DMjuIK90.js → appointment-workflow-status-S-lx81Yz.js} +2 -2
- package/dist/_chunks/ban-CiSCCcOE.js +15 -0
- package/dist/_chunks/{calendar-BIoOeBTT.js → calendar-CyLtLBNP.js} +2 -2
- package/dist/_chunks/{calendar-appointment-editor-dialog-BHx6kUhX.js → calendar-appointment-editor-dialog-I5PfWudy.js} +15 -15
- package/dist/_chunks/{calendar-event-card-BNEzkjm-.js → calendar-event-card-BJifpYZQ.js} +7 -6
- package/dist/_chunks/{care-plan-card-DKScH9Ss.js → care-plan-card-CjHq6PLo.js} +6 -6
- package/dist/_chunks/{care-plan-entry-card-AG1y3nyW.js → care-plan-entry-card-DY1toF6E.js} +2 -2
- package/dist/_chunks/{care-plan-header-Dx5OMkc9.js → care-plan-header-CeFXUDnL.js} +6 -6
- package/dist/_chunks/{chat-container-B83b4hut.js → chat-container-CoOT7dzB.js} +37 -36
- package/dist/_chunks/{chat-input-DwQ4_WXK.js → chat-input-CX4dxBq7.js} +85 -84
- package/dist/_chunks/check-in-documents-CEVcgcYZ.js +136 -0
- package/dist/_chunks/{clinical-note-card-pPaeWWnu.js → clinical-note-card-D--IwbZa.js} +2 -2
- package/dist/_chunks/communications-panel-BKPHCiMB.js +973 -0
- package/dist/_chunks/document-preview-DLVIrOYV.js +385 -0
- package/dist/_chunks/{entity-card-fpm-KUKc.js → entity-card-p-LANpYt.js} +18 -17
- package/dist/_chunks/{entity-summary-KHM0PnSI.js → entity-summary-CpNk6ybN.js} +70 -69
- package/dist/_chunks/{error-page-B0fGNTRB.js → error-page-WLhmWUTq.js} +100 -115
- package/dist/_chunks/finished-terminal-unDnXT4j.js +191 -0
- package/dist/_chunks/get-error-message-DbFUzuja.js +7 -0
- package/dist/_chunks/handled-rejection-C-6Dq0As.js +9 -0
- package/dist/_chunks/house-DGCypGTo.js +21 -0
- package/dist/_chunks/is-safe-url-CEy9CEml.js +8 -0
- package/dist/_chunks/keypad-DBH_keVs.js +152 -0
- package/dist/_chunks/keypad-button-mOaPQRrH.js +114 -0
- package/dist/_chunks/megaphone-CzeTT9B3.js +22 -0
- package/dist/_chunks/{message-card-BG3_3nN1.js → message-card-Bw_q1qKx.js} +2 -2
- package/dist/_chunks/{message-tray-BjZv0Fsk.js → message-tray-pLGgLmoG.js} +2 -2
- package/dist/_chunks/{note-attachment-MNTIqdSz.js → note-attachment-JTIy9iXN.js} +2 -2
- package/dist/_chunks/{note-timeline-BQeW0VZY.js → note-timeline-BbjHMhkL.js} +2 -2
- package/dist/_chunks/{notes-panel-Cm-_pCRJ.js → notes-panel-BvjAo4RQ.js} +6 -5
- package/dist/_chunks/{operator-hero-CnfWckNQ.js → operator-hero-D4wfVu2l.js} +2 -2
- package/dist/_chunks/otp-input-BNOTlxq3.js +342 -0
- package/dist/_chunks/patient-account-settings-B2XbN_Fe.js +546 -0
- package/dist/_chunks/patient-card-DTh3QTyS.js +125 -0
- package/dist/_chunks/patient-check-in-resume-B7NY-6KI.js +742 -0
- package/dist/_chunks/patient-sign-in-pin-CDBqV254.js +432 -0
- package/dist/_chunks/patient-sign-in-steps-C2JSqlok.js +199 -0
- package/dist/_chunks/{patient-summary-card-BUcZ-gaL.js → patient-summary-card-Bl2NknPe.js} +2 -2
- package/dist/_chunks/{payment-request-card-Dv4WbRBe.js → payment-request-card-CNW00DCx.js} +6 -6
- package/dist/_chunks/{pdf-viewer-BnBKdx0y.js → pdf-viewer-TRC5jEm5.js} +472 -425
- package/dist/_chunks/pin-entry-BugWQMOS.js +219 -0
- package/dist/_chunks/pin-indicator-Cb-n40UI.js +124 -0
- package/dist/_chunks/portal-details-DCIiGkHA.js +478 -0
- package/dist/_chunks/portal-documents-DJOH8pZx.js +902 -0
- package/dist/_chunks/portal-parts-Br8wuala.js +285 -0
- package/dist/_chunks/{privacy-mask-DJ1gee4c.js → privacy-mask-C19dJFMk.js} +5 -5
- package/dist/_chunks/{product-hub-panel-a8wdVOUt.js → product-hub-panel-K4QbULG7.js} +2 -2
- package/dist/_chunks/{registration-form-CwbhtKcy.js → registration-form-DS3RuKHu.js} +2 -2
- package/dist/_chunks/{reserved.agent-W8mR179D.js → reserved.agent-DOzOBUW7.js} +2 -2
- package/dist/_chunks/session-countdown-DOx1IBUB.js +232 -0
- package/dist/_chunks/{sign-document-CQZVzfpk.js → sign-document-DDZbmYHu.js} +2 -2
- package/dist/_chunks/{signature-field-DjabvRZm.js → signature-field-BjlY_yXH.js} +39 -34
- package/dist/_chunks/{signature-request-4pGq3YBe.js → signature-request-CHsM_iWi.js} +2 -2
- package/dist/_chunks/{signature-status-chip-pIoQjvH8.js → signature-status-chip-DS9hHwIt.js} +66 -69
- package/dist/_chunks/signing-end-screen-BdhbkPKO.js +1355 -0
- package/dist/_chunks/sms-code-entry-Dgp4GwlM.js +316 -0
- package/dist/_chunks/step-up-dialog-C2JqJmCA.js +132 -0
- package/dist/_chunks/{task-editor-BL2hHxNz.js → task-editor-DvwqPfFR.js} +40 -39
- package/dist/_chunks/{tasks-panel-BE3zaayj.js → tasks-panel-6EzdnwT8.js} +155 -171
- package/dist/_chunks/{use-appointment-details-read-_b7FRB1x.js → use-appointment-details-read-6_OmOwUs.js} +115 -114
- package/dist/_chunks/use-zoom-drilldown-Cr1baU5X.js +221 -0
- package/dist/_chunks/{user-x-DYszNtIg.js → user-x-BJZg4kaP.js} +8 -19
- package/dist/_chunks/{verify-identity-types-CxtrBXsZ.js → verify-identity-types-C6Bam8v6.js} +2 -2
- package/dist/_chunks/{workflow-status-D1WgGVTP.js → workflow-status-CO0mxXs2.js} +3 -2
- package/dist/agent-catalog.json +933 -324
- package/dist/agent-i18n/en.json +103 -18
- package/dist/browser-support.js +1 -1
- package/dist/components/_shared/is-safe-url.d.ts +3 -1
- package/dist/components/_shared/sms-segments.d.ts +43 -0
- package/dist/components/agenda-card/index.js +2 -2
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-summary-panel/ai-summary-panel.agent.d.ts +4 -0
- package/dist/components/ai-summary-panel/ai-summary-panel.d.ts +71 -0
- package/dist/components/ai-summary-panel/index.d.ts +4 -0
- package/dist/components/ai-summary-panel/index.js +6 -0
- package/dist/components/appointment-card/appointment-card.d.ts +45 -0
- package/dist/components/appointment-card/appointment-tray.d.ts +11 -0
- package/dist/components/appointment-card/index.js +3 -3
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/chat-container/chat-container.d.ts +7 -0
- package/dist/components/chat-container/index.js +1 -1
- package/dist/components/chat-input/chat-input.d.ts +3 -0
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/communications-panel/communications-panel.agent.d.ts +4 -0
- package/dist/components/communications-panel/communications-panel.d.ts +136 -0
- package/dist/components/communications-panel/index.d.ts +6 -0
- package/dist/components/communications-panel/index.js +7 -0
- package/dist/components/document-preview/document-preview.d.ts +61 -7
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/entity-summary/entity-summary.d.ts +8 -0
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/finished-terminal/finished-terminal.d.ts +63 -6
- package/dist/components/finished-terminal/index.d.ts +1 -1
- package/dist/components/finished-terminal/index.js +1 -1
- package/dist/components/index.d.ts +14 -0
- package/dist/components/keypad/index.d.ts +3 -0
- package/dist/components/keypad/index.js +6 -0
- package/dist/components/keypad/keypad.d.ts +54 -0
- package/dist/components/keypad-button/index.d.ts +3 -0
- package/dist/components/keypad-button/index.js +6 -0
- package/dist/components/keypad-button/keypad-button.d.ts +33 -0
- package/dist/components/message-card/index.js +2 -2
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/note-timeline/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/otp-input/otp-input.d.ts +11 -0
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/pdf-viewer/pdf-viewer.d.ts +7 -0
- package/dist/components/pin-entry/index.d.ts +3 -0
- package/dist/components/pin-entry/index.js +5 -0
- package/dist/components/pin-entry/pin-entry.agent.d.ts +4 -0
- package/dist/components/pin-entry/pin-entry.d.ts +64 -0
- package/dist/components/pin-indicator/index.d.ts +3 -0
- package/dist/components/pin-indicator/index.js +9 -0
- package/dist/components/pin-indicator/pin-indicator.d.ts +34 -0
- package/dist/components/product-hub-tray/index.js +2 -2
- package/dist/components/session-countdown/index.js +1 -1
- package/dist/components/session-countdown/session-countdown.d.ts +19 -0
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/signature-field/index.js +1 -1
- package/dist/components/signature-field/signature-field.d.ts +17 -6
- package/dist/components/signature-status-chip/index.js +1 -1
- package/dist/components/signature-status-chip/signature-status-chip.d.ts +3 -2
- package/dist/components/sms-code-entry/index.d.ts +3 -0
- package/dist/components/sms-code-entry/index.js +5 -0
- package/dist/components/sms-code-entry/sms-code-entry.agent.d.ts +4 -0
- package/dist/components/sms-code-entry/sms-code-entry.d.ts +156 -0
- package/dist/components/step-up-dialog/index.d.ts +3 -0
- package/dist/components/step-up-dialog/index.js +5 -0
- package/dist/components/step-up-dialog/step-up-dialog.d.ts +108 -0
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/workflow-status/index.js +2 -2
- package/dist/core.css +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-signing-session.d.ts +7 -2
- package/dist/host-compat.css +18 -3
- package/dist/i18n/locales/ar.d.ts +605 -1
- package/dist/i18n/locales/ar.js +603 -3
- package/dist/i18n/locales/de.d.ts +605 -1
- package/dist/i18n/locales/de.js +611 -4
- package/dist/i18n/locales/el.d.ts +605 -1
- package/dist/i18n/locales/el.js +606 -4
- package/dist/i18n/locales/en.d.ts +607 -1
- package/dist/i18n/locales/en.js +614 -4
- package/dist/i18n/locales/es.d.ts +605 -1
- package/dist/i18n/locales/es.js +604 -4
- package/dist/i18n/locales/fr.d.ts +605 -1
- package/dist/i18n/locales/fr.js +604 -4
- package/dist/i18n/locales/hi.d.ts +605 -1
- package/dist/i18n/locales/hi.js +604 -4
- package/dist/i18n/locales/it.d.ts +605 -1
- package/dist/i18n/locales/it.js +611 -4
- package/dist/i18n/locales/ja.d.ts +605 -1
- package/dist/i18n/locales/ja.js +604 -4
- package/dist/i18n/locales/nl.d.ts +605 -1
- package/dist/i18n/locales/nl.js +611 -4
- package/dist/i18n/locales/pl.d.ts +605 -1
- package/dist/i18n/locales/pl.js +611 -4
- package/dist/i18n/locales/pt.d.ts +605 -1
- package/dist/i18n/locales/pt.js +611 -4
- package/dist/i18n/locales/ro.d.ts +605 -1
- package/dist/i18n/locales/ro.js +611 -4
- package/dist/i18n/locales/ru.d.ts +605 -1
- package/dist/i18n/locales/ru.js +603 -3
- package/dist/i18n/locales/sq.d.ts +605 -1
- package/dist/i18n/locales/sq.js +604 -4
- package/dist/i18n/locales/sv.d.ts +605 -1
- package/dist/i18n/locales/sv.js +604 -4
- package/dist/i18n/locales/tr.d.ts +605 -1
- package/dist/i18n/locales/tr.js +606 -4
- package/dist/i18n/locales/zh.d.ts +605 -1
- package/dist/i18n/locales/zh.js +604 -4
- package/dist/index.js +1305 -1231
- package/dist/locales/ar.json +606 -2
- package/dist/locales/de.json +607 -3
- package/dist/locales/el.json +607 -3
- package/dist/locales/en.json +607 -3
- package/dist/locales/es.json +607 -3
- package/dist/locales/fr.json +607 -3
- package/dist/locales/hi.json +607 -3
- package/dist/locales/it.json +607 -3
- package/dist/locales/ja.json +607 -3
- package/dist/locales/nl.json +607 -3
- package/dist/locales/pl.json +607 -3
- package/dist/locales/pt.json +607 -3
- package/dist/locales/ro.json +607 -3
- package/dist/locales/ru.json +606 -2
- package/dist/locales/sq.json +607 -3
- package/dist/locales/sv.json +607 -3
- package/dist/locales/tr.json +607 -3
- package/dist/locales/zh.json +607 -3
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/calendar/calendar.journey.d.ts +7 -0
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/check-in-documents/check-in-documents.d.ts +61 -0
- package/dist/patterns/check-in-documents/check-in-signable-document.d.ts +32 -0
- package/dist/patterns/check-in-documents/index.d.ts +4 -0
- package/dist/patterns/check-in-documents/index.js +5 -0
- package/dist/patterns/error-page/index.js +1 -1
- package/dist/patterns/patient-account-settings/index.d.ts +4 -0
- package/dist/patterns/patient-account-settings/index.js +5 -0
- package/dist/patterns/patient-account-settings/patient-account-settings-panels.d.ts +36 -0
- package/dist/patterns/patient-account-settings/patient-account-settings.d.ts +94 -0
- package/dist/patterns/patient-account-settings/patient-account-settings.types.d.ts +91 -0
- package/dist/patterns/patient-check-in/index.d.ts +20 -0
- package/dist/patterns/patient-check-in/index.js +13 -0
- package/dist/patterns/patient-check-in/patient-check-in-changed.d.ts +33 -0
- package/dist/patterns/patient-check-in/patient-check-in-connection-notice.d.ts +29 -0
- package/dist/patterns/patient-check-in/patient-check-in-done.d.ts +25 -0
- package/dist/patterns/patient-check-in/patient-check-in-entry.d.ts +29 -0
- package/dist/patterns/patient-check-in/patient-check-in-hub-empty.d.ts +23 -0
- package/dist/patterns/patient-check-in/patient-check-in-hub.d.ts +61 -0
- package/dist/patterns/patient-check-in/patient-check-in-personal-data.d.ts +73 -0
- package/dist/patterns/patient-check-in/patient-check-in-privacy.d.ts +9 -0
- package/dist/patterns/patient-check-in/patient-check-in-resume.d.ts +29 -0
- package/dist/patterns/patient-check-in/patient-check-in-shell.d.ts +60 -0
- package/dist/patterns/patient-check-in/patient-check-in-types.d.ts +92 -0
- package/dist/patterns/patient-portal/index.d.ts +12 -0
- package/dist/patterns/patient-portal/index.js +13 -0
- package/dist/patterns/patient-portal/portal-appointments.d.ts +70 -0
- package/dist/patterns/patient-portal/portal-details.d.ts +148 -0
- package/dist/patterns/patient-portal/portal-documents.d.ts +74 -0
- package/dist/patterns/patient-portal/portal-format.d.ts +14 -0
- package/dist/patterns/patient-portal/portal-home.d.ts +71 -0
- package/dist/patterns/patient-portal/portal-parts.d.ts +107 -0
- package/dist/patterns/patient-portal/portal-shell.d.ts +84 -0
- package/dist/patterns/patient-portal/portal-types.d.ts +157 -0
- package/dist/patterns/patient-sign-in/index.d.ts +7 -0
- package/dist/patterns/patient-sign-in/index.js +15 -0
- package/dist/patterns/patient-sign-in/patient-card.d.ts +74 -0
- package/dist/patterns/patient-sign-in/patient-sign-in-email.d.ts +109 -0
- package/dist/patterns/patient-sign-in/patient-sign-in-pin.d.ts +157 -0
- package/dist/patterns/patient-sign-in/patient-sign-in-steps.d.ts +143 -0
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signing/index.d.ts +26 -0
- package/dist/patterns/signing/index.js +16 -0
- package/dist/patterns/signing/multi-field-signer.d.ts +138 -0
- package/dist/patterns/signing/signing-awaiting-screen.d.ts +25 -0
- package/dist/patterns/signing/signing-checkbox-pill.d.ts +66 -0
- package/dist/patterns/signing/signing-checkbox-sheet.d.ts +16 -0
- package/dist/patterns/signing/signing-chrome.d.ts +30 -0
- package/dist/patterns/signing/signing-document-screen.d.ts +104 -0
- package/dist/patterns/signing/signing-end-screen.d.ts +27 -0
- package/dist/patterns/signing/signing-finished-screen.d.ts +34 -0
- package/dist/patterns/signing/signing-footer.d.ts +56 -0
- package/dist/patterns/signing/signing-handoff-screen.d.ts +37 -0
- package/dist/patterns/signing/signing-message-dialog.d.ts +29 -0
- package/dist/patterns/signing/signing-progress-chip.d.ts +27 -0
- package/dist/patterns/signing/signing-roster.d.ts +44 -0
- package/dist/patterns/signing/signing-staff-id-confirmation.d.ts +49 -0
- package/dist/patterns/verify-identity/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +57 -1
- package/dist/_chunks/appointment-card-OAOur8lH.js +0 -434
- package/dist/_chunks/appointment-tray-DSFqO5Rm.js +0 -193
- package/dist/_chunks/document-preview-_kQ9QvZV.js +0 -291
- package/dist/_chunks/finished-terminal-FR8uc_Ws.js +0 -122
- package/dist/_chunks/handled-rejection-6gqCf5vt.js +0 -13
- package/dist/_chunks/is-safe-url-DkETxeHz.js +0 -7
- package/dist/_chunks/otp-input-gV1446Dw.js +0 -301
- package/dist/_chunks/session-countdown-C4tzbJVc.js +0 -223
- package/dist/_chunks/use-zoom-drilldown-qCX34w9I.js +0 -210
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { jsxs as F, jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as G, useContext as J, useId as Q, useRef as h, useCallback as X, useEffect as K, useReducer as Z, useMemo as $, useImperativeHandle as ee } from "react";
|
|
3
|
+
import { c as w } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as te } from "react-i18next";
|
|
5
|
+
import { u as se } from "./use-controllable-state-BiY4xTzM.js";
|
|
6
|
+
import { u as ne } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
7
|
+
import { u as ie, F as re, a as ae } from "./form-field-context-DtiROUJV.js";
|
|
8
|
+
import { a as oe, K as de } from "./keypad-DBH_keVs.js";
|
|
9
|
+
import { P as le, r as ce } from "./pin-indicator-Cb-n40UI.js";
|
|
10
|
+
import { u as ue } from "./registry-DvAUVLHh.js";
|
|
11
|
+
const pe = {
|
|
12
|
+
id: "pin-entry",
|
|
13
|
+
capabilities: [],
|
|
14
|
+
state: {
|
|
15
|
+
filledCount: {
|
|
16
|
+
type: "number",
|
|
17
|
+
descriptionKey: "ui.agent.pinEntry.state.filledCount",
|
|
18
|
+
description: "How many digits are typed. Never the digits themselves.",
|
|
19
|
+
read: (s) => s.getFilledCount()
|
|
20
|
+
},
|
|
21
|
+
length: {
|
|
22
|
+
type: "number",
|
|
23
|
+
descriptionKey: "ui.agent.pinEntry.state.length",
|
|
24
|
+
description: "How many digits the PIN has.",
|
|
25
|
+
read: (s) => s.getLength()
|
|
26
|
+
},
|
|
27
|
+
isComplete: {
|
|
28
|
+
type: "boolean",
|
|
29
|
+
descriptionKey: "ui.agent.pinEntry.state.isComplete",
|
|
30
|
+
description: "Whether every digit is typed.",
|
|
31
|
+
read: (s) => s.isComplete()
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
actions: {
|
|
35
|
+
clear: {
|
|
36
|
+
safety: "destructive",
|
|
37
|
+
idempotent: !0,
|
|
38
|
+
descriptionKey: "ui.agent.pinEntry.actions.clear",
|
|
39
|
+
description: "Empty the PIN. Loses the digits typed so far.",
|
|
40
|
+
invoke: (s) => {
|
|
41
|
+
s.clear();
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
focus: {
|
|
45
|
+
safety: "read",
|
|
46
|
+
idempotent: !0,
|
|
47
|
+
descriptionKey: "ui.agent.pinEntry.actions.focus",
|
|
48
|
+
description: "Move keyboard focus to the PIN field, so physical digits type into it.",
|
|
49
|
+
invoke: (s) => {
|
|
50
|
+
s.focus();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
domHooks: {
|
|
55
|
+
root: {
|
|
56
|
+
attr: "data-component",
|
|
57
|
+
value: "pin-entry",
|
|
58
|
+
description: 'Marks the PIN control: a label, the PIN dots over a real password field (inputmode="none") and a Keypad.'
|
|
59
|
+
},
|
|
60
|
+
instanceId: {
|
|
61
|
+
attr: "data-component-id",
|
|
62
|
+
sourceProp: "id",
|
|
63
|
+
description: "Sourced from the id prop."
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}, fe = w(
|
|
67
|
+
"ds:inline-flex ds:max-w-full ds:flex-col ds:items-center ds:gap-[var(--spacing-lg)]"
|
|
68
|
+
), me = w("type-label ds:text-foreground ds:text-center", {
|
|
69
|
+
variants: {
|
|
70
|
+
hidden: { true: "ds:sr-only", false: "" }
|
|
71
|
+
},
|
|
72
|
+
defaultVariants: { hidden: !1 }
|
|
73
|
+
}), ge = w(
|
|
74
|
+
[
|
|
75
|
+
"ds:absolute ds:inset-0 ds:m-0 ds:size-full ds:cursor-pointer ds:appearance-none",
|
|
76
|
+
"ds:rounded-[var(--radius-md)] ds:border-0 ds:bg-transparent ds:p-0",
|
|
77
|
+
"ds:text-transparent ds:caret-transparent ds:selection:bg-transparent",
|
|
78
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
79
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
80
|
+
"ds:disabled:cursor-not-allowed"
|
|
81
|
+
].join(" ")
|
|
82
|
+
);
|
|
83
|
+
function b(s, m) {
|
|
84
|
+
return s.replace(/[٠-٩]/g, (a) => String(a.charCodeAt(0) - 1632)).replace(/[۰-۹]/g, (a) => String(a.charCodeAt(0) - 1776)).replace(/\D/g, "").slice(0, m);
|
|
85
|
+
}
|
|
86
|
+
const ye = G(
|
|
87
|
+
({
|
|
88
|
+
length: s,
|
|
89
|
+
value: m,
|
|
90
|
+
defaultValue: a,
|
|
91
|
+
onChange: d,
|
|
92
|
+
onComplete: l,
|
|
93
|
+
label: L,
|
|
94
|
+
hideLabel: S = !1,
|
|
95
|
+
error: k = !1,
|
|
96
|
+
disabled: A = !1,
|
|
97
|
+
autoComplete: x = "current-password",
|
|
98
|
+
name: D,
|
|
99
|
+
bottomLeft: R,
|
|
100
|
+
autoFocus: E = !1,
|
|
101
|
+
size: V = "lg",
|
|
102
|
+
maskClassName: j = de,
|
|
103
|
+
id: g,
|
|
104
|
+
className: M,
|
|
105
|
+
"aria-describedby": B
|
|
106
|
+
}, H) => {
|
|
107
|
+
const { t: z } = te("ui"), t = ce(s), c = ie(), T = J(re) !== null, I = ae(c, g), _ = Q(), u = h(null), [q, N] = se({
|
|
108
|
+
value: m,
|
|
109
|
+
defaultValue: b(a ?? "", t)
|
|
110
|
+
}), n = b(q ?? "", t), i = h(n);
|
|
111
|
+
i.current = n;
|
|
112
|
+
const p = h(n.length === t), P = c.disabled || A, C = c.invalid || k, o = X(
|
|
113
|
+
(e) => {
|
|
114
|
+
const r = b(e, t);
|
|
115
|
+
r !== i.current && (i.current = r, N(r), d == null || d(r), r.length === t ? p.current || (p.current = !0, l == null || l(r)) : p.current = !1);
|
|
116
|
+
},
|
|
117
|
+
[t, d, l, N]
|
|
118
|
+
);
|
|
119
|
+
K(() => {
|
|
120
|
+
n.length < t && (p.current = !1);
|
|
121
|
+
}, [n, t]);
|
|
122
|
+
const [, O] = Z((e) => e + 1, 0);
|
|
123
|
+
ne(() => {
|
|
124
|
+
const e = u.current;
|
|
125
|
+
e && e.value !== n && (e.value = n);
|
|
126
|
+
}), K(() => {
|
|
127
|
+
var e;
|
|
128
|
+
E && ((e = u.current) == null || e.focus({ preventScroll: !0 }));
|
|
129
|
+
}, [E]);
|
|
130
|
+
const y = $(
|
|
131
|
+
() => ({
|
|
132
|
+
clear: () => o(""),
|
|
133
|
+
focus: () => {
|
|
134
|
+
var e;
|
|
135
|
+
return (e = u.current) == null ? void 0 : e.focus();
|
|
136
|
+
},
|
|
137
|
+
getFilledCount: () => i.current.length,
|
|
138
|
+
getLength: () => t,
|
|
139
|
+
isComplete: () => i.current.length === t
|
|
140
|
+
}),
|
|
141
|
+
[o, t]
|
|
142
|
+
);
|
|
143
|
+
ee(H, () => y, [y]), ue(pe, y, g);
|
|
144
|
+
const U = (e) => {
|
|
145
|
+
o(e.target.value), O();
|
|
146
|
+
}, v = x === "new-password", W = [B, c.describedBy].filter(Boolean).join(" ") || void 0, Y = !T;
|
|
147
|
+
return /* @__PURE__ */ F(
|
|
148
|
+
"div",
|
|
149
|
+
{
|
|
150
|
+
"data-component": "pin-entry",
|
|
151
|
+
"data-component-id": g,
|
|
152
|
+
className: fe({
|
|
153
|
+
className: [j, M].filter(Boolean).join(" ")
|
|
154
|
+
}),
|
|
155
|
+
children: [
|
|
156
|
+
Y ? /* @__PURE__ */ f(
|
|
157
|
+
"label",
|
|
158
|
+
{
|
|
159
|
+
id: _,
|
|
160
|
+
htmlFor: I,
|
|
161
|
+
className: me({ hidden: S }),
|
|
162
|
+
children: L ?? z("inputs.pinEntry.label", "PIN")
|
|
163
|
+
}
|
|
164
|
+
) : null,
|
|
165
|
+
/* @__PURE__ */ F("div", { className: "ds:relative ds:inline-flex ds:min-h-[var(--min-target-size)] ds:max-w-full ds:min-w-0 ds:items-center ds:justify-center ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]", children: [
|
|
166
|
+
/* @__PURE__ */ f(
|
|
167
|
+
"input",
|
|
168
|
+
{
|
|
169
|
+
ref: u,
|
|
170
|
+
id: I,
|
|
171
|
+
type: "password",
|
|
172
|
+
inputMode: "none",
|
|
173
|
+
autoComplete: x,
|
|
174
|
+
name: D,
|
|
175
|
+
minLength: v ? t : void 0,
|
|
176
|
+
maxLength: v ? t : void 0,
|
|
177
|
+
pattern: v ? "[0-9]*" : void 0,
|
|
178
|
+
disabled: P,
|
|
179
|
+
"aria-invalid": C || void 0,
|
|
180
|
+
"aria-describedby": W,
|
|
181
|
+
spellCheck: !1,
|
|
182
|
+
autoCapitalize: "none",
|
|
183
|
+
autoCorrect: "off",
|
|
184
|
+
onChange: U,
|
|
185
|
+
className: ge()
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
/* @__PURE__ */ f(
|
|
189
|
+
le,
|
|
190
|
+
{
|
|
191
|
+
length: t,
|
|
192
|
+
filled: n.length,
|
|
193
|
+
error: C,
|
|
194
|
+
className: "ds:pointer-events-none ds:relative"
|
|
195
|
+
}
|
|
196
|
+
)
|
|
197
|
+
] }),
|
|
198
|
+
/* @__PURE__ */ f(
|
|
199
|
+
oe,
|
|
200
|
+
{
|
|
201
|
+
size: V,
|
|
202
|
+
maskClassName: "",
|
|
203
|
+
disabled: P,
|
|
204
|
+
deleteDisabled: n.length === 0,
|
|
205
|
+
bottomLeft: R,
|
|
206
|
+
onDigit: (e) => o(i.current + e),
|
|
207
|
+
onDelete: () => o(i.current.slice(0, -1))
|
|
208
|
+
}
|
|
209
|
+
)
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
);
|
|
215
|
+
ye.displayName = "PinEntry";
|
|
216
|
+
export {
|
|
217
|
+
ye as P
|
|
218
|
+
};
|
|
219
|
+
//# sourceMappingURL=pin-entry-BugWQMOS.js.map
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { jsxs as v, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as b } from "react";
|
|
3
|
+
import { c as i } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as g } from "react-i18next";
|
|
5
|
+
const N = 4, h = 12, x = 8;
|
|
6
|
+
function M(a) {
|
|
7
|
+
const s = typeof a == "number" && Number.isFinite(a) ? Math.floor(a) : x;
|
|
8
|
+
return Math.max(N, Math.min(h, s));
|
|
9
|
+
}
|
|
10
|
+
const _ = i(
|
|
11
|
+
[
|
|
12
|
+
// `px-px` leaves room for the filled dot's 1.1 scale, so the outer dots
|
|
13
|
+
// never push a 320 px container into a sideways scroll.
|
|
14
|
+
"ds:inline-flex ds:max-w-full ds:items-center ds:justify-center ds:px-px",
|
|
15
|
+
"ds:data-[state=error]:animate-[pin-indicator-shake_calc(var(--animation-duration)*2)_var(--ease-out)] ds:motion-reduce:animate-none"
|
|
16
|
+
].join(" "),
|
|
17
|
+
{
|
|
18
|
+
variants: {
|
|
19
|
+
size: {
|
|
20
|
+
sm: "ds:gap-[var(--spacing-sm)]",
|
|
21
|
+
md: "ds:gap-[var(--spacing-md)]"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: { size: "md" }
|
|
25
|
+
}
|
|
26
|
+
), T = i(
|
|
27
|
+
[
|
|
28
|
+
// The dots give way before the gaps do, so 12 of them fit a 320 px
|
|
29
|
+
// container; the square shape follows the width. At normal widths
|
|
30
|
+
// nothing shrinks and the dots keep their full size.
|
|
31
|
+
"ds:block ds:aspect-square ds:h-auto ds:min-w-0 ds:shrink ds:rounded-[var(--radius-full)] ds:border-2",
|
|
32
|
+
"ds:transition-[background-color,border-color,scale] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
|
|
33
|
+
].join(" "),
|
|
34
|
+
{
|
|
35
|
+
variants: {
|
|
36
|
+
size: {
|
|
37
|
+
sm: "ds:w-3",
|
|
38
|
+
md: "ds:w-4"
|
|
39
|
+
},
|
|
40
|
+
filled: {
|
|
41
|
+
true: "ds:scale-110 ds:forced-colors:bg-[CanvasText] ds:forced-colors:border-[CanvasText]",
|
|
42
|
+
false: "ds:bg-transparent ds:border-[color:var(--control-border)] ds:forced-colors:border-[CanvasText]"
|
|
43
|
+
},
|
|
44
|
+
tone: {
|
|
45
|
+
default: "",
|
|
46
|
+
error: ""
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
compoundVariants: [
|
|
50
|
+
{
|
|
51
|
+
filled: !0,
|
|
52
|
+
tone: "default",
|
|
53
|
+
className: "ds:bg-foreground ds:border-foreground"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
filled: !0,
|
|
57
|
+
tone: "error",
|
|
58
|
+
className: "ds:bg-destructive ds:border-destructive"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
filled: !1,
|
|
62
|
+
tone: "error",
|
|
63
|
+
className: "ds:border-destructive"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
defaultVariants: { size: "md", filled: !1, tone: "default" }
|
|
67
|
+
}
|
|
68
|
+
), I = b(
|
|
69
|
+
({
|
|
70
|
+
filled: a,
|
|
71
|
+
length: s,
|
|
72
|
+
error: o = !1,
|
|
73
|
+
size: d = "md",
|
|
74
|
+
announce: l = !0,
|
|
75
|
+
id: c,
|
|
76
|
+
className: m,
|
|
77
|
+
...u
|
|
78
|
+
}, f) => {
|
|
79
|
+
const { t: p } = g("ui"), r = M(s), t = Math.max(0, Math.min(r, Math.floor(a || 0)));
|
|
80
|
+
return /* @__PURE__ */ v(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
ref: f,
|
|
84
|
+
"data-component": "pin-indicator",
|
|
85
|
+
"data-component-id": c,
|
|
86
|
+
"data-state": o ? "error" : t === r ? "complete" : "idle",
|
|
87
|
+
"data-filled": t,
|
|
88
|
+
"data-length": r,
|
|
89
|
+
className: _({ size: d, className: m }),
|
|
90
|
+
...u,
|
|
91
|
+
children: [
|
|
92
|
+
Array.from({ length: r }, (V, e) => /* @__PURE__ */ n(
|
|
93
|
+
"span",
|
|
94
|
+
{
|
|
95
|
+
"aria-hidden": "true",
|
|
96
|
+
"data-dot-id": e,
|
|
97
|
+
"data-filled": e < t ? "" : void 0,
|
|
98
|
+
className: T({
|
|
99
|
+
size: d,
|
|
100
|
+
filled: e < t,
|
|
101
|
+
tone: o ? "error" : "default"
|
|
102
|
+
})
|
|
103
|
+
},
|
|
104
|
+
e
|
|
105
|
+
)),
|
|
106
|
+
l ? /* @__PURE__ */ n("span", { "aria-live": "polite", "aria-atomic": "true", className: "ds:sr-only", children: p("inputs.pinIndicator.progress", {
|
|
107
|
+
filled: t,
|
|
108
|
+
total: r,
|
|
109
|
+
defaultValue: "Digits entered: {{filled}} of {{total}}"
|
|
110
|
+
}) }) : null
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
I.displayName = "PinIndicator";
|
|
117
|
+
export {
|
|
118
|
+
x as D,
|
|
119
|
+
h as M,
|
|
120
|
+
I as P,
|
|
121
|
+
N as a,
|
|
122
|
+
M as r
|
|
123
|
+
};
|
|
124
|
+
//# sourceMappingURL=pin-indicator-Cb-n40UI.js.map
|