@alfadocs/ui-kit 0.42.0 → 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/{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/{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-DsZbyzX6.js → cycle-calculator-Dln-y1k_.js} +43 -42
- 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/{due-date-calculator-s_CBgaFs.js → due-date-calculator-Cc4dRqTI.js} +46 -38
- package/dist/_chunks/{editable-currency-cell-renderer-BhUkRiPZ.js → editable-currency-cell-renderer-9jqwDv5x.js} +2 -2
- 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/{gestation-BXEgDGmP.js → gestation-mWF4AXea.js} +3 -3
- package/dist/_chunks/{gestational-age-calculator-CWOG3bkI.js → gestational-age-calculator-ZMSrzkRW.js} +42 -41
- package/dist/_chunks/{header-CTZWX-tm.js → header-Ce1Br27u.js} +70 -75
- package/dist/_chunks/{hi-wkq_rQAh.js → hi-Dj3oYd84.js} +2 -2
- package/dist/_chunks/{insert-result-DtQQeSSf.js → insert-result-DisOY2G-.js} +91 -75
- 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/{marketplace-app-shell-kVAVycz_.js → marketplace-app-shell-Dc5cTIt8.js} +186 -149
- package/dist/_chunks/{nl-xOogO4sZ.js → nl-D9kHCmp3.js} +2 -2
- package/dist/_chunks/{patient-shell-lDX3wwu6.js → patient-shell-CnT4L8gn.js} +2 -2
- package/dist/_chunks/{pl-GnOW6eGK.js → pl-B3Smqpkr.js} +3 -3
- package/dist/_chunks/{pregnancy-weight-gain-B7kBK-ZR.js → pregnancy-weight-gain-zZL5Ir2-.js} +49 -48
- package/dist/_chunks/{pt-_bV5b5RW.js → pt-D3J-1c_7.js} +6 -6
- 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/{sign-document-QHfcNKFj.js → sign-document-B-3k_0LO.js} +165 -137
- 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-C4II-7ej.js → tab-bar-Xetknddo.js} +53 -34
- package/dist/_chunks/{tr-CMSs_Vgf.js → tr-OKUOuhMW.js} +2 -2
- package/dist/_chunks/{unit-converter-D1UrEUxa.js → unit-converter-CuXCXJhK.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/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 +57 -2
- package/dist/components/badge/badge.d.ts +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/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/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/due-date-calculator/index.js +2 -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/index.d.ts +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/public-header/public-header.d.ts +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/stat/stat.d.ts +1 -1
- package/dist/components/tab-bar/index.d.ts +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tab-bar/tab-bar.d.ts +44 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/index.js +495 -494
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +57 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1411 -2
- package/package.json +1 -1
- package/dist/_chunks/bmi-calculator-D4juUcyF.js +0 -219
- package/dist/_chunks/react-day-picker-CdtIiKjx.js +0 -3174
- package/dist/_chunks/subDays-_T9YeKPX.js +0 -8
|
@@ -4,13 +4,13 @@ import { useTranslation as ee } from "react-i18next";
|
|
|
4
4
|
import * as f from "@radix-ui/react-popover";
|
|
5
5
|
import { u as te } from "./use-controllable-state-BiY4xTzM.js";
|
|
6
6
|
import { u as ae } from "./form-field-context-B3APVHKx.js";
|
|
7
|
-
import { b as ne, u as re, g as se, c as oe, e as T, s as W, f as ie, h as de, j as v, d as ce, C as le, k as pe, t as ge, p as ue, D as me, l as fe, m as he } from "./
|
|
8
|
-
import { s as R } from "./subDays-
|
|
9
|
-
import { u as
|
|
10
|
-
function
|
|
7
|
+
import { b as ne, u as re, g as se, c as oe, e as T, s as W, f as ie, h as de, j as v, d as ce, C as le, k as pe, t as ge, p as ue, D as me, l as fe, m as he, n as ke } from "./date-picker-variants-DLi1Va_e.js";
|
|
8
|
+
import { s as R } from "./subDays-Dv7q9S7u.js";
|
|
9
|
+
import { u as ye } from "./registry-nPAVE19X.js";
|
|
10
|
+
function be(a, s, i) {
|
|
11
11
|
return ne(a, -1, i);
|
|
12
12
|
}
|
|
13
|
-
const
|
|
13
|
+
const ve = {
|
|
14
14
|
id: "date-range-picker",
|
|
15
15
|
capabilities: ["range_pick", "open", "close"],
|
|
16
16
|
state: {
|
|
@@ -81,7 +81,7 @@ const be = {
|
|
|
81
81
|
description: "Sourced from the id prop."
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
},
|
|
84
|
+
}, Re = Q(
|
|
85
85
|
({
|
|
86
86
|
value: a,
|
|
87
87
|
defaultValue: s,
|
|
@@ -137,7 +137,7 @@ const be = {
|
|
|
137
137
|
{
|
|
138
138
|
label: r("inputs.dateRangePicker.presets.lastWeek", "Last week"),
|
|
139
139
|
range: () => {
|
|
140
|
-
const e =
|
|
140
|
+
const e = be(/* @__PURE__ */ new Date());
|
|
141
141
|
return {
|
|
142
142
|
from: W(e, { locale: o }),
|
|
143
143
|
to: T(e, { locale: o })
|
|
@@ -163,13 +163,13 @@ const be = {
|
|
|
163
163
|
}, J = (e) => {
|
|
164
164
|
const u = e.range();
|
|
165
165
|
d(u), O(u.from), g(!1);
|
|
166
|
-
},
|
|
166
|
+
}, N = (() => {
|
|
167
167
|
if (t.from && t.to) {
|
|
168
168
|
const e = v(t.from, y, { locale: o }), u = v(t.to, y, { locale: o });
|
|
169
169
|
return `${e} – ${u}`;
|
|
170
170
|
}
|
|
171
171
|
return t.from ? v(t.from, y, { locale: o }) : "";
|
|
172
|
-
})(),
|
|
172
|
+
})(), M = (() => {
|
|
173
173
|
if (t.from && t.to) {
|
|
174
174
|
const e = ce(t.to, t.from) + 1;
|
|
175
175
|
return r("inputs.dateRangePicker.days", "{{count}} days", {
|
|
@@ -188,7 +188,7 @@ const be = {
|
|
|
188
188
|
}),
|
|
189
189
|
[t, d, p]
|
|
190
190
|
);
|
|
191
|
-
return z(B, () => b, [b]),
|
|
191
|
+
return z(B, () => b, [b]), ye(ve, b, k), /* @__PURE__ */ n(f.Root, { open: p, onOpenChange: g, children: /* @__PURE__ */ m(
|
|
192
192
|
"div",
|
|
193
193
|
{
|
|
194
194
|
className: j,
|
|
@@ -211,8 +211,8 @@ const be = {
|
|
|
211
211
|
/* @__PURE__ */ n(
|
|
212
212
|
"span",
|
|
213
213
|
{
|
|
214
|
-
className:
|
|
215
|
-
children:
|
|
214
|
+
className: N ? "ds:text-foreground" : "ds:text-muted-foreground",
|
|
215
|
+
children: N || _
|
|
216
216
|
}
|
|
217
217
|
),
|
|
218
218
|
/* @__PURE__ */ n(
|
|
@@ -231,7 +231,7 @@ const be = {
|
|
|
231
231
|
{
|
|
232
232
|
sideOffset: 4,
|
|
233
233
|
align: "start",
|
|
234
|
-
className:
|
|
234
|
+
className: ke(),
|
|
235
235
|
children: /* @__PURE__ */ m("div", { className: "ds:flex ds:gap-[var(--spacing-md)]", children: [
|
|
236
236
|
S.length > 0 ? /* @__PURE__ */ n("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:min-w-[8rem] ds:border-e ds:border-border ds:pe-[var(--spacing-md)]", children: S.map((e) => /* @__PURE__ */ n(
|
|
237
237
|
"button",
|
|
@@ -258,16 +258,17 @@ const be = {
|
|
|
258
258
|
showOutsideDays: !0,
|
|
259
259
|
fixedWeeks: !0,
|
|
260
260
|
pagedNavigation: !0,
|
|
261
|
+
classNames: he,
|
|
261
262
|
components: { Chevron: fe }
|
|
262
263
|
}
|
|
263
264
|
),
|
|
264
|
-
|
|
265
|
+
M ? /* @__PURE__ */ n(
|
|
265
266
|
"div",
|
|
266
267
|
{
|
|
267
268
|
role: "status",
|
|
268
269
|
"aria-live": "polite",
|
|
269
270
|
className: "type-body-sm ds:text-muted-foreground ds:mt-[var(--spacing-sm)] ds:text-center",
|
|
270
|
-
children:
|
|
271
|
+
children: M
|
|
271
272
|
}
|
|
272
273
|
) : null
|
|
273
274
|
] })
|
|
@@ -279,9 +280,9 @@ const be = {
|
|
|
279
280
|
) });
|
|
280
281
|
}
|
|
281
282
|
);
|
|
282
|
-
|
|
283
|
+
Re.displayName = "DateRangePicker";
|
|
283
284
|
export {
|
|
284
|
-
|
|
285
|
-
|
|
285
|
+
Re as D,
|
|
286
|
+
ve as d
|
|
286
287
|
};
|
|
287
|
-
//# sourceMappingURL=date-range-picker-
|
|
288
|
+
//# sourceMappingURL=date-range-picker-DcXuI9y7.js.map
|
|
@@ -6,8 +6,8 @@ import * as k from "@radix-ui/react-popover";
|
|
|
6
6
|
import { u as me } from "./use-controllable-state-BiY4xTzM.js";
|
|
7
7
|
import { u as pe } from "./form-field-context-B3APVHKx.js";
|
|
8
8
|
import { T as fe } from "./time-picker-B5umYwfv.js";
|
|
9
|
-
import { u as ge, c as he,
|
|
10
|
-
import { u as
|
|
9
|
+
import { u as ge, c as he, o as ve, i as be, j as ye, C as Te, k as ke, t as we, D as De, l as Ce, m as Pe, n as xe } from "./date-picker-variants-DLi1Va_e.js";
|
|
10
|
+
import { u as Oe } from "./registry-nPAVE19X.js";
|
|
11
11
|
import { t as j } from "./isSameDay-DUEiAT0G.js";
|
|
12
12
|
function K(e, t, r) {
|
|
13
13
|
const i = j(e, r == null ? void 0 : r.in);
|
|
@@ -17,7 +17,7 @@ function A(e, t, r) {
|
|
|
17
17
|
const i = j(e, r == null ? void 0 : r.in);
|
|
18
18
|
return i.setMinutes(t), i;
|
|
19
19
|
}
|
|
20
|
-
const
|
|
20
|
+
const Ne = {
|
|
21
21
|
id: "date-time-picker",
|
|
22
22
|
capabilities: ["pick", "open", "close"],
|
|
23
23
|
state: {
|
|
@@ -96,7 +96,7 @@ function Me(e, t) {
|
|
|
96
96
|
return "";
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Ve(e) {
|
|
100
100
|
if (!e || e === "local") return !1;
|
|
101
101
|
try {
|
|
102
102
|
const t = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
@@ -105,7 +105,7 @@ function Ne(e) {
|
|
|
105
105
|
return !1;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
const
|
|
108
|
+
const Se = ce(
|
|
109
109
|
[
|
|
110
110
|
"ds:w-full ds:rounded-[var(--radius-sm)]",
|
|
111
111
|
"ds:bg-primary ds:text-primary-foreground",
|
|
@@ -125,7 +125,7 @@ const Ve = ce(
|
|
|
125
125
|
},
|
|
126
126
|
defaultVariants: { size: "md" }
|
|
127
127
|
}
|
|
128
|
-
),
|
|
128
|
+
), Ie = ne(
|
|
129
129
|
({
|
|
130
130
|
value: e,
|
|
131
131
|
defaultValue: t,
|
|
@@ -142,10 +142,10 @@ const Ve = ce(
|
|
|
142
142
|
className: E,
|
|
143
143
|
id: U
|
|
144
144
|
}, W) => {
|
|
145
|
-
const { t: l, i18n:
|
|
145
|
+
const { t: l, i18n: N } = ue(), c = pe(), D = U ?? c.id, M = c.disabled || _, q = c.invalid ? "error" : "default", V = ge(N.language), G = z ?? l("inputs.dateTimePicker.placeholder", "Select date and time"), J = l("inputs.dateTimePicker.apply", "Apply"), Q = l(
|
|
146
146
|
"inputs.dateTimePicker.outOfRange",
|
|
147
147
|
"Date/time is out of allowed range"
|
|
148
|
-
), S = (w !== void 0 ? w :
|
|
148
|
+
), S = (w !== void 0 ? w : Ve(i)) ? Me(N.language, i) : "", [X, I] = me({
|
|
149
149
|
value: e,
|
|
150
150
|
defaultValue: t,
|
|
151
151
|
onChange: r
|
|
@@ -192,20 +192,20 @@ const Ve = ce(
|
|
|
192
192
|
}),
|
|
193
193
|
[n, b, h]
|
|
194
194
|
);
|
|
195
|
-
return le(W, () => x, [x]),
|
|
195
|
+
return le(W, () => x, [x]), Oe(Ne, x, D), /* @__PURE__ */ s(k.Root, { open: h, onOpenChange: ee, children: /* @__PURE__ */ y(
|
|
196
196
|
"div",
|
|
197
197
|
{
|
|
198
198
|
className: E,
|
|
199
199
|
"data-component": "date-time-picker",
|
|
200
200
|
"data-component-id": D,
|
|
201
201
|
children: [
|
|
202
|
-
/* @__PURE__ */ s(k.Trigger, { asChild: !0, disabled:
|
|
202
|
+
/* @__PURE__ */ s(k.Trigger, { asChild: !0, disabled: M, children: /* @__PURE__ */ y(
|
|
203
203
|
"button",
|
|
204
204
|
{
|
|
205
205
|
ref: L,
|
|
206
206
|
id: D,
|
|
207
207
|
type: "button",
|
|
208
|
-
disabled:
|
|
208
|
+
disabled: M,
|
|
209
209
|
"aria-describedby": c.describedBy || void 0,
|
|
210
210
|
"aria-invalid": c.invalid || void 0,
|
|
211
211
|
"aria-haspopup": "dialog",
|
|
@@ -235,7 +235,7 @@ const Ve = ce(
|
|
|
235
235
|
{
|
|
236
236
|
sideOffset: 4,
|
|
237
237
|
align: "start",
|
|
238
|
-
className:
|
|
238
|
+
className: xe(),
|
|
239
239
|
children: /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:sm:flex-row ds:gap-[var(--spacing-md)]", children: [
|
|
240
240
|
/* @__PURE__ */ s("div", { role: "region", "aria-label": re, children: /* @__PURE__ */ s(
|
|
241
241
|
De,
|
|
@@ -249,6 +249,7 @@ const Ve = ce(
|
|
|
249
249
|
locale: V,
|
|
250
250
|
showOutsideDays: !0,
|
|
251
251
|
fixedWeeks: !0,
|
|
252
|
+
classNames: Pe,
|
|
252
253
|
components: { Chevron: Ce }
|
|
253
254
|
}
|
|
254
255
|
) }),
|
|
@@ -287,7 +288,7 @@ const Ve = ce(
|
|
|
287
288
|
type: "button",
|
|
288
289
|
onClick: se,
|
|
289
290
|
disabled: !o || R,
|
|
290
|
-
className:
|
|
291
|
+
className: Se({ size: f }),
|
|
291
292
|
children: J
|
|
292
293
|
}
|
|
293
294
|
)
|
|
@@ -302,9 +303,9 @@ const Ve = ce(
|
|
|
302
303
|
) });
|
|
303
304
|
}
|
|
304
305
|
);
|
|
305
|
-
|
|
306
|
+
Ie.displayName = "DateTimePicker";
|
|
306
307
|
export {
|
|
307
|
-
|
|
308
|
-
|
|
308
|
+
Ie as D,
|
|
309
|
+
Ne as d
|
|
309
310
|
};
|
|
310
|
-
//# sourceMappingURL=date-time-picker-
|
|
311
|
+
//# sourceMappingURL=date-time-picker-RimumeLR.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { q as s, r as n, v as o, w as u } from "./date-picker-variants-DLi1Va_e.js";
|
|
2
2
|
const d = {
|
|
3
3
|
lessThanXSeconds: {
|
|
4
4
|
standalone: {
|
|
@@ -474,4 +474,4 @@ const d = {
|
|
|
474
474
|
export {
|
|
475
475
|
O as de
|
|
476
476
|
};
|
|
477
|
-
//# sourceMappingURL=de-
|
|
477
|
+
//# sourceMappingURL=de-bTBGdjPS.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as s, jsxs as v } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as R, useEffect as T, useMemo as O, forwardRef as d, useContext as j, createContext as
|
|
2
|
+
import { useRef as R, useEffect as T, useMemo as O, forwardRef as d, useContext as j, createContext as E } from "react";
|
|
3
3
|
import * as t from "@radix-ui/react-dialog";
|
|
4
|
-
import { c as
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import { I } from "./icon-button-CKEOrN37.js";
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { X as
|
|
10
|
-
const
|
|
4
|
+
import { c as _ } from "./index-D2ZczOXr.js";
|
|
5
|
+
import { useTranslation as k } from "react-i18next";
|
|
6
|
+
import { I as z } from "./icon-button-CKEOrN37.js";
|
|
7
|
+
import { u as I } from "./use-controllable-state-BiY4xTzM.js";
|
|
8
|
+
import { u as B } from "./registry-nPAVE19X.js";
|
|
9
|
+
import { X as S } from "./x-CCcI3eJp.js";
|
|
10
|
+
const A = {
|
|
11
11
|
id: "dialog",
|
|
12
12
|
capabilities: ["open", "close", "dismiss"],
|
|
13
13
|
state: {
|
|
@@ -48,14 +48,14 @@ const H = {
|
|
|
48
48
|
description: "Sourced from the id prop on Dialog.Root."
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
},
|
|
52
|
-
"ds
|
|
53
|
-
"ds:bg-[var(--background)]/[var(--opacity-70)]",
|
|
51
|
+
}, H = [
|
|
52
|
+
"ds-dialog__backdrop",
|
|
54
53
|
"ds:backdrop-blur-sm",
|
|
55
54
|
"ds:data-[state=open]:animate-in ds:data-[state=open]:fade-in-0",
|
|
56
55
|
"ds:data-[state=closed]:animate-out ds:data-[state=closed]:fade-out-0",
|
|
57
56
|
"ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
|
|
58
|
-
].join(" "),
|
|
57
|
+
].join(" "), V = [
|
|
58
|
+
"ds-dialog",
|
|
59
59
|
"ds:fixed ds:z-[var(--z-modal)]",
|
|
60
60
|
"ds:bg-[var(--popover)] ds:text-[var(--popover-foreground)]",
|
|
61
61
|
"ds:shadow-[var(--shadow-xl)]",
|
|
@@ -64,7 +64,7 @@ const H = {
|
|
|
64
64
|
"ds:data-[state=open]:animate-in ds:data-[state=open]:fade-in-0 ds:data-[state=open]:zoom-in-95",
|
|
65
65
|
"ds:data-[state=closed]:animate-out ds:data-[state=closed]:fade-out-0 ds:data-[state=closed]:zoom-out-95",
|
|
66
66
|
"ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
|
|
67
|
-
].join(" "), g = "ds:start-1/2 ds:top-1/2 ds:-translate-x-1/2 ds:-translate-y-1/2 ds:w-[calc(100%-var(--spacing-lg)*2)]",
|
|
67
|
+
].join(" "), g = "ds:start-1/2 ds:top-1/2 ds:-translate-x-1/2 ds:-translate-y-1/2 ds:w-[calc(100%-var(--spacing-lg)*2)]", F = _(V, {
|
|
68
68
|
variants: {
|
|
69
69
|
size: {
|
|
70
70
|
sm: `${g} ds:max-w-[448px] ds:rounded-[var(--radius-lg)] ds:overflow-y-auto ds:max-h-[85dvh]`,
|
|
@@ -74,7 +74,7 @@ const H = {
|
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
defaultVariants: { size: "md" }
|
|
77
|
-
}), f =
|
|
77
|
+
}), f = E(void 0), u = ({
|
|
78
78
|
children: o,
|
|
79
79
|
id: e,
|
|
80
80
|
open: a,
|
|
@@ -82,7 +82,7 @@ const H = {
|
|
|
82
82
|
onOpenChange: c,
|
|
83
83
|
...p
|
|
84
84
|
}) => {
|
|
85
|
-
const [m, n] =
|
|
85
|
+
const [m, n] = I({
|
|
86
86
|
value: a,
|
|
87
87
|
defaultValue: r ?? !1,
|
|
88
88
|
onChange: c
|
|
@@ -98,14 +98,14 @@ const H = {
|
|
|
98
98
|
}),
|
|
99
99
|
[n]
|
|
100
100
|
);
|
|
101
|
-
return
|
|
101
|
+
return B(A, N, e), /* @__PURE__ */ s(f.Provider, { value: e, children: /* @__PURE__ */ s(t.Root, { open: i, onOpenChange: n, ...p, children: o }) });
|
|
102
102
|
};
|
|
103
103
|
u.displayName = "Dialog.Root";
|
|
104
104
|
const h = d(({ children: o, ...e }, a) => /* @__PURE__ */ s(t.Trigger, { ref: a, ...e, children: o }));
|
|
105
105
|
h.displayName = "Dialog.Trigger";
|
|
106
106
|
const x = d(({ children: o, ...e }, a) => /* @__PURE__ */ s(t.Close, { ref: a, ...e, children: o }));
|
|
107
107
|
x.displayName = "Dialog.Close";
|
|
108
|
-
const
|
|
108
|
+
const D = d(
|
|
109
109
|
({
|
|
110
110
|
size: o = "md",
|
|
111
111
|
variant: e = "default",
|
|
@@ -114,13 +114,13 @@ const y = d(
|
|
|
114
114
|
children: c,
|
|
115
115
|
...p
|
|
116
116
|
}, m) => {
|
|
117
|
-
const { t: n } =
|
|
117
|
+
const { t: n } = k(), i = j(f), l = e === "alert" ? { role: "alertdialog" } : {};
|
|
118
118
|
return /* @__PURE__ */ v(t.Portal, { children: [
|
|
119
119
|
/* @__PURE__ */ s(
|
|
120
120
|
t.Overlay,
|
|
121
121
|
{
|
|
122
122
|
"data-component": "dialog-overlay",
|
|
123
|
-
className:
|
|
123
|
+
className: H
|
|
124
124
|
}
|
|
125
125
|
),
|
|
126
126
|
/* @__PURE__ */ v(
|
|
@@ -130,14 +130,19 @@ const y = d(
|
|
|
130
130
|
...l,
|
|
131
131
|
"data-component": "dialog",
|
|
132
132
|
"data-component-id": i,
|
|
133
|
-
className:
|
|
133
|
+
className: F({ size: o, className: r }),
|
|
134
134
|
...p,
|
|
135
135
|
children: [
|
|
136
136
|
c,
|
|
137
|
-
!a &&
|
|
138
|
-
|
|
137
|
+
!a && // Positioning wrapper. The interactive close is an IconButton
|
|
138
|
+
// (ghost / sm) — same lucide `X` glyph, 32px target, 16px icon,
|
|
139
|
+
// hover wash and focus ring that the vanilla `.ds-dialog__close`
|
|
140
|
+
// contract reproduces from the same tokens, so the React and
|
|
141
|
+
// non-React close buttons render identically.
|
|
142
|
+
/* @__PURE__ */ s("div", { className: "ds:absolute ds:end-[var(--spacing-md)] ds:top-[var(--spacing-md)]", children: /* @__PURE__ */ s(t.Close, { asChild: !0, children: /* @__PURE__ */ s(
|
|
143
|
+
z,
|
|
139
144
|
{
|
|
140
|
-
icon: /* @__PURE__ */ s(
|
|
145
|
+
icon: /* @__PURE__ */ s(S, {}),
|
|
141
146
|
intent: "ghost",
|
|
142
147
|
size: "sm",
|
|
143
148
|
"aria-label": n("common.close", "Close")
|
|
@@ -149,13 +154,17 @@ const y = d(
|
|
|
149
154
|
] });
|
|
150
155
|
}
|
|
151
156
|
);
|
|
152
|
-
|
|
153
|
-
const
|
|
157
|
+
D.displayName = "Dialog.Content";
|
|
158
|
+
const y = d(
|
|
154
159
|
({ className: o, ...e }, a) => /* @__PURE__ */ s(
|
|
155
160
|
"div",
|
|
156
161
|
{
|
|
157
162
|
ref: a,
|
|
158
163
|
className: [
|
|
164
|
+
// `ds-dialog__header` is the shared vanilla contract (src/styles.css);
|
|
165
|
+
// the Tailwind utilities reproduce it for hosts that render through
|
|
166
|
+
// this component, keeping the two surfaces identical.
|
|
167
|
+
"ds-dialog__header",
|
|
159
168
|
"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:pe-[var(--spacing-xl)]",
|
|
160
169
|
o
|
|
161
170
|
].filter(Boolean).join(" "),
|
|
@@ -163,17 +172,17 @@ const D = d(
|
|
|
163
172
|
}
|
|
164
173
|
)
|
|
165
174
|
);
|
|
166
|
-
|
|
167
|
-
const
|
|
175
|
+
y.displayName = "Dialog.Header";
|
|
176
|
+
const C = d(({ className: o, ...e }, a) => /* @__PURE__ */ s(
|
|
168
177
|
t.Title,
|
|
169
178
|
{
|
|
170
179
|
ref: a,
|
|
171
|
-
className: ["type-title-card ds:break-words", o].filter(Boolean).join(" "),
|
|
180
|
+
className: ["ds-dialog__title type-title-card ds:break-words", o].filter(Boolean).join(" "),
|
|
172
181
|
...e
|
|
173
182
|
}
|
|
174
183
|
));
|
|
175
|
-
|
|
176
|
-
const
|
|
184
|
+
C.displayName = "Dialog.Title";
|
|
185
|
+
const b = d(({ className: o, ...e }, a) => /* @__PURE__ */ s(
|
|
177
186
|
t.Description,
|
|
178
187
|
{
|
|
179
188
|
ref: a,
|
|
@@ -181,7 +190,7 @@ const C = d(({ className: o, ...e }, a) => /* @__PURE__ */ s(
|
|
|
181
190
|
...e
|
|
182
191
|
}
|
|
183
192
|
));
|
|
184
|
-
|
|
193
|
+
b.displayName = "Dialog.Description";
|
|
185
194
|
const w = d(
|
|
186
195
|
({ className: o, divider: e = !1, ...a }, r) => /* @__PURE__ */ s(
|
|
187
196
|
"div",
|
|
@@ -201,15 +210,15 @@ w.displayName = "Dialog.Footer";
|
|
|
201
210
|
const J = Object.assign(u, {
|
|
202
211
|
Root: u,
|
|
203
212
|
Trigger: h,
|
|
204
|
-
Content:
|
|
205
|
-
Header:
|
|
206
|
-
Title:
|
|
207
|
-
Description:
|
|
213
|
+
Content: D,
|
|
214
|
+
Header: y,
|
|
215
|
+
Title: C,
|
|
216
|
+
Description: b,
|
|
208
217
|
Footer: w,
|
|
209
218
|
Close: x
|
|
210
219
|
});
|
|
211
220
|
export {
|
|
212
221
|
J as D,
|
|
213
|
-
|
|
222
|
+
A as d
|
|
214
223
|
};
|
|
215
|
-
//# sourceMappingURL=dialog-
|
|
224
|
+
//# sourceMappingURL=dialog-DOYgd75U.js.map
|
|
@@ -1,45 +1,46 @@
|
|
|
1
1
|
import { jsxs as l, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
2
|
+
import { forwardRef as _, useState as i, useMemo as g, useEffect as I } from "react";
|
|
3
|
+
import { c as S } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as z } from "react-i18next";
|
|
5
5
|
import { R as s } from "./radio-TWf9Q-mp.js";
|
|
6
6
|
import { R as h } from "./radio-group-CLjK-SlK.js";
|
|
7
7
|
import { F as v } from "./form-field-BOm9hK35.js";
|
|
8
|
-
import { D as
|
|
9
|
-
import { N as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
8
|
+
import { D as G } from "./date-picker-Bq7xhMA-.js";
|
|
9
|
+
import { N as M } from "./number-input-Dj5L3pXK.js";
|
|
10
|
+
import { C } from "./card-DPmk26CL.js";
|
|
11
|
+
import { B as R } from "./badge-zsf5i5bH.js";
|
|
12
|
+
import { I as V } from "./insert-result-DisOY2G-.js";
|
|
13
|
+
import { D as b, c as j } from "./gestation-mWF4AXea.js";
|
|
14
|
+
const H = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
14
15
|
variants: {
|
|
15
16
|
width: { full: "ds:w-full", auto: "ds:inline-flex" }
|
|
16
17
|
},
|
|
17
18
|
defaultVariants: { width: "full" }
|
|
18
|
-
}),
|
|
19
|
+
}), Y = {
|
|
19
20
|
preconception: "neutral",
|
|
20
21
|
first: "info",
|
|
21
22
|
second: "success",
|
|
22
23
|
third: "warning",
|
|
23
24
|
postterm: "error"
|
|
24
|
-
},
|
|
25
|
+
}, K = {
|
|
25
26
|
lmp: "dueDateCalculator.lmpDate",
|
|
26
27
|
conception: "dueDateCalculator.conceptionDate",
|
|
27
28
|
ivf: "dueDateCalculator.transferDate"
|
|
28
|
-
},
|
|
29
|
+
}, P = _(
|
|
29
30
|
({
|
|
30
|
-
defaultMethod:
|
|
31
|
+
defaultMethod: y = "lmp",
|
|
31
32
|
onResultChange: d,
|
|
32
33
|
onInsert: p,
|
|
33
34
|
insertVariant: D = "insert",
|
|
34
|
-
onCopy:
|
|
35
|
-
onError:
|
|
36
|
-
id:
|
|
37
|
-
width:
|
|
38
|
-
className:
|
|
39
|
-
},
|
|
40
|
-
const { t: e, i18n: f } =
|
|
35
|
+
onCopy: x,
|
|
36
|
+
onError: N,
|
|
37
|
+
id: L,
|
|
38
|
+
width: A,
|
|
39
|
+
className: w
|
|
40
|
+
}, E) => {
|
|
41
|
+
const { t: e, i18n: f } = z(), [r, T] = i(y), [o, $] = i(void 0), [u, B] = i(
|
|
41
42
|
b
|
|
42
|
-
), [n, F] = i(5), t = g(() => o ?
|
|
43
|
+
), [n, F] = i(5), t = g(() => o ? j(
|
|
43
44
|
{
|
|
44
45
|
method: r,
|
|
45
46
|
date: o,
|
|
@@ -51,17 +52,17 @@ const j = I("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
51
52
|
() => new Intl.DateTimeFormat(f.language, { dateStyle: "long" }),
|
|
52
53
|
[f.language]
|
|
53
54
|
);
|
|
54
|
-
|
|
55
|
+
I(() => {
|
|
55
56
|
d == null || d(t);
|
|
56
57
|
}, [t, d]);
|
|
57
58
|
const k = g(() => /* @__PURE__ */ new Date(), []);
|
|
58
59
|
return /* @__PURE__ */ l(
|
|
59
60
|
"div",
|
|
60
61
|
{
|
|
61
|
-
ref:
|
|
62
|
+
ref: E,
|
|
62
63
|
"data-component": "due-date-calculator",
|
|
63
|
-
"data-component-id":
|
|
64
|
-
className:
|
|
64
|
+
"data-component-id": L,
|
|
65
|
+
className: H({ width: A, className: w }),
|
|
65
66
|
children: [
|
|
66
67
|
/* @__PURE__ */ l(
|
|
67
68
|
h,
|
|
@@ -69,7 +70,7 @@ const j = I("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
69
70
|
label: e("dueDateCalculator.method.label"),
|
|
70
71
|
variant: "horizontal",
|
|
71
72
|
value: r,
|
|
72
|
-
onValueChange: (m) =>
|
|
73
|
+
onValueChange: (m) => T(m),
|
|
73
74
|
children: [
|
|
74
75
|
/* @__PURE__ */ a(s, { label: e("dueDateCalculator.method.lmp"), value: "lmp" }),
|
|
75
76
|
/* @__PURE__ */ a(
|
|
@@ -84,20 +85,20 @@ const j = I("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
84
85
|
}
|
|
85
86
|
),
|
|
86
87
|
/* @__PURE__ */ l("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
|
|
87
|
-
/* @__PURE__ */ a(v, { label: e(
|
|
88
|
+
/* @__PURE__ */ a(v, { label: e(K[r]), children: /* @__PURE__ */ a(G, { value: o, onChange: $, maxDate: k }) }),
|
|
88
89
|
r === "lmp" && /* @__PURE__ */ a(
|
|
89
90
|
v,
|
|
90
91
|
{
|
|
91
92
|
label: e("dueDateCalculator.cycleLength"),
|
|
92
93
|
description: e("dueDateCalculator.cycleLengthHint"),
|
|
93
94
|
children: /* @__PURE__ */ a(
|
|
94
|
-
|
|
95
|
+
M,
|
|
95
96
|
{
|
|
96
97
|
mode: "integer",
|
|
97
98
|
min: 20,
|
|
98
99
|
max: 45,
|
|
99
100
|
value: u,
|
|
100
|
-
onChange:
|
|
101
|
+
onChange: B
|
|
101
102
|
}
|
|
102
103
|
)
|
|
103
104
|
}
|
|
@@ -121,11 +122,18 @@ const j = I("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
121
122
|
)}. ${e("dueDateCalculator.result.trimesterLabel")}: ${e(
|
|
122
123
|
`dueDateCalculator.trimester.${t.trimester}`
|
|
123
124
|
)}.` : "" }),
|
|
124
|
-
t ? /* @__PURE__ */
|
|
125
|
+
t ? /* @__PURE__ */ a(C, { variant: "elevated", children: /* @__PURE__ */ l(C.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
125
126
|
/* @__PURE__ */ l("dl", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3", children: [
|
|
126
127
|
/* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]", children: [
|
|
127
128
|
/* @__PURE__ */ a("dt", { className: "type-label ds:text-muted-foreground", children: e("dueDateCalculator.result.trimesterLabel") }),
|
|
128
|
-
/* @__PURE__ */ a("dd", { children: /* @__PURE__ */ a(
|
|
129
|
+
/* @__PURE__ */ a("dd", { children: /* @__PURE__ */ a(
|
|
130
|
+
R,
|
|
131
|
+
{
|
|
132
|
+
variant: Y[t.trimester],
|
|
133
|
+
size: "lg",
|
|
134
|
+
children: e(`dueDateCalculator.trimester.${t.trimester}`)
|
|
135
|
+
}
|
|
136
|
+
) })
|
|
129
137
|
] }),
|
|
130
138
|
/* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
131
139
|
/* @__PURE__ */ a("dt", { className: "type-label ds:text-muted-foreground", children: e("dueDateCalculator.result.gestationLabel") }),
|
|
@@ -140,12 +148,12 @@ const j = I("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
140
148
|
] })
|
|
141
149
|
] }),
|
|
142
150
|
D === "copy" || p ? /* @__PURE__ */ a(
|
|
143
|
-
|
|
151
|
+
V,
|
|
144
152
|
{
|
|
145
153
|
variant: D,
|
|
146
154
|
onInsert: p,
|
|
147
|
-
onCopy:
|
|
148
|
-
onError:
|
|
155
|
+
onCopy: x,
|
|
156
|
+
onError: N,
|
|
149
157
|
card: {
|
|
150
158
|
title: e("insert.title.dueDate"),
|
|
151
159
|
highlight: c.format(t.dueDate),
|
|
@@ -171,14 +179,14 @@ const j = I("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
171
179
|
}
|
|
172
180
|
}
|
|
173
181
|
) : null
|
|
174
|
-
] }) : /* @__PURE__ */ a("p", { className: "type-body ds:text-muted-foreground", children: e("dueDateCalculator.empty") })
|
|
182
|
+
] }) }) : /* @__PURE__ */ a("p", { className: "type-body ds:text-muted-foreground", children: e("dueDateCalculator.empty") })
|
|
175
183
|
]
|
|
176
184
|
}
|
|
177
185
|
);
|
|
178
186
|
}
|
|
179
187
|
);
|
|
180
|
-
|
|
188
|
+
P.displayName = "DueDateCalculator";
|
|
181
189
|
export {
|
|
182
|
-
|
|
190
|
+
P as D
|
|
183
191
|
};
|
|
184
|
-
//# sourceMappingURL=due-date-calculator-
|
|
192
|
+
//# sourceMappingURL=due-date-calculator-Cc4dRqTI.js.map
|
|
@@ -26,7 +26,7 @@ import { S as Ie } from "./select-hsCaJSX3.js";
|
|
|
26
26
|
import { u as zt } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
27
27
|
import { u as At } from "./use-theme-C2dHKUAN.js";
|
|
28
28
|
import { u as Pt } from "./registry-nPAVE19X.js";
|
|
29
|
-
import { D as ze } from "./date-range-picker-
|
|
29
|
+
import { D as ze } from "./date-range-picker-DcXuI9y7.js";
|
|
30
30
|
import { M as Ot } from "./multi-select-DOLO3K_z.js";
|
|
31
31
|
import { A as Ae } from "./autocomplete-DIgdhCGJ.js";
|
|
32
32
|
import { N as ee } from "./number-input-Dj5L3pXK.js";
|
|
@@ -2332,4 +2332,4 @@ export {
|
|
|
2332
2332
|
Be as q,
|
|
2333
2333
|
xn as u
|
|
2334
2334
|
};
|
|
2335
|
-
//# sourceMappingURL=editable-currency-cell-renderer-
|
|
2335
|
+
//# sourceMappingURL=editable-currency-cell-renderer-9jqwDv5x.js.map
|