@alfadocs/ui-kit-debug 0.94.0 → 0.96.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/{apexcharts-theme-fAQXLIMW.js → apexcharts-theme-B_AxGC_h.js} +25 -20
- package/dist/_chunks/apexcharts-theme-B_AxGC_h.js.map +1 -0
- package/dist/_chunks/chart-DR68TJD5.js +705 -0
- package/dist/_chunks/chart-DR68TJD5.js.map +1 -0
- package/dist/_chunks/{date-range-picker-Cfv4Sr63.js → date-range-picker-pEG3Ln3i.js} +314 -297
- package/dist/_chunks/date-range-picker-pEG3Ln3i.js.map +1 -0
- package/dist/_chunks/{link-cell-renderer-_LDZhY4r.js → link-cell-renderer-flfZh2qY.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-_LDZhY4r.js.map → link-cell-renderer-flfZh2qY.js.map} +1 -1
- package/dist/_chunks/{patient-table-CFM92QqU.js → patient-table-CvZTIM2R.js} +2 -2
- package/dist/_chunks/{patient-table-CFM92QqU.js.map → patient-table-CvZTIM2R.js.map} +1 -1
- package/dist/_chunks/{radiograph-panel.agent-DDnDGVpN.js → radiograph-panel.agent-AsXJBr1p.js} +2 -2
- package/dist/_chunks/{radiograph-panel.agent-DDnDGVpN.js.map → radiograph-panel.agent-AsXJBr1p.js.map} +1 -1
- package/dist/_chunks/signature-request-BzXTV_RH.js +403 -0
- package/dist/_chunks/signature-request-BzXTV_RH.js.map +1 -0
- package/dist/_chunks/{sparkline-o6JH4O66.js → sparkline-DcXqRZoq.js} +2 -2
- package/dist/_chunks/{sparkline-o6JH4O66.js.map → sparkline-DcXqRZoq.js.map} +1 -1
- package/dist/agent-catalog.json +10 -6
- package/dist/agent-i18n/en.json +1 -1
- package/dist/components/chart/chart.d.ts +12 -5
- package/dist/components/chart/chart.d.ts.map +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts +10 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts.map +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/sparkline/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +3 -1
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +3 -1
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +3 -1
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +3 -1
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +3 -1
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +3 -1
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +3 -1
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +3 -1
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +3 -1
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +3 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +3 -1
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +3 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +3 -1
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +3 -1
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +3 -1
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +3 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +3 -1
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +3 -1
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +3 -1
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +3 -1
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +3 -1
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +3 -1
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +3 -1
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +3 -1
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +3 -1
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +3 -1
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +3 -1
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +3 -1
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +3 -1
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +3 -1
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +3 -1
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +3 -1
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +3 -1
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +3 -1
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +3 -1
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +3 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/locales/ar.json +3 -1
- package/dist/locales/de.json +3 -1
- package/dist/locales/el.json +3 -1
- package/dist/locales/en.json +3 -1
- package/dist/locales/es.json +3 -1
- package/dist/locales/fr.json +3 -1
- package/dist/locales/hi.json +3 -1
- package/dist/locales/it.json +3 -1
- package/dist/locales/ja.json +3 -1
- package/dist/locales/nl.json +3 -1
- package/dist/locales/pl.json +3 -1
- package/dist/locales/pt.json +3 -1
- package/dist/locales/ro.json +3 -1
- package/dist/locales/ru.json +3 -1
- package/dist/locales/sq.json +3 -1
- package/dist/locales/sv.json +3 -1
- package/dist/locales/tr.json +3 -1
- package/dist/locales/zh.json +3 -1
- package/dist/patterns/signature-request/index.d.ts +1 -1
- package/dist/patterns/signature-request/index.d.ts.map +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signature-request/signature-request.d.ts +30 -3
- package/dist/patterns/signature-request/signature-request.d.ts.map +1 -1
- package/dist/tokens/apexcharts-theme.d.ts +19 -33
- package/dist/tokens/apexcharts-theme.d.ts.map +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/apexcharts-theme-fAQXLIMW.js.map +0 -1
- package/dist/_chunks/chart-DqxVCm1I.js +0 -664
- package/dist/_chunks/chart-DqxVCm1I.js.map +0 -1
- package/dist/_chunks/date-range-picker-Cfv4Sr63.js.map +0 -1
- package/dist/_chunks/signature-request-D_6jgDZd.js +0 -324
- package/dist/_chunks/signature-request-D_6jgDZd.js.map +0 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as r, jsxs as c, Fragment as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { S as
|
|
9
|
-
import { u as
|
|
10
|
-
import { l as
|
|
11
|
-
import { s as
|
|
12
|
-
import { C as
|
|
13
|
-
import { C as
|
|
14
|
-
import { i as
|
|
15
|
-
import { p as
|
|
16
|
-
function
|
|
17
|
-
return
|
|
1
|
+
import { jsx as r, jsxs as c, Fragment as Ct } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Et, useState as b, useRef as fe, useId as M, useCallback as We, useEffect as je, useMemo as Mt, useImperativeHandle as Ft, Fragment as Kt } from "react";
|
|
3
|
+
import { useTranslation as At } from "react-i18next";
|
|
4
|
+
import * as H from "@radix-ui/react-popover";
|
|
5
|
+
import * as Q from "@radix-ui/react-radio-group";
|
|
6
|
+
import { u as me } from "./use-controllable-state-BiY4xTzM.js";
|
|
7
|
+
import { u as Lt } from "./form-field-context-B3APVHKx.js";
|
|
8
|
+
import { S as $t } from "./switch-OILsBLWo.js";
|
|
9
|
+
import { u as Wt } from "./registry-DvAUVLHh.js";
|
|
10
|
+
import { l as jt, m as qt, u as _t, g as zt, b as Bt, f as k, n as qe, s as _e, o as Yt, q as Ut, k as ge, a as Ht, d as Qt, t as Jt, r as ze, v as Be, w as Ye, p as Xt, x as Zt, D as ea, C as ta, y as aa, e as ra, z as J, h as sa, j as na, i as ve, c as ia } from "./date-picker-variants-eL6HjWvw.js";
|
|
11
|
+
import { s as F } from "./subDays-BcNi04uf.js";
|
|
12
|
+
import { C as oa } from "./calendar-days-BGWklvE-.js";
|
|
13
|
+
import { C as da } from "./check-DrFSN__t.js";
|
|
14
|
+
import { i as Ue } from "./isSameDay-DUEiAT0G.js";
|
|
15
|
+
import { p as la } from "./parse-DvA97ro9.js";
|
|
16
|
+
function ca(s, l, g) {
|
|
17
|
+
return jt(s, -1, g);
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
return
|
|
19
|
+
function He(s, l, g) {
|
|
20
|
+
return qt(s, -1, g);
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const ua = {
|
|
23
23
|
id: "date-range-picker",
|
|
24
24
|
capabilities: [
|
|
25
25
|
"range_pick",
|
|
@@ -38,11 +38,11 @@ const oa = {
|
|
|
38
38
|
descriptionKey: "ui.agent.dateRangePicker.state.range",
|
|
39
39
|
description: "Currently-selected ISO date range endpoints, each possibly null.",
|
|
40
40
|
read: (s) => {
|
|
41
|
-
var
|
|
41
|
+
var g, p;
|
|
42
42
|
const l = s.getRange();
|
|
43
43
|
return {
|
|
44
|
-
from: ((
|
|
45
|
-
to: ((
|
|
44
|
+
from: ((g = l.from) == null ? void 0 : g.toISOString()) ?? null,
|
|
45
|
+
to: ((p = l.to) == null ? void 0 : p.toISOString()) ?? null
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
},
|
|
@@ -63,11 +63,11 @@ const oa = {
|
|
|
63
63
|
descriptionKey: "ui.agent.dateRangePicker.state.compareRange",
|
|
64
64
|
description: "Resolved comparison period when compare-to-previous-period is on, else null.",
|
|
65
65
|
read: (s) => {
|
|
66
|
-
var
|
|
66
|
+
var g, p;
|
|
67
67
|
const l = s.getCompareRange();
|
|
68
68
|
return l ? {
|
|
69
|
-
from: ((
|
|
70
|
-
to: ((
|
|
69
|
+
from: ((g = l.from) == null ? void 0 : g.toISOString()) ?? null,
|
|
70
|
+
to: ((p = l.to) == null ? void 0 : p.toISOString()) ?? null
|
|
71
71
|
} : null;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -211,71 +211,79 @@ const oa = {
|
|
|
211
211
|
description: "Sourced from the id prop."
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
},
|
|
214
|
+
}, Qe = [
|
|
215
215
|
{ value: "day", fallback: "Day" },
|
|
216
216
|
{ value: "week", fallback: "Week" },
|
|
217
217
|
{ value: "month", fallback: "Month" },
|
|
218
218
|
{ value: "quarter", fallback: "Quarter" }
|
|
219
|
-
],
|
|
219
|
+
], pa = [
|
|
220
220
|
{ value: "previous", fallback: "Previous period" },
|
|
221
221
|
{ value: "lastYear", fallback: "Same period last year" }
|
|
222
|
-
],
|
|
222
|
+
], fa = Et(
|
|
223
223
|
({
|
|
224
224
|
value: s,
|
|
225
225
|
defaultValue: l,
|
|
226
|
-
onChange:
|
|
227
|
-
commitMode:
|
|
228
|
-
onApply:
|
|
229
|
-
onCancel:
|
|
230
|
-
showClear:
|
|
231
|
-
numberOfMonths:
|
|
232
|
-
granularity:
|
|
233
|
-
defaultGranularity:
|
|
234
|
-
onGranularityChange:
|
|
235
|
-
allowedGranularities:
|
|
236
|
-
compare:
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
226
|
+
onChange: g,
|
|
227
|
+
commitMode: p = "auto",
|
|
228
|
+
onApply: w,
|
|
229
|
+
onCancel: I,
|
|
230
|
+
showClear: Je = !0,
|
|
231
|
+
numberOfMonths: Xe = 2,
|
|
232
|
+
granularity: ye,
|
|
233
|
+
defaultGranularity: he,
|
|
234
|
+
onGranularityChange: Ze,
|
|
235
|
+
allowedGranularities: X,
|
|
236
|
+
compare: j = !1,
|
|
237
|
+
compareEnabled: et,
|
|
238
|
+
defaultCompare: tt = !1,
|
|
239
|
+
defaultCompareMode: at = "previous",
|
|
240
|
+
onCompareChange: f,
|
|
241
|
+
weekStartsOn: K,
|
|
242
|
+
minDate: Z,
|
|
243
|
+
maxDate: ee,
|
|
244
|
+
presets: te,
|
|
245
|
+
mergePresets: rt = !1,
|
|
246
|
+
size: be = "md",
|
|
247
|
+
chrome: st = "input",
|
|
248
|
+
disabled: nt,
|
|
249
|
+
placeholder: it,
|
|
250
|
+
className: ot,
|
|
251
|
+
id: dt
|
|
252
|
+
}, lt) => {
|
|
253
|
+
const { t: n, i18n: ke } = At(), A = Lt(), ae = dt ?? A.id, Re = A.disabled || nt, ct = A.invalid ? "error" : "default", u = _t(ke.language), m = zt(ke.language), ut = it ?? n("inputs.dateRangePicker.placeholder", "Select date range"), [pt, xe] = me({
|
|
253
254
|
value: s,
|
|
254
255
|
defaultValue: l ?? {},
|
|
255
|
-
onChange:
|
|
256
|
-
}),
|
|
257
|
-
(e) =>
|
|
258
|
-
) :
|
|
256
|
+
onChange: g
|
|
257
|
+
}), o = pt ?? {}, [O, R] = b(!1), [a, T] = b(o), [ft, re] = b(o.from ?? /* @__PURE__ */ new Date()), [Pe, Ne] = b(""), [De, Se] = b(""), [G, L] = b(!1), [V, $] = b(!1), q = ye !== void 0 || he !== void 0, _ = X && X.length > 0 ? X : void 0, we = _ ? Qe.filter(
|
|
258
|
+
(e) => _.includes(e.value)
|
|
259
|
+
) : Qe, W = (e) => {
|
|
259
260
|
var t;
|
|
260
|
-
return !
|
|
261
|
-
}, [
|
|
262
|
-
value:
|
|
263
|
-
defaultValue:
|
|
264
|
-
onChange:
|
|
265
|
-
}),
|
|
261
|
+
return !_ || _.includes(e) ? e : ((t = we[0]) == null ? void 0 : t.value) ?? e;
|
|
262
|
+
}, [mt, se] = me({
|
|
263
|
+
value: ye,
|
|
264
|
+
defaultValue: W(he ?? "day"),
|
|
265
|
+
onChange: Ze
|
|
266
|
+
}), z = W(mt ?? "day"), [C, B] = me({
|
|
267
|
+
value: et,
|
|
268
|
+
defaultValue: tt
|
|
269
|
+
// onCompareChange needs the resolved range as its 2nd arg, so it is
|
|
270
|
+
// called manually at the commit points rather than wired here.
|
|
271
|
+
}), [N, E] = b(
|
|
272
|
+
C ?? !1
|
|
273
|
+
), [Ie, gt] = b(at), vt = fe(null), D = fe(!1), Oe = M(), Te = M(), Ge = M(), Ve = M(), ne = M(), yt = M(), x = We(
|
|
266
274
|
(e) => {
|
|
267
|
-
|
|
275
|
+
xe(e);
|
|
268
276
|
},
|
|
269
|
-
[
|
|
270
|
-
),
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}, [
|
|
274
|
-
|
|
275
|
-
a.from ?
|
|
276
|
-
),
|
|
277
|
-
}, [a.from, a.to,
|
|
278
|
-
const
|
|
277
|
+
[xe]
|
|
278
|
+
), ht = Bt(Z, ee), bt = (e) => (Z ? ia(e, Z) : !1) || (ee ? ve(e, ee) : !1);
|
|
279
|
+
je(() => {
|
|
280
|
+
O && (T(o), E(C ?? !1), L(!1), $(!1), D.current = !1);
|
|
281
|
+
}, [O]), je(() => {
|
|
282
|
+
G || Ne(
|
|
283
|
+
a.from ? k(a.from, m, { locale: u }) : ""
|
|
284
|
+
), V || Se(a.to ? k(a.to, m, { locale: u }) : "");
|
|
285
|
+
}, [a.from, a.to, m, u]);
|
|
286
|
+
const Ce = [
|
|
279
287
|
{
|
|
280
288
|
label: n("inputs.dateRangePicker.presets.today", "Today"),
|
|
281
289
|
range: () => {
|
|
@@ -286,14 +294,14 @@ const oa = {
|
|
|
286
294
|
{
|
|
287
295
|
label: n("inputs.dateRangePicker.presets.yesterday", "Yesterday"),
|
|
288
296
|
range: () => {
|
|
289
|
-
const e =
|
|
297
|
+
const e = F(/* @__PURE__ */ new Date(), 1);
|
|
290
298
|
return { from: e, to: e };
|
|
291
299
|
}
|
|
292
300
|
},
|
|
293
301
|
{
|
|
294
302
|
label: n("inputs.dateRangePicker.presets.last7", "Last 7 days"),
|
|
295
303
|
range: () => ({
|
|
296
|
-
from:
|
|
304
|
+
from: F(/* @__PURE__ */ new Date(), 6),
|
|
297
305
|
to: /* @__PURE__ */ new Date()
|
|
298
306
|
})
|
|
299
307
|
},
|
|
@@ -302,191 +310,200 @@ const oa = {
|
|
|
302
310
|
range: () => ({
|
|
303
311
|
// `weekStartsOn` (when set) overrides the locale's first day; when
|
|
304
312
|
// undefined date-fns falls back to the locale.
|
|
305
|
-
from:
|
|
306
|
-
to:
|
|
313
|
+
from: _e(/* @__PURE__ */ new Date(), { locale: u, weekStartsOn: K }),
|
|
314
|
+
to: qe(/* @__PURE__ */ new Date(), { locale: u, weekStartsOn: K })
|
|
307
315
|
})
|
|
308
316
|
},
|
|
309
317
|
{
|
|
310
318
|
label: n("inputs.dateRangePicker.presets.lastWeek", "Last week"),
|
|
311
319
|
range: () => {
|
|
312
|
-
const e =
|
|
320
|
+
const e = ca(/* @__PURE__ */ new Date());
|
|
313
321
|
return {
|
|
314
|
-
from:
|
|
315
|
-
to:
|
|
322
|
+
from: _e(e, { locale: u, weekStartsOn: K }),
|
|
323
|
+
to: qe(e, { locale: u, weekStartsOn: K })
|
|
316
324
|
};
|
|
317
325
|
}
|
|
318
326
|
},
|
|
319
327
|
{
|
|
320
328
|
label: n("inputs.dateRangePicker.presets.thisMonth", "This month"),
|
|
321
329
|
range: () => ({
|
|
322
|
-
from:
|
|
323
|
-
to:
|
|
330
|
+
from: Ut(/* @__PURE__ */ new Date()),
|
|
331
|
+
to: Yt(/* @__PURE__ */ new Date())
|
|
324
332
|
})
|
|
325
333
|
},
|
|
326
334
|
{
|
|
327
335
|
label: n("inputs.dateRangePicker.presets.last30", "Last 30 days"),
|
|
328
336
|
range: () => ({
|
|
329
|
-
from:
|
|
337
|
+
from: F(/* @__PURE__ */ new Date(), 29),
|
|
330
338
|
to: /* @__PURE__ */ new Date()
|
|
331
339
|
})
|
|
332
340
|
}
|
|
333
|
-
],
|
|
341
|
+
], ie = te ? rt ? [...Ce, ...te] : te : Ce, Ee = (() => {
|
|
334
342
|
const e = [], t = /* @__PURE__ */ new Map();
|
|
335
|
-
for (const d of
|
|
336
|
-
const
|
|
337
|
-
t.has(
|
|
343
|
+
for (const d of ie) {
|
|
344
|
+
const i = d.group ?? "";
|
|
345
|
+
t.has(i) || (t.set(i, []), e.push(i)), t.get(i).push(d);
|
|
338
346
|
}
|
|
339
347
|
return e.map((d) => ({ group: d, presets: t.get(d) }));
|
|
340
|
-
})(),
|
|
348
|
+
})(), kt = Ee.some((e) => e.group !== ""), y = (e, t = Ie) => {
|
|
341
349
|
if (!e.from || !e.to) return;
|
|
342
350
|
if (t === "lastYear")
|
|
343
|
-
return { from:
|
|
344
|
-
const d =
|
|
345
|
-
return { from:
|
|
346
|
-
},
|
|
347
|
-
if (!(
|
|
348
|
-
const e =
|
|
351
|
+
return { from: He(e.from), to: He(e.to) };
|
|
352
|
+
const d = ge(e.to, e.from), i = F(e.from, 1);
|
|
353
|
+
return { from: F(i, d), to: i };
|
|
354
|
+
}, Y = j && N, Me = j && (C ?? !1), h = Y ? y(a) : void 0, Rt = (() => {
|
|
355
|
+
if (!(h != null && h.from) || !h.to) return;
|
|
356
|
+
const e = h.from, t = h.to, d = {
|
|
349
357
|
compareStart: e,
|
|
350
358
|
compareEnd: t
|
|
351
359
|
};
|
|
352
|
-
return
|
|
353
|
-
})(),
|
|
360
|
+
return ge(t, e) >= 2 && (d.compareMiddle = { from: Ht(e, 1), to: F(t, 1) }), d;
|
|
361
|
+
})(), Fe = (e) => {
|
|
354
362
|
const t = {};
|
|
355
|
-
return
|
|
356
|
-
},
|
|
363
|
+
return q && (t.granularity = z), Y && (t.compareRange = y(e)), t.granularity || t.compareRange ? t : void 0;
|
|
364
|
+
}, xt = (e) => {
|
|
357
365
|
const t = e;
|
|
358
|
-
|
|
359
|
-
},
|
|
360
|
-
|
|
361
|
-
},
|
|
366
|
+
gt(t), Y && p === "auto" && (f == null || f(!0, y(a, t)));
|
|
367
|
+
}, Pt = (e) => {
|
|
368
|
+
E(e), p === "auto" && (B(e), f == null || f(e, e ? y(a) : void 0));
|
|
369
|
+
}, oe = We(
|
|
362
370
|
(e) => {
|
|
363
|
-
|
|
371
|
+
T(e), p === "auto" && e.from && e.to && x(e);
|
|
364
372
|
},
|
|
365
|
-
[
|
|
366
|
-
),
|
|
367
|
-
|
|
368
|
-
},
|
|
373
|
+
[p, x]
|
|
374
|
+
), Nt = (e) => {
|
|
375
|
+
L(!1), $(!1), oe({ from: e == null ? void 0 : e.from, to: e == null ? void 0 : e.to });
|
|
376
|
+
}, Dt = (e) => {
|
|
369
377
|
const t = e.range();
|
|
370
|
-
|
|
371
|
-
},
|
|
372
|
-
const d = e === "from" ?
|
|
378
|
+
L(!1), $(!1), T(t), re(t.from), p === "auto" && (x(t), w == null || w(t, Fe(t)), D.current = !0, R(!1));
|
|
379
|
+
}, de = (e, t) => {
|
|
380
|
+
const d = e === "from" ? L : $;
|
|
373
381
|
if (t.trim() === "") {
|
|
374
|
-
d(!1),
|
|
382
|
+
d(!1), oe(
|
|
375
383
|
e === "from" ? { from: void 0, to: a.to } : { from: a.from, to: void 0 }
|
|
376
384
|
);
|
|
377
385
|
return;
|
|
378
386
|
}
|
|
379
|
-
const
|
|
380
|
-
if (!
|
|
387
|
+
const i = la(t, m, /* @__PURE__ */ new Date(), { locale: u });
|
|
388
|
+
if (!na(i) || bt(i)) {
|
|
381
389
|
d(!0);
|
|
382
390
|
return;
|
|
383
391
|
}
|
|
384
392
|
d(!1);
|
|
385
|
-
let
|
|
386
|
-
e === "from" ?
|
|
387
|
-
},
|
|
388
|
-
t.key === "Enter" && (t.preventDefault(),
|
|
389
|
-
},
|
|
390
|
-
|
|
391
|
-
},
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
393
|
+
let P;
|
|
394
|
+
e === "from" ? P = a.to && ve(i, a.to) ? { from: i, to: void 0 } : { from: i, to: a.to } : P = a.from && ve(a.from, i) ? { from: i, to: void 0 } : { from: a.from, to: i }, re(i), oe(P);
|
|
395
|
+
}, Ke = (e) => (t) => {
|
|
396
|
+
t.key === "Enter" && (t.preventDefault(), de(e, e === "from" ? Pe : De));
|
|
397
|
+
}, St = () => {
|
|
398
|
+
T({}), L(!1), $(!1), p === "auto" && x({});
|
|
399
|
+
}, wt = !!(a.from && a.to), It = !a.from && !a.to, Ae = (wt || It) && !G && !V, le = () => {
|
|
400
|
+
Ae && (x(a), j && N !== (C ?? !1) && (B(N), f == null || f(
|
|
401
|
+
N,
|
|
402
|
+
N ? y(a) : void 0
|
|
403
|
+
)), w == null || w(a, Fe(a))), D.current = !0, R(!1);
|
|
404
|
+
}, Ot = () => {
|
|
405
|
+
D.current = !0, R(!1);
|
|
406
|
+
}, ce = () => {
|
|
407
|
+
p === "apply" && (I == null || I()), T(o), E(C ?? !1), R(!1);
|
|
408
|
+
}, Tt = (e) => {
|
|
398
409
|
if (e) {
|
|
399
|
-
|
|
410
|
+
D.current = !1, R(!0);
|
|
400
411
|
return;
|
|
401
412
|
}
|
|
402
|
-
|
|
403
|
-
},
|
|
404
|
-
if (!
|
|
413
|
+
p === "apply" && !D.current && (I == null || I()), T(o), E(C ?? !1), D.current = !1, R(!1);
|
|
414
|
+
}, Gt = (e) => {
|
|
415
|
+
if (!o.from || !o.to) return !1;
|
|
405
416
|
const t = e.range();
|
|
406
|
-
return
|
|
407
|
-
},
|
|
408
|
-
if (
|
|
409
|
-
const e =
|
|
417
|
+
return Ue(t.from, o.from) && Ue(t.to, o.to);
|
|
418
|
+
}, S = ie.find(Gt), Le = (() => {
|
|
419
|
+
if (o.from && o.to) {
|
|
420
|
+
const e = k(o.from, m, { locale: u }), t = k(o.to, m, { locale: u });
|
|
410
421
|
return `${e} – ${t}`;
|
|
411
422
|
}
|
|
412
|
-
return
|
|
413
|
-
})(),
|
|
423
|
+
return o.from ? k(o.from, m, { locale: u }) : "";
|
|
424
|
+
})(), U = a.from ? a.to ? null : "end" : "start", Vt = (() => {
|
|
414
425
|
if (!a.from)
|
|
415
426
|
return n("inputs.dateRangePicker.selectStart", "Select start date");
|
|
416
427
|
if (!a.to)
|
|
417
428
|
return n("inputs.dateRangePicker.selectEnd", "Select end date");
|
|
418
|
-
const e =
|
|
419
|
-
return `${t} – ${d} · ${
|
|
420
|
-
})(),
|
|
421
|
-
currentValue:
|
|
422
|
-
open:
|
|
423
|
-
getGranularity: () =>
|
|
424
|
-
setGranularity: (e) =>
|
|
425
|
-
getCompareRange: () =>
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
429
|
+
const e = ge(a.to, a.from) + 1, t = k(a.from, m, { locale: u }), d = k(a.to, m, { locale: u }), i = n("inputs.dateRangePicker.days", { count: e });
|
|
430
|
+
return `${t} – ${d} · ${i}`;
|
|
431
|
+
})(), v = fe({
|
|
432
|
+
currentValue: o,
|
|
433
|
+
open: O,
|
|
434
|
+
getGranularity: () => q ? z : void 0,
|
|
435
|
+
setGranularity: (e) => se(W(e)),
|
|
436
|
+
getCompareRange: () => Me ? y(o) : void 0,
|
|
437
|
+
// Imperative/agent path commits directly (like setRange/clear), so
|
|
438
|
+
// toggle_compare reflects in getCompareRange immediately — not a draft.
|
|
439
|
+
setCompare: (e) => {
|
|
440
|
+
E(e), B(e), f == null || f(
|
|
441
|
+
e,
|
|
442
|
+
e ? y(o) : void 0
|
|
443
|
+
);
|
|
430
444
|
},
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
445
|
+
getActivePreset: () => S == null ? void 0 : S.label,
|
|
446
|
+
getActiveEnd: () => U,
|
|
447
|
+
apply: () => le(),
|
|
448
|
+
cancel: () => ce()
|
|
434
449
|
});
|
|
435
|
-
|
|
436
|
-
currentValue:
|
|
437
|
-
open:
|
|
438
|
-
getGranularity: () =>
|
|
439
|
-
setGranularity: (e) =>
|
|
440
|
-
getCompareRange: () =>
|
|
441
|
-
setCompare: (e) =>
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
450
|
+
v.current = {
|
|
451
|
+
currentValue: o,
|
|
452
|
+
open: O,
|
|
453
|
+
getGranularity: () => q ? z : void 0,
|
|
454
|
+
setGranularity: (e) => se(W(e)),
|
|
455
|
+
getCompareRange: () => Me ? y(o) : void 0,
|
|
456
|
+
setCompare: (e) => {
|
|
457
|
+
E(e), B(e), f == null || f(
|
|
458
|
+
e,
|
|
459
|
+
e ? y(o) : void 0
|
|
460
|
+
);
|
|
445
461
|
},
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
462
|
+
getActivePreset: () => S == null ? void 0 : S.label,
|
|
463
|
+
getActiveEnd: () => U,
|
|
464
|
+
apply: () => le(),
|
|
465
|
+
cancel: () => ce()
|
|
449
466
|
};
|
|
450
|
-
const
|
|
467
|
+
const ue = Mt(
|
|
451
468
|
() => ({
|
|
452
|
-
getRange: () =>
|
|
453
|
-
setRange: (e) =>
|
|
454
|
-
clear: () =>
|
|
455
|
-
isOpen: () =>
|
|
456
|
-
open: () =>
|
|
457
|
-
close: () =>
|
|
458
|
-
getGranularity: () =>
|
|
459
|
-
setGranularity: (e) =>
|
|
460
|
-
getCompareRange: () =>
|
|
461
|
-
setCompare: (e) =>
|
|
462
|
-
getActivePreset: () =>
|
|
463
|
-
getActiveEnd: () =>
|
|
464
|
-
apply: () =>
|
|
465
|
-
cancel: () =>
|
|
469
|
+
getRange: () => v.current.currentValue,
|
|
470
|
+
setRange: (e) => x(e),
|
|
471
|
+
clear: () => x({}),
|
|
472
|
+
isOpen: () => v.current.open,
|
|
473
|
+
open: () => R(!0),
|
|
474
|
+
close: () => R(!1),
|
|
475
|
+
getGranularity: () => v.current.getGranularity(),
|
|
476
|
+
setGranularity: (e) => v.current.setGranularity(e),
|
|
477
|
+
getCompareRange: () => v.current.getCompareRange(),
|
|
478
|
+
setCompare: (e) => v.current.setCompare(e),
|
|
479
|
+
getActivePreset: () => v.current.getActivePreset(),
|
|
480
|
+
getActiveEnd: () => v.current.getActiveEnd(),
|
|
481
|
+
apply: () => v.current.apply(),
|
|
482
|
+
cancel: () => v.current.cancel()
|
|
466
483
|
}),
|
|
467
|
-
[
|
|
484
|
+
[x]
|
|
468
485
|
);
|
|
469
|
-
|
|
470
|
-
const
|
|
471
|
-
return /* @__PURE__ */ r(
|
|
486
|
+
Ft(lt, () => ue, [ue]), Wt(ua, ue, ae);
|
|
487
|
+
const $e = (e) => e === "from" ? G ? "error" : U === "start" ? "active" : "default" : V ? "error" : U === "end" ? "active" : "default";
|
|
488
|
+
return /* @__PURE__ */ r(H.Root, { open: O, onOpenChange: Tt, children: /* @__PURE__ */ c(
|
|
472
489
|
"div",
|
|
473
490
|
{
|
|
474
|
-
className:
|
|
491
|
+
className: ot,
|
|
475
492
|
"data-component": "date-range-picker",
|
|
476
|
-
"data-component-id":
|
|
493
|
+
"data-component-id": ae,
|
|
477
494
|
children: [
|
|
478
|
-
/* @__PURE__ */ r(
|
|
495
|
+
/* @__PURE__ */ r(H.Trigger, { asChild: !0, disabled: Re, children: /* @__PURE__ */ c(
|
|
479
496
|
"button",
|
|
480
497
|
{
|
|
481
|
-
ref:
|
|
482
|
-
id:
|
|
498
|
+
ref: vt,
|
|
499
|
+
id: ae,
|
|
483
500
|
type: "button",
|
|
484
|
-
disabled:
|
|
485
|
-
"aria-describedby":
|
|
486
|
-
"aria-invalid":
|
|
501
|
+
disabled: Re,
|
|
502
|
+
"aria-describedby": A.describedBy || void 0,
|
|
503
|
+
"aria-invalid": A.invalid || void 0,
|
|
487
504
|
"aria-haspopup": "dialog",
|
|
488
|
-
"aria-expanded":
|
|
489
|
-
className:
|
|
505
|
+
"aria-expanded": O,
|
|
506
|
+
className: Jt({ size: be, tone: ct, chrome: st }),
|
|
490
507
|
children: [
|
|
491
508
|
/* @__PURE__ */ r(
|
|
492
509
|
"span",
|
|
@@ -498,24 +515,24 @@ const oa = {
|
|
|
498
515
|
// lets the flex child shrink below its content width so
|
|
499
516
|
// `truncate` engages.
|
|
500
517
|
"ds:min-w-0 ds:flex-1 ds:truncate ds:text-start",
|
|
501
|
-
|
|
518
|
+
Le ? "ds:text-foreground" : "ds:text-muted-foreground"
|
|
502
519
|
].join(" "),
|
|
503
|
-
children:
|
|
520
|
+
children: Le || ut
|
|
504
521
|
}
|
|
505
522
|
),
|
|
506
523
|
/* @__PURE__ */ r(
|
|
507
524
|
"span",
|
|
508
525
|
{
|
|
509
526
|
"aria-hidden": "true",
|
|
510
|
-
className:
|
|
511
|
-
children: /* @__PURE__ */ r(
|
|
527
|
+
className: Qt({ size: be }),
|
|
528
|
+
children: /* @__PURE__ */ r(oa, {})
|
|
512
529
|
}
|
|
513
530
|
)
|
|
514
531
|
]
|
|
515
532
|
}
|
|
516
533
|
) }),
|
|
517
|
-
/* @__PURE__ */ r(
|
|
518
|
-
|
|
534
|
+
/* @__PURE__ */ r(H.Portal, { children: /* @__PURE__ */ r(
|
|
535
|
+
H.Content,
|
|
519
536
|
{
|
|
520
537
|
sideOffset: 4,
|
|
521
538
|
align: "start",
|
|
@@ -524,35 +541,35 @@ const oa = {
|
|
|
524
541
|
"inputs.dateRangePicker.title",
|
|
525
542
|
"Select date range"
|
|
526
543
|
),
|
|
527
|
-
className:
|
|
544
|
+
className: sa(),
|
|
528
545
|
children: /* @__PURE__ */ c("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
529
546
|
/* @__PURE__ */ c("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
530
547
|
/* @__PURE__ */ c("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
531
548
|
/* @__PURE__ */ r(
|
|
532
549
|
"h2",
|
|
533
550
|
{
|
|
534
|
-
id:
|
|
551
|
+
id: Oe,
|
|
535
552
|
className: "type-body-sm ds:font-semibold ds:text-foreground",
|
|
536
553
|
children: n("inputs.dateRangePicker.title", "Select date range")
|
|
537
554
|
}
|
|
538
555
|
),
|
|
539
|
-
|
|
540
|
-
|
|
556
|
+
q ? /* @__PURE__ */ r(
|
|
557
|
+
Q.Root,
|
|
541
558
|
{
|
|
542
|
-
value:
|
|
543
|
-
onValueChange: (e) =>
|
|
544
|
-
|
|
559
|
+
value: z,
|
|
560
|
+
onValueChange: (e) => se(
|
|
561
|
+
W(e)
|
|
545
562
|
),
|
|
546
563
|
"aria-label": n(
|
|
547
564
|
"inputs.dateRangePicker.granularityLabel",
|
|
548
565
|
"Granularity"
|
|
549
566
|
),
|
|
550
|
-
className:
|
|
551
|
-
children:
|
|
552
|
-
|
|
567
|
+
className: Be(),
|
|
568
|
+
children: we.map((e) => /* @__PURE__ */ r(
|
|
569
|
+
Q.Item,
|
|
553
570
|
{
|
|
554
571
|
value: e.value,
|
|
555
|
-
className:
|
|
572
|
+
className: ze(),
|
|
556
573
|
children: n(
|
|
557
574
|
`inputs.dateRangePicker.granularity.${e.value}`,
|
|
558
575
|
e.fallback
|
|
@@ -568,7 +585,7 @@ const oa = {
|
|
|
568
585
|
/* @__PURE__ */ r(
|
|
569
586
|
"label",
|
|
570
587
|
{
|
|
571
|
-
htmlFor:
|
|
588
|
+
htmlFor: Te,
|
|
572
589
|
className: "ds:text-[length:var(--font-size-xs)] ds:text-muted-foreground",
|
|
573
590
|
children: n("inputs.dateRangePicker.startLabel", "Start date")
|
|
574
591
|
}
|
|
@@ -576,18 +593,18 @@ const oa = {
|
|
|
576
593
|
/* @__PURE__ */ r(
|
|
577
594
|
"input",
|
|
578
595
|
{
|
|
579
|
-
id:
|
|
596
|
+
id: Te,
|
|
580
597
|
type: "text",
|
|
581
598
|
inputMode: "numeric",
|
|
582
|
-
value:
|
|
583
|
-
placeholder:
|
|
584
|
-
"aria-invalid":
|
|
585
|
-
"aria-describedby":
|
|
586
|
-
onChange: (e) =>
|
|
587
|
-
onBlur: (e) =>
|
|
588
|
-
onKeyDown:
|
|
589
|
-
className:
|
|
590
|
-
state:
|
|
599
|
+
value: Pe,
|
|
600
|
+
placeholder: m.toUpperCase(),
|
|
601
|
+
"aria-invalid": G || void 0,
|
|
602
|
+
"aria-describedby": G ? ne : void 0,
|
|
603
|
+
onChange: (e) => Ne(e.target.value),
|
|
604
|
+
onBlur: (e) => de("from", e.target.value),
|
|
605
|
+
onKeyDown: Ke("from"),
|
|
606
|
+
className: Ye({
|
|
607
|
+
state: $e("from")
|
|
591
608
|
})
|
|
592
609
|
}
|
|
593
610
|
)
|
|
@@ -604,7 +621,7 @@ const oa = {
|
|
|
604
621
|
/* @__PURE__ */ r(
|
|
605
622
|
"label",
|
|
606
623
|
{
|
|
607
|
-
htmlFor:
|
|
624
|
+
htmlFor: Ge,
|
|
608
625
|
className: "ds:text-[length:var(--font-size-xs)] ds:text-muted-foreground",
|
|
609
626
|
children: n("inputs.dateRangePicker.endLabel", "End date")
|
|
610
627
|
}
|
|
@@ -612,54 +629,54 @@ const oa = {
|
|
|
612
629
|
/* @__PURE__ */ r(
|
|
613
630
|
"input",
|
|
614
631
|
{
|
|
615
|
-
id:
|
|
632
|
+
id: Ge,
|
|
616
633
|
type: "text",
|
|
617
634
|
inputMode: "numeric",
|
|
618
|
-
value:
|
|
619
|
-
placeholder:
|
|
620
|
-
"aria-invalid":
|
|
621
|
-
"aria-describedby":
|
|
622
|
-
onChange: (e) =>
|
|
623
|
-
onBlur: (e) =>
|
|
624
|
-
onKeyDown:
|
|
625
|
-
className:
|
|
626
|
-
state:
|
|
635
|
+
value: De,
|
|
636
|
+
placeholder: m.toUpperCase(),
|
|
637
|
+
"aria-invalid": V || void 0,
|
|
638
|
+
"aria-describedby": V ? ne : void 0,
|
|
639
|
+
onChange: (e) => Se(e.target.value),
|
|
640
|
+
onBlur: (e) => de("to", e.target.value),
|
|
641
|
+
onKeyDown: Ke("to"),
|
|
642
|
+
className: Ye({
|
|
643
|
+
state: $e("to")
|
|
627
644
|
})
|
|
628
645
|
}
|
|
629
646
|
)
|
|
630
647
|
] })
|
|
631
648
|
] }),
|
|
632
|
-
|
|
649
|
+
G || V ? /* @__PURE__ */ r(
|
|
633
650
|
"p",
|
|
634
651
|
{
|
|
635
|
-
id:
|
|
652
|
+
id: ne,
|
|
636
653
|
role: "alert",
|
|
637
654
|
className: "ds:text-[length:var(--font-size-xs)] ds:text-destructive",
|
|
638
655
|
children: n(
|
|
639
656
|
"inputs.dateRangePicker.invalidDate",
|
|
640
657
|
"Enter a date as {{format}}",
|
|
641
658
|
{
|
|
642
|
-
format:
|
|
659
|
+
format: m.toUpperCase()
|
|
643
660
|
}
|
|
644
661
|
)
|
|
645
662
|
}
|
|
646
663
|
) : null
|
|
647
664
|
] }),
|
|
648
665
|
/* @__PURE__ */ c("div", { className: "ds:flex ds:gap-[var(--spacing-md)]", children: [
|
|
649
|
-
|
|
650
|
-
const d = `${
|
|
651
|
-
const
|
|
666
|
+
ie.length > 0 ? /* @__PURE__ */ r("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: Ee.map((e, t) => {
|
|
667
|
+
const d = `${Oe}-pg${t}`, i = e.presets.map((P) => {
|
|
668
|
+
const pe = P === S;
|
|
652
669
|
return /* @__PURE__ */ c(
|
|
653
670
|
"button",
|
|
654
671
|
{
|
|
655
672
|
type: "button",
|
|
656
|
-
"aria-pressed":
|
|
657
|
-
onClick: () =>
|
|
658
|
-
className:
|
|
673
|
+
"aria-pressed": pe,
|
|
674
|
+
onClick: () => Dt(P),
|
|
675
|
+
className: Xt({ active: pe }),
|
|
659
676
|
children: [
|
|
660
|
-
/* @__PURE__ */ r("span", { className: "ds:min-w-0 ds:truncate", children:
|
|
661
|
-
|
|
662
|
-
|
|
677
|
+
/* @__PURE__ */ r("span", { className: "ds:min-w-0 ds:truncate", children: P.label }),
|
|
678
|
+
pe ? /* @__PURE__ */ r(
|
|
679
|
+
da,
|
|
663
680
|
{
|
|
664
681
|
"aria-hidden": "true",
|
|
665
682
|
className: "ds:size-4 ds:shrink-0 ds:text-primary"
|
|
@@ -667,10 +684,10 @@ const oa = {
|
|
|
667
684
|
) : null
|
|
668
685
|
]
|
|
669
686
|
},
|
|
670
|
-
|
|
687
|
+
P.label
|
|
671
688
|
);
|
|
672
689
|
});
|
|
673
|
-
return
|
|
690
|
+
return kt && e.group ? /* @__PURE__ */ c(
|
|
674
691
|
"div",
|
|
675
692
|
{
|
|
676
693
|
role: "group",
|
|
@@ -681,56 +698,56 @@ const oa = {
|
|
|
681
698
|
"div",
|
|
682
699
|
{
|
|
683
700
|
id: d,
|
|
684
|
-
className:
|
|
701
|
+
className: Zt(),
|
|
685
702
|
children: e.group
|
|
686
703
|
}
|
|
687
704
|
),
|
|
688
|
-
|
|
705
|
+
i
|
|
689
706
|
]
|
|
690
707
|
},
|
|
691
708
|
e.group
|
|
692
|
-
) : /* @__PURE__ */ r(
|
|
709
|
+
) : /* @__PURE__ */ r(Kt, { children: i }, e.group || "_ungrouped");
|
|
693
710
|
}) }) : null,
|
|
694
|
-
/* @__PURE__ */ c("div", { role: "region", "aria-labelledby":
|
|
695
|
-
/* @__PURE__ */ r("span", { id:
|
|
711
|
+
/* @__PURE__ */ c("div", { role: "region", "aria-labelledby": Ve, children: [
|
|
712
|
+
/* @__PURE__ */ r("span", { id: Ve, className: "ds:sr-only", children: n("inputs.dateRangePicker.gridLabel", "Calendar") }),
|
|
696
713
|
/* @__PURE__ */ r(
|
|
697
|
-
|
|
714
|
+
ea,
|
|
698
715
|
{
|
|
699
716
|
mode: "range",
|
|
700
717
|
selected: a.from ? { from: a.from, to: a.to } : void 0,
|
|
701
|
-
onSelect:
|
|
702
|
-
month:
|
|
703
|
-
onMonthChange:
|
|
704
|
-
numberOfMonths:
|
|
705
|
-
weekStartsOn:
|
|
706
|
-
disabled:
|
|
718
|
+
onSelect: Nt,
|
|
719
|
+
month: ft,
|
|
720
|
+
onMonthChange: re,
|
|
721
|
+
numberOfMonths: Xe,
|
|
722
|
+
weekStartsOn: K,
|
|
723
|
+
disabled: ht,
|
|
707
724
|
locale: u,
|
|
708
725
|
showOutsideDays: !0,
|
|
709
726
|
fixedWeeks: !0,
|
|
710
727
|
pagedNavigation: !0,
|
|
711
|
-
classNames:
|
|
712
|
-
modifiers:
|
|
713
|
-
modifiersClassNames:
|
|
714
|
-
components: { Chevron:
|
|
728
|
+
classNames: ra,
|
|
729
|
+
modifiers: Rt,
|
|
730
|
+
modifiersClassNames: aa,
|
|
731
|
+
components: { Chevron: ta }
|
|
715
732
|
}
|
|
716
733
|
)
|
|
717
734
|
] })
|
|
718
735
|
] }),
|
|
719
|
-
|
|
736
|
+
j ? /* @__PURE__ */ c("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)] ds:border-t ds:border-border ds:pt-[var(--spacing-sm)]", children: [
|
|
720
737
|
/* @__PURE__ */ r(
|
|
721
|
-
|
|
738
|
+
$t,
|
|
722
739
|
{
|
|
723
|
-
id:
|
|
740
|
+
id: yt,
|
|
724
741
|
label: n(
|
|
725
742
|
"inputs.dateRangePicker.compareLabel",
|
|
726
743
|
"Compare to previous period"
|
|
727
744
|
),
|
|
728
745
|
size: "sm",
|
|
729
|
-
checked:
|
|
730
|
-
onCheckedChange:
|
|
746
|
+
checked: N,
|
|
747
|
+
onCheckedChange: Pt
|
|
731
748
|
}
|
|
732
749
|
),
|
|
733
|
-
|
|
750
|
+
Y && h ? /* @__PURE__ */ c("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[length:var(--font-size-xs)] ds:text-muted-foreground", children: [
|
|
734
751
|
/* @__PURE__ */ r(
|
|
735
752
|
"span",
|
|
736
753
|
{
|
|
@@ -738,23 +755,23 @@ const oa = {
|
|
|
738
755
|
className: "ds:inline-block ds:size-3 ds:rounded-[calc(var(--radius-sm)-2px)] ds:bg-[var(--calendar-compare-fill)] ds:border-b-2 ds:border-dashed ds:border-b-[var(--calendar-compare-edge)]"
|
|
739
756
|
}
|
|
740
757
|
),
|
|
741
|
-
`${h
|
|
758
|
+
`${k(h.from, m, { locale: u })} – ${k(h.to, m, { locale: u })}`
|
|
742
759
|
] }) : null,
|
|
743
|
-
|
|
744
|
-
|
|
760
|
+
N ? /* @__PURE__ */ r(
|
|
761
|
+
Q.Root,
|
|
745
762
|
{
|
|
746
|
-
value:
|
|
747
|
-
onValueChange:
|
|
763
|
+
value: Ie,
|
|
764
|
+
onValueChange: xt,
|
|
748
765
|
"aria-label": n(
|
|
749
766
|
"inputs.dateRangePicker.compareModeLabel",
|
|
750
767
|
"Comparison period"
|
|
751
768
|
),
|
|
752
|
-
className: `${
|
|
753
|
-
children:
|
|
754
|
-
|
|
769
|
+
className: `${Be()} ds:ms-auto`,
|
|
770
|
+
children: pa.map((e) => /* @__PURE__ */ r(
|
|
771
|
+
Q.Item,
|
|
755
772
|
{
|
|
756
773
|
value: e.value,
|
|
757
|
-
className:
|
|
774
|
+
className: ze(),
|
|
758
775
|
children: n(
|
|
759
776
|
`inputs.dateRangePicker.compareMode.${e.value}`,
|
|
760
777
|
e.fallback
|
|
@@ -772,26 +789,26 @@ const oa = {
|
|
|
772
789
|
role: "status",
|
|
773
790
|
"aria-live": "polite",
|
|
774
791
|
className: "type-body-sm ds:min-w-0 ds:truncate ds:text-muted-foreground",
|
|
775
|
-
children:
|
|
792
|
+
children: Vt
|
|
776
793
|
}
|
|
777
794
|
),
|
|
778
795
|
/* @__PURE__ */ c("div", { className: "ds:flex ds:shrink-0 ds:gap-[var(--spacing-xs)]", children: [
|
|
779
|
-
|
|
796
|
+
Je ? /* @__PURE__ */ r(
|
|
780
797
|
"button",
|
|
781
798
|
{
|
|
782
799
|
type: "button",
|
|
783
|
-
onClick:
|
|
784
|
-
className:
|
|
800
|
+
onClick: St,
|
|
801
|
+
className: J({ intent: "ghost" }),
|
|
785
802
|
children: n("inputs.dateRangePicker.clear", "Clear")
|
|
786
803
|
}
|
|
787
804
|
) : null,
|
|
788
|
-
|
|
805
|
+
p === "apply" ? /* @__PURE__ */ c(Ct, { children: [
|
|
789
806
|
/* @__PURE__ */ r(
|
|
790
807
|
"button",
|
|
791
808
|
{
|
|
792
809
|
type: "button",
|
|
793
|
-
onClick:
|
|
794
|
-
className:
|
|
810
|
+
onClick: ce,
|
|
811
|
+
className: J({ intent: "ghost" }),
|
|
795
812
|
children: n("inputs.dateRangePicker.cancel", "Cancel")
|
|
796
813
|
}
|
|
797
814
|
),
|
|
@@ -799,9 +816,9 @@ const oa = {
|
|
|
799
816
|
"button",
|
|
800
817
|
{
|
|
801
818
|
type: "button",
|
|
802
|
-
disabled: !
|
|
803
|
-
onClick:
|
|
804
|
-
className:
|
|
819
|
+
disabled: !Ae,
|
|
820
|
+
onClick: le,
|
|
821
|
+
className: J({ intent: "primary" }),
|
|
805
822
|
children: n("inputs.dateRangePicker.apply", "Apply")
|
|
806
823
|
}
|
|
807
824
|
)
|
|
@@ -809,8 +826,8 @@ const oa = {
|
|
|
809
826
|
"button",
|
|
810
827
|
{
|
|
811
828
|
type: "button",
|
|
812
|
-
onClick:
|
|
813
|
-
className:
|
|
829
|
+
onClick: Ot,
|
|
830
|
+
className: J({ intent: "primary" }),
|
|
814
831
|
children: n("inputs.dateRangePicker.done", "Done")
|
|
815
832
|
}
|
|
816
833
|
)
|
|
@@ -824,9 +841,9 @@ const oa = {
|
|
|
824
841
|
) });
|
|
825
842
|
}
|
|
826
843
|
);
|
|
827
|
-
|
|
844
|
+
fa.displayName = "DateRangePicker";
|
|
828
845
|
export {
|
|
829
|
-
|
|
830
|
-
|
|
846
|
+
fa as D,
|
|
847
|
+
ua as d
|
|
831
848
|
};
|
|
832
|
-
//# sourceMappingURL=date-range-picker-
|
|
849
|
+
//# sourceMappingURL=date-range-picker-pEG3Ln3i.js.map
|