@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.
Files changed (199) hide show
  1. package/dist/_chunks/address-autocomplete-CSjMrBvu.js +358 -0
  2. package/dist/_chunks/{alia-sidebar-DXsYPinm.js → alia-sidebar-BpX4z_af.js} +2 -2
  3. package/dist/_chunks/{ar-Cn_NxqkN.js → ar-DEz65ZJW.js} +2 -2
  4. package/dist/_chunks/bmi-calculator-DuVSFDuw.js +259 -0
  5. package/dist/_chunks/{booking-4mCw3Mpl.js → booking-CtLwaxkK.js} +4 -4
  6. package/dist/_chunks/{breadcrumb-CLlhx7qo.js → breadcrumb-OTbaY70e.js} +4 -4
  7. package/dist/_chunks/{calculator-dialog-B74fqpFZ.js → calculator-dialog-DdexHrTP.js} +2 -2
  8. package/dist/_chunks/{chart-Cbt0_sKv.js → chart-Cg3e9EH9.js} +101 -99
  9. package/dist/_chunks/cycle-calculator-Dln-y1k_.js +192 -0
  10. package/dist/_chunks/{date-picker-CvQfs6Xh.js → date-picker-Bq7xhMA-.js} +109 -108
  11. package/dist/_chunks/date-picker-variants-DLi1Va_e.js +3238 -0
  12. package/dist/_chunks/{date-range-picker-U9fn1g9d.js → date-range-picker-DcXuI9y7.js} +20 -19
  13. package/dist/_chunks/{date-time-picker-Cva0ZCWw.js → date-time-picker-RimumeLR.js} +18 -17
  14. package/dist/_chunks/{de-BMM2H7Bs.js → de-bTBGdjPS.js} +2 -2
  15. package/dist/_chunks/{dialog-Cee13rHU.js → dialog-DOYgd75U.js} +46 -37
  16. package/dist/_chunks/{document-scanner-CqS_klIr.js → document-scanner-BqLsGs4Y.js} +7 -7
  17. package/dist/_chunks/{dropdown-menu-BC5ZdOMo.js → dropdown-menu-CUEXqKis.js} +2 -2
  18. package/dist/_chunks/{due-date-calculator-CUspKSTw.js → due-date-calculator-Cc4dRqTI.js} +62 -41
  19. package/dist/_chunks/{editable-currency-cell-renderer-DgkCIIcO.js → editable-currency-cell-renderer-9jqwDv5x.js} +3 -3
  20. package/dist/_chunks/{el-BYPonAaK.js → el-BWG5RXxa.js} +6 -6
  21. package/dist/_chunks/{es-CMkVCQ4F.js → es-DfO_G435.js} +2 -2
  22. package/dist/_chunks/{fr-BcuWxqft.js → fr-BTn24bs8.js} +2 -2
  23. package/dist/_chunks/{freemium-paywall-BAk3a6er.js → freemium-paywall-BLXESpH4.js} +2 -2
  24. package/dist/_chunks/{gestation-BXEgDGmP.js → gestation-mWF4AXea.js} +3 -3
  25. package/dist/_chunks/{gestational-age-calculator-CsQ05qDy.js → gestational-age-calculator-ZMSrzkRW.js} +59 -45
  26. package/dist/_chunks/{header-CTZWX-tm.js → header-Ce1Br27u.js} +70 -75
  27. package/dist/_chunks/{header-settings-CBLwUK6t.js → header-settings-Bx0Biimh.js} +2 -2
  28. package/dist/_chunks/{hi-wkq_rQAh.js → hi-Dj3oYd84.js} +2 -2
  29. package/dist/_chunks/index.modern-D2LGACWg.js +1529 -0
  30. package/dist/_chunks/insert-result-DisOY2G-.js +243 -0
  31. package/dist/_chunks/{isSameWeek-Bim5ftRd.js → isSameWeek-HfxKk6Lz.js} +2 -2
  32. package/dist/_chunks/{it-GiQrQ9p4.js → it-Y85ofIQQ.js} +7 -7
  33. package/dist/_chunks/{ja-qfYg3Rua.js → ja-CQ7J6YoA.js} +2 -2
  34. package/dist/_chunks/{kbd-Cglkd7CY.js → kbd-D855ZXIW.js} +2 -2
  35. package/dist/_chunks/map-view-Tb5VfK9Y.js +333 -0
  36. package/dist/_chunks/marketplace-app-shell-Dc5cTIt8.js +428 -0
  37. package/dist/_chunks/{nl-xOogO4sZ.js → nl-D9kHCmp3.js} +2 -2
  38. package/dist/_chunks/{patient-search-CBq62kmL.js → patient-search-DPe2ZYEL.js} +2 -2
  39. package/dist/_chunks/{patient-shell-DF81lALv.js → patient-shell-CnT4L8gn.js} +3 -3
  40. package/dist/_chunks/{payment-form-Dy3WIIsC.js → payment-form-BzVsG6Ks.js} +5 -5
  41. package/dist/_chunks/{pdf-viewer-Cy6Ul3hZ.js → pdf-viewer-B6MC6VTx.js} +139 -126
  42. package/dist/_chunks/{pl-GnOW6eGK.js → pl-B3Smqpkr.js} +3 -3
  43. package/dist/_chunks/{practice-results-C0d4IL5E.js → practice-results-CrLpEiiW.js} +4 -4
  44. package/dist/_chunks/pregnancy-weight-gain-zZL5Ir2-.js +224 -0
  45. package/dist/_chunks/{pt-_bV5b5RW.js → pt-D3J-1c_7.js} +6 -6
  46. package/dist/_chunks/{public-header.agent-B2dDg2_d.js → public-header.agent-BY6FH71R.js} +2 -2
  47. package/dist/_chunks/radio-group-CLjK-SlK.js +167 -0
  48. package/dist/_chunks/{rich-text-editor-DLbg2852.js → rich-text-editor-DhGIBd4a.js} +10 -10
  49. package/dist/_chunks/{ro-BEcyh5Nj.js → ro-BKAbbEA3.js} +2 -2
  50. package/dist/_chunks/{ru-Bi86hqMf.js → ru-BeG8f0Ep.js} +3 -3
  51. package/dist/_chunks/{sheet-BV-yuLE2.js → sheet-xbzu4YiY.js} +7 -7
  52. package/dist/_chunks/sign-document-B-3k_0LO.js +344 -0
  53. package/dist/_chunks/{signature-capture-DoiBd6i3.js → signature-capture-CpMBhqQ9.js} +6 -6
  54. package/dist/_chunks/{sq-BujHSAWu.js → sq-_hRPaeUy.js} +6 -6
  55. package/dist/_chunks/subDays-Dv7q9S7u.js +8 -0
  56. package/dist/_chunks/{sv-C8AeDrTA.js → sv-g009fSpe.js} +2 -2
  57. package/dist/_chunks/tab-bar-Xetknddo.js +105 -0
  58. package/dist/_chunks/{theme-toggle-DpC28kt5.js → theme-toggle-ClATnY4Q.js} +2 -2
  59. package/dist/_chunks/{toast.agent-WHHfw5VX.js → toast.agent-B0MCsvdZ.js} +2 -2
  60. package/dist/_chunks/{tr-CMSs_Vgf.js → tr-OKUOuhMW.js} +2 -2
  61. package/dist/_chunks/{unit-converter-EUwO6QYq.js → unit-converter-CuXCXJhK.js} +46 -40
  62. package/dist/_chunks/{workflow-map-C3gB0FvB.js → workflow-map-BFNpzTiw.js} +2 -2
  63. package/dist/_chunks/{zh-CN-eXB-PFu4.js → zh-CN-De4zwEhx.js} +3 -3
  64. package/dist/agent-catalog.json +1 -1
  65. package/dist/brand/product-lockup/product-lockup.d.ts +16 -0
  66. package/dist/components/_shared/calendar-class-names.d.ts +8 -0
  67. package/dist/components/_shared/index.d.ts +2 -0
  68. package/dist/components/_shared/insert-result.d.ts +78 -6
  69. package/dist/components/address-autocomplete/address-autocomplete.d.ts +77 -0
  70. package/dist/components/address-autocomplete/index.d.ts +4 -0
  71. package/dist/components/address-autocomplete/index.js +6 -0
  72. package/dist/components/address-autocomplete/parse-address.d.ts +52 -0
  73. package/dist/components/badge/badge.d.ts +1 -1
  74. package/dist/components/bmi-calculator/bmi-calculator.d.ts +11 -1
  75. package/dist/components/bmi-calculator/index.js +1 -1
  76. package/dist/components/booking/index.js +1 -1
  77. package/dist/components/breadcrumb/index.js +1 -1
  78. package/dist/components/calculator-dialog/index.js +1 -1
  79. package/dist/components/card/card.d.ts +1 -1
  80. package/dist/components/chart/chart.d.ts +10 -0
  81. package/dist/components/chart/index.js +1 -1
  82. package/dist/components/cycle-calculator/cycle-calculator.d.ts +12 -2
  83. package/dist/components/cycle-calculator/index.js +1 -1
  84. package/dist/components/data-table/index.js +1 -1
  85. package/dist/components/date-picker/date-picker.d.ts +0 -1
  86. package/dist/components/date-picker/index.js +1 -1
  87. package/dist/components/date-range-picker/date-range-picker.d.ts +0 -1
  88. package/dist/components/date-range-picker/index.js +1 -1
  89. package/dist/components/date-time-picker/date-time-picker.d.ts +0 -1
  90. package/dist/components/date-time-picker/index.js +1 -1
  91. package/dist/components/dialog/index.js +1 -1
  92. package/dist/components/document-scanner/index.js +1 -1
  93. package/dist/components/dropdown-menu/index.js +1 -1
  94. package/dist/components/due-date-calculator/due-date-calculator.d.ts +11 -1
  95. package/dist/components/due-date-calculator/index.js +2 -2
  96. package/dist/components/freemium-paywall/index.js +1 -1
  97. package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +12 -2
  98. package/dist/components/gestational-age-calculator/index.js +1 -1
  99. package/dist/components/header/header.d.ts +8 -0
  100. package/dist/components/header/index.js +1 -1
  101. package/dist/components/header-settings/index.js +1 -1
  102. package/dist/components/index.d.ts +3 -1
  103. package/dist/components/kbd/index.js +1 -1
  104. package/dist/components/map-view/index.js +1 -1
  105. package/dist/components/matrix-rain/matrix-rain.d.ts +1 -1
  106. package/dist/components/patient-search/index.js +1 -1
  107. package/dist/components/payment-form/index.js +1 -1
  108. package/dist/components/pdf-viewer/index.js +1 -1
  109. package/dist/components/practice-results/index.js +1 -1
  110. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  111. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +12 -2
  112. package/dist/components/public-header/index.js +1 -1
  113. package/dist/components/public-header/public-header.d.ts +1 -1
  114. package/dist/components/radio-group/index.js +1 -1
  115. package/dist/components/rich-text-editor/index.js +1 -1
  116. package/dist/components/sheet/index.js +1 -1
  117. package/dist/components/sign-document/index.js +1 -1
  118. package/dist/components/sign-document/sign-document.d.ts +12 -0
  119. package/dist/components/signature-capture/index.js +1 -1
  120. package/dist/components/stat/stat.d.ts +1 -1
  121. package/dist/components/tab-bar/index.d.ts +3 -0
  122. package/dist/components/tab-bar/index.js +5 -0
  123. package/dist/components/tab-bar/tab-bar.d.ts +104 -0
  124. package/dist/components/theme-toggle/index.js +1 -1
  125. package/dist/components/toast/index.js +1 -1
  126. package/dist/components/unit-converter/index.js +1 -1
  127. package/dist/components/unit-converter/unit-converter.d.ts +11 -1
  128. package/dist/components/workflow/index.js +1 -1
  129. package/dist/i18n/locales/ar.d.ts +17 -0
  130. package/dist/i18n/locales/ar.js +18 -1
  131. package/dist/i18n/locales/de.d.ts +17 -0
  132. package/dist/i18n/locales/de.js +18 -1
  133. package/dist/i18n/locales/el.d.ts +17 -0
  134. package/dist/i18n/locales/el.js +18 -1
  135. package/dist/i18n/locales/en.d.ts +17 -0
  136. package/dist/i18n/locales/en.js +18 -1
  137. package/dist/i18n/locales/es.d.ts +17 -0
  138. package/dist/i18n/locales/es.js +18 -1
  139. package/dist/i18n/locales/fr.d.ts +17 -0
  140. package/dist/i18n/locales/fr.js +18 -1
  141. package/dist/i18n/locales/hi.d.ts +17 -0
  142. package/dist/i18n/locales/hi.js +18 -1
  143. package/dist/i18n/locales/it.d.ts +17 -0
  144. package/dist/i18n/locales/it.js +18 -1
  145. package/dist/i18n/locales/ja.d.ts +17 -0
  146. package/dist/i18n/locales/ja.js +18 -1
  147. package/dist/i18n/locales/nl.d.ts +17 -0
  148. package/dist/i18n/locales/nl.js +18 -1
  149. package/dist/i18n/locales/pl.d.ts +17 -0
  150. package/dist/i18n/locales/pl.js +18 -1
  151. package/dist/i18n/locales/pt.d.ts +17 -0
  152. package/dist/i18n/locales/pt.js +18 -1
  153. package/dist/i18n/locales/ro.d.ts +17 -0
  154. package/dist/i18n/locales/ro.js +18 -1
  155. package/dist/i18n/locales/ru.d.ts +17 -0
  156. package/dist/i18n/locales/ru.js +18 -1
  157. package/dist/i18n/locales/sq.d.ts +17 -0
  158. package/dist/i18n/locales/sq.js +18 -1
  159. package/dist/i18n/locales/sv.d.ts +17 -0
  160. package/dist/i18n/locales/sv.js +18 -1
  161. package/dist/i18n/locales/tr.d.ts +17 -0
  162. package/dist/i18n/locales/tr.js +18 -1
  163. package/dist/i18n/locales/zh.d.ts +17 -0
  164. package/dist/i18n/locales/zh.js +18 -1
  165. package/dist/index.js +605 -599
  166. package/dist/locales/ar.json +18 -1
  167. package/dist/locales/de.json +18 -1
  168. package/dist/locales/el.json +18 -1
  169. package/dist/locales/en.json +18 -1
  170. package/dist/locales/es.json +18 -1
  171. package/dist/locales/fr.json +18 -1
  172. package/dist/locales/hi.json +18 -1
  173. package/dist/locales/it.json +18 -1
  174. package/dist/locales/ja.json +18 -1
  175. package/dist/locales/nl.json +18 -1
  176. package/dist/locales/pl.json +18 -1
  177. package/dist/locales/pt.json +18 -1
  178. package/dist/locales/ro.json +18 -1
  179. package/dist/locales/ru.json +18 -1
  180. package/dist/locales/sq.json +18 -1
  181. package/dist/locales/sv.json +18 -1
  182. package/dist/locales/tr.json +18 -1
  183. package/dist/locales/zh.json +18 -1
  184. package/dist/patterns/alia-assistant/index.js +1 -1
  185. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  186. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +87 -4
  187. package/dist/patterns/patient-shell/index.js +1 -1
  188. package/dist/tokens.css +1411 -2
  189. package/package.json +16 -1
  190. package/dist/_chunks/bmi-calculator-DnEr513I.js +0 -213
  191. package/dist/_chunks/cycle-calculator-B5Uj9QeT.js +0 -185
  192. package/dist/_chunks/insert-result-yJ0QavoN.js +0 -133
  193. package/dist/_chunks/map-view-qJLybrmN.js +0 -1850
  194. package/dist/_chunks/marketplace-app-shell-BlxVizU4.js +0 -296
  195. package/dist/_chunks/pregnancy-weight-gain-BCdi-JSv.js +0 -209
  196. package/dist/_chunks/radio-group-BcF92GEF.js +0 -152
  197. package/dist/_chunks/react-day-picker-CdtIiKjx.js +0 -3174
  198. package/dist/_chunks/sign-document-CpLDZ6Db.js +0 -316
  199. 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
@@ -1,8 +0,0 @@
1
- import { a as o } from "./react-day-picker-CdtIiKjx.js";
2
- function n(a, s, r) {
3
- return o(a, -s, r);
4
- }
5
- export {
6
- n as s
7
- };
8
- //# sourceMappingURL=subDays-_T9YeKPX.js.map