@alfadocs/ui-kit-debug 0.36.0 → 0.38.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/Alfadocs_Logo_Mark-7o3L3WBI.js +56 -0
- package/dist/_chunks/Alfadocs_Logo_Mark-7o3L3WBI.js.map +1 -0
- package/dist/_chunks/{alia-sidebar-BEoMl6UL.js → alia-sidebar-DXsYPinm.js} +2 -2
- package/dist/_chunks/{alia-sidebar-BEoMl6UL.js.map → alia-sidebar-DXsYPinm.js.map} +1 -1
- package/dist/_chunks/{ar-CEpIJtcO.js → ar-Cn_NxqkN.js} +2 -2
- package/dist/_chunks/{ar-CEpIJtcO.js.map → ar-Cn_NxqkN.js.map} +1 -1
- package/dist/_chunks/bmi-BxD-tFzU.js +32 -0
- package/dist/_chunks/bmi-BxD-tFzU.js.map +1 -0
- package/dist/_chunks/bmi-calculator-BRUru9QX.js +213 -0
- package/dist/_chunks/bmi-calculator-BRUru9QX.js.map +1 -0
- package/dist/_chunks/{booking-eM0y0NIR.js → booking-DK_BPHnQ.js} +4 -4
- package/dist/_chunks/{booking-eM0y0NIR.js.map → booking-DK_BPHnQ.js.map} +1 -1
- package/dist/_chunks/calculator-dialog-B74fqpFZ.js +40 -0
- package/dist/_chunks/calculator-dialog-B74fqpFZ.js.map +1 -0
- package/dist/_chunks/chart-DnHvmiDX.js +312 -0
- package/dist/_chunks/chart-DnHvmiDX.js.map +1 -0
- package/dist/_chunks/{chat-message-D53_fH2w.js → chat-message-ASgGtj-L.js} +30 -39
- package/dist/_chunks/chat-message-ASgGtj-L.js.map +1 -0
- package/dist/_chunks/{contact-profile-card-BA6fgS45.js → contact-profile-card-DHyuAPXM.js} +14 -13
- package/dist/_chunks/{contact-profile-card-BA6fgS45.js.map → contact-profile-card-DHyuAPXM.js.map} +1 -1
- package/dist/_chunks/cycle-calculator-B5Uj9QeT.js +185 -0
- package/dist/_chunks/cycle-calculator-B5Uj9QeT.js.map +1 -0
- package/dist/_chunks/{date-picker-B94HAV4A.js → date-picker-CvQfs6Xh.js} +2 -2
- package/dist/_chunks/{date-picker-B94HAV4A.js.map → date-picker-CvQfs6Xh.js.map} +1 -1
- package/dist/_chunks/{date-range-picker-D8CHNYQT.js → date-range-picker-U9fn1g9d.js} +3 -3
- package/dist/_chunks/{date-range-picker-D8CHNYQT.js.map → date-range-picker-U9fn1g9d.js.map} +1 -1
- package/dist/_chunks/{date-time-picker-D1GEzf8p.js → date-time-picker-Cva0ZCWw.js} +2 -2
- package/dist/_chunks/{date-time-picker-D1GEzf8p.js.map → date-time-picker-Cva0ZCWw.js.map} +1 -1
- package/dist/_chunks/{de-Dfbeau59.js → de-BMM2H7Bs.js} +2 -2
- package/dist/_chunks/{de-Dfbeau59.js.map → de-BMM2H7Bs.js.map} +1 -1
- package/dist/_chunks/dependent-selector-CRWgieHm.js +324 -0
- package/dist/_chunks/dependent-selector-CRWgieHm.js.map +1 -0
- package/dist/_chunks/document-scanner-CdHQ6lTN.js +702 -0
- package/dist/_chunks/document-scanner-CdHQ6lTN.js.map +1 -0
- package/dist/_chunks/due-date-calculator-CUspKSTw.js +171 -0
- package/dist/_chunks/due-date-calculator-CUspKSTw.js.map +1 -0
- package/dist/_chunks/{editable-currency-cell-renderer-CZcVWBPo.js → editable-currency-cell-renderer-DGKuRNVG.js} +2 -2
- package/dist/_chunks/{editable-currency-cell-renderer-CZcVWBPo.js.map → editable-currency-cell-renderer-DGKuRNVG.js.map} +1 -1
- package/dist/_chunks/{el-Dro3J7CP.js → el-BYPonAaK.js} +2 -2
- package/dist/_chunks/{el-Dro3J7CP.js.map → el-BYPonAaK.js.map} +1 -1
- package/dist/_chunks/{es-Dvg8u70B.js → es-CMkVCQ4F.js} +2 -2
- package/dist/_chunks/{es-Dvg8u70B.js.map → es-CMkVCQ4F.js.map} +1 -1
- package/dist/_chunks/{file-upload-CdozCPct.js → file-upload-CnzRcErt.js} +2 -1
- package/dist/_chunks/{file-upload-CdozCPct.js.map → file-upload-CnzRcErt.js.map} +1 -1
- package/dist/_chunks/fiscal-code-input-BZ0FxwUl.js +540 -0
- package/dist/_chunks/fiscal-code-input-BZ0FxwUl.js.map +1 -0
- package/dist/_chunks/{fr-VOGjBSPP.js → fr-BcuWxqft.js} +2 -2
- package/dist/_chunks/{fr-VOGjBSPP.js.map → fr-BcuWxqft.js.map} +1 -1
- package/dist/_chunks/gestation-BXEgDGmP.js +50 -0
- package/dist/_chunks/gestation-BXEgDGmP.js.map +1 -0
- package/dist/_chunks/gestational-age-calculator-CsQ05qDy.js +165 -0
- package/dist/_chunks/gestational-age-calculator-CsQ05qDy.js.map +1 -0
- package/dist/_chunks/heart-C0faivFf.js +20 -0
- package/dist/_chunks/heart-C0faivFf.js.map +1 -0
- package/dist/_chunks/{hi-BSDxWU_y.js → hi-wkq_rQAh.js} +2 -2
- package/dist/_chunks/{hi-BSDxWU_y.js.map → hi-wkq_rQAh.js.map} +1 -1
- package/dist/_chunks/image-C6RM5hfF.js +16 -0
- package/dist/_chunks/image-C6RM5hfF.js.map +1 -0
- package/dist/_chunks/insert-result-yJ0QavoN.js +133 -0
- package/dist/_chunks/insert-result-yJ0QavoN.js.map +1 -0
- package/dist/_chunks/{isSameWeek-Dfzu29cW.js → isSameWeek-Bim5ftRd.js} +2 -2
- package/dist/_chunks/{isSameWeek-Dfzu29cW.js.map → isSameWeek-Bim5ftRd.js.map} +1 -1
- package/dist/_chunks/{it-CuonvcI_.js → it-GiQrQ9p4.js} +3 -3
- package/dist/_chunks/{it-CuonvcI_.js.map → it-GiQrQ9p4.js.map} +1 -1
- package/dist/_chunks/{ja-DO57gIOT.js → ja-qfYg3Rua.js} +2 -2
- package/dist/_chunks/{ja-DO57gIOT.js.map → ja-qfYg3Rua.js.map} +1 -1
- package/dist/_chunks/{logo-_Z-jLq80.js → logo-yituK7sE.js} +42 -91
- package/dist/_chunks/logo-yituK7sE.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-DXHxy9dj.js → marketplace-app-shell-BnClrL2B.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-DXHxy9dj.js.map → marketplace-app-shell-BnClrL2B.js.map} +1 -1
- package/dist/_chunks/{nl-DjPaaWaW.js → nl-xOogO4sZ.js} +2 -2
- package/dist/_chunks/{nl-DjPaaWaW.js.map → nl-xOogO4sZ.js.map} +1 -1
- package/dist/_chunks/{patient-shell-CDvMw_Nk.js → patient-shell-Bz3CdO84.js} +2 -2
- package/dist/_chunks/{patient-shell-CDvMw_Nk.js.map → patient-shell-Bz3CdO84.js.map} +1 -1
- package/dist/_chunks/{pl-Cl4lOx2N.js → pl-GnOW6eGK.js} +3 -3
- package/dist/_chunks/{pl-Cl4lOx2N.js.map → pl-GnOW6eGK.js.map} +1 -1
- package/dist/_chunks/{practice-results-BFM_lyUs.js → practice-results-C8ciLQap.js} +3 -2
- package/dist/_chunks/{practice-results-BFM_lyUs.js.map → practice-results-C8ciLQap.js.map} +1 -1
- package/dist/_chunks/pregnancy-weight-gain-BCdi-JSv.js +209 -0
- package/dist/_chunks/pregnancy-weight-gain-BCdi-JSv.js.map +1 -0
- package/dist/_chunks/{privacy-lock-DD-wHxBg.js → privacy-lock-BmX_gkvt.js} +2 -2
- package/dist/_chunks/{privacy-lock-DD-wHxBg.js.map → privacy-lock-BmX_gkvt.js.map} +1 -1
- package/dist/_chunks/{pt-D7qO5CzD.js → pt-_bV5b5RW.js} +2 -2
- package/dist/_chunks/{pt-D7qO5CzD.js.map → pt-_bV5b5RW.js.map} +1 -1
- package/dist/_chunks/{public-footer.agent-Cjfe5jus.js → public-footer.agent-zw1vFin_.js} +2 -2
- package/dist/_chunks/{public-footer.agent-Cjfe5jus.js.map → public-footer.agent-zw1vFin_.js.map} +1 -1
- package/dist/_chunks/qr-code-DNXhi6se.js +568 -0
- package/dist/_chunks/qr-code-DNXhi6se.js.map +1 -0
- package/dist/_chunks/{react-day-picker-DsjfS7uI.js → react-day-picker-CdtIiKjx.js} +27 -27
- package/dist/_chunks/{react-day-picker-DsjfS7uI.js.map → react-day-picker-CdtIiKjx.js.map} +1 -1
- package/dist/_chunks/{rich-text-editor-CHmr9Bz8.js → rich-text-editor-DLbg2852.js} +114 -124
- package/dist/_chunks/rich-text-editor-DLbg2852.js.map +1 -0
- package/dist/_chunks/{ro-CP2-VJ_O.js → ro-BEcyh5Nj.js} +2 -2
- package/dist/_chunks/{ro-CP2-VJ_O.js.map → ro-BEcyh5Nj.js.map} +1 -1
- package/dist/_chunks/rotate-ccw-BWANpitO.js +15 -0
- package/dist/_chunks/rotate-ccw-BWANpitO.js.map +1 -0
- package/dist/_chunks/{ru-RPn9_Lpq.js → ru-Bi86hqMf.js} +3 -3
- package/dist/_chunks/{ru-RPn9_Lpq.js.map → ru-Bi86hqMf.js.map} +1 -1
- package/dist/_chunks/session-countdown-LPnhTHjn.js +214 -0
- package/dist/_chunks/session-countdown-LPnhTHjn.js.map +1 -0
- package/dist/_chunks/{shield-check-BhHyReu8.js → shield-check-C73ma9Cs.js} +8 -24
- package/dist/_chunks/shield-check-C73ma9Cs.js.map +1 -0
- package/dist/_chunks/{sign-in-with-alfadocs-button-BI0fVonM.js → sign-in-with-alfadocs-button-DeHBFRNS.js} +2 -2
- package/dist/_chunks/{sign-in-with-alfadocs-button-BI0fVonM.js.map → sign-in-with-alfadocs-button-DeHBFRNS.js.map} +1 -1
- package/dist/_chunks/social-sign-in-button-X54ySJr1.js +243 -0
- package/dist/_chunks/social-sign-in-button-X54ySJr1.js.map +1 -0
- package/dist/_chunks/{sq-AQvefouo.js → sq-BujHSAWu.js} +2 -2
- package/dist/_chunks/{sq-AQvefouo.js.map → sq-BujHSAWu.js.map} +1 -1
- package/dist/_chunks/subDays-_T9YeKPX.js +8 -0
- package/dist/_chunks/{subDays-CANHP9hz.js.map → subDays-_T9YeKPX.js.map} +1 -1
- package/dist/_chunks/{sv-zkx9eBtD.js → sv-C8AeDrTA.js} +2 -2
- package/dist/_chunks/{sv-zkx9eBtD.js.map → sv-C8AeDrTA.js.map} +1 -1
- package/dist/_chunks/{tr-Dmr412Ac.js → tr-CMSs_Vgf.js} +2 -2
- package/dist/_chunks/{tr-Dmr412Ac.js.map → tr-CMSs_Vgf.js.map} +1 -1
- package/dist/_chunks/unit-converter-EUwO6QYq.js +168 -0
- package/dist/_chunks/unit-converter-EUwO6QYq.js.map +1 -0
- package/dist/_chunks/wallet-pay-button-DK4ESYge.js +250 -0
- package/dist/_chunks/wallet-pay-button-DK4ESYge.js.map +1 -0
- package/dist/_chunks/{zh-CN-DxVt64Zk.js → zh-CN-eXB-PFu4.js} +3 -3
- package/dist/_chunks/{zh-CN-DxVt64Zk.js.map → zh-CN-eXB-PFu4.js.map} +1 -1
- package/dist/agent-catalog.json +203 -1
- package/dist/brand/provider-marks/apple-pay.d.ts +12 -0
- package/dist/brand/provider-marks/apple-pay.d.ts.map +1 -0
- package/dist/brand/provider-marks/apple.d.ts +12 -0
- package/dist/brand/provider-marks/apple.d.ts.map +1 -0
- package/dist/brand/provider-marks/google-pay.d.ts +12 -0
- package/dist/brand/provider-marks/google-pay.d.ts.map +1 -0
- package/dist/brand/provider-marks/google.d.ts +13 -0
- package/dist/brand/provider-marks/google.d.ts.map +1 -0
- package/dist/components/_shared/insert-result.d.ts +47 -0
- package/dist/components/_shared/insert-result.d.ts.map +1 -0
- package/dist/components/bmi-calculator/bmi-calculator.d.ts +27 -0
- package/dist/components/bmi-calculator/bmi-calculator.d.ts.map +1 -0
- package/dist/components/bmi-calculator/bmi.d.ts +37 -0
- package/dist/components/bmi-calculator/bmi.d.ts.map +1 -0
- package/dist/components/bmi-calculator/index.d.ts +4 -0
- package/dist/components/bmi-calculator/index.d.ts.map +1 -0
- package/dist/components/bmi-calculator/index.js +15 -0
- package/dist/components/bmi-calculator/index.js.map +1 -0
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/calculator-dialog.d.ts +26 -0
- package/dist/components/calculator-dialog/calculator-dialog.d.ts.map +1 -0
- package/dist/components/calculator-dialog/index.d.ts +3 -0
- package/dist/components/calculator-dialog/index.d.ts.map +1 -0
- package/dist/components/calculator-dialog/index.js +5 -0
- package/dist/components/calculator-dialog/index.js.map +1 -0
- package/dist/components/chart/chart.d.ts +7 -0
- package/dist/components/chart/chart.d.ts.map +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/cycle-calculator/cycle-calculator.d.ts +21 -0
- package/dist/components/cycle-calculator/cycle-calculator.d.ts.map +1 -0
- package/dist/components/cycle-calculator/cycle.d.ts +37 -0
- package/dist/components/cycle-calculator/cycle.d.ts.map +1 -0
- package/dist/components/cycle-calculator/index.d.ts +4 -0
- package/dist/components/cycle-calculator/index.d.ts.map +1 -0
- package/dist/components/cycle-calculator/index.js +7 -0
- package/dist/components/cycle-calculator/index.js.map +1 -0
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/dependent-selector/dependent-selector.agent.d.ts +4 -0
- package/dist/components/dependent-selector/dependent-selector.agent.d.ts.map +1 -0
- package/dist/components/dependent-selector/dependent-selector.d.ts +72 -0
- package/dist/components/dependent-selector/dependent-selector.d.ts.map +1 -0
- package/dist/components/dependent-selector/index.d.ts +4 -0
- package/dist/components/dependent-selector/index.d.ts.map +1 -0
- package/dist/components/dependent-selector/index.js +6 -0
- package/dist/components/dependent-selector/index.js.map +1 -0
- package/dist/components/document-scanner/document-scanner.agent.d.ts +4 -0
- package/dist/components/document-scanner/document-scanner.agent.d.ts.map +1 -0
- package/dist/components/document-scanner/document-scanner.d.ts +93 -0
- package/dist/components/document-scanner/document-scanner.d.ts.map +1 -0
- package/dist/components/document-scanner/index.d.ts +4 -0
- package/dist/components/document-scanner/index.d.ts.map +1 -0
- package/dist/components/document-scanner/index.js +6 -0
- package/dist/components/document-scanner/index.js.map +1 -0
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +21 -0
- package/dist/components/due-date-calculator/due-date-calculator.d.ts.map +1 -0
- package/dist/components/due-date-calculator/gestation.d.ts +60 -0
- package/dist/components/due-date-calculator/gestation.d.ts.map +1 -0
- package/dist/components/due-date-calculator/index.d.ts +4 -0
- package/dist/components/due-date-calculator/index.d.ts.map +1 -0
- package/dist/components/due-date-calculator/index.js +13 -0
- package/dist/components/due-date-calculator/index.js.map +1 -0
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/fiscal-code-input/calculate-codice-fiscale.d.ts +24 -0
- package/dist/components/fiscal-code-input/calculate-codice-fiscale.d.ts.map +1 -0
- package/dist/components/fiscal-code-input/fiscal-code-input.agent.d.ts +4 -0
- package/dist/components/fiscal-code-input/fiscal-code-input.agent.d.ts.map +1 -0
- package/dist/components/fiscal-code-input/fiscal-code-input.d.ts +61 -0
- package/dist/components/fiscal-code-input/fiscal-code-input.d.ts.map +1 -0
- package/dist/components/fiscal-code-input/index.d.ts +6 -0
- package/dist/components/fiscal-code-input/index.d.ts.map +1 -0
- package/dist/components/fiscal-code-input/index.js +11 -0
- package/dist/components/fiscal-code-input/index.js.map +1 -0
- package/dist/components/fiscal-code-input/is-valid-codice-fiscale.d.ts +21 -0
- package/dist/components/fiscal-code-input/is-valid-codice-fiscale.d.ts.map +1 -0
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +27 -0
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts.map +1 -0
- package/dist/components/gestational-age-calculator/index.d.ts +3 -0
- package/dist/components/gestational-age-calculator/index.d.ts.map +1 -0
- package/dist/components/gestational-age-calculator/index.js +5 -0
- package/dist/components/gestational-age-calculator/index.js.map +1 -0
- package/dist/components/index.d.ts +15 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/logo/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.d.ts +4 -0
- package/dist/components/pregnancy-weight-gain/index.d.ts.map +1 -0
- package/dist/components/pregnancy-weight-gain/index.js +9 -0
- package/dist/components/pregnancy-weight-gain/index.js.map +1 -0
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +19 -0
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts.map +1 -0
- package/dist/components/pregnancy-weight-gain/weight-gain.d.ts +41 -0
- package/dist/components/pregnancy-weight-gain/weight-gain.d.ts.map +1 -0
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/qr-code/index.d.ts +5 -0
- package/dist/components/qr-code/index.d.ts.map +1 -0
- package/dist/components/qr-code/index.js +8 -0
- package/dist/components/qr-code/index.js.map +1 -0
- package/dist/components/qr-code/qr-code.agent.d.ts +3 -0
- package/dist/components/qr-code/qr-code.agent.d.ts.map +1 -0
- package/dist/components/qr-code/qr-code.d.ts +59 -0
- package/dist/components/qr-code/qr-code.d.ts.map +1 -0
- package/dist/components/qr-code/qr-encode.d.ts +46 -0
- package/dist/components/qr-code/qr-encode.d.ts.map +1 -0
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/session-countdown/index.d.ts +4 -0
- package/dist/components/session-countdown/index.d.ts.map +1 -0
- package/dist/components/session-countdown/index.js +6 -0
- package/dist/components/session-countdown/index.js.map +1 -0
- package/dist/components/session-countdown/session-countdown.agent.d.ts +3 -0
- package/dist/components/session-countdown/session-countdown.agent.d.ts.map +1 -0
- package/dist/components/session-countdown/session-countdown.d.ts +38 -0
- package/dist/components/session-countdown/session-countdown.d.ts.map +1 -0
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/skeleton/skeleton.d.ts +1 -1
- package/dist/components/social-sign-in-button/index.d.ts +3 -0
- package/dist/components/social-sign-in-button/index.d.ts.map +1 -0
- package/dist/components/social-sign-in-button/index.js +5 -0
- package/dist/components/social-sign-in-button/index.js.map +1 -0
- package/dist/components/social-sign-in-button/social-sign-in-button.d.ts +56 -0
- package/dist/components/social-sign-in-button/social-sign-in-button.d.ts.map +1 -0
- package/dist/components/unit-converter/index.d.ts +4 -0
- package/dist/components/unit-converter/index.d.ts.map +1 -0
- package/dist/components/unit-converter/index.js +9 -0
- package/dist/components/unit-converter/index.js.map +1 -0
- package/dist/components/unit-converter/unit-converter.d.ts +21 -0
- package/dist/components/unit-converter/unit-converter.d.ts.map +1 -0
- package/dist/components/unit-converter/units.d.ts +18 -0
- package/dist/components/unit-converter/units.d.ts.map +1 -0
- package/dist/components/wallet-pay-button/index.d.ts +3 -0
- package/dist/components/wallet-pay-button/index.d.ts.map +1 -0
- package/dist/components/wallet-pay-button/index.js +5 -0
- package/dist/components/wallet-pay-button/index.js.map +1 -0
- package/dist/components/wallet-pay-button/wallet-pay-button.d.ts +63 -0
- package/dist/components/wallet-pay-button/wallet-pay-button.d.ts.map +1 -0
- package/dist/i18n/locales/ar.d.ts +316 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +307 -0
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +316 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +307 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +316 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +307 -0
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +316 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +310 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +316 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +307 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +316 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +307 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +316 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +307 -0
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +316 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +307 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +316 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +303 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +316 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +307 -0
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +316 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +307 -0
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +316 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +310 -0
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +316 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +307 -0
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +316 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +307 -0
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +316 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +307 -0
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +316 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +307 -0
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +316 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +307 -0
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +316 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +303 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +597 -527
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +316 -0
- package/dist/locales/de.json +316 -0
- package/dist/locales/el.json +316 -0
- package/dist/locales/en.json +316 -0
- package/dist/locales/es.json +316 -0
- package/dist/locales/fr.json +316 -0
- package/dist/locales/hi.json +316 -0
- package/dist/locales/it.json +316 -0
- package/dist/locales/ja.json +316 -0
- package/dist/locales/nl.json +316 -0
- package/dist/locales/pl.json +316 -0
- package/dist/locales/pt.json +316 -0
- package/dist/locales/ro.json +316 -0
- package/dist/locales/ru.json +316 -0
- package/dist/locales/sq.json +316 -0
- package/dist/locales/sv.json +316 -0
- package/dist/locales/tr.json +316 -0
- package/dist/locales/zh.json +316 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +57 -1
- package/dist/_chunks/chart-DLkVn_ex.js +0 -292
- package/dist/_chunks/chart-DLkVn_ex.js.map +0 -1
- package/dist/_chunks/chat-message-D53_fH2w.js.map +0 -1
- package/dist/_chunks/logo-_Z-jLq80.js.map +0 -1
- package/dist/_chunks/rich-text-editor-CHmr9Bz8.js.map +0 -1
- package/dist/_chunks/shield-check-BhHyReu8.js.map +0 -1
- package/dist/_chunks/subDays-CANHP9hz.js +0 -8
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as k, useState as g, useMemo as _, useEffect as O } from "react";
|
|
3
|
+
import { c as z } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as j } from "react-i18next";
|
|
5
|
+
import { F as v } from "./form-field-BOm9hK35.js";
|
|
6
|
+
import { N as A } from "./number-input-Dj5L3pXK.js";
|
|
7
|
+
import { S as y } from "./select-hsCaJSX3.js";
|
|
8
|
+
import { I as B } from "./insert-result-yJ0QavoN.js";
|
|
9
|
+
const F = {
|
|
10
|
+
// weight → base kg
|
|
11
|
+
kg: { id: "kg", category: "weight", factor: 1, offset: 0 },
|
|
12
|
+
g: { id: "g", category: "weight", factor: 1e-3, offset: 0 },
|
|
13
|
+
lb: { id: "lb", category: "weight", factor: 0.45359237, offset: 0 },
|
|
14
|
+
oz: { id: "oz", category: "weight", factor: 0.028349523125, offset: 0 },
|
|
15
|
+
// length → base cm
|
|
16
|
+
cm: { id: "cm", category: "length", factor: 1, offset: 0 },
|
|
17
|
+
m: { id: "m", category: "length", factor: 100, offset: 0 },
|
|
18
|
+
in: { id: "in", category: "length", factor: 2.54, offset: 0 },
|
|
19
|
+
ft: { id: "ft", category: "length", factor: 30.48, offset: 0 },
|
|
20
|
+
// temperature → base °C (affine: °C = °F·5/9 − 32·5/9)
|
|
21
|
+
c: { id: "c", category: "temperature", factor: 1, offset: 0 },
|
|
22
|
+
f: { id: "f", category: "temperature", factor: 5 / 9, offset: -160 / 9 },
|
|
23
|
+
// glucose → base mmol/L (1 mg/dL = 1/18.0156 mmol/L)
|
|
24
|
+
mmol_l: { id: "mmol_l", category: "glucose", factor: 1, offset: 0 },
|
|
25
|
+
mg_dl: { id: "mg_dl", category: "glucose", factor: 1 / 18.0156, offset: 0 }
|
|
26
|
+
}, p = {
|
|
27
|
+
weight: ["kg", "g", "lb", "oz"],
|
|
28
|
+
length: ["cm", "m", "in", "ft"],
|
|
29
|
+
temperature: ["c", "f"],
|
|
30
|
+
glucose: ["mmol_l", "mg_dl"]
|
|
31
|
+
}, G = [
|
|
32
|
+
"weight",
|
|
33
|
+
"length",
|
|
34
|
+
"temperature",
|
|
35
|
+
"glucose"
|
|
36
|
+
];
|
|
37
|
+
function Y(c, o, f) {
|
|
38
|
+
const r = F[o], n = F[f];
|
|
39
|
+
if (!r || !n) throw new Error(`Unknown unit: ${o} → ${f}`);
|
|
40
|
+
if (r.category !== n.category)
|
|
41
|
+
throw new Error(
|
|
42
|
+
`Cannot convert across categories: ${r.category} → ${n.category}`
|
|
43
|
+
);
|
|
44
|
+
return (c * r.factor + r.offset - n.offset) / n.factor;
|
|
45
|
+
}
|
|
46
|
+
const D = z("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
47
|
+
variants: {
|
|
48
|
+
width: { full: "ds:w-full", auto: "ds:inline-flex" }
|
|
49
|
+
},
|
|
50
|
+
defaultVariants: { width: "full" }
|
|
51
|
+
}), L = k(
|
|
52
|
+
({
|
|
53
|
+
defaultCategory: c = "weight",
|
|
54
|
+
onResultChange: o,
|
|
55
|
+
onInsert: f,
|
|
56
|
+
id: r,
|
|
57
|
+
width: n,
|
|
58
|
+
className: C
|
|
59
|
+
}, U) => {
|
|
60
|
+
const { t, i18n: b } = j(), [$, E] = g(c), [i, S] = g(null), [m, w] = g(
|
|
61
|
+
p[c][0]
|
|
62
|
+
), [l, x] = g(
|
|
63
|
+
p[c][1]
|
|
64
|
+
), T = (s) => {
|
|
65
|
+
const I = s, h = p[I];
|
|
66
|
+
E(I), w(h[0]), x(h[1] ?? h[0]);
|
|
67
|
+
}, a = _(
|
|
68
|
+
() => i === null ? null : Y(i, m, l),
|
|
69
|
+
[i, m, l]
|
|
70
|
+
), u = _(
|
|
71
|
+
() => new Intl.NumberFormat(b.language, { maximumFractionDigits: 3 }),
|
|
72
|
+
[b.language]
|
|
73
|
+
);
|
|
74
|
+
O(() => {
|
|
75
|
+
o == null || o(a);
|
|
76
|
+
}, [a, o]);
|
|
77
|
+
const V = G.map((s) => ({
|
|
78
|
+
value: s,
|
|
79
|
+
label: t(`unitConverter.category.${s}`)
|
|
80
|
+
})), N = p[$].map((s) => ({
|
|
81
|
+
value: s,
|
|
82
|
+
label: t(`unitConverter.units.${s}`)
|
|
83
|
+
}));
|
|
84
|
+
return /* @__PURE__ */ d(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
ref: U,
|
|
88
|
+
"data-component": "unit-converter",
|
|
89
|
+
"data-component-id": r,
|
|
90
|
+
className: D({ width: n, className: C }),
|
|
91
|
+
children: [
|
|
92
|
+
/* @__PURE__ */ e(v, { label: t("unitConverter.categoryLabel"), children: /* @__PURE__ */ e(
|
|
93
|
+
y,
|
|
94
|
+
{
|
|
95
|
+
options: V,
|
|
96
|
+
value: $,
|
|
97
|
+
onValueChange: T
|
|
98
|
+
}
|
|
99
|
+
) }),
|
|
100
|
+
/* @__PURE__ */ d("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3", children: [
|
|
101
|
+
/* @__PURE__ */ e(v, { label: t("unitConverter.value"), children: /* @__PURE__ */ e(A, { mode: "decimal", value: i, onChange: S }) }),
|
|
102
|
+
/* @__PURE__ */ e(v, { label: t("unitConverter.from"), children: /* @__PURE__ */ e(
|
|
103
|
+
y,
|
|
104
|
+
{
|
|
105
|
+
options: N,
|
|
106
|
+
value: m,
|
|
107
|
+
onValueChange: w
|
|
108
|
+
}
|
|
109
|
+
) }),
|
|
110
|
+
/* @__PURE__ */ e(v, { label: t("unitConverter.to"), children: /* @__PURE__ */ e(
|
|
111
|
+
y,
|
|
112
|
+
{
|
|
113
|
+
options: N,
|
|
114
|
+
value: l,
|
|
115
|
+
onValueChange: x
|
|
116
|
+
}
|
|
117
|
+
) })
|
|
118
|
+
] }),
|
|
119
|
+
/* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: a !== null ? `${u.format(i ?? 0)} ${t(
|
|
120
|
+
`unitConverter.units.${m}`
|
|
121
|
+
)} = ${u.format(a)} ${t(
|
|
122
|
+
`unitConverter.units.${l}`
|
|
123
|
+
)}` : "" }),
|
|
124
|
+
a !== null ? /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
125
|
+
/* @__PURE__ */ e("span", { className: "type-label ds:text-muted-foreground", children: t("unitConverter.result") }),
|
|
126
|
+
/* @__PURE__ */ d("span", { className: "type-metric ds:text-foreground", children: [
|
|
127
|
+
u.format(a),
|
|
128
|
+
" ",
|
|
129
|
+
t(`unitConverter.units.${l}`)
|
|
130
|
+
] }),
|
|
131
|
+
f ? /* @__PURE__ */ e(
|
|
132
|
+
B,
|
|
133
|
+
{
|
|
134
|
+
onInsert: f,
|
|
135
|
+
card: {
|
|
136
|
+
title: t("insert.title.unitConverter"),
|
|
137
|
+
fields: [
|
|
138
|
+
{
|
|
139
|
+
label: t("unitConverter.from"),
|
|
140
|
+
value: `${u.format(i ?? 0)} ${t(
|
|
141
|
+
`unitConverter.units.${m}`
|
|
142
|
+
)}`
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
label: t("unitConverter.to"),
|
|
146
|
+
value: `${u.format(a)} ${t(
|
|
147
|
+
`unitConverter.units.${l}`
|
|
148
|
+
)}`
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
) : null
|
|
154
|
+
] }) : /* @__PURE__ */ e("p", { className: "type-body ds:text-muted-foreground", children: t("unitConverter.empty") })
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
L.displayName = "UnitConverter";
|
|
161
|
+
export {
|
|
162
|
+
G as C,
|
|
163
|
+
F as U,
|
|
164
|
+
p as a,
|
|
165
|
+
L as b,
|
|
166
|
+
Y as c
|
|
167
|
+
};
|
|
168
|
+
//# sourceMappingURL=unit-converter-EUwO6QYq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unit-converter-EUwO6QYq.js","sources":["../../src/components/unit-converter/units.ts","../../src/components/unit-converter/unit-converter.tsx"],"sourcesContent":["/* ------------------------------------------------------------------ */\n/* Generic unit conversion — pure, framework-free, unit-testable. */\n/* */\n/* Every unit is described by an affine map to its category's base */\n/* unit: base = value * factor + offset. Conversion is base-in then */\n/* base-out, so the same code handles linear scales (weight, length, */\n/* glucose) and offset scales (temperature) uniformly. */\n/* ------------------------------------------------------------------ */\n\nexport type UnitCategory = 'weight' | 'length' | 'temperature' | 'glucose';\n\nexport interface UnitDef {\n id: string;\n category: UnitCategory;\n /** Multiplier to the category base unit. */\n factor: number;\n /** Additive offset to the base unit (non-zero only for temperature). */\n offset: number;\n}\n\n/* Base units: kg, cm, °C, mmol/L. */\nexport const UNITS: Record<string, UnitDef> = {\n // weight → base kg\n kg: { id: 'kg', category: 'weight', factor: 1, offset: 0 },\n g: { id: 'g', category: 'weight', factor: 0.001, offset: 0 },\n lb: { id: 'lb', category: 'weight', factor: 0.45359237, offset: 0 },\n oz: { id: 'oz', category: 'weight', factor: 0.028349523125, offset: 0 },\n // length → base cm\n cm: { id: 'cm', category: 'length', factor: 1, offset: 0 },\n m: { id: 'm', category: 'length', factor: 100, offset: 0 },\n in: { id: 'in', category: 'length', factor: 2.54, offset: 0 },\n ft: { id: 'ft', category: 'length', factor: 30.48, offset: 0 },\n // temperature → base °C (affine: °C = °F·5/9 − 32·5/9)\n c: { id: 'c', category: 'temperature', factor: 1, offset: 0 },\n f: { id: 'f', category: 'temperature', factor: 5 / 9, offset: (-32 * 5) / 9 },\n // glucose → base mmol/L (1 mg/dL = 1/18.0156 mmol/L)\n mmol_l: { id: 'mmol_l', category: 'glucose', factor: 1, offset: 0 },\n mg_dl: { id: 'mg_dl', category: 'glucose', factor: 1 / 18.0156, offset: 0 },\n};\n\nexport const UNITS_BY_CATEGORY: Record<UnitCategory, string[]> = {\n weight: ['kg', 'g', 'lb', 'oz'],\n length: ['cm', 'm', 'in', 'ft'],\n temperature: ['c', 'f'],\n glucose: ['mmol_l', 'mg_dl'],\n};\n\nexport const CATEGORIES: UnitCategory[] = [\n 'weight',\n 'length',\n 'temperature',\n 'glucose',\n];\n\n/**\n * Convert `value` from one unit to another. Both ids must belong to the same\n * category; mismatched categories throw (a programming error, not user input).\n */\nexport function convertUnits(\n value: number,\n fromId: string,\n toId: string,\n): number {\n const from = UNITS[fromId];\n const to = UNITS[toId];\n if (!from || !to) throw new Error(`Unknown unit: ${fromId} → ${toId}`);\n if (from.category !== to.category) {\n throw new Error(\n `Cannot convert across categories: ${from.category} → ${to.category}`,\n );\n }\n const base = value * from.factor + from.offset;\n return (base - to.offset) / to.factor;\n}\n","/* ------------------------------------------------------------------ */\n/* UnitConverter — generic clinical/everyday unit conversion across */\n/* weight, length, temperature and glucose. */\n/* */\n/* Maths lives in `./units` (pure, separately tested). */\n/* ------------------------------------------------------------------ */\n\nimport { forwardRef, useEffect, useMemo, useState } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { FormField } from '../form-field';\nimport { NumberInput } from '../number-input';\nimport { Select } from '../select';\nimport { InsertButton, type InsertPayload } from '../_shared/insert-result';\nimport {\n type UnitCategory,\n CATEGORIES,\n UNITS_BY_CATEGORY,\n convertUnits,\n} from './units';\n\nconst rootVariants = cva('ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]', {\n variants: {\n width: { full: 'ds:w-full', auto: 'ds:inline-flex' },\n },\n defaultVariants: { width: 'full' },\n});\n\nexport interface UnitConverterProps extends VariantProps<typeof rootVariants> {\n /** Initial category. Defaults to `'weight'`. */\n defaultCategory?: UnitCategory;\n /** Fires with the converted value (and `null` when input is empty). */\n onResultChange?: (value: number | null) => void;\n /** When provided, shows an \"Insert\" button that emits the result for an editor. */\n onInsert?: (payload: InsertPayload) => void;\n /** Opaque instance id, emitted as `data-component-id`. */\n id?: string;\n /** Extra class names on the wrapper. */\n className?: string;\n}\n\nexport const UnitConverter = forwardRef<HTMLDivElement, UnitConverterProps>(\n (\n {\n defaultCategory = 'weight',\n onResultChange,\n onInsert,\n id,\n width,\n className,\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n\n const [category, setCategory] = useState<UnitCategory>(defaultCategory);\n const [value, setValue] = useState<number | null>(null);\n const [fromId, setFromId] = useState<string>(\n UNITS_BY_CATEGORY[defaultCategory][0],\n );\n const [toId, setToId] = useState<string>(\n UNITS_BY_CATEGORY[defaultCategory][1],\n );\n\n const handleCategoryChange = (next: string): void => {\n const cat = next as UnitCategory;\n const units = UNITS_BY_CATEGORY[cat];\n setCategory(cat);\n setFromId(units[0]);\n setToId(units[1] ?? units[0]);\n };\n\n const converted = useMemo(\n () => (value === null ? null : convertUnits(value, fromId, toId)),\n [value, fromId, toId],\n );\n\n const numberFmt = useMemo(\n () => new Intl.NumberFormat(i18n.language, { maximumFractionDigits: 3 }),\n [i18n.language],\n );\n\n useEffect(() => {\n onResultChange?.(converted);\n }, [converted, onResultChange]);\n\n const categoryOptions = CATEGORIES.map((c) => ({\n value: c,\n label: t(`unitConverter.category.${c}`),\n }));\n const unitOptions = UNITS_BY_CATEGORY[category].map((u) => ({\n value: u,\n label: t(`unitConverter.units.${u}`),\n }));\n\n return (\n <div\n ref={ref}\n data-component=\"unit-converter\"\n data-component-id={id}\n className={rootVariants({ width, className })}\n >\n <FormField label={t('unitConverter.categoryLabel')}>\n <Select\n options={categoryOptions}\n value={category}\n onValueChange={handleCategoryChange}\n />\n </FormField>\n\n <div className=\"ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3\">\n <FormField label={t('unitConverter.value')}>\n <NumberInput mode=\"decimal\" value={value} onChange={setValue} />\n </FormField>\n <FormField label={t('unitConverter.from')}>\n <Select\n options={unitOptions}\n value={fromId}\n onValueChange={setFromId}\n />\n </FormField>\n <FormField label={t('unitConverter.to')}>\n <Select\n options={unitOptions}\n value={toId}\n onValueChange={setToId}\n />\n </FormField>\n </div>\n\n <p className=\"ds:sr-only\" role=\"status\" aria-live=\"polite\">\n {converted !== null\n ? `${numberFmt.format(value ?? 0)} ${t(\n `unitConverter.units.${fromId}`,\n )} = ${numberFmt.format(converted)} ${t(\n `unitConverter.units.${toId}`,\n )}`\n : ''}\n </p>\n\n {converted !== null ? (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <span className=\"type-label ds:text-muted-foreground\">\n {t('unitConverter.result')}\n </span>\n <span className=\"type-metric ds:text-foreground\">\n {numberFmt.format(converted)} {t(`unitConverter.units.${toId}`)}\n </span>\n {onInsert ? (\n <InsertButton\n onInsert={onInsert}\n card={{\n title: t('insert.title.unitConverter'),\n fields: [\n {\n label: t('unitConverter.from'),\n value: `${numberFmt.format(value ?? 0)} ${t(\n `unitConverter.units.${fromId}`,\n )}`,\n },\n {\n label: t('unitConverter.to'),\n value: `${numberFmt.format(converted)} ${t(\n `unitConverter.units.${toId}`,\n )}`,\n },\n ],\n }}\n />\n ) : null}\n </div>\n ) : (\n <p className=\"type-body ds:text-muted-foreground\">\n {t('unitConverter.empty')}\n </p>\n )}\n </div>\n );\n },\n);\n\nUnitConverter.displayName = 'UnitConverter';\n"],"names":["UNITS","UNITS_BY_CATEGORY","CATEGORIES","convertUnits","value","fromId","toId","from","to","rootVariants","cva","UnitConverter","forwardRef","defaultCategory","onResultChange","onInsert","id","width","className","ref","i18n","useTranslation","category","setCategory","useState","setValue","setFromId","setToId","handleCategoryChange","next","cat","units","converted","useMemo","numberFmt","useEffect","categoryOptions","c","unitOptions","u","jsxs","jsx","FormField","Select","NumberInput","InsertButton"],"mappings":";;;;;;;;AAqBO,MAAMA,IAAiC;AAAA;AAAA,EAE5C,IAAI,EAAE,IAAI,MAAM,UAAU,UAAU,QAAQ,GAAG,QAAQ,EAAA;AAAA,EACvD,GAAG,EAAE,IAAI,KAAK,UAAU,UAAU,QAAQ,MAAO,QAAQ,EAAA;AAAA,EACzD,IAAI,EAAE,IAAI,MAAM,UAAU,UAAU,QAAQ,YAAY,QAAQ,EAAA;AAAA,E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BACF;AAAA,cACF;AAAA,YAAA,IAEA;AAAA,UAAA,GACN,IAEA,gBAAAmC,EAAC,KAAA,EAAE,WAAU,sCACV,UAAA,EAAE,qBAAqB,EAAA,CAC1B;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA9B,EAAc,cAAc;"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as B } from "react";
|
|
3
|
+
import { c as S } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as H } from "react-i18next";
|
|
5
|
+
import { S as P } from "./spinner-CCByyvcb.js";
|
|
6
|
+
function V({ className: a }) {
|
|
7
|
+
return /* @__PURE__ */ s(
|
|
8
|
+
"svg",
|
|
9
|
+
{
|
|
10
|
+
"aria-hidden": "true",
|
|
11
|
+
role: "img",
|
|
12
|
+
viewBox: "-1 18 158 69",
|
|
13
|
+
fill: "currentColor",
|
|
14
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
+
className: a,
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ e("path", { d: "M30.07 27.69c-1.93 2.28-5.01 4.08-8.09 3.82-.39-3.08.92-6.34 2.68-8.36 1.93-2.34 5.31-4.01 8.04-4.14.33 3.21-.92 6.34-2.63 8.68m2.6 4.13c-4.47-.26-8.29 2.54-10.41 2.54-2.15 0-5.4-2.41-8.94-2.34-4.6.07-8.88 2.67-11.23 6.82-4.83 8.29-1.26 20.57 3.41 27.32 2.28 3.34 5.01 7.01 8.62 6.88 3.41-.13 4.75-2.21 8.88-2.21 4.16 0 5.34 2.21 8.94 2.15 3.74-.07 6.08-3.34 8.36-6.68 2.6-3.8 3.67-7.5 3.74-7.69-.07-.07-7.21-2.8-7.27-11.02-.07-6.88 5.6-10.15 5.86-10.35-3.21-4.73-8.22-5.26-9.95-5.39" }),
|
|
18
|
+
/* @__PURE__ */ e("path", { d: "M71.62 22.42c9.71 0 16.47 6.69 16.47 16.43 0 9.78-6.9 16.5-16.71 16.5H60.62v17.08H52.86V22.42h18.76zM60.62 48.83h8.91c6.76 0 10.61-3.64 10.61-9.95 0-6.31-3.85-9.92-10.58-9.92h-8.94v19.87zM90.11 62.05c0-6.38 4.89-10.3 13.56-10.79l9.99-.59v-2.81c0-4.06-2.74-6.49-7.32-6.49-4.34 0-7.05 2.08-7.71 5.34h-7.08c.42-6.59 6.03-11.45 15.06-11.45 8.86 0 14.51 4.69 14.51 12.01v25.16h-7.18v-6.01h-.17c-2.11 4.06-6.73 6.62-11.52 6.62-7.15 0-12.15-4.44-12.15-11.01zm23.55-3.29v-2.88l-8.99.56c-4.48.31-7.01 2.29-7.01 5.41 0 3.19 2.64 5.27 6.66 5.27 5.24 0 9.34-3.61 9.34-8.36zM124.95 85.78v-6.07c.55.14 1.79.14 2.42.14 3.47 0 5.34-1.46 6.49-5.2 0-.07.66-2.22.66-2.25l-13.18-36.52h8.11l9.23 29.69h.14l9.23-29.69h7.9l-13.66 38.39c-3.12 8.85-6.73 11.69-14.29 11.69-.63 0-2.5-.07-3.05-.21z" })
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
function j({ className: a }) {
|
|
24
|
+
return /* @__PURE__ */ s(
|
|
25
|
+
"svg",
|
|
26
|
+
{
|
|
27
|
+
"aria-hidden": "true",
|
|
28
|
+
role: "img",
|
|
29
|
+
viewBox: "1 7 101 36",
|
|
30
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
31
|
+
className: a,
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ s("g", { transform: "translate(2 8)", children: [
|
|
34
|
+
/* @__PURE__ */ e(
|
|
35
|
+
"path",
|
|
36
|
+
{
|
|
37
|
+
fill: "#4285F4",
|
|
38
|
+
d: "M31.5 16.5c0-1.16-.1-2.27-.3-3.34H16.07v6.33h8.65a7.4 7.4 0 0 1-3.21 4.85v4.03h5.19c3.04-2.8 4.8-6.92 4.8-11.87z"
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ e(
|
|
42
|
+
"path",
|
|
43
|
+
{
|
|
44
|
+
fill: "#34A853",
|
|
45
|
+
d: "M16.07 32c4.34 0 7.99-1.44 10.65-3.89l-5.19-4.03c-1.44.97-3.29 1.54-5.46 1.54-4.2 0-7.76-2.84-9.03-6.65H1.67v4.17C4.32 28.4 9.71 32 16.07 32z"
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ e(
|
|
49
|
+
"path",
|
|
50
|
+
{
|
|
51
|
+
fill: "#FBBC04",
|
|
52
|
+
d: "M7.04 18.97A9.6 9.6 0 0 1 6.53 16c0-1.03.18-2.03.51-2.97V8.86H1.67A15.96 15.96 0 0 0 0 16c0 2.58.62 5.02 1.67 7.14l5.37-4.17z"
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ e(
|
|
56
|
+
"path",
|
|
57
|
+
{
|
|
58
|
+
fill: "#EA4335",
|
|
59
|
+
d: "M16.07 6.39c2.37 0 4.5.81 6.17 2.41l4.62-4.62C24.05 1.6 20.41 0 16.07 0 9.71 0 4.32 3.6 1.67 8.86l5.37 4.17c1.27-3.81 4.83-6.64 9.03-6.64z"
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] }),
|
|
63
|
+
/* @__PURE__ */ s("g", { fill: "currentColor", transform: "translate(44 8)", children: [
|
|
64
|
+
/* @__PURE__ */ e("path", { d: "M11.9 17.06v9.94H8.75V2.52h8.36c2.12 0 3.93.71 5.41 2.12 1.51 1.42 2.27 3.14 2.27 5.18 0 2.09-.76 3.82-2.27 5.21-1.46 1.39-3.27 2.07-5.41 2.07H11.9v-.06zm0-11.53v8.55h5.28c1.25 0 2.29-.42 3.12-1.26.84-.84 1.26-1.86 1.26-3.01 0-1.12-.42-2.13-1.26-2.97-.83-.87-1.87-1.31-3.12-1.31H11.9z" }),
|
|
65
|
+
/* @__PURE__ */ e("path", { d: "M32.43 9.72c2.33 0 4.16.62 5.51 1.87 1.35 1.25 2.02 2.96 2.02 5.12V27h-3.01v-2.33h-.14c-1.3 1.92-3.05 2.88-5.23 2.88-1.85 0-3.41-.55-4.65-1.65-1.25-1.1-1.87-2.46-1.87-4.11 0-1.74.66-3.11 1.97-4.13 1.31-1.02 3.07-1.54 5.26-1.54 1.87 0 3.41.34 4.62 1.03v-.72c0-1.1-.43-2.02-1.29-2.79-.86-.77-1.87-1.15-3.02-1.15-1.74 0-3.11.72-4.11 2.18l-2.78-1.75c1.5-2.16 3.72-3.24 6.64-3.24zm-4.07 12.21c0 .82.35 1.5 1.04 2.04.69.55 1.5.81 2.43.81 1.31 0 2.48-.49 3.51-1.46 1.02-.97 1.54-2.12 1.54-3.43-.98-.77-2.34-1.16-4.09-1.16-1.28 0-2.34.31-3.2.92-.85.62-1.27 1.39-1.27 2.28z" }),
|
|
66
|
+
/* @__PURE__ */ e("path", { d: "M57.16 10.27L46.62 34.5h-3.25l3.91-8.47-6.93-15.76h3.43l5 12.06h.07l4.87-12.06z" })
|
|
67
|
+
] })
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
const W = {
|
|
73
|
+
"apple-pay": "applePay",
|
|
74
|
+
"google-pay": "googlePay"
|
|
75
|
+
}, C = S(
|
|
76
|
+
[
|
|
77
|
+
// `ds:relative` anchors the `::before` pseudo touch-target used by
|
|
78
|
+
// the `sm` size below the `sm:` breakpoint.
|
|
79
|
+
"ds:relative ds:inline-flex ds:items-center ds:justify-center",
|
|
80
|
+
"ds:font-medium ds:whitespace-nowrap ds:select-none",
|
|
81
|
+
"ds:rounded-[var(--radius-md)]",
|
|
82
|
+
"ds:gap-[var(--spacing-xs)]",
|
|
83
|
+
"ds:transition-[background-color,box-shadow,opacity]",
|
|
84
|
+
"ds:duration-[var(--animation-duration)]",
|
|
85
|
+
"ds:active:opacity-90",
|
|
86
|
+
// Focus ring is `var(--ring)` at `--focus-ring-width` / offset —
|
|
87
|
+
// deliberately NOT the brand surface colour. A black ring on the
|
|
88
|
+
// black surface, or an invisible ring on the white surface, fails
|
|
89
|
+
// 2.4.7. The token widens 2→3px automatically in the accessible
|
|
90
|
+
// theme. Same reasoning WhatsAppButton documents.
|
|
91
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
92
|
+
"ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
93
|
+
// Under Windows High Contrast Mode the brand bg + border are
|
|
94
|
+
// stripped; repaint a solid ButtonBorder edge and swap the focus
|
|
95
|
+
// ring to CanvasText so the affordance stays identifiable.
|
|
96
|
+
"ds:forced-colors:border ds:forced-colors:border-[ButtonBorder]",
|
|
97
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
98
|
+
"ds:disabled:opacity-50 ds:disabled:cursor-not-allowed",
|
|
99
|
+
"ds:motion-reduce:transition-none"
|
|
100
|
+
].join(" "),
|
|
101
|
+
{
|
|
102
|
+
variants: {
|
|
103
|
+
provider: {
|
|
104
|
+
"apple-pay": "",
|
|
105
|
+
"google-pay": ""
|
|
106
|
+
},
|
|
107
|
+
buttonStyle: {
|
|
108
|
+
black: "",
|
|
109
|
+
white: "",
|
|
110
|
+
"white-outline": ""
|
|
111
|
+
},
|
|
112
|
+
size: {
|
|
113
|
+
// Size axis sizes the brand mark via a DIRECT-CHILD selector
|
|
114
|
+
// (`[&>svg]`) — the mark is a direct `<svg>` child of the button,
|
|
115
|
+
// whereas the loading Spinner's `<svg>` is nested inside its
|
|
116
|
+
// `role=status` span. A descendant `[&_svg]` would reach into the
|
|
117
|
+
// Spinner and override its own `size-full`, forcing a 20/24px svg
|
|
118
|
+
// inside a 16/20px span (clipped). `[&>svg]` sizes only the mark.
|
|
119
|
+
sm: [
|
|
120
|
+
"ds:h-8 ds:ps-3 ds:pe-3 ds:text-[length:var(--font-size-sm)]",
|
|
121
|
+
"ds:[&>svg]:h-4 ds:[&>svg]:w-auto",
|
|
122
|
+
// Expand the hit-target to `--min-target-size` below the
|
|
123
|
+
// `sm:` breakpoint via a `::before` overlay, identical to
|
|
124
|
+
// Button / WhatsAppButton. The visual box stays 32px; touch
|
|
125
|
+
// stays ≥44/48px on mobile.
|
|
126
|
+
"ds:min-h-[var(--min-target-size)] ds:sm:min-h-0",
|
|
127
|
+
'ds:before:absolute ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[""] ds:sm:before:hidden'
|
|
128
|
+
].join(" "),
|
|
129
|
+
// `md` is the DEFAULT size. Its visual box is 40px (h-10), which is
|
|
130
|
+
// below the 44/48px `--min-target-size`, so it carries the same
|
|
131
|
+
// `::before` hit-target expansion as `sm` to reliably meet WCAG
|
|
132
|
+
// 2.5.5 (44×44) / 2.5.8 (48×48 accessible) on touch viewports. The
|
|
133
|
+
// visual box stays 40px; the touch target lifts to the token below
|
|
134
|
+
// the `sm:` breakpoint.
|
|
135
|
+
md: [
|
|
136
|
+
"ds:h-10 ds:ps-4 ds:pe-4 ds:text-[length:var(--font-size-base)]",
|
|
137
|
+
"ds:[&>svg]:h-5 ds:[&>svg]:w-auto",
|
|
138
|
+
"ds:min-h-[var(--min-target-size)] ds:sm:min-h-0",
|
|
139
|
+
'ds:before:absolute ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[""] ds:sm:before:hidden'
|
|
140
|
+
].join(" "),
|
|
141
|
+
lg: "ds:h-12 ds:ps-5 ds:pe-5 ds:text-[length:var(--font-size-lg)] ds:[&>svg]:h-6 ds:[&>svg]:w-auto"
|
|
142
|
+
},
|
|
143
|
+
fullWidth: {
|
|
144
|
+
true: "ds:flex ds:w-full",
|
|
145
|
+
false: ""
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
compoundVariants: [
|
|
149
|
+
/* ----- Apple Pay surfaces ----- */
|
|
150
|
+
{
|
|
151
|
+
provider: "apple-pay",
|
|
152
|
+
buttonStyle: "black",
|
|
153
|
+
class: "ds:bg-[var(--brand-applepay-black)] ds:text-[var(--brand-applepay-black-foreground)] ds:hover:bg-[var(--brand-applepay-black-hover)]"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
provider: "apple-pay",
|
|
157
|
+
buttonStyle: "white",
|
|
158
|
+
class: "ds:bg-[var(--brand-applepay-white)] ds:text-[var(--brand-applepay-white-foreground)] ds:hover:bg-[var(--brand-applepay-white-hover)]"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
provider: "apple-pay",
|
|
162
|
+
buttonStyle: "white-outline",
|
|
163
|
+
class: "ds:bg-[var(--brand-applepay-white)] ds:text-[var(--brand-applepay-white-foreground)] ds:hover:bg-[var(--brand-applepay-white-hover)] ds:border ds:border-[var(--brand-applepay-white-border)]"
|
|
164
|
+
},
|
|
165
|
+
/* ----- Google Pay surfaces (no outline type — see fallback) ----- */
|
|
166
|
+
{
|
|
167
|
+
provider: "google-pay",
|
|
168
|
+
buttonStyle: "black",
|
|
169
|
+
class: "ds:bg-[var(--brand-googlepay-black)] ds:text-[var(--brand-googlepay-black-foreground)] ds:hover:bg-[var(--brand-googlepay-black-hover)]"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
provider: "google-pay",
|
|
173
|
+
buttonStyle: "white",
|
|
174
|
+
class: "ds:bg-[var(--brand-googlepay-white)] ds:text-[var(--brand-googlepay-white-foreground)] ds:hover:bg-[var(--brand-googlepay-white-hover)] ds:border ds:border-[var(--brand-googlepay-white-border)]"
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
defaultVariants: {
|
|
178
|
+
buttonStyle: "black",
|
|
179
|
+
size: "md",
|
|
180
|
+
fullWidth: !1
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
function N({ provider: a }) {
|
|
185
|
+
return a === "apple-pay" ? /* @__PURE__ */ e(V, {}) : /* @__PURE__ */ e(j, {});
|
|
186
|
+
}
|
|
187
|
+
const R = B(
|
|
188
|
+
({
|
|
189
|
+
provider: a,
|
|
190
|
+
buttonStyle: l = "black",
|
|
191
|
+
labelType: n = "pay",
|
|
192
|
+
size: i = "md",
|
|
193
|
+
fullWidth: b = !1,
|
|
194
|
+
onActivate: r,
|
|
195
|
+
loading: t = !1,
|
|
196
|
+
disabled: p = !1,
|
|
197
|
+
label: c,
|
|
198
|
+
type: g = "button",
|
|
199
|
+
className: u,
|
|
200
|
+
onClick: o,
|
|
201
|
+
...f
|
|
202
|
+
}, y) => {
|
|
203
|
+
const { t: m } = H();
|
|
204
|
+
let d = l;
|
|
205
|
+
a === "google-pay" && l === "white-outline" && (d = "white");
|
|
206
|
+
const w = W[a], h = c ?? m(`walletPayButton.${w}.${n}`), z = n === "plain" && c == null, x = !t && !p, M = (v) => {
|
|
207
|
+
o == null || o(v), x && (r == null || r(v));
|
|
208
|
+
}, k = [
|
|
209
|
+
C({
|
|
210
|
+
provider: a,
|
|
211
|
+
buttonStyle: d,
|
|
212
|
+
size: i,
|
|
213
|
+
fullWidth: b
|
|
214
|
+
}),
|
|
215
|
+
u
|
|
216
|
+
].filter(Boolean).join(" ");
|
|
217
|
+
return /* @__PURE__ */ s(
|
|
218
|
+
"button",
|
|
219
|
+
{
|
|
220
|
+
ref: y,
|
|
221
|
+
type: g,
|
|
222
|
+
disabled: p || t,
|
|
223
|
+
"aria-busy": t || void 0,
|
|
224
|
+
"data-component": "wallet-pay-button",
|
|
225
|
+
"data-provider": a,
|
|
226
|
+
"data-button-style": d,
|
|
227
|
+
className: k,
|
|
228
|
+
onClick: M,
|
|
229
|
+
...f,
|
|
230
|
+
children: [
|
|
231
|
+
t ? /* @__PURE__ */ e(P, { size: i ?? "md", variant: "pulse" }) : /* @__PURE__ */ e(N, { provider: a }),
|
|
232
|
+
z ? /* @__PURE__ */ e("span", { className: "ds:sr-only", children: h }) : (
|
|
233
|
+
// `<bdi>` isolates the label from the surrounding bidi context so
|
|
234
|
+
// the Latin brand wordmark ("Apple Pay" / "Google Pay") embedded
|
|
235
|
+
// in an RTL verb phrase keeps its own direction — matching the
|
|
236
|
+
// i18n note. Trailing-Latin placement already renders correctly
|
|
237
|
+
// under the UBA today; the isolation also keeps a future
|
|
238
|
+
// mid-phrase wordmark from reordering.
|
|
239
|
+
/* @__PURE__ */ e("bdi", { children: h })
|
|
240
|
+
)
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
R.displayName = "WalletPayButton";
|
|
247
|
+
export {
|
|
248
|
+
R as W
|
|
249
|
+
};
|
|
250
|
+
//# sourceMappingURL=wallet-pay-button-DK4ESYge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet-pay-button-DK4ESYge.js","sources":["../../src/brand/provider-marks/apple-pay.tsx","../../src/brand/provider-marks/google-pay.tsx","../../src/components/wallet-pay-button/wallet-pay-button.tsx"],"sourcesContent":["/* ------------------------------------------------------------------ */\n/* Apple Pay brand mark. */\n/* */\n/* Lives under `src/brand/**` — one of the two zones (with */\n/* `src/tokens/**`) where literal hex / brand SVG paths are sanctioned */\n/* by constraint #2. Apple's Marketing Guidelines mandate the official */\n/* Apple-logo-plus-\"Pay\" lockup and forbid recolouring it to a kit */\n/* accent. The mark is MONOCHROME: it paints in `currentColor` so the */\n/* WalletPayButton's brand-locked foreground token (white on the black */\n/* surface, near-black on the white / white-outline surface) drives it */\n/* from a single CVA class — exactly how the WhatsApp glyph inherits */\n/* `--brand-whatsapp-foreground`. Do NOT tint this with a kit colour. */\n/* */\n/* The viewBox keeps the official aspect ratio so the lockup never */\n/* distorts; the consuming button scales it via `[&_svg]:h-*` height */\n/* classes and `width:auto` so the proportion is preserved at every */\n/* size step. */\n/* ------------------------------------------------------------------ */\n\nimport type { ReactNode } from 'react';\n\nexport interface BrandMarkProps {\n /** Extra classes from the consuming button's CVA size axis. */\n className?: string;\n}\n\n/**\n * Apple Pay lockup (Apple logo + \"Pay\"). Decorative — the parent button\n * carries `aria-hidden` semantics by wrapping it next to the visible /\n * sr-only accessible name, so this SVG is marked `aria-hidden=\"true\"`.\n */\nexport function ApplePayMark({ className }: BrandMarkProps): ReactNode {\n return (\n <svg\n aria-hidden=\"true\"\n role=\"img\"\n viewBox=\"-1 18 158 69\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n >\n {/* Apple logo glyph */}\n <path d=\"M30.07 27.69c-1.93 2.28-5.01 4.08-8.09 3.82-.39-3.08.92-6.34 2.68-8.36 1.93-2.34 5.31-4.01 8.04-4.14.33 3.21-.92 6.34-2.63 8.68m2.6 4.13c-4.47-.26-8.29 2.54-10.41 2.54-2.15 0-5.4-2.41-8.94-2.34-4.6.07-8.88 2.67-11.23 6.82-4.83 8.29-1.26 20.57 3.41 27.32 2.28 3.34 5.01 7.01 8.62 6.88 3.41-.13 4.75-2.21 8.88-2.21 4.16 0 5.34 2.21 8.94 2.15 3.74-.07 6.08-3.34 8.36-6.68 2.6-3.8 3.67-7.5 3.74-7.69-.07-.07-7.21-2.8-7.27-11.02-.07-6.88 5.6-10.15 5.86-10.35-3.21-4.73-8.22-5.26-9.95-5.39\" />\n {/* \"Pay\" wordmark */}\n <path d=\"M71.62 22.42c9.71 0 16.47 6.69 16.47 16.43 0 9.78-6.9 16.5-16.71 16.5H60.62v17.08H52.86V22.42h18.76zM60.62 48.83h8.91c6.76 0 10.61-3.64 10.61-9.95 0-6.31-3.85-9.92-10.58-9.92h-8.94v19.87zM90.11 62.05c0-6.38 4.89-10.3 13.56-10.79l9.99-.59v-2.81c0-4.06-2.74-6.49-7.32-6.49-4.34 0-7.05 2.08-7.71 5.34h-7.08c.42-6.59 6.03-11.45 15.06-11.45 8.86 0 14.51 4.69 14.51 12.01v25.16h-7.18v-6.01h-.17c-2.11 4.06-6.73 6.62-11.52 6.62-7.15 0-12.15-4.44-12.15-11.01zm23.55-3.29v-2.88l-8.99.56c-4.48.31-7.01 2.29-7.01 5.41 0 3.19 2.64 5.27 6.66 5.27 5.24 0 9.34-3.61 9.34-8.36zM124.95 85.78v-6.07c.55.14 1.79.14 2.42.14 3.47 0 5.34-1.46 6.49-5.2 0-.07.66-2.22.66-2.25l-13.18-36.52h8.11l9.23 29.69h.14l9.23-29.69h7.9l-13.66 38.39c-3.12 8.85-6.73 11.69-14.29 11.69-.63 0-2.5-.07-3.05-.21z\" />\n </svg>\n );\n}\n","/* ------------------------------------------------------------------ */\n/* Google Pay brand mark. */\n/* */\n/* Lives under `src/brand/**` — the sanctioned zone (constraint #2) for */\n/* literal brand hex. Google's Pay Brand Guidelines mandate the */\n/* full-colour \"G Pay\" lockup: the four-colour Google \"G\" plus the */\n/* \"Pay\" wordmark. CRITICAL: unlike the Apple Pay mark (which is */\n/* monochrome `currentColor`), the four-colour Google \"G\" must STAY */\n/* FULL-COLOUR even on the white button — the four brand hues are fixed */\n/* and may not be recoloured to a kit token. Hence the literal fills */\n/* below; they are brand constants, not theme tokens. */\n/* */\n/* The \"Pay\" wordmark is the only part that flips with the surface: it */\n/* inherits `currentColor` (driven by the brand foreground token) so it */\n/* reads dark on the white surface and white on the black surface, */\n/* exactly as Google's dark/light button variants specify. The \"G\" is */\n/* never recoloured. */\n/* ------------------------------------------------------------------ */\n\nimport type { ReactNode } from 'react';\nimport type { BrandMarkProps } from './apple-pay';\n\n/**\n * Google Pay lockup (four-colour Google \"G\" + \"Pay\" wordmark). The \"G\"\n * keeps Google's mandated four brand hues at all times; the \"Pay\"\n * wordmark inherits `currentColor` so it reads against either the black\n * or the white surface (brand foreground token). Decorative —\n * `aria-hidden=\"true\"`; the accessible name comes from the parent\n * button.\n */\nexport function GooglePayMark({ className }: BrandMarkProps): ReactNode {\n return (\n <svg\n aria-hidden=\"true\"\n role=\"img\"\n viewBox=\"1 7 101 36\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n >\n {/* Four-colour Google \"G\" — fixed brand hues, never recoloured. */}\n <g transform=\"translate(2 8)\">\n <path\n fill=\"#4285F4\"\n d=\"M31.5 16.5c0-1.16-.1-2.27-.3-3.34H16.07v6.33h8.65a7.4 7.4 0 0 1-3.21 4.85v4.03h5.19c3.04-2.8 4.8-6.92 4.8-11.87z\"\n />\n <path\n fill=\"#34A853\"\n d=\"M16.07 32c4.34 0 7.99-1.44 10.65-3.89l-5.19-4.03c-1.44.97-3.29 1.54-5.46 1.54-4.2 0-7.76-2.84-9.03-6.65H1.67v4.17C4.32 28.4 9.71 32 16.07 32z\"\n />\n <path\n fill=\"#FBBC04\"\n d=\"M7.04 18.97A9.6 9.6 0 0 1 6.53 16c0-1.03.18-2.03.51-2.97V8.86H1.67A15.96 15.96 0 0 0 0 16c0 2.58.62 5.02 1.67 7.14l5.37-4.17z\"\n />\n <path\n fill=\"#EA4335\"\n d=\"M16.07 6.39c2.37 0 4.5.81 6.17 2.41l4.62-4.62C24.05 1.6 20.41 0 16.07 0 9.71 0 4.32 3.6 1.67 8.86l5.37 4.17c1.27-3.81 4.83-6.64 9.03-6.64z\"\n />\n </g>\n {/* \"Pay\" wordmark — flips with the surface via currentColor. */}\n <g fill=\"currentColor\" transform=\"translate(44 8)\">\n <path d=\"M11.9 17.06v9.94H8.75V2.52h8.36c2.12 0 3.93.71 5.41 2.12 1.51 1.42 2.27 3.14 2.27 5.18 0 2.09-.76 3.82-2.27 5.21-1.46 1.39-3.27 2.07-5.41 2.07H11.9v-.06zm0-11.53v8.55h5.28c1.25 0 2.29-.42 3.12-1.26.84-.84 1.26-1.86 1.26-3.01 0-1.12-.42-2.13-1.26-2.97-.83-.87-1.87-1.31-3.12-1.31H11.9z\" />\n <path d=\"M32.43 9.72c2.33 0 4.16.62 5.51 1.87 1.35 1.25 2.02 2.96 2.02 5.12V27h-3.01v-2.33h-.14c-1.3 1.92-3.05 2.88-5.23 2.88-1.85 0-3.41-.55-4.65-1.65-1.25-1.1-1.87-2.46-1.87-4.11 0-1.74.66-3.11 1.97-4.13 1.31-1.02 3.07-1.54 5.26-1.54 1.87 0 3.41.34 4.62 1.03v-.72c0-1.1-.43-2.02-1.29-2.79-.86-.77-1.87-1.15-3.02-1.15-1.74 0-3.11.72-4.11 2.18l-2.78-1.75c1.5-2.16 3.72-3.24 6.64-3.24zm-4.07 12.21c0 .82.35 1.5 1.04 2.04.69.55 1.5.81 2.43.81 1.31 0 2.48-.49 3.51-1.46 1.02-.97 1.54-2.12 1.54-3.43-.98-.77-2.34-1.16-4.09-1.16-1.28 0-2.34.31-3.2.92-.85.62-1.27 1.39-1.27 2.28z\" />\n <path d=\"M57.16 10.27L46.62 34.5h-3.25l3.91-8.47-6.93-15.76h3.43l5 12.06h.07l4.87-12.06z\" />\n </g>\n </svg>\n );\n}\n","/* ------------------------------------------------------------------ */\n/* WalletPayButton — brand-locked express-payment button. */\n/* */\n/* Renders the official Apple Pay or Google Pay mark on the brand- */\n/* mandated surface (black / white / white-outline) and fires */\n/* `onActivate` on click / Enter / Space. It is PRESENTATIONAL ONLY: */\n/* the branded surface + the trigger. The consumer's `onActivate` */\n/* handler opens the native wallet sheet (Payment Request API / Apple */\n/* Pay JS / Google Pay API) — this component never calls a payment API, */\n/* never holds a publishable key, never knows the amount, and never */\n/* drives the downstream fiscal-receipt / Sistema TS step. Same posture */\n/* as WhatsAppButton (a branded CTA) and SignInWithAlfadocsButton (a */\n/* branded provider button). */\n/* */\n/* BRAND EXCEPTION: Apple's Marketing Guidelines and Google's Pay Brand */\n/* Guidelines mandate exact button surfaces and forbid recolouring the */\n/* marks. The surfaces therefore live as component-private brand tokens */\n/* (`--brand-applepay-*` / `--brand-googlepay-*`, precedent */\n/* `--brand-whatsapp-*`) that do NOT shift in the accessible theme — */\n/* the accessible theme only widens the focus ring and raises the */\n/* target size, which is compliant. The marks are designed to meet */\n/* contrast against their own mandated surfaces, so the axe */\n/* `color-contrast` rule (and only that rule) is waived at story/meta */\n/* level with a rationale, exactly as whatsapp-button / payment-form */\n/* do. Do not reuse these tokens outside this component. */\n/* */\n/* A NATIVE <button> is used (not a Button wrapper, which carries kit */\n/* intent colours, and not an <a> like WhatsAppButton — this opens an */\n/* in-page sheet, not a navigation). The native element gives free */\n/* Enter / Space activation, disabled semantics and the focusable */\n/* accessible-name contract with zero ARIA authoring. */\n/* ------------------------------------------------------------------ */\n\nimport {\n forwardRef,\n type ButtonHTMLAttributes,\n type MouseEvent,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Spinner } from '../spinner';\nimport { ApplePayMark } from '../../brand/provider-marks/apple-pay';\nimport { GooglePayMark } from '../../brand/provider-marks/google-pay';\n\n/* ------------------------------------------------------------------ */\n/* Constants */\n/* ------------------------------------------------------------------ */\n\ntype Provider = 'apple-pay' | 'google-pay';\ntype ButtonStyle = 'black' | 'white' | 'white-outline';\ntype LabelType = 'buy' | 'pay' | 'checkout' | 'book' | 'plain';\n\n/** i18n root segment per provider — drives the bare t() key. */\nconst PROVIDER_I18N_ROOT: Record<Provider, 'applePay' | 'googlePay'> = {\n 'apple-pay': 'applePay',\n 'google-pay': 'googlePay',\n};\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst rootVariants = cva(\n [\n // `ds:relative` anchors the `::before` pseudo touch-target used by\n // the `sm` size below the `sm:` breakpoint.\n 'ds:relative ds:inline-flex ds:items-center ds:justify-center',\n 'ds:font-medium ds:whitespace-nowrap ds:select-none',\n 'ds:rounded-[var(--radius-md)]',\n 'ds:gap-[var(--spacing-xs)]',\n 'ds:transition-[background-color,box-shadow,opacity]',\n 'ds:duration-[var(--animation-duration)]',\n 'ds:active:opacity-90',\n // Focus ring is `var(--ring)` at `--focus-ring-width` / offset —\n // deliberately NOT the brand surface colour. A black ring on the\n // black surface, or an invisible ring on the white surface, fails\n // 2.4.7. The token widens 2→3px automatically in the accessible\n // theme. Same reasoning WhatsAppButton documents.\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n // Under Windows High Contrast Mode the brand bg + border are\n // stripped; repaint a solid ButtonBorder edge and swap the focus\n // ring to CanvasText so the affordance stays identifiable.\n 'ds:forced-colors:border ds:forced-colors:border-[ButtonBorder]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n 'ds:disabled:opacity-50 ds:disabled:cursor-not-allowed',\n 'ds:motion-reduce:transition-none',\n ].join(' '),\n {\n variants: {\n provider: {\n 'apple-pay': '',\n 'google-pay': '',\n },\n buttonStyle: {\n black: '',\n white: '',\n 'white-outline': '',\n },\n size: {\n // Size axis sizes the brand mark via a DIRECT-CHILD selector\n // (`[&>svg]`) — the mark is a direct `<svg>` child of the button,\n // whereas the loading Spinner's `<svg>` is nested inside its\n // `role=status` span. A descendant `[&_svg]` would reach into the\n // Spinner and override its own `size-full`, forcing a 20/24px svg\n // inside a 16/20px span (clipped). `[&>svg]` sizes only the mark.\n sm: [\n 'ds:h-8 ds:ps-3 ds:pe-3 ds:text-[length:var(--font-size-sm)]',\n 'ds:[&>svg]:h-4 ds:[&>svg]:w-auto',\n // Expand the hit-target to `--min-target-size` below the\n // `sm:` breakpoint via a `::before` overlay, identical to\n // Button / WhatsAppButton. The visual box stays 32px; touch\n // stays ≥44/48px on mobile.\n 'ds:min-h-[var(--min-target-size)] ds:sm:min-h-0',\n 'ds:before:absolute ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[\"\"] ds:sm:before:hidden',\n ].join(' '),\n // `md` is the DEFAULT size. Its visual box is 40px (h-10), which is\n // below the 44/48px `--min-target-size`, so it carries the same\n // `::before` hit-target expansion as `sm` to reliably meet WCAG\n // 2.5.5 (44×44) / 2.5.8 (48×48 accessible) on touch viewports. The\n // visual box stays 40px; the touch target lifts to the token below\n // the `sm:` breakpoint.\n md: [\n 'ds:h-10 ds:ps-4 ds:pe-4 ds:text-[length:var(--font-size-base)]',\n 'ds:[&>svg]:h-5 ds:[&>svg]:w-auto',\n 'ds:min-h-[var(--min-target-size)] ds:sm:min-h-0',\n 'ds:before:absolute ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[\"\"] ds:sm:before:hidden',\n ].join(' '),\n lg: 'ds:h-12 ds:ps-5 ds:pe-5 ds:text-[length:var(--font-size-lg)] ds:[&>svg]:h-6 ds:[&>svg]:w-auto',\n },\n fullWidth: {\n true: 'ds:flex ds:w-full',\n false: '',\n },\n },\n compoundVariants: [\n /* ----- Apple Pay surfaces ----- */\n {\n provider: 'apple-pay',\n buttonStyle: 'black',\n class:\n 'ds:bg-[var(--brand-applepay-black)] ds:text-[var(--brand-applepay-black-foreground)] ds:hover:bg-[var(--brand-applepay-black-hover)]',\n },\n {\n provider: 'apple-pay',\n buttonStyle: 'white',\n class:\n 'ds:bg-[var(--brand-applepay-white)] ds:text-[var(--brand-applepay-white-foreground)] ds:hover:bg-[var(--brand-applepay-white-hover)]',\n },\n {\n provider: 'apple-pay',\n buttonStyle: 'white-outline',\n class:\n 'ds:bg-[var(--brand-applepay-white)] ds:text-[var(--brand-applepay-white-foreground)] ds:hover:bg-[var(--brand-applepay-white-hover)] ds:border ds:border-[var(--brand-applepay-white-border)]',\n },\n /* ----- Google Pay surfaces (no outline type — see fallback) ----- */\n {\n provider: 'google-pay',\n buttonStyle: 'black',\n class:\n 'ds:bg-[var(--brand-googlepay-black)] ds:text-[var(--brand-googlepay-black-foreground)] ds:hover:bg-[var(--brand-googlepay-black-hover)]',\n },\n {\n provider: 'google-pay',\n buttonStyle: 'white',\n class:\n 'ds:bg-[var(--brand-googlepay-white)] ds:text-[var(--brand-googlepay-white-foreground)] ds:hover:bg-[var(--brand-googlepay-white-hover)] ds:border ds:border-[var(--brand-googlepay-white-border)]',\n },\n ],\n defaultVariants: {\n buttonStyle: 'black',\n size: 'md',\n fullWidth: false,\n },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Mark resolver */\n/* ------------------------------------------------------------------ */\n\nfunction WalletMark({ provider }: { provider: Provider }): ReactNode {\n return provider === 'apple-pay' ? <ApplePayMark /> : <GooglePayMark />;\n}\n\n/* ------------------------------------------------------------------ */\n/* Props */\n/* ------------------------------------------------------------------ */\n\nexport interface WalletPayButtonProps\n extends\n Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'type'>,\n Omit<VariantProps<typeof rootVariants>, 'provider'> {\n /**\n * Which wallet the button represents. Drives the inline brand mark,\n * the default label key, the brand-locked surface tokens, and the\n * `data-provider` hook. Required — there is no sensible default\n * wallet.\n */\n provider: Provider;\n /**\n * Brand-mandated button type. Apple Pay supports\n * `black` / `white` / `white-outline`; Google Pay supports\n * `black` / `white` only. Passing `white-outline` with\n * `provider=\"google-pay\"` falls back to `white` and dev-warns —\n * Google's branding has no outline type.\n */\n buttonStyle?: ButtonStyle;\n /**\n * Brand-approved call-to-action phrasing. `plain` renders the bare\n * mark (mark-only) with an sr-only accessible name. The verb portion\n * is i18n; the wallet brand name (\"Apple Pay\" / \"Google Pay\") is a\n * non-translated constant.\n */\n labelType?: LabelType;\n /**\n * Fired on click / Enter / Space when not loading and not disabled.\n * Open the native wallet sheet here (Payment Request API). Named\n * `onActivate` rather than `onClick` to signal it triggers a payment\n * flow. A native `onClick` still forwards through `...rest`.\n */\n onActivate?: (event: MouseEvent<HTMLButtonElement>) => void;\n /**\n * Wallet sheet is opening / payment in flight. Swaps the mark for the\n * kit Spinner, sets `aria-busy=\"true\"`, and suppresses activation so\n * the user cannot double-open the sheet.\n */\n loading?: boolean;\n /**\n * Override the resolved accessible / visible label. Defaults to the\n * `provider` + `labelType` i18n string. The brand wordmark constant\n * (\"Apple Pay\" / \"Google Pay\") is never overridable via this prop —\n * pass a fully-translated verb phrase only.\n */\n label?: ReactNode;\n /**\n * Native button type. Defaults to `'button'` so the wallet trigger\n * never implicitly submits an ambient `<form>`.\n */\n type?: 'button' | 'submit' | 'reset';\n}\n\n/* ------------------------------------------------------------------ */\n/* WalletPayButton */\n/* ------------------------------------------------------------------ */\n\nexport const WalletPayButton = forwardRef<\n HTMLButtonElement,\n WalletPayButtonProps\n>(\n (\n {\n provider,\n buttonStyle = 'black',\n labelType = 'pay',\n size = 'md',\n fullWidth = false,\n onActivate,\n loading = false,\n disabled = false,\n label,\n type = 'button',\n className,\n onClick,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n\n // Google Pay has no white-outline type — fall back to white and\n // dev-warn so the consumer fixes the call site. Done once, before\n // the surface CVA resolves, so no outline class is ever applied.\n let resolvedButtonStyle = buttonStyle;\n if (provider === 'google-pay' && buttonStyle === 'white-outline') {\n resolvedButtonStyle = 'white';\n if (\n typeof import.meta !== 'undefined' &&\n typeof import.meta.env !== 'undefined' &&\n import.meta.env.DEV === true\n ) {\n console.warn(\n `[WalletPayButton] buttonStyle=\"white-outline\" is not a Google Pay ` +\n `brand type — falling back to \"white\". Google's branding has no ` +\n `outline button; use \"black\" or \"white\".`,\n );\n }\n }\n\n const providerRoot = PROVIDER_I18N_ROOT[provider];\n // The default label always carries the wallet brand name as part of\n // the i18n string (\"Pay with Apple Pay\"), so SR users hear the\n // wallet name. `label` overrides only the verb phrase.\n const resolvedLabel =\n label ?? t(`walletPayButton.${providerRoot}.${labelType}`);\n\n const isMarkOnly = labelType === 'plain' && label == null;\n const isInteractive = !loading && !disabled;\n\n const handleClick = (event: MouseEvent<HTMLButtonElement>): void => {\n // Forward the native onClick first (analytics, logging) — it sees\n // every click, including suppressed ones, mirroring WhatsAppButton.\n onClick?.(event);\n if (!isInteractive) return;\n onActivate?.(event);\n };\n\n const composedClassName = [\n rootVariants({\n provider,\n buttonStyle: resolvedButtonStyle,\n size,\n fullWidth,\n }),\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <button\n ref={ref}\n type={type}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n data-component=\"wallet-pay-button\"\n data-provider={provider}\n data-button-style={resolvedButtonStyle}\n className={composedClassName}\n onClick={handleClick}\n {...rest}\n >\n {loading ? (\n <Spinner size={size ?? 'md'} variant=\"pulse\" />\n ) : (\n <WalletMark provider={provider} />\n )}\n {/*\n Label rendering:\n - mark-only (`plain`): sr-only accessible name, no visible\n text. The bare mark still resolves a button name.\n - otherwise: visible label. When loading, the label stays\n visible (aria-busy carries the \"in flight\" semantics) so\n the accessible name never collapses to nothing.\n */}\n {isMarkOnly ? (\n <span className=\"ds:sr-only\">{resolvedLabel}</span>\n ) : (\n // `<bdi>` isolates the label from the surrounding bidi context so\n // the Latin brand wordmark (\"Apple Pay\" / \"Google Pay\") embedded\n // in an RTL verb phrase keeps its own direction — matching the\n // i18n note. Trailing-Latin placement already renders correctly\n // under the UBA today; the isolation also keeps a future\n // mid-phrase wordmark from reordering.\n <bdi>{resolvedLabel}</bdi>\n )}\n </button>\n );\n },\n);\n\nWalletPayButton.displayName = 'WalletPayButton';\n"],"names":["ApplePayMark","className","jsxs","jsx","GooglePayMark","PROVIDER_I18N_ROOT","rootVariants","cva","WalletMark","provider","WalletPayButton","forwardRef","buttonStyle","labelType","size","fullWidth","onActivate","loading","disabled","label","type","onClick","rest","ref","t","useTranslation","resolvedButtonStyle","providerRoot","resolvedLabel","isMarkOnly","isInteractive","handleClick","event","composedClassName","Spinner"],"mappings":";;;;;AA+BO,SAASA,EAAa,EAAE,WAAAC,KAAwC;AACrE,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,MACZ,MAAK;AAAA,MACL,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,OAAM;AAAA,MACN,WAAAD;AAAA,MAGA,UAAA;AAAA,QAAA,gBAAAE,EAAC,Q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D;AAAA,QACtB,aAAWA,KAAW;AAAA,QACtB,kBAAe;AAAA,QACf,iBAAeR;AAAA,QACf,qBAAmBiB;AAAA,QACnB,WAAWO;AAAA,QACX,SAASF;AAAA,QACR,GAAGT;AAAA,QAEH,UAAA;AAAA,UAAAL,IACC,gBAAAd,EAAC+B,GAAA,EAAQ,MAAMpB,KAAQ,MAAM,SAAQ,QAAA,CAAQ,IAE7C,gBAAAX,EAACK,GAAA,EAAW,UAAAC,GAAoB;AAAA,UAUjCoB,sBACE,QAAA,EAAK,WAAU,cAAc,UAAAD,GAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAQ5C,gBAAAzB,EAAC,SAAK,UAAAyB,GAAc;AAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAI5B;AACF;AAEAlB,EAAgB,cAAc;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as s, q as i, r as o, v as m } from "./react-day-picker-
|
|
2
|
-
import { i as u } from "./isSameWeek-
|
|
1
|
+
import { o as s, q as i, r as o, v as m } from "./react-day-picker-CdtIiKjx.js";
|
|
2
|
+
import { i as u } from "./isSameWeek-Bim5ftRd.js";
|
|
3
3
|
const c = {
|
|
4
4
|
lessThanXSeconds: {
|
|
5
5
|
one: "不到 1 秒",
|
|
@@ -385,4 +385,4 @@ const b = {
|
|
|
385
385
|
export {
|
|
386
386
|
Q as zhCN
|
|
387
387
|
};
|
|
388
|
-
//# sourceMappingURL=zh-CN-
|
|
388
|
+
//# sourceMappingURL=zh-CN-eXB-PFu4.js.map
|