@alfadocs/ui-kit 1.55.0 → 1.56.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/{alia-sidebar-DS0b54Mv.js → alia-sidebar-DOei4Iyu.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-Dtw5Hpg4.js → anamnesis-summary-rows-CQ-XGr0T.js} +3 -3
- package/dist/_chunks/{balance-badge-cell-zP-iN-Pd.js → balance-badge-cell-DmDcXw0c.js} +3 -3
- package/dist/_chunks/{bmi-calculator-DTZhRhXe.js → bmi-calculator-C0UTxB7R.js} +2 -2
- package/dist/_chunks/{booking-uZO10TLK.js → booking-WyNGKPE2.js} +2 -2
- package/dist/_chunks/{breadcrumb-xgVpPH2H.js → breadcrumb-Boan-5n8.js} +39 -39
- package/dist/_chunks/{calculator-dialog-BRjZMWuE.js → calculator-dialog-pCPWta7h.js} +2 -2
- package/dist/_chunks/{calendar-workspace-DVajSkKA.js → calendar-workspace-Du2ryaI-.js} +8 -8
- package/dist/_chunks/{care-plan-header-BeMYMiI7.js → care-plan-header-DUX_SVvF.js} +2 -2
- package/dist/_chunks/chart-HsF1KHbx.js +909 -0
- package/dist/_chunks/{contact-profile-card-C5DbP_X3.js → contact-profile-card-Ci8lBQ6a.js} +2 -2
- package/dist/_chunks/dashboard-grid-DfEY2qci.js +844 -0
- package/dist/_chunks/{data-table-C6T31E33.js → data-table-D8fuhqO1.js} +1 -1
- package/dist/_chunks/{date-range-picker-BOvHwWO5.js → date-range-picker-CtUOI38x.js} +188 -182
- package/dist/_chunks/{dependent-selector-Bet3XAFj.js → dependent-selector-DgaAQc-c.js} +91 -86
- package/dist/_chunks/{dialog-D52AI4nF.js → dialog-CUzbnKLw.js} +86 -69
- package/dist/_chunks/{due-date-calculator-DXDJbUzo.js → due-date-calculator-CSjklbyw.js} +2 -2
- package/dist/_chunks/{file-manager-dIJQUZvq.js → file-manager-Cc_uO8r2.js} +4 -4
- package/dist/_chunks/{freemium-paywall-B6ojVXq7.js → freemium-paywall-DIKuhX8b.js} +90 -86
- package/dist/_chunks/{gestational-age-calculator-BfGpt3du.js → gestational-age-calculator-DqVeJke2.js} +2 -2
- package/dist/_chunks/{heatmap-BARGZZt2.js → heatmap-Gf9r7Tn1.js} +2 -2
- package/dist/_chunks/{help-me-write-templates-B7L3zGsE.js → help-me-write-templates-fV-Apf72.js} +2 -2
- package/dist/_chunks/{key-value-pair-Ax8IJr1M.js → key-value-pair-BNNITp6S.js} +25 -19
- package/dist/_chunks/{kit-extensions-C9-v8Dih.js → kit-extensions-Byfxy6sy.js} +4 -4
- package/dist/_chunks/{link-cell-renderer-DlBVPMTi.js → link-cell-renderer-TeJNvymP.js} +2 -2
- package/dist/_chunks/non-modal-tab-exit-D2Bd93Bq.js +65 -0
- package/dist/_chunks/{notes-panel-I8ntrrUW.js → notes-panel-DceRhthG.js} +3 -3
- package/dist/_chunks/{patient-summary-card-3dspc2tR.js → patient-summary-card-9nQWTQf6.js} +7 -3
- package/dist/_chunks/{payment-automation-upsell-DEUfM7EU.js → payment-automation-upsell-DiHovmUL.js} +2 -2
- package/dist/_chunks/{payment-request-card-DAGqh9Yx.js → payment-request-card-CwDpwXUC.js} +2 -2
- package/dist/_chunks/{periodontal-chart-BqwLxy2m.js → periodontal-chart-DD5C0M3l.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-CWZ1YM1h.js → periodontal-chart-card-CxdXvsPU.js} +2 -2
- package/dist/_chunks/{periodontal-diagnosis-C9IuvLId.js → periodontal-diagnosis-D-PJv7KS.js} +2 -2
- package/dist/_chunks/{position-grid-D2D5_Tze.js → position-grid-CBB88EaH.js} +38 -36
- package/dist/_chunks/{practice-results-DxOgbPDy.js → practice-results-Dhbo-fc_.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-R3q5n1Wh.js → pregnancy-dating-Bfu0Cq4H.js} +2 -2
- package/dist/_chunks/{pregnancy-weight-gain-DwmNklDU.js → pregnancy-weight-gain-CUUrBTBo.js} +2 -2
- package/dist/_chunks/{public-header.agent-BWusjxY8.js → public-header.agent-pr2hyiND.js} +2 -2
- package/dist/_chunks/{radio-group-BT97ty7o.js → radio-group-DicxWJXP.js} +111 -106
- package/dist/_chunks/{radiograph-panel.agent-BA90I3Mu.js → radiograph-panel.agent-DkUokbEa.js} +3 -3
- package/dist/_chunks/{rich-text-editor-Blp4smUr.js → rich-text-editor-CkFfmA3v.js} +2 -2
- package/dist/_chunks/{sheet-CNFW8mYZ.js → sheet-C7SwIxwB.js} +95 -79
- package/dist/_chunks/{signature-request-rgMsgo-C.js → signature-request-DhbpB9N9.js} +2 -2
- package/dist/_chunks/{stat-51CDL4au.js → stat-DmjGfXND.js} +117 -108
- package/dist/_chunks/{stepper-accordion-D7lnBGh2.js → stepper-accordion-DDTSOUHc.js} +17 -6
- package/dist/_chunks/{task-editor-Ctxsa1BY.js → task-editor-ByyRu29Y.js} +3 -3
- package/dist/_chunks/{use-appointment-details-read-DinTrRIW.js → use-appointment-details-read-JsDM48tf.js} +2 -2
- package/dist/_chunks/use-select-on-arrow-Cr4iBuW5.js +26 -0
- package/dist/_chunks/{widget-picker-D8RiWrJd.js → widget-picker-DXYBMTfe.js} +2 -2
- package/dist/_chunks/{workflow-map-D3mezmGB.js → workflow-map-Demlpy39.js} +2 -2
- package/dist/agent-catalog.json +27 -10
- package/dist/agent-i18n/en.json +8 -7
- package/dist/components/_shared/non-modal-tab-exit.d.ts +8 -0
- package/dist/components/_shared/use-apex-chart-semantics.d.ts +6 -0
- package/dist/components/_shared/use-select-on-arrow.d.ts +20 -0
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/chart/chart.d.ts +10 -5
- package/dist/components/chart/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/dashboard-grid/dashboard-grid-engine.d.ts +22 -0
- package/dist/components/dashboard-grid/dashboard-grid.d.ts +48 -4
- package/dist/components/dashboard-grid/index.js +1 -1
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/dialog/dialog.d.ts +2 -2
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/periodontal-chart/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/position-grid/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sheet/sheet.d.ts +2 -2
- package/dist/components/stat/index.d.ts +1 -1
- package/dist/components/stat/index.js +1 -1
- package/dist/components/stat/stat.d.ts +9 -0
- package/dist/components/stepper-accordion/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/host-legacy.css +13 -2
- package/dist/i18n/locales/ar.d.ts +3 -2
- package/dist/i18n/locales/ar.js +5 -4
- package/dist/i18n/locales/de.d.ts +3 -2
- package/dist/i18n/locales/de.js +5 -4
- package/dist/i18n/locales/el.d.ts +3 -2
- package/dist/i18n/locales/el.js +5 -4
- package/dist/i18n/locales/en.d.ts +3 -2
- package/dist/i18n/locales/en.js +5 -4
- package/dist/i18n/locales/es.d.ts +3 -2
- package/dist/i18n/locales/es.js +5 -4
- package/dist/i18n/locales/fr.d.ts +3 -2
- package/dist/i18n/locales/fr.js +5 -4
- package/dist/i18n/locales/hi.d.ts +3 -2
- package/dist/i18n/locales/hi.js +5 -4
- package/dist/i18n/locales/it.d.ts +3 -2
- package/dist/i18n/locales/it.js +5 -4
- package/dist/i18n/locales/ja.d.ts +3 -2
- package/dist/i18n/locales/ja.js +5 -4
- package/dist/i18n/locales/nl.d.ts +3 -2
- package/dist/i18n/locales/nl.js +5 -4
- package/dist/i18n/locales/pl.d.ts +3 -2
- package/dist/i18n/locales/pl.js +5 -4
- package/dist/i18n/locales/pt.d.ts +3 -2
- package/dist/i18n/locales/pt.js +5 -4
- package/dist/i18n/locales/ro.d.ts +3 -2
- package/dist/i18n/locales/ro.js +5 -4
- package/dist/i18n/locales/ru.d.ts +3 -2
- package/dist/i18n/locales/ru.js +5 -4
- package/dist/i18n/locales/sq.d.ts +3 -2
- package/dist/i18n/locales/sq.js +5 -4
- package/dist/i18n/locales/sv.d.ts +3 -2
- package/dist/i18n/locales/sv.js +5 -4
- package/dist/i18n/locales/tr.d.ts +3 -2
- package/dist/i18n/locales/tr.js +5 -4
- package/dist/i18n/locales/zh.d.ts +3 -2
- package/dist/i18n/locales/zh.js +5 -4
- package/dist/index.js +48 -48
- package/dist/locales/ar.json +5 -4
- package/dist/locales/de.json +5 -4
- package/dist/locales/el.json +5 -4
- package/dist/locales/en.json +5 -4
- package/dist/locales/es.json +5 -4
- package/dist/locales/fr.json +5 -4
- package/dist/locales/hi.json +5 -4
- package/dist/locales/it.json +5 -4
- package/dist/locales/ja.json +5 -4
- package/dist/locales/nl.json +5 -4
- package/dist/locales/pl.json +5 -4
- package/dist/locales/pt.json +5 -4
- package/dist/locales/ro.json +5 -4
- package/dist/locales/ru.json +5 -4
- package/dist/locales/sq.json +5 -4
- package/dist/locales/sv.json +5 -4
- package/dist/locales/tr.json +5 -4
- package/dist/locales/zh.json +5 -4
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts +2 -2
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +13 -2
- package/package.json +1 -1
- package/dist/_chunks/chart-C2RBJERE.js +0 -705
- package/dist/_chunks/dashboard-grid-SAGoyCtL.js +0 -691
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { jsx as r, jsxs as u, Fragment as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { useTranslation as
|
|
1
|
+
import { jsx as r, jsxs as u, Fragment as Lt } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as $t, useState as b, useRef as ge, useId as E, useCallback as _e, useEffect as Be, useMemo as Wt, useImperativeHandle as jt, Fragment as qt } from "react";
|
|
3
|
+
import { useTranslation as _t } from "react-i18next";
|
|
4
4
|
import * as H from "@radix-ui/react-popover";
|
|
5
5
|
import * as Q from "@radix-ui/react-radio-group";
|
|
6
|
-
import { S as
|
|
7
|
-
import { j as
|
|
6
|
+
import { S as Bt } from "./spinner-CoflYlEx.js";
|
|
7
|
+
import { j as zt, k as Yt, u as Ut, b as Ht, g as Qt, c as Jt, l as ze, m as Xt, s as Zt, a as ea, e as ta, t as aa, n as Ye, o as Ue, r as He, p as ra, q as sa, D as na, C as oa, v as ia, f as da, w as J, h as la, d as ve, i as ca } from "./date-picker-variants-BnF-sHzq.js";
|
|
8
|
+
import { u as Qe } from "./use-select-on-arrow-Cr4iBuW5.js";
|
|
8
9
|
import { u as ye } from "./use-controllable-state-BiY4xTzM.js";
|
|
9
|
-
import { u as
|
|
10
|
-
import { S as
|
|
11
|
-
import { u as
|
|
12
|
-
import { f as k, s as
|
|
10
|
+
import { u as ua, a as pa } from "./form-field-context-DtiROUJV.js";
|
|
11
|
+
import { S as ma } from "./switch-D--x7n6h.js";
|
|
12
|
+
import { u as fa } from "./registry-DvAUVLHh.js";
|
|
13
|
+
import { f as k, s as Je, j as he, b as Xe, i as ga } from "./format-D-1gTdHF.js";
|
|
13
14
|
import { s as M } from "./subDays-DlMw8Xng.js";
|
|
14
|
-
import { C as
|
|
15
|
-
import { C as
|
|
16
|
-
import { p as
|
|
17
|
-
function
|
|
18
|
-
return
|
|
15
|
+
import { C as va } from "./calendar-days-BGWklvE-.js";
|
|
16
|
+
import { C as ya } from "./check-DrFSN__t.js";
|
|
17
|
+
import { p as ha } from "./parse-jZ-i8Xgj.js";
|
|
18
|
+
function ba(s, l, g) {
|
|
19
|
+
return zt(s, -1, g);
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
-
return
|
|
21
|
+
function Ze(s, l, g) {
|
|
22
|
+
return Yt(s, -1, g);
|
|
22
23
|
}
|
|
23
|
-
const
|
|
24
|
+
const ka = {
|
|
24
25
|
id: "date-range-picker",
|
|
25
26
|
capabilities: [
|
|
26
27
|
"range_pick",
|
|
@@ -212,80 +213,80 @@ const ya = {
|
|
|
212
213
|
description: "Sourced from the id prop."
|
|
213
214
|
}
|
|
214
215
|
}
|
|
215
|
-
},
|
|
216
|
+
}, et = [
|
|
216
217
|
{ value: "day", fallback: "Day" },
|
|
217
218
|
{ value: "week", fallback: "Week" },
|
|
218
219
|
{ value: "month", fallback: "Month" },
|
|
219
220
|
{ value: "quarter", fallback: "Quarter" }
|
|
220
|
-
],
|
|
221
|
+
], Ra = [
|
|
221
222
|
{ value: "previous", fallback: "Previous period" },
|
|
222
223
|
{ value: "lastYear", fallback: "Same period last year" }
|
|
223
|
-
],
|
|
224
|
+
], xa = $t(
|
|
224
225
|
({
|
|
225
226
|
value: s,
|
|
226
227
|
defaultValue: l,
|
|
227
228
|
onChange: g,
|
|
228
229
|
commitMode: p = "auto",
|
|
229
|
-
onApply:
|
|
230
|
+
onApply: S,
|
|
230
231
|
onCancel: I,
|
|
231
|
-
showClear:
|
|
232
|
-
numberOfMonths:
|
|
232
|
+
showClear: tt = !0,
|
|
233
|
+
numberOfMonths: at,
|
|
233
234
|
compact: X = !1,
|
|
234
235
|
granularity: be,
|
|
235
236
|
defaultGranularity: ke,
|
|
236
|
-
onGranularityChange:
|
|
237
|
+
onGranularityChange: rt,
|
|
237
238
|
allowedGranularities: Z,
|
|
238
239
|
compare: j = !1,
|
|
239
|
-
compareEnabled:
|
|
240
|
-
defaultCompare:
|
|
241
|
-
defaultCompareMode:
|
|
242
|
-
onCompareChange:
|
|
243
|
-
weekStartsOn:
|
|
240
|
+
compareEnabled: st,
|
|
241
|
+
defaultCompare: nt = !1,
|
|
242
|
+
defaultCompareMode: ot = "previous",
|
|
243
|
+
onCompareChange: m,
|
|
244
|
+
weekStartsOn: F,
|
|
244
245
|
minDate: ee,
|
|
245
246
|
maxDate: te,
|
|
246
247
|
presets: ae,
|
|
247
|
-
mergePresets:
|
|
248
|
+
mergePresets: it = !1,
|
|
248
249
|
size: Re = "md",
|
|
249
|
-
chrome:
|
|
250
|
-
disabled:
|
|
251
|
-
placeholder:
|
|
252
|
-
className:
|
|
253
|
-
id:
|
|
254
|
-
},
|
|
255
|
-
const { t: n, i18n: re } =
|
|
250
|
+
chrome: dt = "input",
|
|
251
|
+
disabled: lt,
|
|
252
|
+
placeholder: ct,
|
|
253
|
+
className: ut,
|
|
254
|
+
id: pt
|
|
255
|
+
}, mt) => {
|
|
256
|
+
const { t: n, i18n: re } = _t("ui"), A = ua(), se = pa(A, pt), xe = A.disabled || lt, ft = A.invalid ? "error" : "default", c = Ut(re.language), gt = Ht(), f = Qt(re.language), vt = ct ?? n("inputs.dateRangePicker.placeholder", "Select date range"), [yt, Pe] = ye({
|
|
256
257
|
value: s,
|
|
257
258
|
defaultValue: l ?? {},
|
|
258
259
|
onChange: g
|
|
259
|
-
}), i =
|
|
260
|
+
}), i = yt ?? {}, [O, R] = b(!1), [a, T] = b(i), [ht, ne] = b(i.from ?? /* @__PURE__ */ new Date()), [De, we] = b(""), [Ne, Se] = b(""), [G, L] = b(!1), [C, $] = b(!1), q = be !== void 0 || ke !== void 0, _ = Z && Z.length > 0 ? Z : void 0, Ie = _ ? et.filter(
|
|
260
261
|
(e) => _.includes(e.value)
|
|
261
|
-
) :
|
|
262
|
+
) : et, W = (e) => {
|
|
262
263
|
var t;
|
|
263
264
|
return !_ || _.includes(e) ? e : ((t = Ie[0]) == null ? void 0 : t.value) ?? e;
|
|
264
|
-
}, [
|
|
265
|
+
}, [bt, oe] = ye({
|
|
265
266
|
value: be,
|
|
266
267
|
defaultValue: W(ke ?? "day"),
|
|
267
|
-
onChange:
|
|
268
|
-
}), B = W(
|
|
269
|
-
value:
|
|
270
|
-
defaultValue:
|
|
268
|
+
onChange: rt
|
|
269
|
+
}), B = W(bt ?? "day"), [K, z] = ye({
|
|
270
|
+
value: st,
|
|
271
|
+
defaultValue: nt
|
|
271
272
|
// onCompareChange needs the resolved range as its 2nd arg, so it is
|
|
272
273
|
// called manually at the commit points rather than wired here.
|
|
273
|
-
}), [
|
|
274
|
-
|
|
275
|
-
), [Oe,
|
|
274
|
+
}), [D, V] = b(
|
|
275
|
+
K ?? !1
|
|
276
|
+
), [Oe, kt] = b(ot), Rt = ge(null), w = ge(!1), xt = at ?? (X ? 1 : 2), Te = E(), Ge = E(), Ce = E(), Ke = E(), ie = E(), Pt = E(), x = _e(
|
|
276
277
|
(e) => {
|
|
277
278
|
Pe(e);
|
|
278
279
|
},
|
|
279
280
|
[Pe]
|
|
280
|
-
),
|
|
281
|
-
|
|
282
|
-
O && (T(i),
|
|
283
|
-
}, [O]),
|
|
284
|
-
G ||
|
|
285
|
-
a.from ? k(a.from,
|
|
286
|
-
), C ||
|
|
287
|
-
}, [a.from, a.to,
|
|
288
|
-
const
|
|
281
|
+
), Dt = Jt(ee, te), wt = (e) => (ee ? ca(e, ee) : !1) || (te ? ve(e, te) : !1);
|
|
282
|
+
Be(() => {
|
|
283
|
+
O && (T(i), V(K ?? !1), L(!1), $(!1), w.current = !1);
|
|
284
|
+
}, [O]), Be(() => {
|
|
285
|
+
G || we(
|
|
286
|
+
a.from ? k(a.from, f, { locale: c }) : ""
|
|
287
|
+
), C || Se(a.to ? k(a.to, f, { locale: c }) : "");
|
|
288
|
+
}, [a.from, a.to, f, c]);
|
|
289
|
+
const Ve = [
|
|
289
290
|
{
|
|
290
291
|
label: n("inputs.dateRangePicker.presets.today", "Today"),
|
|
291
292
|
range: () => {
|
|
@@ -312,25 +313,25 @@ const ya = {
|
|
|
312
313
|
range: () => ({
|
|
313
314
|
// `weekStartsOn` (when set) overrides the locale's first day; when
|
|
314
315
|
// undefined date-fns falls back to the locale.
|
|
315
|
-
from:
|
|
316
|
-
to:
|
|
316
|
+
from: Je(/* @__PURE__ */ new Date(), { locale: c, weekStartsOn: F }),
|
|
317
|
+
to: ze(/* @__PURE__ */ new Date(), { locale: c, weekStartsOn: F })
|
|
317
318
|
})
|
|
318
319
|
},
|
|
319
320
|
{
|
|
320
321
|
label: n("inputs.dateRangePicker.presets.lastWeek", "Last week"),
|
|
321
322
|
range: () => {
|
|
322
|
-
const e =
|
|
323
|
+
const e = ba(/* @__PURE__ */ new Date());
|
|
323
324
|
return {
|
|
324
|
-
from:
|
|
325
|
-
to:
|
|
325
|
+
from: Je(e, { locale: c, weekStartsOn: F }),
|
|
326
|
+
to: ze(e, { locale: c, weekStartsOn: F })
|
|
326
327
|
};
|
|
327
328
|
}
|
|
328
329
|
},
|
|
329
330
|
{
|
|
330
331
|
label: n("inputs.dateRangePicker.presets.thisMonth", "This month"),
|
|
331
332
|
range: () => ({
|
|
332
|
-
from:
|
|
333
|
-
to:
|
|
333
|
+
from: Zt(/* @__PURE__ */ new Date()),
|
|
334
|
+
to: Xt(/* @__PURE__ */ new Date())
|
|
334
335
|
})
|
|
335
336
|
},
|
|
336
337
|
{
|
|
@@ -340,95 +341,96 @@ const ya = {
|
|
|
340
341
|
to: /* @__PURE__ */ new Date()
|
|
341
342
|
})
|
|
342
343
|
}
|
|
343
|
-
], de = ae ?
|
|
344
|
+
], de = ae ? it ? [...Ve, ...ae] : ae : Ve, Ee = (() => {
|
|
344
345
|
const e = [], t = /* @__PURE__ */ new Map();
|
|
345
346
|
for (const d of de) {
|
|
346
347
|
const o = d.group ?? "";
|
|
347
348
|
t.has(o) || (t.set(o, []), e.push(o)), t.get(o).push(d);
|
|
348
349
|
}
|
|
349
350
|
return e.map((d) => ({ group: d, presets: t.get(d) }));
|
|
350
|
-
})(),
|
|
351
|
+
})(), Nt = Ee.some((e) => e.group !== ""), y = (e, t = Oe) => {
|
|
351
352
|
if (!e.from || !e.to) return;
|
|
352
353
|
if (t === "lastYear")
|
|
353
|
-
return { from:
|
|
354
|
+
return { from: Ze(e.from), to: Ze(e.to) };
|
|
354
355
|
const d = he(e.to, e.from), o = M(e.from, 1);
|
|
355
356
|
return { from: M(o, d), to: o };
|
|
356
|
-
}, Y = j &&
|
|
357
|
+
}, Y = j && D, Me = j && (K ?? !1), h = Y ? y(a) : void 0, St = (() => {
|
|
357
358
|
if (!(h != null && h.from) || !h.to) return;
|
|
358
359
|
const e = h.from, t = h.to, d = {
|
|
359
360
|
compareStart: e,
|
|
360
361
|
compareEnd: t
|
|
361
362
|
};
|
|
362
|
-
return he(t, e) >= 2 && (d.compareMiddle = { from:
|
|
363
|
-
})(),
|
|
363
|
+
return he(t, e) >= 2 && (d.compareMiddle = { from: ea(e, 1), to: M(t, 1) }), d;
|
|
364
|
+
})(), Fe = (e) => {
|
|
364
365
|
const t = {};
|
|
365
366
|
return q && (t.granularity = B), Y && (t.compareRange = y(e)), t.granularity || t.compareRange ? t : void 0;
|
|
366
|
-
},
|
|
367
|
+
}, Ae = Qe(), Le = Qe(), It = (e) => {
|
|
368
|
+
Le.noteSelection();
|
|
367
369
|
const t = e;
|
|
368
|
-
|
|
369
|
-
},
|
|
370
|
-
|
|
371
|
-
}, le =
|
|
370
|
+
kt(t), Y && p === "auto" && (m == null || m(!0, y(a, t)));
|
|
371
|
+
}, Ot = (e) => {
|
|
372
|
+
V(e), p === "auto" && (z(e), m == null || m(e, e ? y(a) : void 0));
|
|
373
|
+
}, le = _e(
|
|
372
374
|
(e) => {
|
|
373
375
|
T(e), p === "auto" && e.from && e.to && x(e);
|
|
374
376
|
},
|
|
375
377
|
[p, x]
|
|
376
|
-
),
|
|
377
|
-
|
|
378
|
-
},
|
|
378
|
+
), Tt = (e) => {
|
|
379
|
+
L(!1), $(!1), le({ from: e == null ? void 0 : e.from, to: e == null ? void 0 : e.to });
|
|
380
|
+
}, Gt = (e) => {
|
|
379
381
|
const t = e.range();
|
|
380
|
-
|
|
382
|
+
L(!1), $(!1), T(t), ne(t.from), p === "auto" && (x(t), S == null || S(t, Fe(t)), w.current = !0, R(!1));
|
|
381
383
|
}, ce = (e, t) => {
|
|
382
|
-
const d = e === "from" ?
|
|
384
|
+
const d = e === "from" ? L : $;
|
|
383
385
|
if (t.trim() === "") {
|
|
384
386
|
d(!1), le(
|
|
385
387
|
e === "from" ? { from: void 0, to: a.to } : { from: a.from, to: void 0 }
|
|
386
388
|
);
|
|
387
389
|
return;
|
|
388
390
|
}
|
|
389
|
-
const o =
|
|
390
|
-
if (!
|
|
391
|
+
const o = ha(t, f, /* @__PURE__ */ new Date(), { locale: c });
|
|
392
|
+
if (!ga(o) || wt(o)) {
|
|
391
393
|
d(!0);
|
|
392
394
|
return;
|
|
393
395
|
}
|
|
394
396
|
d(!1);
|
|
395
397
|
let P;
|
|
396
398
|
e === "from" ? P = a.to && ve(o, a.to) ? { from: o, to: void 0 } : { from: o, to: a.to } : P = a.from && ve(a.from, o) ? { from: o, to: void 0 } : { from: a.from, to: o }, ne(o), le(P);
|
|
397
|
-
},
|
|
398
|
-
t.key === "Enter" && (t.preventDefault(), ce(e, e === "from" ?
|
|
399
|
-
}, Ot = () => {
|
|
400
|
-
T({}), A(!1), $(!1), p === "auto" && x({});
|
|
401
|
-
}, Tt = !!(a.from && a.to), Gt = !a.from && !a.to, Ae = (Tt || Gt) && !G && !C, ue = () => {
|
|
402
|
-
Ae && (x(a), j && N !== (V ?? !1) && (z(N), f == null || f(
|
|
403
|
-
N,
|
|
404
|
-
N ? y(a) : void 0
|
|
405
|
-
)), w == null || w(a, Ke(a))), D.current = !0, R(!1);
|
|
399
|
+
}, $e = (e) => (t) => {
|
|
400
|
+
t.key === "Enter" && (t.preventDefault(), ce(e, e === "from" ? De : Ne));
|
|
406
401
|
}, Ct = () => {
|
|
407
|
-
|
|
402
|
+
T({}), L(!1), $(!1), p === "auto" && x({});
|
|
403
|
+
}, Kt = !!(a.from && a.to), Vt = !a.from && !a.to, We = (Kt || Vt) && !G && !C, ue = () => {
|
|
404
|
+
We && (x(a), j && D !== (K ?? !1) && (z(D), m == null || m(
|
|
405
|
+
D,
|
|
406
|
+
D ? y(a) : void 0
|
|
407
|
+
)), S == null || S(a, Fe(a))), w.current = !0, R(!1);
|
|
408
|
+
}, Et = () => {
|
|
409
|
+
w.current = !0, R(!1);
|
|
408
410
|
}, pe = () => {
|
|
409
|
-
p === "apply" && (I == null || I()), T(i),
|
|
410
|
-
},
|
|
411
|
+
p === "apply" && (I == null || I()), T(i), V(K ?? !1), R(!1);
|
|
412
|
+
}, Mt = (e) => {
|
|
411
413
|
if (e) {
|
|
412
|
-
|
|
414
|
+
w.current = !1, R(!0);
|
|
413
415
|
return;
|
|
414
416
|
}
|
|
415
|
-
p === "apply" && !
|
|
416
|
-
},
|
|
417
|
+
p === "apply" && !w.current && (I == null || I()), T(i), V(K ?? !1), w.current = !1, R(!1);
|
|
418
|
+
}, Ft = (e) => {
|
|
417
419
|
if (!i.from || !i.to) return !1;
|
|
418
420
|
const t = e.range();
|
|
419
|
-
return
|
|
420
|
-
},
|
|
421
|
+
return Xe(t.from, i.from) && Xe(t.to, i.to);
|
|
422
|
+
}, N = de.find(Ft), je = (() => {
|
|
421
423
|
if (i.from && i.to) {
|
|
422
|
-
const e = k(i.from,
|
|
424
|
+
const e = k(i.from, f, { locale: c }), t = k(i.to, f, { locale: c });
|
|
423
425
|
return `${e} – ${t}`;
|
|
424
426
|
}
|
|
425
|
-
return i.from ? k(i.from,
|
|
426
|
-
})(), U = a.from ? a.to ? null : "end" : "start",
|
|
427
|
+
return i.from ? k(i.from, f, { locale: c }) : "";
|
|
428
|
+
})(), U = a.from ? a.to ? null : "end" : "start", At = (() => {
|
|
427
429
|
if (!a.from)
|
|
428
430
|
return n("inputs.dateRangePicker.selectStart", "Select start date");
|
|
429
431
|
if (!a.to)
|
|
430
432
|
return n("inputs.dateRangePicker.selectEnd", "Select end date");
|
|
431
|
-
const e = he(a.to, a.from) + 1, t = k(a.from,
|
|
433
|
+
const e = he(a.to, a.from) + 1, t = k(a.from, f, { locale: c }), d = k(a.to, f, { locale: c }), o = n("inputs.dateRangePicker.days", { count: e });
|
|
432
434
|
return `${t} – ${d} · ${o}`;
|
|
433
435
|
})(), v = ge({
|
|
434
436
|
currentValue: i,
|
|
@@ -439,12 +441,12 @@ const ya = {
|
|
|
439
441
|
// Imperative/agent path commits directly (like setRange/clear), so
|
|
440
442
|
// toggle_compare reflects in getCompareRange immediately — not a draft.
|
|
441
443
|
setCompare: (e) => {
|
|
442
|
-
|
|
444
|
+
V(e), z(e), m == null || m(
|
|
443
445
|
e,
|
|
444
446
|
e ? y(i) : void 0
|
|
445
447
|
);
|
|
446
448
|
},
|
|
447
|
-
getActivePreset: () =>
|
|
449
|
+
getActivePreset: () => N == null ? void 0 : N.label,
|
|
448
450
|
getActiveEnd: () => U,
|
|
449
451
|
apply: () => ue(),
|
|
450
452
|
cancel: () => pe()
|
|
@@ -456,17 +458,17 @@ const ya = {
|
|
|
456
458
|
setGranularity: (e) => oe(W(e)),
|
|
457
459
|
getCompareRange: () => Me ? y(i) : void 0,
|
|
458
460
|
setCompare: (e) => {
|
|
459
|
-
|
|
461
|
+
V(e), z(e), m == null || m(
|
|
460
462
|
e,
|
|
461
463
|
e ? y(i) : void 0
|
|
462
464
|
);
|
|
463
465
|
},
|
|
464
|
-
getActivePreset: () =>
|
|
466
|
+
getActivePreset: () => N == null ? void 0 : N.label,
|
|
465
467
|
getActiveEnd: () => U,
|
|
466
468
|
apply: () => ue(),
|
|
467
469
|
cancel: () => pe()
|
|
468
470
|
};
|
|
469
|
-
const
|
|
471
|
+
const me = Wt(
|
|
470
472
|
() => ({
|
|
471
473
|
getRange: () => v.current.currentValue,
|
|
472
474
|
setRange: (e) => x(e),
|
|
@@ -485,27 +487,27 @@ const ya = {
|
|
|
485
487
|
}),
|
|
486
488
|
[x]
|
|
487
489
|
);
|
|
488
|
-
|
|
489
|
-
const
|
|
490
|
-
return /* @__PURE__ */ r(H.Root, { open: O, onOpenChange:
|
|
490
|
+
jt(mt, () => me, [me]), fa(ka, me, se);
|
|
491
|
+
const qe = (e) => e === "from" ? G ? "error" : U === "start" ? "active" : "default" : C ? "error" : U === "end" ? "active" : "default";
|
|
492
|
+
return /* @__PURE__ */ r(H.Root, { open: O, onOpenChange: Mt, children: /* @__PURE__ */ u(
|
|
491
493
|
"div",
|
|
492
494
|
{
|
|
493
|
-
className:
|
|
495
|
+
className: ut,
|
|
494
496
|
"data-component": "date-range-picker",
|
|
495
497
|
"data-component-id": se,
|
|
496
498
|
children: [
|
|
497
499
|
/* @__PURE__ */ r(H.Trigger, { asChild: !0, disabled: xe, children: /* @__PURE__ */ u(
|
|
498
500
|
"button",
|
|
499
501
|
{
|
|
500
|
-
ref:
|
|
502
|
+
ref: Rt,
|
|
501
503
|
id: se,
|
|
502
504
|
type: "button",
|
|
503
505
|
disabled: xe,
|
|
504
|
-
"aria-describedby":
|
|
505
|
-
"aria-invalid":
|
|
506
|
+
"aria-describedby": A.describedBy || void 0,
|
|
507
|
+
"aria-invalid": A.invalid || void 0,
|
|
506
508
|
"aria-haspopup": "dialog",
|
|
507
509
|
"aria-expanded": O,
|
|
508
|
-
className:
|
|
510
|
+
className: aa({ size: Re, tone: ft, chrome: dt }),
|
|
509
511
|
children: [
|
|
510
512
|
/* @__PURE__ */ r(
|
|
511
513
|
"span",
|
|
@@ -517,17 +519,17 @@ const ya = {
|
|
|
517
519
|
// lets the flex child shrink below its content width so
|
|
518
520
|
// `truncate` engages.
|
|
519
521
|
"ds:min-w-0 ds:flex-1 ds:truncate ds:text-start",
|
|
520
|
-
|
|
522
|
+
je ? "ds:text-foreground" : "ds:text-muted-foreground"
|
|
521
523
|
].join(" "),
|
|
522
|
-
children:
|
|
524
|
+
children: je || vt
|
|
523
525
|
}
|
|
524
526
|
),
|
|
525
527
|
/* @__PURE__ */ r(
|
|
526
528
|
"span",
|
|
527
529
|
{
|
|
528
530
|
"aria-hidden": "true",
|
|
529
|
-
className:
|
|
530
|
-
children: /* @__PURE__ */ r(
|
|
531
|
+
className: ta({ size: Re }),
|
|
532
|
+
children: /* @__PURE__ */ r(va, {})
|
|
531
533
|
}
|
|
532
534
|
)
|
|
533
535
|
]
|
|
@@ -544,7 +546,7 @@ const ya = {
|
|
|
544
546
|
"Select date range"
|
|
545
547
|
),
|
|
546
548
|
"data-component": "date-range-picker-content",
|
|
547
|
-
className:
|
|
549
|
+
className: la(),
|
|
548
550
|
children: /* @__PURE__ */ u("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
549
551
|
/* @__PURE__ */ u("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
550
552
|
/* @__PURE__ */ u("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
@@ -560,19 +562,22 @@ const ya = {
|
|
|
560
562
|
Q.Root,
|
|
561
563
|
{
|
|
562
564
|
value: B,
|
|
563
|
-
onValueChange: (e) =>
|
|
564
|
-
|
|
565
|
-
|
|
565
|
+
onValueChange: (e) => {
|
|
566
|
+
Ae.noteSelection(), oe(
|
|
567
|
+
W(e)
|
|
568
|
+
);
|
|
569
|
+
},
|
|
570
|
+
onKeyDown: Ae.onKeyDown,
|
|
566
571
|
"aria-label": n(
|
|
567
572
|
"inputs.dateRangePicker.granularityLabel",
|
|
568
573
|
"Granularity"
|
|
569
574
|
),
|
|
570
|
-
className:
|
|
575
|
+
className: Ue(),
|
|
571
576
|
children: Ie.map((e) => /* @__PURE__ */ r(
|
|
572
577
|
Q.Item,
|
|
573
578
|
{
|
|
574
579
|
value: e.value,
|
|
575
|
-
className:
|
|
580
|
+
className: Ye(),
|
|
576
581
|
children: n(
|
|
577
582
|
`inputs.dateRangePicker.granularity.${e.value}`,
|
|
578
583
|
e.fallback
|
|
@@ -599,15 +604,15 @@ const ya = {
|
|
|
599
604
|
id: Ge,
|
|
600
605
|
type: "text",
|
|
601
606
|
inputMode: "numeric",
|
|
602
|
-
value:
|
|
603
|
-
placeholder:
|
|
607
|
+
value: De,
|
|
608
|
+
placeholder: f.toUpperCase(),
|
|
604
609
|
"aria-invalid": G || void 0,
|
|
605
610
|
"aria-describedby": G ? ie : void 0,
|
|
606
|
-
onChange: (e) =>
|
|
611
|
+
onChange: (e) => we(e.target.value),
|
|
607
612
|
onBlur: (e) => ce("from", e.target.value),
|
|
608
|
-
onKeyDown:
|
|
609
|
-
className:
|
|
610
|
-
state:
|
|
613
|
+
onKeyDown: $e("from"),
|
|
614
|
+
className: He({
|
|
615
|
+
state: qe("from")
|
|
611
616
|
})
|
|
612
617
|
}
|
|
613
618
|
)
|
|
@@ -635,15 +640,15 @@ const ya = {
|
|
|
635
640
|
id: Ce,
|
|
636
641
|
type: "text",
|
|
637
642
|
inputMode: "numeric",
|
|
638
|
-
value:
|
|
639
|
-
placeholder:
|
|
643
|
+
value: Ne,
|
|
644
|
+
placeholder: f.toUpperCase(),
|
|
640
645
|
"aria-invalid": C || void 0,
|
|
641
646
|
"aria-describedby": C ? ie : void 0,
|
|
642
|
-
onChange: (e) =>
|
|
647
|
+
onChange: (e) => Se(e.target.value),
|
|
643
648
|
onBlur: (e) => ce("to", e.target.value),
|
|
644
|
-
onKeyDown:
|
|
645
|
-
className:
|
|
646
|
-
state:
|
|
649
|
+
onKeyDown: $e("to"),
|
|
650
|
+
className: He({
|
|
651
|
+
state: qe("to")
|
|
647
652
|
})
|
|
648
653
|
}
|
|
649
654
|
)
|
|
@@ -659,27 +664,27 @@ const ya = {
|
|
|
659
664
|
"inputs.dateRangePicker.invalidDate",
|
|
660
665
|
"Enter a date as {{format}}",
|
|
661
666
|
{
|
|
662
|
-
format:
|
|
667
|
+
format: f.toUpperCase()
|
|
663
668
|
}
|
|
664
669
|
)
|
|
665
670
|
}
|
|
666
671
|
) : null
|
|
667
672
|
] }),
|
|
668
673
|
/* @__PURE__ */ u("div", { className: "ds:flex ds:gap-[var(--spacing-md)]", children: [
|
|
669
|
-
!X && de.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:
|
|
674
|
+
!X && de.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) => {
|
|
670
675
|
const d = `${Te}-pg${t}`, o = e.presets.map((P) => {
|
|
671
|
-
const
|
|
676
|
+
const fe = P === N;
|
|
672
677
|
return /* @__PURE__ */ u(
|
|
673
678
|
"button",
|
|
674
679
|
{
|
|
675
680
|
type: "button",
|
|
676
|
-
"aria-pressed":
|
|
677
|
-
onClick: () =>
|
|
678
|
-
className:
|
|
681
|
+
"aria-pressed": fe,
|
|
682
|
+
onClick: () => Gt(P),
|
|
683
|
+
className: ra({ active: fe }),
|
|
679
684
|
children: [
|
|
680
685
|
/* @__PURE__ */ r("span", { className: "ds:min-w-0 ds:truncate", children: P.label }),
|
|
681
|
-
|
|
682
|
-
|
|
686
|
+
fe ? /* @__PURE__ */ r(
|
|
687
|
+
ya,
|
|
683
688
|
{
|
|
684
689
|
"aria-hidden": "true",
|
|
685
690
|
className: "ds:size-4 ds:shrink-0 ds:text-primary"
|
|
@@ -690,7 +695,7 @@ const ya = {
|
|
|
690
695
|
P.label
|
|
691
696
|
);
|
|
692
697
|
});
|
|
693
|
-
return
|
|
698
|
+
return Nt && e.group ? /* @__PURE__ */ u(
|
|
694
699
|
"div",
|
|
695
700
|
{
|
|
696
701
|
role: "group",
|
|
@@ -701,7 +706,7 @@ const ya = {
|
|
|
701
706
|
"div",
|
|
702
707
|
{
|
|
703
708
|
id: d,
|
|
704
|
-
className:
|
|
709
|
+
className: sa(),
|
|
705
710
|
children: e.group
|
|
706
711
|
}
|
|
707
712
|
),
|
|
@@ -709,47 +714,47 @@ const ya = {
|
|
|
709
714
|
]
|
|
710
715
|
},
|
|
711
716
|
e.group
|
|
712
|
-
) : /* @__PURE__ */ r(
|
|
717
|
+
) : /* @__PURE__ */ r(qt, { children: o }, e.group || "_ungrouped");
|
|
713
718
|
}) }) : null,
|
|
714
|
-
/* @__PURE__ */ u("div", { role: "region", "aria-labelledby":
|
|
715
|
-
/* @__PURE__ */ r("span", { id:
|
|
719
|
+
/* @__PURE__ */ u("div", { role: "region", "aria-labelledby": Ke, children: [
|
|
720
|
+
/* @__PURE__ */ r("span", { id: Ke, className: "ds:sr-only", children: n("inputs.dateRangePicker.gridLabel", "Calendar") }),
|
|
716
721
|
c ? /* @__PURE__ */ r(
|
|
717
|
-
|
|
722
|
+
na,
|
|
718
723
|
{
|
|
719
724
|
mode: "range",
|
|
720
725
|
selected: a.from ? { from: a.from, to: a.to } : void 0,
|
|
721
|
-
onSelect:
|
|
722
|
-
month:
|
|
726
|
+
onSelect: Tt,
|
|
727
|
+
month: ht,
|
|
723
728
|
onMonthChange: ne,
|
|
724
|
-
numberOfMonths:
|
|
725
|
-
weekStartsOn:
|
|
726
|
-
disabled:
|
|
729
|
+
numberOfMonths: xt,
|
|
730
|
+
weekStartsOn: F,
|
|
731
|
+
disabled: Dt,
|
|
727
732
|
locale: c,
|
|
728
|
-
labels:
|
|
733
|
+
labels: gt,
|
|
729
734
|
dir: re.dir(),
|
|
730
735
|
showOutsideDays: !0,
|
|
731
736
|
fixedWeeks: !0,
|
|
732
737
|
pagedNavigation: !0,
|
|
733
|
-
classNames:
|
|
734
|
-
modifiers:
|
|
735
|
-
modifiersClassNames:
|
|
736
|
-
components: { Chevron:
|
|
738
|
+
classNames: da,
|
|
739
|
+
modifiers: St,
|
|
740
|
+
modifiersClassNames: ia,
|
|
741
|
+
components: { Chevron: oa }
|
|
737
742
|
}
|
|
738
|
-
) : /* @__PURE__ */ r(
|
|
743
|
+
) : /* @__PURE__ */ r(Bt, {})
|
|
739
744
|
] })
|
|
740
745
|
] }),
|
|
741
746
|
j ? /* @__PURE__ */ u("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: [
|
|
742
747
|
/* @__PURE__ */ r(
|
|
743
|
-
|
|
748
|
+
ma,
|
|
744
749
|
{
|
|
745
|
-
id:
|
|
750
|
+
id: Pt,
|
|
746
751
|
label: n(
|
|
747
752
|
"inputs.dateRangePicker.compareLabel",
|
|
748
753
|
"Compare to previous period"
|
|
749
754
|
),
|
|
750
755
|
size: "sm",
|
|
751
|
-
checked:
|
|
752
|
-
onCheckedChange:
|
|
756
|
+
checked: D,
|
|
757
|
+
onCheckedChange: Ot
|
|
753
758
|
}
|
|
754
759
|
),
|
|
755
760
|
Y && h ? /* @__PURE__ */ u("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: [
|
|
@@ -760,23 +765,24 @@ const ya = {
|
|
|
760
765
|
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)]"
|
|
761
766
|
}
|
|
762
767
|
),
|
|
763
|
-
`${k(h.from,
|
|
768
|
+
`${k(h.from, f, { locale: c })} – ${k(h.to, f, { locale: c })}`
|
|
764
769
|
] }) : null,
|
|
765
|
-
|
|
770
|
+
D ? /* @__PURE__ */ r(
|
|
766
771
|
Q.Root,
|
|
767
772
|
{
|
|
768
773
|
value: Oe,
|
|
769
|
-
onValueChange:
|
|
774
|
+
onValueChange: It,
|
|
775
|
+
onKeyDown: Le.onKeyDown,
|
|
770
776
|
"aria-label": n(
|
|
771
777
|
"inputs.dateRangePicker.compareModeLabel",
|
|
772
778
|
"Comparison period"
|
|
773
779
|
),
|
|
774
|
-
className: `${
|
|
775
|
-
children:
|
|
780
|
+
className: `${Ue()} ds:ms-auto`,
|
|
781
|
+
children: Ra.map((e) => /* @__PURE__ */ r(
|
|
776
782
|
Q.Item,
|
|
777
783
|
{
|
|
778
784
|
value: e.value,
|
|
779
|
-
className:
|
|
785
|
+
className: Ye(),
|
|
780
786
|
children: n(
|
|
781
787
|
`inputs.dateRangePicker.compareMode.${e.value}`,
|
|
782
788
|
e.fallback
|
|
@@ -794,20 +800,20 @@ const ya = {
|
|
|
794
800
|
role: "status",
|
|
795
801
|
"aria-live": "polite",
|
|
796
802
|
className: "type-body-sm ds:min-w-0 ds:truncate ds:text-muted-foreground",
|
|
797
|
-
children:
|
|
803
|
+
children: At
|
|
798
804
|
}
|
|
799
805
|
),
|
|
800
806
|
/* @__PURE__ */ u("div", { className: "ds:flex ds:shrink-0 ds:gap-[var(--spacing-xs)]", children: [
|
|
801
|
-
|
|
807
|
+
tt ? /* @__PURE__ */ r(
|
|
802
808
|
"button",
|
|
803
809
|
{
|
|
804
810
|
type: "button",
|
|
805
|
-
onClick:
|
|
811
|
+
onClick: Ct,
|
|
806
812
|
className: J({ intent: "ghost" }),
|
|
807
813
|
children: n("inputs.dateRangePicker.clear", "Clear")
|
|
808
814
|
}
|
|
809
815
|
) : null,
|
|
810
|
-
p === "apply" ? /* @__PURE__ */ u(
|
|
816
|
+
p === "apply" ? /* @__PURE__ */ u(Lt, { children: [
|
|
811
817
|
/* @__PURE__ */ r(
|
|
812
818
|
"button",
|
|
813
819
|
{
|
|
@@ -821,7 +827,7 @@ const ya = {
|
|
|
821
827
|
"button",
|
|
822
828
|
{
|
|
823
829
|
type: "button",
|
|
824
|
-
disabled: !
|
|
830
|
+
disabled: !We,
|
|
825
831
|
onClick: ue,
|
|
826
832
|
className: J({ intent: "primary" }),
|
|
827
833
|
children: n("inputs.dateRangePicker.apply", "Apply")
|
|
@@ -831,7 +837,7 @@ const ya = {
|
|
|
831
837
|
"button",
|
|
832
838
|
{
|
|
833
839
|
type: "button",
|
|
834
|
-
onClick:
|
|
840
|
+
onClick: Et,
|
|
835
841
|
className: J({ intent: "primary" }),
|
|
836
842
|
children: n("inputs.dateRangePicker.done", "Done")
|
|
837
843
|
}
|
|
@@ -846,9 +852,9 @@ const ya = {
|
|
|
846
852
|
) });
|
|
847
853
|
}
|
|
848
854
|
);
|
|
849
|
-
|
|
855
|
+
xa.displayName = "DateRangePicker";
|
|
850
856
|
export {
|
|
851
|
-
|
|
852
|
-
|
|
857
|
+
xa as D,
|
|
858
|
+
ka as d
|
|
853
859
|
};
|
|
854
|
-
//# sourceMappingURL=date-range-picker-
|
|
860
|
+
//# sourceMappingURL=date-range-picker-CtUOI38x.js.map
|