@alfadocs/ui-kit 1.3.13 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/agenda-card.agent-Cb5tuEh3.js +28 -0
- package/dist/_chunks/{alia-sidebar-DzNz1gDf.js → alia-sidebar-DSBZMick.js} +3 -3
- package/dist/_chunks/{anamnesis-i18n-CfC0qYzy.js → anamnesis-i18n-BA631X4t.js} +2209 -2144
- package/dist/_chunks/{antenatal-schedule-timeline-BMMpi2lb.js → antenatal-schedule-timeline-u8TsS2QJ.js} +27 -26
- package/dist/_chunks/{appointment-timeline-B630OT_J.js → appointment-timeline-Bqf1sTU5.js} +2 -2
- package/dist/_chunks/{ar-THMLfSoN.js → ar-BR1FGFP2.js} +14 -14
- package/dist/_chunks/{bmi-calculator-CM0-G2mg.js → bmi-calculator-CpyY13MV.js} +2 -2
- package/dist/_chunks/{booking-DjNbd7C1.js → booking-BjsA7j1-.js} +699 -688
- package/dist/_chunks/calculator-dialog-12d3Sxaz.js +48 -0
- package/dist/_chunks/{care-plan-card-1G_f4I5s.js → care-plan-card-BvQy366X.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-DmBsffHS.js → care-plan-entry-card-apk_5B3O.js} +2 -2
- package/dist/_chunks/{chat-container-HlFnoEIl.js → chat-container-CYYego1W.js} +105 -81
- package/dist/_chunks/cycle-calculator-B7fyH-h4.js +425 -0
- package/dist/_chunks/{date-picker-ZHejTVAJ.js → date-picker-Bp64zk2p.js} +19 -19
- package/dist/_chunks/date-picker-variants-pKAJfnWr.js +2089 -0
- package/dist/_chunks/{date-range-picker-pEG3Ln3i.js → date-range-picker-CDrZ8Zh0.js} +27 -27
- package/dist/_chunks/{date-time-picker-695QvBGj.js → date-time-picker-DafkGDGO.js} +10 -10
- package/dist/_chunks/{de-DmZ-8rTN.js → de-3iM4rGqo.js} +7 -7
- package/dist/_chunks/{document-preview-D3gg4MXB.js → document-preview-DOrsqiN1.js} +2 -2
- package/dist/_chunks/due-date-calculator-CnkbbAej.js +571 -0
- package/dist/_chunks/{editor-overlay-DE3esyio.js → editor-overlay-B1tr2i7B.js} +22 -21
- package/dist/_chunks/{el-Bela9mxs.js → el-C96rGJvU.js} +2 -2
- package/dist/_chunks/{es-BNncHKex.js → es-Cxiqjx8r.js} +12 -12
- package/dist/_chunks/fetal-weight-avlj-l-S.js +223 -0
- package/dist/_chunks/format-4HNwNGrN.js +1315 -0
- package/dist/_chunks/{fr-CH8ADfhN.js → fr-Bhr6SYKj.js} +21 -21
- package/dist/_chunks/{freemium-paywall-C_Ue6wxU.js → freemium-paywall-DRDdWuOg.js} +3 -3
- package/dist/_chunks/gestational-age-calculator-BljY_DVJ.js +488 -0
- package/dist/_chunks/hcg-doubling-Cv_vH61p.js +312 -0
- package/dist/_chunks/header-settings-Cn5fPXCE.js +335 -0
- package/dist/_chunks/{hi-Bppfxp8l.js → hi-BxXX26d_.js} +12 -12
- package/dist/_chunks/isSameWeek-B73MagWB.js +13 -0
- package/dist/_chunks/{it-B4ySaRyK.js → it-Xmjomvyj.js} +24 -24
- package/dist/_chunks/{ja-CGF6Io9P.js → ja-mfZvt1ZV.js} +16 -16
- package/dist/_chunks/{link-cell-renderer-C5XLwVXQ.js → link-cell-renderer-CJ_gk7gl.js} +3 -3
- package/dist/_chunks/{locale-picker-BfBUdT1m.js → locale-picker-D9Kv2zrK.js} +153 -132
- package/dist/_chunks/map-view-2yZCQW2l.js +445 -0
- package/dist/_chunks/{marketplace-app-shell-DwcFMxzp.js → marketplace-app-shell-BLRvg-M0.js} +49 -40
- package/dist/_chunks/{nl-DuShqwuV.js → nl-DDs-KEnD.js} +15 -15
- package/dist/_chunks/{notes-panel-DPsgB4Mv.js → notes-panel-CiFN3sLW.js} +2 -2
- package/dist/_chunks/{number-input-DrozbZAU.js → number-input-DOe5VYei.js} +64 -64
- package/dist/_chunks/{optical-prescription-BDHJr8Zz.js → optical-prescription-CRemE8fL.js} +2 -2
- package/dist/_chunks/{parse-DvA97ro9.js → parse-JqixfsU0.js} +43 -43
- package/dist/_chunks/parseISO-fOGpHKXm.js +120 -0
- package/dist/_chunks/{patient-details-DqjjwPmt.js → patient-details-CpunD0qx.js} +3 -3
- package/dist/_chunks/{patient-table-BmIDrLIS.js → patient-table-2eWx-Rrk.js} +2 -2
- package/dist/_chunks/{payment-form-h-BZ8onk.js → payment-form-Ds1I9KqB.js} +308 -231
- package/dist/_chunks/{pdf-viewer-Ddx-T053.js → pdf-viewer-DUIsV9s5.js} +429 -369
- package/dist/_chunks/{pl-CKQwX9Fk.js → pl-BYYMnEWP.js} +18 -18
- package/dist/_chunks/{practice-results-B-HPc13W.js → practice-results-SjCniMd2.js} +2 -2
- package/dist/_chunks/pregnancy-dating-BmpHScZ0.js +770 -0
- package/dist/_chunks/pregnancy-weight-gain-B5KSJzdc.js +553 -0
- package/dist/_chunks/progress-CK8otcQ-.js +343 -0
- package/dist/_chunks/{pt-_njpXyOZ.js → pt-BSPnVrQ7.js} +20 -20
- package/dist/_chunks/{radiograph-panel.agent-BQZ64Riy.js → radiograph-panel.agent-CtFtNMzk.js} +3 -3
- package/dist/_chunks/{rich-text-editor-CfeXPPWs.js → rich-text-editor-BedTpWzL.js} +2 -2
- package/dist/_chunks/{ro-3X6_4FcN.js → ro-BbiylGmG.js} +14 -14
- package/dist/_chunks/{ru-bAcgmnS-.js → ru-BX_qsV67.js} +14 -14
- package/dist/_chunks/{session-countdown-Bc70VXN1.js → session-countdown-BL-Psg8u.js} +2 -2
- package/dist/_chunks/{sign-document-CW_ByDUh.js → sign-document-jF4fZDJ5.js} +2 -2
- package/dist/_chunks/slot-grid-DNiUcXy2.js +640 -0
- package/dist/_chunks/{sparkline-BTY4B5tv.js → sparkline-BmGcEyZO.js} +209 -164
- package/dist/_chunks/{sq-jYFqr4Ga.js → sq-i9UOk4P7.js} +10 -10
- package/dist/_chunks/subDays-CAUv47M1.js +8 -0
- package/dist/_chunks/{sv-BSGEJ-8B.js → sv-CpTdtmDQ.js} +8 -8
- package/dist/_chunks/{tab-bar-Axhk6xzx.js → tab-bar-BYESZINM.js} +83 -77
- package/dist/_chunks/task-card.agent-CF2N_uu4.js +29 -0
- package/dist/_chunks/{tr-CTpgUtw6.js → tr-DXG2QN1K.js} +17 -17
- package/dist/_chunks/{unit-converter-COgkN7YP.js → unit-converter-CHPDuV7W.js} +2 -2
- package/dist/_chunks/{warning-stack-BtjmJChC.js → warning-stack-B7t_8jRE.js} +42 -37
- package/dist/_chunks/{zh-CN-BgM0Io2O.js → zh-CN-vPkPEK6H.js} +18 -18
- package/dist/agent-catalog.json +6426 -3382
- package/dist/agent-i18n/en.json +234 -15
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/chat-container/chat-container.d.ts +14 -0
- package/dist/components/chat-container/index.js +1 -1
- package/dist/components/cycle-calculator/cycle-calculator.agent.d.ts +4 -0
- package/dist/components/cycle-calculator/cycle-calculator.d.ts +42 -0
- package/dist/components/cycle-calculator/index.d.ts +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- 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/document-preview/index.js +1 -1
- package/dist/components/due-date-calculator/due-date-calculator.agent.d.ts +4 -0
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +61 -1
- package/dist/components/due-date-calculator/index.d.ts +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/editor-overlay/editor-overlay.d.ts +7 -1
- package/dist/components/editor-overlay/index.js +1 -1
- package/dist/components/fetal-weight/fetal-weight.agent.d.ts +4 -0
- package/dist/components/fetal-weight/fetal-weight.d.ts +26 -0
- package/dist/components/fetal-weight/index.d.ts +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/gestational-age-calculator.agent.d.ts +4 -0
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +44 -2
- package/dist/components/gestational-age-calculator/index.d.ts +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/hcg-doubling.agent.d.ts +4 -0
- package/dist/components/hcg-doubling/hcg-doubling.d.ts +30 -0
- package/dist/components/hcg-doubling/index.d.ts +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header-settings/header-settings.d.ts +13 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/locale-picker/locale-picker.d.ts +9 -0
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts +22 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/number-input.d.ts +2 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-form/index.d.ts +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/payment-form/payment-form.d.ts +32 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/pdf-viewer/pdf-viewer.d.ts +13 -0
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.d.ts +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-dating/pregnancy-dating.agent.d.ts +4 -0
- package/dist/components/pregnancy-dating/pregnancy-dating.d.ts +65 -1
- package/dist/components/pregnancy-weight-gain/index.d.ts +2 -1
- package/dist/components/pregnancy-weight-gain/index.js +6 -5
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.agent.d.ts +4 -0
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +35 -0
- package/dist/components/progress/index.js +1 -1
- package/dist/components/progress/progress.d.ts +13 -0
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/session-countdown/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/slot-grid/index.d.ts +2 -1
- package/dist/components/slot-grid/index.js +5 -4
- package/dist/components/slot-grid/slot-grid.agent.d.ts +4 -0
- package/dist/components/slot-grid/slot-grid.d.ts +34 -0
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/sparkline/sparkline.d.ts +10 -0
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tab-bar/tab-bar.d.ts +13 -0
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/index.js +630 -627
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/anamnesis-derive.d.ts +27 -8
- package/dist/patterns/anamnesis/anamnesis-format.d.ts +11 -3
- package/dist/patterns/anamnesis/anamnesis-highlight.d.ts +6 -0
- package/dist/patterns/anamnesis/anamnesis-questionnaire.d.ts +23 -9
- package/dist/patterns/anamnesis/anamnesis-types.d.ts +7 -0
- package/dist/patterns/anamnesis/anamnesis.d.ts +16 -7
- package/dist/patterns/anamnesis/index.d.ts +3 -2
- package/dist/patterns/anamnesis/index.js +7 -6
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +6 -0
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/agenda-card.agent-mTCrkKSZ.js +0 -27
- package/dist/_chunks/calculator-dialog-DuXMQSdm.js +0 -40
- package/dist/_chunks/cycle-calculator-BwqYVPB4.js +0 -252
- package/dist/_chunks/date-picker-variants-eL6HjWvw.js +0 -3363
- package/dist/_chunks/due-date-calculator-CwfsFd3T.js +0 -256
- package/dist/_chunks/fetal-weight-ePlLjJPc.js +0 -122
- package/dist/_chunks/gestational-age-calculator-DdgbH69Z.js +0 -311
- package/dist/_chunks/hcg-doubling-BBqD2wI2.js +0 -170
- package/dist/_chunks/header-settings--pjYOe6g.js +0 -284
- package/dist/_chunks/isSameDay-DUEiAT0G.js +0 -39
- package/dist/_chunks/isSameWeek-CK4HS9lH.js +0 -14
- package/dist/_chunks/map-view-CsaHfoo6.js +0 -378
- package/dist/_chunks/pregnancy-dating-DzYTlBkT.js +0 -421
- package/dist/_chunks/pregnancy-weight-gain-O6J0sUIi.js +0 -322
- package/dist/_chunks/progress-DA413-zn.js +0 -299
- package/dist/_chunks/slot-grid-CQSULZjd.js +0 -502
- package/dist/_chunks/subDays-BcNi04uf.js +0 -8
- package/dist/_chunks/task-card.agent-Bt14CzUd.js +0 -25
|
@@ -1,378 +0,0 @@
|
|
|
1
|
-
import { jsx as o, jsxs as m } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as F, useId as J, useMemo as h, useState as T, useEffect as u, useRef as O, useCallback as N, useImperativeHandle as Q } from "react";
|
|
3
|
-
import { c } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as j } from "react-i18next";
|
|
5
|
-
import { A as W, M as X, a as Y, P as k, b as C, u as ee } from "./index.modern-Zta-A4Jm.js";
|
|
6
|
-
import { B as te } from "./button-CPGiR_bH.js";
|
|
7
|
-
import { u as se } from "./registry-DvAUVLHh.js";
|
|
8
|
-
import { M as ae } from "./map-pin-BaY37-Km.js";
|
|
9
|
-
import { E as oe } from "./external-link-CY6zAXXU.js";
|
|
10
|
-
const ne = {
|
|
11
|
-
id: "map-view",
|
|
12
|
-
// pan → scroll (viewport move); set_zoom → set_value; select_marker → pick
|
|
13
|
-
// (NON-persisting marker focus, no value state slot).
|
|
14
|
-
capabilities: ["scroll", "set_value", "pick"],
|
|
15
|
-
state: {},
|
|
16
|
-
actions: {
|
|
17
|
-
pan_to: {
|
|
18
|
-
// Ephemeral viewport move, no data loss → read.
|
|
19
|
-
safety: "read",
|
|
20
|
-
argsType: "{ position: { lat: number; lng: number } }",
|
|
21
|
-
argsSchema: {
|
|
22
|
-
type: "object",
|
|
23
|
-
properties: {
|
|
24
|
-
position: {
|
|
25
|
-
type: "object",
|
|
26
|
-
properties: {
|
|
27
|
-
lat: { type: "number", description: "Latitude in degrees." },
|
|
28
|
-
lng: { type: "number", description: "Longitude in degrees." }
|
|
29
|
-
},
|
|
30
|
-
required: ["lat", "lng"]
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
required: ["position"]
|
|
34
|
-
},
|
|
35
|
-
idempotent: !0,
|
|
36
|
-
descriptionKey: "ui.agent.mapView.actions.panTo",
|
|
37
|
-
description: "Pan the map to a new centre without changing zoom.",
|
|
38
|
-
invoke: (a, n) => {
|
|
39
|
-
a.panTo(n.position);
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
set_zoom: {
|
|
43
|
-
// Ephemeral viewport zoom, no data loss → read.
|
|
44
|
-
safety: "read",
|
|
45
|
-
argsType: "{ zoom: number }",
|
|
46
|
-
argsSchema: {
|
|
47
|
-
type: "object",
|
|
48
|
-
properties: {
|
|
49
|
-
zoom: {
|
|
50
|
-
type: "number",
|
|
51
|
-
description: "Zoom level, typical range 1–20."
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
required: ["zoom"]
|
|
55
|
-
},
|
|
56
|
-
idempotent: !0,
|
|
57
|
-
descriptionKey: "ui.agent.mapView.actions.setZoom",
|
|
58
|
-
description: "Set the map zoom level (typical range 1–20).",
|
|
59
|
-
invoke: (a, n) => {
|
|
60
|
-
a.setZoom(n.zoom);
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
select_marker: {
|
|
64
|
-
// Ephemeral marker focus, no data loss → read.
|
|
65
|
-
safety: "read",
|
|
66
|
-
argsType: "{ id: string | null }",
|
|
67
|
-
argsSchema: {
|
|
68
|
-
type: "object",
|
|
69
|
-
properties: {
|
|
70
|
-
id: {
|
|
71
|
-
type: ["string", "null"],
|
|
72
|
-
description: "Marker id to select, or null to clear the selection."
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
required: ["id"]
|
|
76
|
-
},
|
|
77
|
-
idempotent: !0,
|
|
78
|
-
descriptionKey: "ui.agent.mapView.actions.selectMarker",
|
|
79
|
-
description: "Select a marker by id, or pass null to clear the selection.",
|
|
80
|
-
invoke: (a, n) => {
|
|
81
|
-
a.selectMarker(n.id);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
domHooks: {
|
|
86
|
-
root: {
|
|
87
|
-
attr: "data-component",
|
|
88
|
-
value: "map-view",
|
|
89
|
-
description: "Marks the element as a kit MapView."
|
|
90
|
-
},
|
|
91
|
-
instanceId: {
|
|
92
|
-
attr: "data-component-id",
|
|
93
|
-
sourceProp: "id",
|
|
94
|
-
description: "Sourced from the id prop."
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}, re = c(
|
|
98
|
-
["ds:relative ds:overflow-hidden ds:block", "ds:bg-[var(--muted)]"].join(" "),
|
|
99
|
-
{
|
|
100
|
-
variants: {
|
|
101
|
-
size: {
|
|
102
|
-
sm: "ds:[--map-block-size:14rem]",
|
|
103
|
-
md: "ds:[--map-block-size:20rem]",
|
|
104
|
-
lg: "ds:[--map-block-size:28rem]",
|
|
105
|
-
// `fill` defers sizing to the parent. The outer takes
|
|
106
|
-
// `block-size: 100%` so the inner (also 100%) has something
|
|
107
|
-
// to inherit from. Use inside a viewport-locked column —
|
|
108
|
-
// `<PracticeResults variant="map-first">` wires this through
|
|
109
|
-
// automatically; standalone consumers must give the parent
|
|
110
|
-
// a constrained block-size or the map collapses to 0.
|
|
111
|
-
fill: "ds:[block-size:100%]"
|
|
112
|
-
},
|
|
113
|
-
surface: {
|
|
114
|
-
bordered: "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
|
|
115
|
-
elevated: "ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)] ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2",
|
|
116
|
-
bare: "ds:rounded-none ds:border-0"
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
defaultVariants: { size: "md", surface: "bordered" }
|
|
120
|
-
}
|
|
121
|
-
), ie = c("ds:block ds:inline-size-full", {
|
|
122
|
-
variants: {
|
|
123
|
-
size: {
|
|
124
|
-
sm: "ds:[block-size:var(--map-block-size)]",
|
|
125
|
-
md: "ds:[block-size:var(--map-block-size)]",
|
|
126
|
-
lg: "ds:[block-size:var(--map-block-size)]",
|
|
127
|
-
fill: "ds:[block-size:100%]"
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
defaultVariants: { size: "md" }
|
|
131
|
-
}), de = c(
|
|
132
|
-
[
|
|
133
|
-
"ds:absolute ds:inset-0",
|
|
134
|
-
"ds:flex ds:flex-col ds:items-center ds:justify-center",
|
|
135
|
-
"ds:gap-[var(--spacing-sm)]",
|
|
136
|
-
"ds:p-[var(--spacing-md)]",
|
|
137
|
-
"ds:bg-[var(--muted)] ds:text-[var(--foreground)]",
|
|
138
|
-
"ds:text-center"
|
|
139
|
-
].join(" ")
|
|
140
|
-
), le = c("type-heading-3 ds:m-0"), Z = c(
|
|
141
|
-
"type-body-sm ds:text-[var(--muted-foreground)] ds:[max-inline-size:28rem] ds:m-0"
|
|
142
|
-
);
|
|
143
|
-
function ce({
|
|
144
|
-
onHandleReady: a,
|
|
145
|
-
onMarkerSelect: n
|
|
146
|
-
}) {
|
|
147
|
-
const s = ee();
|
|
148
|
-
return u(() => {
|
|
149
|
-
s && a({
|
|
150
|
-
panTo: (i) => s.panTo(i),
|
|
151
|
-
setZoom: (i) => s.setZoom(i),
|
|
152
|
-
selectMarker: (i) => n(i)
|
|
153
|
-
});
|
|
154
|
-
}, [s, a, n]), null;
|
|
155
|
-
}
|
|
156
|
-
function pe({
|
|
157
|
-
address: a,
|
|
158
|
-
description: n,
|
|
159
|
-
onLoadMap: s,
|
|
160
|
-
openInGoogleMapsHref: i,
|
|
161
|
-
consentCta: f
|
|
162
|
-
}) {
|
|
163
|
-
const { t: l } = j();
|
|
164
|
-
return /* @__PURE__ */ m("div", { className: de(), "data-testid": "map-view-consent", children: [
|
|
165
|
-
/* @__PURE__ */ o(
|
|
166
|
-
ae,
|
|
167
|
-
{
|
|
168
|
-
"aria-hidden": "true",
|
|
169
|
-
className: "ds:size-6 ds:text-[var(--muted-foreground)]"
|
|
170
|
-
}
|
|
171
|
-
),
|
|
172
|
-
/* @__PURE__ */ o("p", { className: le(), children: l("mapView.consentTitle") }),
|
|
173
|
-
a ? /* @__PURE__ */ o(
|
|
174
|
-
"p",
|
|
175
|
-
{
|
|
176
|
-
className: Z(),
|
|
177
|
-
"data-testid": "map-view-address",
|
|
178
|
-
children: a
|
|
179
|
-
}
|
|
180
|
-
) : null,
|
|
181
|
-
/* @__PURE__ */ o("p", { className: Z(), children: n }),
|
|
182
|
-
/* @__PURE__ */ m("div", { className: "ds:flex ds:gap-[var(--spacing-sm)] ds:flex-wrap ds:items-center ds:justify-center", children: [
|
|
183
|
-
f ?? /* @__PURE__ */ o(
|
|
184
|
-
te,
|
|
185
|
-
{
|
|
186
|
-
type: "button",
|
|
187
|
-
intent: "primary",
|
|
188
|
-
size: "sm",
|
|
189
|
-
onClick: s,
|
|
190
|
-
"data-testid": "map-view-load-cta",
|
|
191
|
-
children: l("mapView.consentCta")
|
|
192
|
-
}
|
|
193
|
-
),
|
|
194
|
-
/* @__PURE__ */ m(
|
|
195
|
-
"a",
|
|
196
|
-
{
|
|
197
|
-
href: i,
|
|
198
|
-
target: "_blank",
|
|
199
|
-
rel: "noopener noreferrer",
|
|
200
|
-
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:text-[var(--primary)] ds:underline ds:underline-offset-2",
|
|
201
|
-
children: [
|
|
202
|
-
l("mapView.openInGoogleMaps"),
|
|
203
|
-
/* @__PURE__ */ o(oe, { "aria-hidden": "true", className: "ds:size-3" })
|
|
204
|
-
]
|
|
205
|
-
}
|
|
206
|
-
)
|
|
207
|
-
] })
|
|
208
|
-
] });
|
|
209
|
-
}
|
|
210
|
-
const me = F(
|
|
211
|
-
({
|
|
212
|
-
id: a,
|
|
213
|
-
apiKey: n,
|
|
214
|
-
center: s,
|
|
215
|
-
zoom: i = 15,
|
|
216
|
-
markers: f,
|
|
217
|
-
selectedMarkerId: l,
|
|
218
|
-
onMarkerClick: r,
|
|
219
|
-
consentGranted: I = !1,
|
|
220
|
-
onConsentRequest: g,
|
|
221
|
-
address: p,
|
|
222
|
-
consentDescription: L,
|
|
223
|
-
consentCta: M,
|
|
224
|
-
mapId: y,
|
|
225
|
-
size: w,
|
|
226
|
-
surface: S,
|
|
227
|
-
ariaLabel: P,
|
|
228
|
-
className: _,
|
|
229
|
-
...q
|
|
230
|
-
}, A) => {
|
|
231
|
-
const { t: b, i18n: E } = j(), z = J(), H = h(
|
|
232
|
-
() => `map-${z.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
233
|
-
[z]
|
|
234
|
-
), [V, R] = T(!1);
|
|
235
|
-
u(() => {
|
|
236
|
-
if (typeof window > "u") return;
|
|
237
|
-
const e = window.matchMedia("(prefers-reduced-motion: reduce)"), t = () => R(e.matches);
|
|
238
|
-
return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
239
|
-
}, []);
|
|
240
|
-
const $ = h(() => `https://www.google.com/maps/search/?api=1&query=${p ? encodeURIComponent(p) : `${s.lat},${s.lng}`}`, [p, s.lat, s.lng]), d = O(null), B = N((e) => {
|
|
241
|
-
d.current = e;
|
|
242
|
-
}, []);
|
|
243
|
-
Q(
|
|
244
|
-
A,
|
|
245
|
-
() => ({
|
|
246
|
-
panTo: (e) => {
|
|
247
|
-
var t;
|
|
248
|
-
return (t = d.current) == null ? void 0 : t.panTo(e);
|
|
249
|
-
},
|
|
250
|
-
setZoom: (e) => {
|
|
251
|
-
var t;
|
|
252
|
-
return (t = d.current) == null ? void 0 : t.setZoom(e);
|
|
253
|
-
},
|
|
254
|
-
selectMarker: (e) => {
|
|
255
|
-
var t;
|
|
256
|
-
return (t = d.current) == null ? void 0 : t.selectMarker(e);
|
|
257
|
-
}
|
|
258
|
-
}),
|
|
259
|
-
[]
|
|
260
|
-
);
|
|
261
|
-
const D = h(
|
|
262
|
-
() => ({
|
|
263
|
-
panTo: (e) => {
|
|
264
|
-
var t;
|
|
265
|
-
return (t = d.current) == null ? void 0 : t.panTo(e);
|
|
266
|
-
},
|
|
267
|
-
setZoom: (e) => {
|
|
268
|
-
var t;
|
|
269
|
-
return (t = d.current) == null ? void 0 : t.setZoom(e);
|
|
270
|
-
},
|
|
271
|
-
selectMarker: (e) => {
|
|
272
|
-
var t;
|
|
273
|
-
return (t = d.current) == null ? void 0 : t.selectMarker(e);
|
|
274
|
-
}
|
|
275
|
-
}),
|
|
276
|
-
[]
|
|
277
|
-
);
|
|
278
|
-
se(ne, D, a), u(() => {
|
|
279
|
-
var e;
|
|
280
|
-
V || (e = d.current) == null || e.panTo(s);
|
|
281
|
-
}, [s.lat, s.lng, V]), u(() => {
|
|
282
|
-
var e;
|
|
283
|
-
(e = d.current) == null || e.setZoom(i);
|
|
284
|
-
}, [i]);
|
|
285
|
-
const [K, x] = T(!1), G = I || K, U = N(() => {
|
|
286
|
-
if (g) {
|
|
287
|
-
g(), x(!0);
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
x(!0);
|
|
291
|
-
}, [g]);
|
|
292
|
-
return /* @__PURE__ */ o(
|
|
293
|
-
"div",
|
|
294
|
-
{
|
|
295
|
-
className: re({ size: w, surface: S, className: _ }),
|
|
296
|
-
"data-component": "map-view",
|
|
297
|
-
"data-component-id": a ?? H,
|
|
298
|
-
role: "region",
|
|
299
|
-
"aria-label": P ?? b("mapView.label"),
|
|
300
|
-
...q,
|
|
301
|
-
children: /* @__PURE__ */ o("div", { className: ie({ size: w }), children: G ? /* @__PURE__ */ o(
|
|
302
|
-
W,
|
|
303
|
-
{
|
|
304
|
-
apiKey: n,
|
|
305
|
-
language: E.language,
|
|
306
|
-
children: /* @__PURE__ */ m(
|
|
307
|
-
X,
|
|
308
|
-
{
|
|
309
|
-
defaultCenter: s,
|
|
310
|
-
defaultZoom: i,
|
|
311
|
-
mapId: y,
|
|
312
|
-
gestureHandling: "cooperative",
|
|
313
|
-
disableDefaultUI: !1,
|
|
314
|
-
onClick: () => r == null ? void 0 : r(null),
|
|
315
|
-
className: "ds:[inline-size:100%] ds:[block-size:100%]",
|
|
316
|
-
children: [
|
|
317
|
-
/* @__PURE__ */ o(
|
|
318
|
-
ce,
|
|
319
|
-
{
|
|
320
|
-
onHandleReady: B,
|
|
321
|
-
onMarkerSelect: (e) => r == null ? void 0 : r(e)
|
|
322
|
-
}
|
|
323
|
-
),
|
|
324
|
-
(f ?? []).map((e) => {
|
|
325
|
-
const t = l != null && l === e.id, v = b("mapView.markerLabel", {
|
|
326
|
-
label: e.label ?? e.id
|
|
327
|
-
});
|
|
328
|
-
return y ? /* @__PURE__ */ o(
|
|
329
|
-
Y,
|
|
330
|
-
{
|
|
331
|
-
position: e.position,
|
|
332
|
-
title: v,
|
|
333
|
-
"aria-label": v,
|
|
334
|
-
"data-selected": t ? "true" : "false",
|
|
335
|
-
onClick: () => r == null ? void 0 : r(e.id),
|
|
336
|
-
children: /* @__PURE__ */ o(
|
|
337
|
-
k,
|
|
338
|
-
{
|
|
339
|
-
background: "var(--primary)",
|
|
340
|
-
borderColor: "var(--primary)",
|
|
341
|
-
glyphColor: "var(--primary-foreground)"
|
|
342
|
-
}
|
|
343
|
-
)
|
|
344
|
-
},
|
|
345
|
-
e.id
|
|
346
|
-
) : /* @__PURE__ */ o(
|
|
347
|
-
C,
|
|
348
|
-
{
|
|
349
|
-
position: e.position,
|
|
350
|
-
title: v,
|
|
351
|
-
onClick: () => r == null ? void 0 : r(e.id)
|
|
352
|
-
},
|
|
353
|
-
e.id
|
|
354
|
-
);
|
|
355
|
-
})
|
|
356
|
-
]
|
|
357
|
-
}
|
|
358
|
-
)
|
|
359
|
-
}
|
|
360
|
-
) : /* @__PURE__ */ o(
|
|
361
|
-
pe,
|
|
362
|
-
{
|
|
363
|
-
address: p,
|
|
364
|
-
description: L ?? b("mapView.consentDescription"),
|
|
365
|
-
onLoadMap: U,
|
|
366
|
-
consentCta: M,
|
|
367
|
-
openInGoogleMapsHref: $
|
|
368
|
-
}
|
|
369
|
-
) })
|
|
370
|
-
}
|
|
371
|
-
);
|
|
372
|
-
}
|
|
373
|
-
);
|
|
374
|
-
me.displayName = "MapView";
|
|
375
|
-
export {
|
|
376
|
-
me as M
|
|
377
|
-
};
|
|
378
|
-
//# sourceMappingURL=map-view-CsaHfoo6.js.map
|