@alfadocs/ui-kit 0.41.2 → 0.43.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/address-autocomplete-CSjMrBvu.js +358 -0
- package/dist/_chunks/{alia-sidebar-DXsYPinm.js → alia-sidebar-BpX4z_af.js} +2 -2
- package/dist/_chunks/{ar-Cn_NxqkN.js → ar-DEz65ZJW.js} +2 -2
- package/dist/_chunks/bmi-calculator-DuVSFDuw.js +259 -0
- package/dist/_chunks/{booking-4mCw3Mpl.js → booking-CtLwaxkK.js} +4 -4
- package/dist/_chunks/{breadcrumb-CLlhx7qo.js → breadcrumb-OTbaY70e.js} +4 -4
- package/dist/_chunks/{calculator-dialog-B74fqpFZ.js → calculator-dialog-DdexHrTP.js} +2 -2
- package/dist/_chunks/{chart-Cbt0_sKv.js → chart-Cg3e9EH9.js} +101 -99
- package/dist/_chunks/cycle-calculator-Dln-y1k_.js +192 -0
- package/dist/_chunks/{date-picker-CvQfs6Xh.js → date-picker-Bq7xhMA-.js} +109 -108
- package/dist/_chunks/date-picker-variants-DLi1Va_e.js +3238 -0
- package/dist/_chunks/{date-range-picker-U9fn1g9d.js → date-range-picker-DcXuI9y7.js} +20 -19
- package/dist/_chunks/{date-time-picker-Cva0ZCWw.js → date-time-picker-RimumeLR.js} +18 -17
- package/dist/_chunks/{de-BMM2H7Bs.js → de-bTBGdjPS.js} +2 -2
- package/dist/_chunks/{dialog-Cee13rHU.js → dialog-DOYgd75U.js} +46 -37
- package/dist/_chunks/{document-scanner-CqS_klIr.js → document-scanner-BqLsGs4Y.js} +7 -7
- package/dist/_chunks/{dropdown-menu-BC5ZdOMo.js → dropdown-menu-CUEXqKis.js} +2 -2
- package/dist/_chunks/{due-date-calculator-CUspKSTw.js → due-date-calculator-Cc4dRqTI.js} +62 -41
- package/dist/_chunks/{editable-currency-cell-renderer-DgkCIIcO.js → editable-currency-cell-renderer-9jqwDv5x.js} +3 -3
- package/dist/_chunks/{el-BYPonAaK.js → el-BWG5RXxa.js} +6 -6
- package/dist/_chunks/{es-CMkVCQ4F.js → es-DfO_G435.js} +2 -2
- package/dist/_chunks/{fr-BcuWxqft.js → fr-BTn24bs8.js} +2 -2
- package/dist/_chunks/{freemium-paywall-BAk3a6er.js → freemium-paywall-BLXESpH4.js} +2 -2
- package/dist/_chunks/{gestation-BXEgDGmP.js → gestation-mWF4AXea.js} +3 -3
- package/dist/_chunks/{gestational-age-calculator-CsQ05qDy.js → gestational-age-calculator-ZMSrzkRW.js} +59 -45
- package/dist/_chunks/{header-CTZWX-tm.js → header-Ce1Br27u.js} +70 -75
- package/dist/_chunks/{header-settings-CBLwUK6t.js → header-settings-Bx0Biimh.js} +2 -2
- package/dist/_chunks/{hi-wkq_rQAh.js → hi-Dj3oYd84.js} +2 -2
- package/dist/_chunks/index.modern-D2LGACWg.js +1529 -0
- package/dist/_chunks/insert-result-DisOY2G-.js +243 -0
- package/dist/_chunks/{isSameWeek-Bim5ftRd.js → isSameWeek-HfxKk6Lz.js} +2 -2
- package/dist/_chunks/{it-GiQrQ9p4.js → it-Y85ofIQQ.js} +7 -7
- package/dist/_chunks/{ja-qfYg3Rua.js → ja-CQ7J6YoA.js} +2 -2
- package/dist/_chunks/{kbd-Cglkd7CY.js → kbd-D855ZXIW.js} +2 -2
- package/dist/_chunks/map-view-Tb5VfK9Y.js +333 -0
- package/dist/_chunks/marketplace-app-shell-Dc5cTIt8.js +428 -0
- package/dist/_chunks/{nl-xOogO4sZ.js → nl-D9kHCmp3.js} +2 -2
- package/dist/_chunks/{patient-search-CBq62kmL.js → patient-search-DPe2ZYEL.js} +2 -2
- package/dist/_chunks/{patient-shell-DF81lALv.js → patient-shell-CnT4L8gn.js} +3 -3
- package/dist/_chunks/{payment-form-Dy3WIIsC.js → payment-form-BzVsG6Ks.js} +5 -5
- package/dist/_chunks/{pdf-viewer-Cy6Ul3hZ.js → pdf-viewer-B6MC6VTx.js} +139 -126
- package/dist/_chunks/{pl-GnOW6eGK.js → pl-B3Smqpkr.js} +3 -3
- package/dist/_chunks/{practice-results-C0d4IL5E.js → practice-results-CrLpEiiW.js} +4 -4
- package/dist/_chunks/pregnancy-weight-gain-zZL5Ir2-.js +224 -0
- package/dist/_chunks/{pt-_bV5b5RW.js → pt-D3J-1c_7.js} +6 -6
- package/dist/_chunks/{public-header.agent-B2dDg2_d.js → public-header.agent-BY6FH71R.js} +2 -2
- package/dist/_chunks/radio-group-CLjK-SlK.js +167 -0
- package/dist/_chunks/{rich-text-editor-DLbg2852.js → rich-text-editor-DhGIBd4a.js} +10 -10
- package/dist/_chunks/{ro-BEcyh5Nj.js → ro-BKAbbEA3.js} +2 -2
- package/dist/_chunks/{ru-Bi86hqMf.js → ru-BeG8f0Ep.js} +3 -3
- package/dist/_chunks/{sheet-BV-yuLE2.js → sheet-xbzu4YiY.js} +7 -7
- package/dist/_chunks/sign-document-B-3k_0LO.js +344 -0
- package/dist/_chunks/{signature-capture-DoiBd6i3.js → signature-capture-CpMBhqQ9.js} +6 -6
- package/dist/_chunks/{sq-BujHSAWu.js → sq-_hRPaeUy.js} +6 -6
- package/dist/_chunks/subDays-Dv7q9S7u.js +8 -0
- package/dist/_chunks/{sv-C8AeDrTA.js → sv-g009fSpe.js} +2 -2
- package/dist/_chunks/tab-bar-Xetknddo.js +105 -0
- package/dist/_chunks/{theme-toggle-DpC28kt5.js → theme-toggle-ClATnY4Q.js} +2 -2
- package/dist/_chunks/{toast.agent-WHHfw5VX.js → toast.agent-B0MCsvdZ.js} +2 -2
- package/dist/_chunks/{tr-CMSs_Vgf.js → tr-OKUOuhMW.js} +2 -2
- package/dist/_chunks/{unit-converter-EUwO6QYq.js → unit-converter-CuXCXJhK.js} +46 -40
- package/dist/_chunks/{workflow-map-C3gB0FvB.js → workflow-map-BFNpzTiw.js} +2 -2
- package/dist/_chunks/{zh-CN-eXB-PFu4.js → zh-CN-De4zwEhx.js} +3 -3
- package/dist/agent-catalog.json +1 -1
- package/dist/brand/product-lockup/product-lockup.d.ts +16 -0
- package/dist/components/_shared/calendar-class-names.d.ts +8 -0
- package/dist/components/_shared/index.d.ts +2 -0
- package/dist/components/_shared/insert-result.d.ts +78 -6
- package/dist/components/address-autocomplete/address-autocomplete.d.ts +77 -0
- package/dist/components/address-autocomplete/index.d.ts +4 -0
- package/dist/components/address-autocomplete/index.js +6 -0
- package/dist/components/address-autocomplete/parse-address.d.ts +52 -0
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/bmi-calculator/bmi-calculator.d.ts +11 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/chart/chart.d.ts +10 -0
- package/dist/components/chart/index.js +1 -1
- package/dist/components/cycle-calculator/cycle-calculator.d.ts +12 -2
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/date-picker.d.ts +0 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts +0 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/date-time-picker.d.ts +0 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +11 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +12 -2
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/header/header.d.ts +8 -0
- package/dist/components/header/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/index.d.ts +3 -1
- package/dist/components/kbd/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/matrix-rain/matrix-rain.d.ts +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +12 -2
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/public-header/public-header.d.ts +1 -1
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/sign-document/sign-document.d.ts +12 -0
- package/dist/components/signature-capture/index.js +1 -1
- package/dist/components/stat/stat.d.ts +1 -1
- package/dist/components/tab-bar/index.d.ts +3 -0
- package/dist/components/tab-bar/index.js +5 -0
- package/dist/components/tab-bar/tab-bar.d.ts +104 -0
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/unit-converter/unit-converter.d.ts +11 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +17 -0
- package/dist/i18n/locales/ar.js +18 -1
- package/dist/i18n/locales/de.d.ts +17 -0
- package/dist/i18n/locales/de.js +18 -1
- package/dist/i18n/locales/el.d.ts +17 -0
- package/dist/i18n/locales/el.js +18 -1
- package/dist/i18n/locales/en.d.ts +17 -0
- package/dist/i18n/locales/en.js +18 -1
- package/dist/i18n/locales/es.d.ts +17 -0
- package/dist/i18n/locales/es.js +18 -1
- package/dist/i18n/locales/fr.d.ts +17 -0
- package/dist/i18n/locales/fr.js +18 -1
- package/dist/i18n/locales/hi.d.ts +17 -0
- package/dist/i18n/locales/hi.js +18 -1
- package/dist/i18n/locales/it.d.ts +17 -0
- package/dist/i18n/locales/it.js +18 -1
- package/dist/i18n/locales/ja.d.ts +17 -0
- package/dist/i18n/locales/ja.js +18 -1
- package/dist/i18n/locales/nl.d.ts +17 -0
- package/dist/i18n/locales/nl.js +18 -1
- package/dist/i18n/locales/pl.d.ts +17 -0
- package/dist/i18n/locales/pl.js +18 -1
- package/dist/i18n/locales/pt.d.ts +17 -0
- package/dist/i18n/locales/pt.js +18 -1
- package/dist/i18n/locales/ro.d.ts +17 -0
- package/dist/i18n/locales/ro.js +18 -1
- package/dist/i18n/locales/ru.d.ts +17 -0
- package/dist/i18n/locales/ru.js +18 -1
- package/dist/i18n/locales/sq.d.ts +17 -0
- package/dist/i18n/locales/sq.js +18 -1
- package/dist/i18n/locales/sv.d.ts +17 -0
- package/dist/i18n/locales/sv.js +18 -1
- package/dist/i18n/locales/tr.d.ts +17 -0
- package/dist/i18n/locales/tr.js +18 -1
- package/dist/i18n/locales/zh.d.ts +17 -0
- package/dist/i18n/locales/zh.js +18 -1
- package/dist/index.js +605 -599
- package/dist/locales/ar.json +18 -1
- package/dist/locales/de.json +18 -1
- package/dist/locales/el.json +18 -1
- package/dist/locales/en.json +18 -1
- package/dist/locales/es.json +18 -1
- package/dist/locales/fr.json +18 -1
- package/dist/locales/hi.json +18 -1
- package/dist/locales/it.json +18 -1
- package/dist/locales/ja.json +18 -1
- package/dist/locales/nl.json +18 -1
- package/dist/locales/pl.json +18 -1
- package/dist/locales/pt.json +18 -1
- package/dist/locales/ro.json +18 -1
- package/dist/locales/ru.json +18 -1
- package/dist/locales/sq.json +18 -1
- package/dist/locales/sv.json +18 -1
- package/dist/locales/tr.json +18 -1
- package/dist/locales/zh.json +18 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +87 -4
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1411 -2
- package/package.json +16 -1
- package/dist/_chunks/bmi-calculator-DnEr513I.js +0 -213
- package/dist/_chunks/cycle-calculator-B5Uj9QeT.js +0 -185
- package/dist/_chunks/insert-result-yJ0QavoN.js +0 -133
- package/dist/_chunks/map-view-qJLybrmN.js +0 -1850
- package/dist/_chunks/marketplace-app-shell-BlxVizU4.js +0 -296
- package/dist/_chunks/pregnancy-weight-gain-BCdi-JSv.js +0 -209
- package/dist/_chunks/radio-group-BcF92GEF.js +0 -152
- package/dist/_chunks/react-day-picker-CdtIiKjx.js +0 -3174
- package/dist/_chunks/sign-document-CpLDZ6Db.js +0 -316
- package/dist/_chunks/subDays-_T9YeKPX.js +0 -8
|
@@ -1,316 +0,0 @@
|
|
|
1
|
-
import { jsxs as d, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as ie, useId as oe, useMemo as M, useRef as k, useState as b, useEffect as L, useCallback as c, useImperativeHandle as de } from "react";
|
|
3
|
-
import { c as i } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as ce } from "react-i18next";
|
|
5
|
-
import { P as le } from "./pdf-viewer-Cy6Ul3hZ.js";
|
|
6
|
-
import { S as ge } from "./signature-capture-DoiBd6i3.js";
|
|
7
|
-
import { u as me } from "./registry-nPAVE19X.js";
|
|
8
|
-
import { C as O } from "./circle-check-9AeSgJD_.js";
|
|
9
|
-
const ue = {
|
|
10
|
-
id: "sign-document",
|
|
11
|
-
capabilities: ["submit"],
|
|
12
|
-
state: {
|
|
13
|
-
isReadComplete: {
|
|
14
|
-
type: "boolean",
|
|
15
|
-
descriptionKey: "signDocument.agent.state.isReadComplete",
|
|
16
|
-
description: "True when the reader has reached the last page (or read-gating is off).",
|
|
17
|
-
read: (n) => n.isReadComplete()
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
actions: {
|
|
21
|
-
submit: {
|
|
22
|
-
safety: "write",
|
|
23
|
-
descriptionKey: "signDocument.agent.actions.confirm",
|
|
24
|
-
description: "Confirm the current signature, emitting it via onSign. No-op if unsigned.",
|
|
25
|
-
invoke: (n) => n.confirm()
|
|
26
|
-
},
|
|
27
|
-
reset: {
|
|
28
|
-
safety: "destructive",
|
|
29
|
-
descriptionKey: "signDocument.agent.actions.reset",
|
|
30
|
-
description: "Clear the captured signature and return to unsigned.",
|
|
31
|
-
invoke: (n) => {
|
|
32
|
-
n.reset();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
domHooks: {
|
|
37
|
-
root: {
|
|
38
|
-
attr: "data-component",
|
|
39
|
-
value: "sign-document",
|
|
40
|
-
description: "Marks the SignDocument wrapper."
|
|
41
|
-
},
|
|
42
|
-
instanceId: {
|
|
43
|
-
attr: "data-component-id",
|
|
44
|
-
sourceProp: "id",
|
|
45
|
-
description: "Sourced from the id prop."
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}, pe = i(
|
|
49
|
-
[
|
|
50
|
-
"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
51
|
-
"ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--card-border)]",
|
|
52
|
-
"ds:shadow-[var(--shadow-card)] ds:[.theme-accessible_&]:border-2",
|
|
53
|
-
"ds:bg-[var(--background)] ds:text-[var(--foreground)]",
|
|
54
|
-
"ds:p-[var(--spacing-md)]",
|
|
55
|
-
"ds:aria-disabled:opacity-[var(--opacity-50)] ds:aria-disabled:cursor-not-allowed"
|
|
56
|
-
].join(" ")
|
|
57
|
-
), fe = i(
|
|
58
|
-
["type-heading-sm ds:text-[var(--foreground)]"].join(" ")
|
|
59
|
-
), ve = i(
|
|
60
|
-
["ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"].join(" ")
|
|
61
|
-
), be = i(
|
|
62
|
-
["type-body-sm ds:font-medium ds:text-[var(--foreground)]"].join(" ")
|
|
63
|
-
), he = i(
|
|
64
|
-
[
|
|
65
|
-
"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
66
|
-
"type-body-sm ds:text-[var(--muted-foreground)]"
|
|
67
|
-
].join(" ")
|
|
68
|
-
), ye = i(
|
|
69
|
-
[
|
|
70
|
-
"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
71
|
-
"type-body-sm",
|
|
72
|
-
"ds:rounded-[var(--radius-sm)]",
|
|
73
|
-
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
|
|
74
|
-
"ds:pt-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]",
|
|
75
|
-
"ds:bg-[color-mix(in_srgb,var(--info)_10%,transparent)]",
|
|
76
|
-
"ds:text-[var(--foreground)]",
|
|
77
|
-
"ds:border ds:border-[color:color-mix(in_srgb,var(--info)_40%,transparent)]"
|
|
78
|
-
].join(" ")
|
|
79
|
-
), xe = i(
|
|
80
|
-
[
|
|
81
|
-
"ds:inline-flex ds:inline-size-full ds:items-center ds:justify-center",
|
|
82
|
-
"ds:min-block-size-[var(--min-target-size)]",
|
|
83
|
-
"ds:min-inline-size-[var(--min-target-size)]",
|
|
84
|
-
"ds:gap-[var(--spacing-xs)]",
|
|
85
|
-
"ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
|
|
86
|
-
"ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]",
|
|
87
|
-
"ds:rounded-[var(--radius-sm)]",
|
|
88
|
-
"ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)]",
|
|
89
|
-
"ds:text-[length:var(--font-size-base)] ds:font-medium",
|
|
90
|
-
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
91
|
-
"ds:hover:bg-[var(--primary-hover)]",
|
|
92
|
-
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
93
|
-
"ds:focus-visible:outline-solid",
|
|
94
|
-
"ds:focus-visible:outline-[var(--ring)]",
|
|
95
|
-
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
96
|
-
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
97
|
-
"ds:disabled:opacity-[var(--opacity-50)] ds:disabled:cursor-not-allowed",
|
|
98
|
-
"ds:disabled:hover:bg-[var(--primary)]"
|
|
99
|
-
].join(" ")
|
|
100
|
-
), De = i(
|
|
101
|
-
[
|
|
102
|
-
"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
103
|
-
"ds:rounded-[var(--radius-sm)]",
|
|
104
|
-
"ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
|
|
105
|
-
"ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]",
|
|
106
|
-
"ds:bg-[color-mix(in_srgb,var(--success)_12%,transparent)]",
|
|
107
|
-
"ds:text-[var(--foreground)]",
|
|
108
|
-
"ds:border ds:border-[color:color-mix(in_srgb,var(--success)_45%,transparent)]"
|
|
109
|
-
].join(" ")
|
|
110
|
-
);
|
|
111
|
-
function Z(n, m) {
|
|
112
|
-
const a = new Date(n);
|
|
113
|
-
if (Number.isNaN(a.getTime())) return n;
|
|
114
|
-
try {
|
|
115
|
-
return new Intl.DateTimeFormat(m, {
|
|
116
|
-
dateStyle: "long",
|
|
117
|
-
timeStyle: "short"
|
|
118
|
-
}).format(a);
|
|
119
|
-
} catch {
|
|
120
|
-
return a.toISOString();
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
const Se = ie(
|
|
124
|
-
({
|
|
125
|
-
id: n,
|
|
126
|
-
src: m,
|
|
127
|
-
documentTitle: a,
|
|
128
|
-
requireReadToEnd: _ = !0,
|
|
129
|
-
onSign: h,
|
|
130
|
-
onError: y,
|
|
131
|
-
signedAt: x = null,
|
|
132
|
-
disabled: D = !1,
|
|
133
|
-
readOnly: S = !1,
|
|
134
|
-
ariaLabel: N,
|
|
135
|
-
className: G
|
|
136
|
-
}, J) => {
|
|
137
|
-
const { t: s, i18n: z } = ce(), V = oe(), u = M(
|
|
138
|
-
() => `sign-doc-${V.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
139
|
-
[V]
|
|
140
|
-
), R = `${u}-doc-heading`, H = `${u}-sign-label`, Q = `${u}-live`, C = `${u}-gate-hint`, p = k(null), [E, w] = b(0), [U, $] = b(1), [W, j] = b(!1), [T, l] = b(!1), g = x != null, X = D || S || g, f = k(h), v = k(y);
|
|
141
|
-
L(() => {
|
|
142
|
-
f.current = h, v.current = y;
|
|
143
|
-
}, [h, y]), L(() => {
|
|
144
|
-
j(!1), w(0), $(1), l(!1);
|
|
145
|
-
}, [m]);
|
|
146
|
-
const Y = c(
|
|
147
|
-
(e) => {
|
|
148
|
-
w(e.numPages), e.numPages <= 1 && j(!0);
|
|
149
|
-
},
|
|
150
|
-
[]
|
|
151
|
-
), q = c((e) => {
|
|
152
|
-
$(e), w((t) => (t > 0 && e >= t && j(!0), t));
|
|
153
|
-
}, []), ee = c((e) => {
|
|
154
|
-
var t;
|
|
155
|
-
(t = v.current) == null || t.call(v, e);
|
|
156
|
-
}, []), B = !g && !S;
|
|
157
|
-
L(() => {
|
|
158
|
-
if (!B) return;
|
|
159
|
-
const e = () => {
|
|
160
|
-
const F = p.current;
|
|
161
|
-
F && l(!F.isEmpty());
|
|
162
|
-
};
|
|
163
|
-
e();
|
|
164
|
-
const t = window.setInterval(e, 200);
|
|
165
|
-
return () => window.clearInterval(t);
|
|
166
|
-
}, [B]);
|
|
167
|
-
const o = !_ || W, K = !(!X && o) || !T, se = c((e) => {
|
|
168
|
-
var t;
|
|
169
|
-
(t = f.current) == null || t.call(f, e);
|
|
170
|
-
}, []), I = c(async () => {
|
|
171
|
-
const e = p.current;
|
|
172
|
-
return e ? e.confirm() : null;
|
|
173
|
-
}, []), A = c(() => {
|
|
174
|
-
var e;
|
|
175
|
-
(e = p.current) == null || e.clear(), l(!1);
|
|
176
|
-
}, []), P = M(
|
|
177
|
-
() => ({
|
|
178
|
-
reset: A,
|
|
179
|
-
confirm: I,
|
|
180
|
-
isReadComplete: () => o
|
|
181
|
-
}),
|
|
182
|
-
[A, I, o]
|
|
183
|
-
);
|
|
184
|
-
de(J, () => P, [P]), me(ue, P, n);
|
|
185
|
-
const ne = N ?? (a ? s("signDocument.regionLabelNamed", { title: a }) : s("signDocument.regionLabel")), ae = a ?? s("signDocument.documentLabel"), te = g ? s("signDocument.signedOn", {
|
|
186
|
-
date: Z(x, z.language)
|
|
187
|
-
}) : o ? s("signDocument.readyToSign") : "", re = o ? T ? "" : s("signDocument.signToEnable") : s("signDocument.scrollToEnd");
|
|
188
|
-
return /* @__PURE__ */ d(
|
|
189
|
-
"div",
|
|
190
|
-
{
|
|
191
|
-
role: "group",
|
|
192
|
-
"aria-labelledby": !N && a ? R : void 0,
|
|
193
|
-
"aria-label": N || !a ? ne : void 0,
|
|
194
|
-
"aria-disabled": D || void 0,
|
|
195
|
-
className: [pe(), G].filter(Boolean).join(" "),
|
|
196
|
-
"data-component": "sign-document",
|
|
197
|
-
"data-component-id": n,
|
|
198
|
-
"data-signed": g || void 0,
|
|
199
|
-
children: [
|
|
200
|
-
/* @__PURE__ */ r(
|
|
201
|
-
"span",
|
|
202
|
-
{
|
|
203
|
-
role: "status",
|
|
204
|
-
"aria-live": "polite",
|
|
205
|
-
"aria-atomic": "true",
|
|
206
|
-
className: "ds:sr-only",
|
|
207
|
-
"data-testid": "sign-document-live",
|
|
208
|
-
id: Q,
|
|
209
|
-
children: te
|
|
210
|
-
}
|
|
211
|
-
),
|
|
212
|
-
/* @__PURE__ */ r("span", { className: "ds:sr-only", id: C, children: re }),
|
|
213
|
-
a ? /* @__PURE__ */ r("h2", { id: R, className: fe(), children: a }) : null,
|
|
214
|
-
/* @__PURE__ */ r(
|
|
215
|
-
le,
|
|
216
|
-
{
|
|
217
|
-
src: m,
|
|
218
|
-
ariaLabel: ae,
|
|
219
|
-
onLoadComplete: Y,
|
|
220
|
-
onPageChange: q,
|
|
221
|
-
onError: ee
|
|
222
|
-
}
|
|
223
|
-
),
|
|
224
|
-
g ? (
|
|
225
|
-
/* ---- Already-signed, read-only ---- */
|
|
226
|
-
/* @__PURE__ */ d(
|
|
227
|
-
"div",
|
|
228
|
-
{
|
|
229
|
-
className: De(),
|
|
230
|
-
"data-testid": "sign-document-signed",
|
|
231
|
-
children: [
|
|
232
|
-
/* @__PURE__ */ r(
|
|
233
|
-
O,
|
|
234
|
-
{
|
|
235
|
-
"aria-hidden": "true",
|
|
236
|
-
className: "ds:size-5 ds:text-[var(--success)] ds:shrink-0"
|
|
237
|
-
}
|
|
238
|
-
),
|
|
239
|
-
/* @__PURE__ */ d("span", { className: "type-body-sm", children: [
|
|
240
|
-
/* @__PURE__ */ r("strong", { className: "ds:font-semibold", children: s("signDocument.signed") }),
|
|
241
|
-
" — ",
|
|
242
|
-
s("signDocument.signedOn", {
|
|
243
|
-
date: Z(x, z.language)
|
|
244
|
-
})
|
|
245
|
-
] })
|
|
246
|
-
]
|
|
247
|
-
}
|
|
248
|
-
)
|
|
249
|
-
) : S ? null : (
|
|
250
|
-
/* ---- Sign surface ---- */
|
|
251
|
-
/* @__PURE__ */ d(
|
|
252
|
-
"div",
|
|
253
|
-
{
|
|
254
|
-
className: ve(),
|
|
255
|
-
role: "group",
|
|
256
|
-
"aria-labelledby": H,
|
|
257
|
-
"aria-describedby": C,
|
|
258
|
-
children: [
|
|
259
|
-
/* @__PURE__ */ d("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
260
|
-
/* @__PURE__ */ r("span", { id: H, className: be(), children: s("signDocument.signatureSection") }),
|
|
261
|
-
E > 0 ? /* @__PURE__ */ r(
|
|
262
|
-
"span",
|
|
263
|
-
{
|
|
264
|
-
className: he(),
|
|
265
|
-
"data-testid": "sign-document-progress",
|
|
266
|
-
children: s("signDocument.pageProgress", {
|
|
267
|
-
current: U,
|
|
268
|
-
total: E
|
|
269
|
-
})
|
|
270
|
-
}
|
|
271
|
-
) : null
|
|
272
|
-
] }),
|
|
273
|
-
_ && !o ? /* @__PURE__ */ r("p", { className: ye(), "data-testid": "sign-document-hint", children: s("signDocument.scrollToEnd") }) : null,
|
|
274
|
-
/* @__PURE__ */ r(
|
|
275
|
-
ge,
|
|
276
|
-
{
|
|
277
|
-
ref: p,
|
|
278
|
-
ariaLabel: s("signDocument.signatureSection"),
|
|
279
|
-
disabled: D || !o,
|
|
280
|
-
onStart: () => l(!0),
|
|
281
|
-
onClear: () => l(!1),
|
|
282
|
-
onConfirm: se
|
|
283
|
-
}
|
|
284
|
-
),
|
|
285
|
-
/* @__PURE__ */ d(
|
|
286
|
-
"button",
|
|
287
|
-
{
|
|
288
|
-
type: "button",
|
|
289
|
-
onClick: () => {
|
|
290
|
-
K || I();
|
|
291
|
-
},
|
|
292
|
-
disabled: K,
|
|
293
|
-
"aria-describedby": C,
|
|
294
|
-
className: xe(),
|
|
295
|
-
"data-testid": "sign-document-confirm",
|
|
296
|
-
children: [
|
|
297
|
-
/* @__PURE__ */ r(O, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
298
|
-
s("signDocument.confirm")
|
|
299
|
-
]
|
|
300
|
-
}
|
|
301
|
-
)
|
|
302
|
-
]
|
|
303
|
-
}
|
|
304
|
-
)
|
|
305
|
-
)
|
|
306
|
-
]
|
|
307
|
-
}
|
|
308
|
-
);
|
|
309
|
-
}
|
|
310
|
-
);
|
|
311
|
-
Se.displayName = "SignDocument";
|
|
312
|
-
export {
|
|
313
|
-
Se as S,
|
|
314
|
-
ue as s
|
|
315
|
-
};
|
|
316
|
-
//# sourceMappingURL=sign-document-CpLDZ6Db.js.map
|