@alfadocs/ui-kit 1.56.0 → 1.57.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/{ai-credits-notice-BoNJtOuE.js → ai-credits-notice-ktklr8fy.js} +2 -2
- package/dist/_chunks/ai-permission-notice-DyuEGwAt.js +206 -0
- package/dist/_chunks/alia-sidebar-BBKBJCv6.js +1284 -0
- package/dist/_chunks/{anamnesis-summary-rows-CQ-XGr0T.js → anamnesis-summary-rows-CCQ62mMN.js} +4 -4
- package/dist/_chunks/{appointment-peek-BIZaDeCi.js → appointment-peek-WvNbE4JG.js} +2 -2
- package/dist/_chunks/{appointment-timeline-DmqYEIT9.js → appointment-timeline-Z0494xO-.js} +2 -2
- package/dist/_chunks/{balance-badge-cell-DmDcXw0c.js → balance-badge-cell-CII3SDmR.js} +3 -3
- package/dist/_chunks/{booking-WyNGKPE2.js → booking-81WnKDsH.js} +3 -3
- package/dist/_chunks/{calculator-dialog-pCPWta7h.js → calculator-dialog-CzQv03p0.js} +2 -2
- package/dist/_chunks/{calendar-workspace-Du2ryaI-.js → calendar-workspace-D5-k_9zE.js} +13 -13
- package/dist/_chunks/{care-plan-card-Ddjh5Doc.js → care-plan-card-DxrRLRdW.js} +2 -2
- package/dist/_chunks/{care-plan-header-DUX_SVvF.js → care-plan-header-BMwZIgHJ.js} +2 -2
- package/dist/_chunks/{chart-HsF1KHbx.js → chart-DQ5GxqgT.js} +347 -350
- package/dist/_chunks/{clinical-note-card-14JIoUR0.js → clinical-note-card-hx939bvw.js} +2 -2
- package/dist/_chunks/{color-picker-BRQ4Y9SO.js → color-picker-BsggJovx.js} +128 -123
- package/dist/_chunks/{contact-card-CmK05vNb.js → contact-card-fHBMwEsx.js} +2 -2
- package/dist/_chunks/{contact-profile-card-Ci8lBQ6a.js → contact-profile-card-CMyBYgRR.js} +2 -2
- package/dist/_chunks/{cycle-calculator-Dgfqr4Q4.js → cycle-calculator-Cww9DzIa.js} +2 -2
- package/dist/_chunks/{data-table-D8fuhqO1.js → data-table-fAMTeAjM.js} +2 -2
- package/dist/_chunks/{data-table-tabs-Xhg5G0gU.js → data-table-tabs-CHYAAeHy.js} +2 -2
- package/dist/_chunks/{date-picker-wRAcq2lt.js → date-picker-BSZuKo13.js} +69 -62
- package/dist/_chunks/{date-range-picker-CtUOI38x.js → date-range-picker-CFk-5O3R.js} +176 -171
- package/dist/_chunks/{date-time-picker-CLeLKuv9.js → date-time-picker-CjxTkblD.js} +92 -85
- package/dist/_chunks/{dialog-CUzbnKLw.js → dialog-Dn-iQ0Jp.js} +2 -2
- package/dist/_chunks/{document-preview-uoTekVR7.js → document-preview-CHGGG0l_.js} +2 -2
- package/dist/_chunks/{due-date-calculator-CSjklbyw.js → due-date-calculator-D_qFUiHp.js} +2 -2
- package/dist/_chunks/{entity-summary-DcB0fIiv.js → entity-summary-CWcCSThK.js} +2 -2
- package/dist/_chunks/{file-manager-Cc_uO8r2.js → file-manager-CFsL1KVt.js} +3 -3
- package/dist/_chunks/{gestational-age-calculator-DqVeJke2.js → gestational-age-calculator-CZi43xKG.js} +2 -2
- package/dist/_chunks/{hcg-doubling-BIYyI2Yo.js → hcg-doubling-Ccvh7OaU.js} +2 -2
- package/dist/_chunks/{header-settings-ge_3gYEq.js → header-settings-BMcCx2LC.js} +2 -2
- package/dist/_chunks/{heatmap-Gf9r7Tn1.js → heatmap-BEeOThkW.js} +2 -2
- package/dist/_chunks/{help-me-write-templates-fV-Apf72.js → help-me-write-templates-BUoYGo6f.js} +2 -2
- package/dist/_chunks/{hover-card-BnTueNS2.js → hover-card-U_ZYoh1n.js} +201 -187
- package/dist/_chunks/{icon-picker-DWrqmI1c.js → icon-picker-C86lQTIA.js} +2 -2
- package/dist/_chunks/{info-tip-B0jmIt6M.js → info-tip-CJpNpzZe.js} +2 -2
- package/dist/_chunks/{kit-extensions-Byfxy6sy.js → kit-extensions-DYVxWcqv.js} +4 -4
- package/dist/_chunks/{link-cell-renderer-TeJNvymP.js → link-cell-renderer-CxW_oLa5.js} +2 -2
- package/dist/_chunks/link-gRw3NtOt.js +137 -0
- package/dist/_chunks/{locale-picker-DfNSdOpy.js → locale-picker-BGfrZyTw.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-Dcx-JEjg.js → marketplace-app-shell-BZcA9Z06.js} +143 -129
- package/dist/_chunks/{message-tray-BB95DA82.js → message-tray-QKQutwxj.js} +76 -69
- package/dist/_chunks/{nav-grid-BqCPH8sm.js → nav-grid-Byx8PxuB.js} +2 -2
- package/dist/_chunks/non-modal-tab-exit-j3CPOuE3.js +89 -0
- package/dist/_chunks/{note-attachment-I1NLoeRZ.js → note-attachment-Bt2cddsZ.js} +2 -2
- package/dist/_chunks/{note-timeline-CsY8YOE7.js → note-timeline-CX9nAgAR.js} +2 -2
- package/dist/_chunks/{notes-panel-DceRhthG.js → notes-panel-Cm4pttpl.js} +4 -4
- package/dist/_chunks/{notification-tray-__sJXnsz.js → notification-tray-C5VtbGjd.js} +83 -76
- package/dist/_chunks/{patient-details-DsTtjpuX.js → patient-details-99kEdtc5.js} +2 -2
- package/dist/_chunks/{patient-field-row-BvZ9luz-.js → patient-field-row-DkxY13T6.js} +5 -5
- package/dist/_chunks/{patient-summary-card-9nQWTQf6.js → patient-summary-card-opdyfeW2.js} +4 -4
- package/dist/_chunks/{payment-request-card-CwDpwXUC.js → payment-request-card-DAniJNLX.js} +2 -2
- package/dist/_chunks/{pdf-viewer-C3minW5b.js → pdf-viewer-CNQxa4tv.js} +396 -391
- package/dist/_chunks/{phone-input-DxkHMYmu.js → phone-input-O9camxkq.js} +156 -151
- package/dist/_chunks/popover-BG75rYjN.js +367 -0
- package/dist/_chunks/{practice-results-Dhbo-fc_.js → practice-results-CfRkjzsI.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-Bfu0Cq4H.js → pregnancy-dating-BFzv9g1N.js} +2 -2
- package/dist/_chunks/{product-hub-panel-BSSiGGG4.js → product-hub-panel-DlVRK7Ue.js} +103 -96
- package/dist/_chunks/{public-footer-CxpG6J1M.js → public-footer-ZWTEG1Rq.js} +2 -2
- package/dist/_chunks/{public-header.agent-pr2hyiND.js → public-header.agent-BctevbuY.js} +2 -2
- package/dist/_chunks/{radiograph-panel.agent-DkUokbEa.js → radiograph-panel.agent-DyqbTECc.js} +4 -4
- package/dist/_chunks/{registration-form-D7iNqMBF.js → registration-form-BlTzYywa.js} +2 -2
- package/dist/_chunks/{rich-text-editor-CkFfmA3v.js → rich-text-editor-DTnNZ4Ff.js} +489 -484
- package/dist/_chunks/{sheet-C7SwIxwB.js → sheet-8qsiMoUI.js} +2 -2
- package/dist/_chunks/{sign-document-B6HlyCGV.js → sign-document-D4iHS_Ug.js} +2 -2
- package/dist/_chunks/{signature-request-DhbpB9N9.js → signature-request-DRuYAG5I.js} +2 -2
- package/dist/_chunks/{signed-out-frame-B2GTIeqA.js → signed-out-frame-AhMsNW1r.js} +2 -2
- package/dist/_chunks/{task-editor-ByyRu29Y.js → task-editor-NkcopDna.js} +3 -3
- package/dist/_chunks/{use-appointment-details-read-JsDM48tf.js → use-appointment-details-read-CfFQNOF_.js} +5 -5
- package/dist/_chunks/{voice-control-panel-Bg1eklL0.js → voice-control-panel-BKbgb7FM.js} +2 -2
- package/dist/_chunks/{widget-picker-DXYBMTfe.js → widget-picker-rBA7MR5P.js} +2 -2
- package/dist/agent-catalog.json +2 -2
- package/dist/components/_shared/non-modal-tab-exit.d.ts +15 -4
- package/dist/components/ai-credits-notice/index.js +1 -1
- package/dist/components/ai-permission-notice/ai-permission-notice.d.ts +32 -0
- package/dist/components/ai-permission-notice/index.d.ts +1 -1
- package/dist/components/ai-permission-notice/index.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/chart/chart.d.ts +5 -5
- package/dist/components/chart/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/contact-card/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/data-table-tabs/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/icon-picker/index.js +1 -1
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/link/link.d.ts +5 -3
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/nav-grid/index.js +1 -1
- package/dist/components/note-timeline/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/patient-details/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/pdf-viewer/index.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/popover.d.ts +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/public-header/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/sign-document/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/voice-control-panel/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +14 -0
- package/dist/i18n/locales/ar.js +15 -1
- package/dist/i18n/locales/de.d.ts +14 -0
- package/dist/i18n/locales/de.js +15 -1
- package/dist/i18n/locales/el.d.ts +14 -0
- package/dist/i18n/locales/el.js +15 -1
- package/dist/i18n/locales/en.d.ts +14 -0
- package/dist/i18n/locales/en.js +15 -1
- package/dist/i18n/locales/es.d.ts +14 -0
- package/dist/i18n/locales/es.js +15 -1
- package/dist/i18n/locales/fr.d.ts +14 -0
- package/dist/i18n/locales/fr.js +15 -1
- package/dist/i18n/locales/hi.d.ts +14 -0
- package/dist/i18n/locales/hi.js +15 -1
- package/dist/i18n/locales/it.d.ts +14 -0
- package/dist/i18n/locales/it.js +15 -1
- package/dist/i18n/locales/ja.d.ts +14 -0
- package/dist/i18n/locales/ja.js +15 -1
- package/dist/i18n/locales/nl.d.ts +14 -0
- package/dist/i18n/locales/nl.js +15 -1
- package/dist/i18n/locales/pl.d.ts +14 -0
- package/dist/i18n/locales/pl.js +15 -1
- package/dist/i18n/locales/pt.d.ts +14 -0
- package/dist/i18n/locales/pt.js +15 -1
- package/dist/i18n/locales/ro.d.ts +14 -0
- package/dist/i18n/locales/ro.js +15 -1
- package/dist/i18n/locales/ru.d.ts +14 -0
- package/dist/i18n/locales/ru.js +15 -1
- package/dist/i18n/locales/sq.d.ts +14 -0
- package/dist/i18n/locales/sq.js +15 -1
- package/dist/i18n/locales/sv.d.ts +14 -0
- package/dist/i18n/locales/sv.js +15 -1
- package/dist/i18n/locales/tr.d.ts +14 -0
- package/dist/i18n/locales/tr.js +15 -1
- package/dist/i18n/locales/zh.d.ts +14 -0
- package/dist/i18n/locales/zh.js +15 -1
- package/dist/index.js +194 -193
- package/dist/locales/ar.json +15 -1
- package/dist/locales/de.json +15 -1
- package/dist/locales/el.json +15 -1
- package/dist/locales/en.json +15 -1
- package/dist/locales/es.json +15 -1
- package/dist/locales/fr.json +15 -1
- package/dist/locales/hi.json +15 -1
- package/dist/locales/it.json +15 -1
- package/dist/locales/ja.json +15 -1
- package/dist/locales/nl.json +15 -1
- package/dist/locales/pl.json +15 -1
- package/dist/locales/pt.json +15 -1
- package/dist/locales/ro.json +15 -1
- package/dist/locales/ru.json +15 -1
- package/dist/locales/sq.json +15 -1
- package/dist/locales/sv.json +15 -1
- package/dist/locales/tr.json +15 -1
- package/dist/locales/zh.json +15 -1
- package/dist/patterns/alia-assistant/alia-asteroid-icon.d.ts +10 -13
- package/dist/patterns/alia-assistant/alia-popout.d.ts +5 -3
- package/dist/patterns/alia-assistant/index.d.ts +2 -0
- package/dist/patterns/alia-assistant/index.js +6 -5
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +7 -2
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signed-out-frame/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/ai-permission-notice-5vpblPCx.js +0 -171
- package/dist/_chunks/alia-sidebar-DOei4Iyu.js +0 -1183
- package/dist/_chunks/link-2HokYuIi.js +0 -130
- package/dist/_chunks/non-modal-tab-exit-D2Bd93Bq.js +0 -65
- package/dist/_chunks/popover-BI3oV3eY.js +0 -305
|
@@ -1,27 +1,28 @@
|
|
|
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 $t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Wt, useState as b, useRef as ge, useId as M, useCallback as Be, useEffect as ze, useMemo as jt, useImperativeHandle as qt, Fragment as _t } from "react";
|
|
3
|
+
import { useTranslation as Bt } from "react-i18next";
|
|
4
4
|
import * as H from "@radix-ui/react-popover";
|
|
5
|
+
import { u as zt, f as Yt } from "./non-modal-tab-exit-j3CPOuE3.js";
|
|
5
6
|
import * as Q from "@radix-ui/react-radio-group";
|
|
6
|
-
import { S as
|
|
7
|
-
import { j as
|
|
8
|
-
import { u as
|
|
7
|
+
import { S as Ut } from "./spinner-CoflYlEx.js";
|
|
8
|
+
import { j as Ht, k as Qt, u as Jt, b as Xt, g as Zt, c as ea, l as Ye, m as ta, s as aa, a as ra, e as sa, t as na, n as Ue, o as He, r as Qe, p as oa, q as ia, D as da, C as la, v as ca, f as ua, w as J, h as pa, d as ve, i as fa } from "./date-picker-variants-BnF-sHzq.js";
|
|
9
|
+
import { u as Je } from "./use-select-on-arrow-Cr4iBuW5.js";
|
|
9
10
|
import { u as ye } from "./use-controllable-state-BiY4xTzM.js";
|
|
10
|
-
import { u as
|
|
11
|
-
import { S as
|
|
12
|
-
import { u as
|
|
13
|
-
import { f as k, s as
|
|
14
|
-
import { s as
|
|
15
|
-
import { C as
|
|
16
|
-
import { C as
|
|
17
|
-
import { p as
|
|
18
|
-
function
|
|
19
|
-
return
|
|
11
|
+
import { u as ma, a as ga } from "./form-field-context-DtiROUJV.js";
|
|
12
|
+
import { S as va } from "./switch-D--x7n6h.js";
|
|
13
|
+
import { u as ya } from "./registry-DvAUVLHh.js";
|
|
14
|
+
import { f as k, s as Xe, j as he, b as Ze, i as ha } from "./format-D-1gTdHF.js";
|
|
15
|
+
import { s as V } from "./subDays-DlMw8Xng.js";
|
|
16
|
+
import { C as ba } from "./calendar-days-BGWklvE-.js";
|
|
17
|
+
import { C as ka } from "./check-DrFSN__t.js";
|
|
18
|
+
import { p as Ra } from "./parse-jZ-i8Xgj.js";
|
|
19
|
+
function xa(s, l, g) {
|
|
20
|
+
return Ht(s, -1, g);
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
return
|
|
22
|
+
function et(s, l, g) {
|
|
23
|
+
return Qt(s, -1, g);
|
|
23
24
|
}
|
|
24
|
-
const
|
|
25
|
+
const Pa = {
|
|
25
26
|
id: "date-range-picker",
|
|
26
27
|
capabilities: [
|
|
27
28
|
"range_pick",
|
|
@@ -213,15 +214,15 @@ const ka = {
|
|
|
213
214
|
description: "Sourced from the id prop."
|
|
214
215
|
}
|
|
215
216
|
}
|
|
216
|
-
},
|
|
217
|
+
}, tt = [
|
|
217
218
|
{ value: "day", fallback: "Day" },
|
|
218
219
|
{ value: "week", fallback: "Week" },
|
|
219
220
|
{ value: "month", fallback: "Month" },
|
|
220
221
|
{ value: "quarter", fallback: "Quarter" }
|
|
221
|
-
],
|
|
222
|
+
], Da = [
|
|
222
223
|
{ value: "previous", fallback: "Previous period" },
|
|
223
224
|
{ value: "lastYear", fallback: "Same period last year" }
|
|
224
|
-
],
|
|
225
|
+
], wa = Wt(
|
|
225
226
|
({
|
|
226
227
|
value: s,
|
|
227
228
|
defaultValue: l,
|
|
@@ -229,64 +230,64 @@ const ka = {
|
|
|
229
230
|
commitMode: p = "auto",
|
|
230
231
|
onApply: S,
|
|
231
232
|
onCancel: I,
|
|
232
|
-
showClear:
|
|
233
|
-
numberOfMonths:
|
|
233
|
+
showClear: at = !0,
|
|
234
|
+
numberOfMonths: rt,
|
|
234
235
|
compact: X = !1,
|
|
235
236
|
granularity: be,
|
|
236
237
|
defaultGranularity: ke,
|
|
237
|
-
onGranularityChange:
|
|
238
|
+
onGranularityChange: st,
|
|
238
239
|
allowedGranularities: Z,
|
|
239
240
|
compare: j = !1,
|
|
240
|
-
compareEnabled:
|
|
241
|
-
defaultCompare:
|
|
242
|
-
defaultCompareMode:
|
|
243
|
-
onCompareChange:
|
|
244
|
-
weekStartsOn:
|
|
241
|
+
compareEnabled: nt,
|
|
242
|
+
defaultCompare: ot = !1,
|
|
243
|
+
defaultCompareMode: it = "previous",
|
|
244
|
+
onCompareChange: f,
|
|
245
|
+
weekStartsOn: A,
|
|
245
246
|
minDate: ee,
|
|
246
247
|
maxDate: te,
|
|
247
248
|
presets: ae,
|
|
248
|
-
mergePresets:
|
|
249
|
+
mergePresets: dt = !1,
|
|
249
250
|
size: Re = "md",
|
|
250
|
-
chrome:
|
|
251
|
-
disabled:
|
|
252
|
-
placeholder:
|
|
253
|
-
className:
|
|
254
|
-
id:
|
|
251
|
+
chrome: lt = "input",
|
|
252
|
+
disabled: ct,
|
|
253
|
+
placeholder: ut,
|
|
254
|
+
className: pt,
|
|
255
|
+
id: ft
|
|
255
256
|
}, mt) => {
|
|
256
|
-
const { t: n, i18n: re } =
|
|
257
|
+
const { t: n, i18n: re } = Bt("ui"), F = ma(), se = ga(F, ft), xe = F.disabled || ct, gt = F.invalid ? "error" : "default", c = Jt(re.language), vt = Xt(), m = Zt(re.language), yt = ut ?? n("inputs.dateRangePicker.placeholder", "Select date range"), [ht, Pe] = ye({
|
|
257
258
|
value: s,
|
|
258
259
|
defaultValue: l ?? {},
|
|
259
260
|
onChange: g
|
|
260
|
-
}), i =
|
|
261
|
+
}), i = ht ?? {}, [O, R] = b(!1), [a, T] = b(i), [bt, ne] = b(i.from ?? /* @__PURE__ */ new Date()), [De, we] = b(""), [Ne, Se] = b(""), [G, L] = b(!1), [K, $] = b(!1), q = be !== void 0 || ke !== void 0, _ = Z && Z.length > 0 ? Z : void 0, Ie = _ ? tt.filter(
|
|
261
262
|
(e) => _.includes(e.value)
|
|
262
|
-
) :
|
|
263
|
+
) : tt, W = (e) => {
|
|
263
264
|
var t;
|
|
264
265
|
return !_ || _.includes(e) ? e : ((t = Ie[0]) == null ? void 0 : t.value) ?? e;
|
|
265
|
-
}, [
|
|
266
|
+
}, [kt, oe] = ye({
|
|
266
267
|
value: be,
|
|
267
268
|
defaultValue: W(ke ?? "day"),
|
|
268
|
-
onChange:
|
|
269
|
-
}), B = W(
|
|
270
|
-
value:
|
|
271
|
-
defaultValue:
|
|
269
|
+
onChange: st
|
|
270
|
+
}), B = W(kt ?? "day"), [C, z] = ye({
|
|
271
|
+
value: nt,
|
|
272
|
+
defaultValue: ot
|
|
272
273
|
// onCompareChange needs the resolved range as its 2nd arg, so it is
|
|
273
274
|
// called manually at the commit points rather than wired here.
|
|
274
|
-
}), [D,
|
|
275
|
-
|
|
276
|
-
), [Oe,
|
|
275
|
+
}), [D, E] = b(
|
|
276
|
+
C ?? !1
|
|
277
|
+
), [Oe, Rt] = b(it), xt = ge(null), w = ge(!1), Pt = rt ?? (X ? 1 : 2), Te = M(), Ge = M(), Ke = M(), Ce = M(), ie = M(), Dt = M(), x = Be(
|
|
277
278
|
(e) => {
|
|
278
279
|
Pe(e);
|
|
279
280
|
},
|
|
280
281
|
[Pe]
|
|
281
|
-
),
|
|
282
|
-
|
|
283
|
-
O && (T(i),
|
|
284
|
-
}, [O]),
|
|
282
|
+
), wt = ea(ee, te), Nt = (e) => (ee ? fa(e, ee) : !1) || (te ? ve(e, te) : !1);
|
|
283
|
+
ze(() => {
|
|
284
|
+
O && (T(i), E(C ?? !1), L(!1), $(!1), w.current = !1);
|
|
285
|
+
}, [O]), ze(() => {
|
|
285
286
|
G || we(
|
|
286
|
-
a.from ? k(a.from,
|
|
287
|
-
),
|
|
288
|
-
}, [a.from, a.to,
|
|
289
|
-
const
|
|
287
|
+
a.from ? k(a.from, m, { locale: c }) : ""
|
|
288
|
+
), K || Se(a.to ? k(a.to, m, { locale: c }) : "");
|
|
289
|
+
}, [a.from, a.to, m, c]);
|
|
290
|
+
const Ee = [
|
|
290
291
|
{
|
|
291
292
|
label: n("inputs.dateRangePicker.presets.today", "Today"),
|
|
292
293
|
range: () => {
|
|
@@ -297,14 +298,14 @@ const ka = {
|
|
|
297
298
|
{
|
|
298
299
|
label: n("inputs.dateRangePicker.presets.yesterday", "Yesterday"),
|
|
299
300
|
range: () => {
|
|
300
|
-
const e =
|
|
301
|
+
const e = V(/* @__PURE__ */ new Date(), 1);
|
|
301
302
|
return { from: e, to: e };
|
|
302
303
|
}
|
|
303
304
|
},
|
|
304
305
|
{
|
|
305
306
|
label: n("inputs.dateRangePicker.presets.last7", "Last 7 days"),
|
|
306
307
|
range: () => ({
|
|
307
|
-
from:
|
|
308
|
+
from: V(/* @__PURE__ */ new Date(), 6),
|
|
308
309
|
to: /* @__PURE__ */ new Date()
|
|
309
310
|
})
|
|
310
311
|
},
|
|
@@ -313,73 +314,73 @@ const ka = {
|
|
|
313
314
|
range: () => ({
|
|
314
315
|
// `weekStartsOn` (when set) overrides the locale's first day; when
|
|
315
316
|
// undefined date-fns falls back to the locale.
|
|
316
|
-
from:
|
|
317
|
-
to:
|
|
317
|
+
from: Xe(/* @__PURE__ */ new Date(), { locale: c, weekStartsOn: A }),
|
|
318
|
+
to: Ye(/* @__PURE__ */ new Date(), { locale: c, weekStartsOn: A })
|
|
318
319
|
})
|
|
319
320
|
},
|
|
320
321
|
{
|
|
321
322
|
label: n("inputs.dateRangePicker.presets.lastWeek", "Last week"),
|
|
322
323
|
range: () => {
|
|
323
|
-
const e =
|
|
324
|
+
const e = xa(/* @__PURE__ */ new Date());
|
|
324
325
|
return {
|
|
325
|
-
from:
|
|
326
|
-
to:
|
|
326
|
+
from: Xe(e, { locale: c, weekStartsOn: A }),
|
|
327
|
+
to: Ye(e, { locale: c, weekStartsOn: A })
|
|
327
328
|
};
|
|
328
329
|
}
|
|
329
330
|
},
|
|
330
331
|
{
|
|
331
332
|
label: n("inputs.dateRangePicker.presets.thisMonth", "This month"),
|
|
332
333
|
range: () => ({
|
|
333
|
-
from:
|
|
334
|
-
to:
|
|
334
|
+
from: aa(/* @__PURE__ */ new Date()),
|
|
335
|
+
to: ta(/* @__PURE__ */ new Date())
|
|
335
336
|
})
|
|
336
337
|
},
|
|
337
338
|
{
|
|
338
339
|
label: n("inputs.dateRangePicker.presets.last30", "Last 30 days"),
|
|
339
340
|
range: () => ({
|
|
340
|
-
from:
|
|
341
|
+
from: V(/* @__PURE__ */ new Date(), 29),
|
|
341
342
|
to: /* @__PURE__ */ new Date()
|
|
342
343
|
})
|
|
343
344
|
}
|
|
344
|
-
], de = ae ?
|
|
345
|
+
], de = ae ? dt ? [...Ee, ...ae] : ae : Ee, Me = (() => {
|
|
345
346
|
const e = [], t = /* @__PURE__ */ new Map();
|
|
346
347
|
for (const d of de) {
|
|
347
348
|
const o = d.group ?? "";
|
|
348
349
|
t.has(o) || (t.set(o, []), e.push(o)), t.get(o).push(d);
|
|
349
350
|
}
|
|
350
351
|
return e.map((d) => ({ group: d, presets: t.get(d) }));
|
|
351
|
-
})(),
|
|
352
|
+
})(), St = Me.some((e) => e.group !== ""), y = (e, t = Oe) => {
|
|
352
353
|
if (!e.from || !e.to) return;
|
|
353
354
|
if (t === "lastYear")
|
|
354
|
-
return { from:
|
|
355
|
-
const d = he(e.to, e.from), o =
|
|
356
|
-
return { from:
|
|
357
|
-
}, Y = j && D,
|
|
355
|
+
return { from: et(e.from), to: et(e.to) };
|
|
356
|
+
const d = he(e.to, e.from), o = V(e.from, 1);
|
|
357
|
+
return { from: V(o, d), to: o };
|
|
358
|
+
}, Y = j && D, Ve = j && (C ?? !1), h = Y ? y(a) : void 0, It = (() => {
|
|
358
359
|
if (!(h != null && h.from) || !h.to) return;
|
|
359
360
|
const e = h.from, t = h.to, d = {
|
|
360
361
|
compareStart: e,
|
|
361
362
|
compareEnd: t
|
|
362
363
|
};
|
|
363
|
-
return he(t, e) >= 2 && (d.compareMiddle = { from:
|
|
364
|
-
})(),
|
|
364
|
+
return he(t, e) >= 2 && (d.compareMiddle = { from: ra(e, 1), to: V(t, 1) }), d;
|
|
365
|
+
})(), Ae = (e) => {
|
|
365
366
|
const t = {};
|
|
366
367
|
return q && (t.granularity = B), Y && (t.compareRange = y(e)), t.granularity || t.compareRange ? t : void 0;
|
|
367
|
-
},
|
|
368
|
+
}, Fe = Je(), Le = Je(), Ot = (e) => {
|
|
368
369
|
Le.noteSelection();
|
|
369
370
|
const t = e;
|
|
370
|
-
|
|
371
|
-
},
|
|
372
|
-
|
|
373
|
-
}, le =
|
|
371
|
+
Rt(t), Y && p === "auto" && (f == null || f(!0, y(a, t)));
|
|
372
|
+
}, Tt = (e) => {
|
|
373
|
+
E(e), p === "auto" && (z(e), f == null || f(e, e ? y(a) : void 0));
|
|
374
|
+
}, le = Be(
|
|
374
375
|
(e) => {
|
|
375
376
|
T(e), p === "auto" && e.from && e.to && x(e);
|
|
376
377
|
},
|
|
377
378
|
[p, x]
|
|
378
|
-
),
|
|
379
|
+
), Gt = (e) => {
|
|
379
380
|
L(!1), $(!1), le({ from: e == null ? void 0 : e.from, to: e == null ? void 0 : e.to });
|
|
380
|
-
},
|
|
381
|
+
}, Kt = (e) => {
|
|
381
382
|
const t = e.range();
|
|
382
|
-
L(!1), $(!1), T(t), ne(t.from), p === "auto" && (x(t), S == null || S(t,
|
|
383
|
+
L(!1), $(!1), T(t), ne(t.from), p === "auto" && (x(t), S == null || S(t, Ae(t)), w.current = !0, R(!1));
|
|
383
384
|
}, ce = (e, t) => {
|
|
384
385
|
const d = e === "from" ? L : $;
|
|
385
386
|
if (t.trim() === "") {
|
|
@@ -388,8 +389,8 @@ const ka = {
|
|
|
388
389
|
);
|
|
389
390
|
return;
|
|
390
391
|
}
|
|
391
|
-
const o =
|
|
392
|
-
if (!
|
|
392
|
+
const o = Ra(t, m, /* @__PURE__ */ new Date(), { locale: c });
|
|
393
|
+
if (!ha(o) || Nt(o)) {
|
|
393
394
|
d(!0);
|
|
394
395
|
return;
|
|
395
396
|
}
|
|
@@ -400,48 +401,48 @@ const ka = {
|
|
|
400
401
|
t.key === "Enter" && (t.preventDefault(), ce(e, e === "from" ? De : Ne));
|
|
401
402
|
}, Ct = () => {
|
|
402
403
|
T({}), L(!1), $(!1), p === "auto" && x({});
|
|
403
|
-
},
|
|
404
|
-
We && (x(a), j && D !== (
|
|
404
|
+
}, Et = !!(a.from && a.to), Mt = !a.from && !a.to, We = (Et || Mt) && !G && !K, ue = () => {
|
|
405
|
+
We && (x(a), j && D !== (C ?? !1) && (z(D), f == null || f(
|
|
405
406
|
D,
|
|
406
407
|
D ? y(a) : void 0
|
|
407
|
-
)), S == null || S(a,
|
|
408
|
-
},
|
|
408
|
+
)), S == null || S(a, Ae(a))), w.current = !0, R(!1);
|
|
409
|
+
}, Vt = () => {
|
|
409
410
|
w.current = !0, R(!1);
|
|
410
411
|
}, pe = () => {
|
|
411
|
-
p === "apply" && (I == null || I()), T(i),
|
|
412
|
-
},
|
|
412
|
+
p === "apply" && (I == null || I()), T(i), E(C ?? !1), R(!1);
|
|
413
|
+
}, je = (e) => {
|
|
413
414
|
if (e) {
|
|
414
415
|
w.current = !1, R(!0);
|
|
415
416
|
return;
|
|
416
417
|
}
|
|
417
|
-
p === "apply" && !w.current && (I == null || I()), T(i),
|
|
418
|
-
},
|
|
418
|
+
p === "apply" && !w.current && (I == null || I()), T(i), E(C ?? !1), w.current = !1, R(!1);
|
|
419
|
+
}, At = (e) => {
|
|
419
420
|
if (!i.from || !i.to) return !1;
|
|
420
421
|
const t = e.range();
|
|
421
|
-
return
|
|
422
|
-
}, N = de.find(
|
|
422
|
+
return Ze(t.from, i.from) && Ze(t.to, i.to);
|
|
423
|
+
}, N = de.find(At), qe = (() => {
|
|
423
424
|
if (i.from && i.to) {
|
|
424
|
-
const e = k(i.from,
|
|
425
|
+
const e = k(i.from, m, { locale: c }), t = k(i.to, m, { locale: c });
|
|
425
426
|
return `${e} – ${t}`;
|
|
426
427
|
}
|
|
427
|
-
return i.from ? k(i.from,
|
|
428
|
-
})(), U = a.from ? a.to ? null : "end" : "start",
|
|
428
|
+
return i.from ? k(i.from, m, { locale: c }) : "";
|
|
429
|
+
})(), U = a.from ? a.to ? null : "end" : "start", Ft = (() => {
|
|
429
430
|
if (!a.from)
|
|
430
431
|
return n("inputs.dateRangePicker.selectStart", "Select start date");
|
|
431
432
|
if (!a.to)
|
|
432
433
|
return n("inputs.dateRangePicker.selectEnd", "Select end date");
|
|
433
|
-
const e = he(a.to, a.from) + 1, t = k(a.from,
|
|
434
|
+
const e = he(a.to, a.from) + 1, t = k(a.from, m, { locale: c }), d = k(a.to, m, { locale: c }), o = n("inputs.dateRangePicker.days", { count: e });
|
|
434
435
|
return `${t} – ${d} · ${o}`;
|
|
435
436
|
})(), v = ge({
|
|
436
437
|
currentValue: i,
|
|
437
438
|
open: O,
|
|
438
439
|
getGranularity: () => q ? B : void 0,
|
|
439
440
|
setGranularity: (e) => oe(W(e)),
|
|
440
|
-
getCompareRange: () =>
|
|
441
|
+
getCompareRange: () => Ve ? y(i) : void 0,
|
|
441
442
|
// Imperative/agent path commits directly (like setRange/clear), so
|
|
442
443
|
// toggle_compare reflects in getCompareRange immediately — not a draft.
|
|
443
444
|
setCompare: (e) => {
|
|
444
|
-
|
|
445
|
+
E(e), z(e), f == null || f(
|
|
445
446
|
e,
|
|
446
447
|
e ? y(i) : void 0
|
|
447
448
|
);
|
|
@@ -456,9 +457,9 @@ const ka = {
|
|
|
456
457
|
open: O,
|
|
457
458
|
getGranularity: () => q ? B : void 0,
|
|
458
459
|
setGranularity: (e) => oe(W(e)),
|
|
459
|
-
getCompareRange: () =>
|
|
460
|
+
getCompareRange: () => Ve ? y(i) : void 0,
|
|
460
461
|
setCompare: (e) => {
|
|
461
|
-
|
|
462
|
+
E(e), z(e), f == null || f(
|
|
462
463
|
e,
|
|
463
464
|
e ? y(i) : void 0
|
|
464
465
|
);
|
|
@@ -468,7 +469,7 @@ const ka = {
|
|
|
468
469
|
apply: () => ue(),
|
|
469
470
|
cancel: () => pe()
|
|
470
471
|
};
|
|
471
|
-
const
|
|
472
|
+
const fe = jt(
|
|
472
473
|
() => ({
|
|
473
474
|
getRange: () => v.current.currentValue,
|
|
474
475
|
setRange: (e) => x(e),
|
|
@@ -487,27 +488,30 @@ const ka = {
|
|
|
487
488
|
}),
|
|
488
489
|
[x]
|
|
489
490
|
);
|
|
490
|
-
|
|
491
|
-
const
|
|
492
|
-
|
|
491
|
+
qt(mt, () => fe, [fe]), ya(Pa, fe, se);
|
|
492
|
+
const Lt = zt(!0, {
|
|
493
|
+
getAnchor: Yt,
|
|
494
|
+
onReturnToTrigger: () => je(!1)
|
|
495
|
+
}), _e = (e) => e === "from" ? G ? "error" : U === "start" ? "active" : "default" : K ? "error" : U === "end" ? "active" : "default";
|
|
496
|
+
return /* @__PURE__ */ r(H.Root, { open: O, onOpenChange: je, children: /* @__PURE__ */ u(
|
|
493
497
|
"div",
|
|
494
498
|
{
|
|
495
|
-
className:
|
|
499
|
+
className: pt,
|
|
496
500
|
"data-component": "date-range-picker",
|
|
497
501
|
"data-component-id": se,
|
|
498
502
|
children: [
|
|
499
503
|
/* @__PURE__ */ r(H.Trigger, { asChild: !0, disabled: xe, children: /* @__PURE__ */ u(
|
|
500
504
|
"button",
|
|
501
505
|
{
|
|
502
|
-
ref:
|
|
506
|
+
ref: xt,
|
|
503
507
|
id: se,
|
|
504
508
|
type: "button",
|
|
505
509
|
disabled: xe,
|
|
506
|
-
"aria-describedby":
|
|
507
|
-
"aria-invalid":
|
|
510
|
+
"aria-describedby": F.describedBy || void 0,
|
|
511
|
+
"aria-invalid": F.invalid || void 0,
|
|
508
512
|
"aria-haspopup": "dialog",
|
|
509
513
|
"aria-expanded": O,
|
|
510
|
-
className:
|
|
514
|
+
className: na({ size: Re, tone: gt, chrome: lt }),
|
|
511
515
|
children: [
|
|
512
516
|
/* @__PURE__ */ r(
|
|
513
517
|
"span",
|
|
@@ -519,17 +523,17 @@ const ka = {
|
|
|
519
523
|
// lets the flex child shrink below its content width so
|
|
520
524
|
// `truncate` engages.
|
|
521
525
|
"ds:min-w-0 ds:flex-1 ds:truncate ds:text-start",
|
|
522
|
-
|
|
526
|
+
qe ? "ds:text-foreground" : "ds:text-muted-foreground"
|
|
523
527
|
].join(" "),
|
|
524
|
-
children:
|
|
528
|
+
children: qe || yt
|
|
525
529
|
}
|
|
526
530
|
),
|
|
527
531
|
/* @__PURE__ */ r(
|
|
528
532
|
"span",
|
|
529
533
|
{
|
|
530
534
|
"aria-hidden": "true",
|
|
531
|
-
className:
|
|
532
|
-
children: /* @__PURE__ */ r(
|
|
535
|
+
className: sa({ size: Re }),
|
|
536
|
+
children: /* @__PURE__ */ r(ba, {})
|
|
533
537
|
}
|
|
534
538
|
)
|
|
535
539
|
]
|
|
@@ -540,13 +544,14 @@ const ka = {
|
|
|
540
544
|
{
|
|
541
545
|
sideOffset: 4,
|
|
542
546
|
align: "start",
|
|
547
|
+
onKeyDown: Lt,
|
|
543
548
|
role: "dialog",
|
|
544
549
|
"aria-label": n(
|
|
545
550
|
"inputs.dateRangePicker.title",
|
|
546
551
|
"Select date range"
|
|
547
552
|
),
|
|
548
553
|
"data-component": "date-range-picker-content",
|
|
549
|
-
className:
|
|
554
|
+
className: pa(),
|
|
550
555
|
children: /* @__PURE__ */ u("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
551
556
|
/* @__PURE__ */ u("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
552
557
|
/* @__PURE__ */ u("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
@@ -563,21 +568,21 @@ const ka = {
|
|
|
563
568
|
{
|
|
564
569
|
value: B,
|
|
565
570
|
onValueChange: (e) => {
|
|
566
|
-
|
|
571
|
+
Fe.noteSelection(), oe(
|
|
567
572
|
W(e)
|
|
568
573
|
);
|
|
569
574
|
},
|
|
570
|
-
onKeyDown:
|
|
575
|
+
onKeyDown: Fe.onKeyDown,
|
|
571
576
|
"aria-label": n(
|
|
572
577
|
"inputs.dateRangePicker.granularityLabel",
|
|
573
578
|
"Granularity"
|
|
574
579
|
),
|
|
575
|
-
className:
|
|
580
|
+
className: He(),
|
|
576
581
|
children: Ie.map((e) => /* @__PURE__ */ r(
|
|
577
582
|
Q.Item,
|
|
578
583
|
{
|
|
579
584
|
value: e.value,
|
|
580
|
-
className:
|
|
585
|
+
className: Ue(),
|
|
581
586
|
children: n(
|
|
582
587
|
`inputs.dateRangePicker.granularity.${e.value}`,
|
|
583
588
|
e.fallback
|
|
@@ -605,14 +610,14 @@ const ka = {
|
|
|
605
610
|
type: "text",
|
|
606
611
|
inputMode: "numeric",
|
|
607
612
|
value: De,
|
|
608
|
-
placeholder:
|
|
613
|
+
placeholder: m.toUpperCase(),
|
|
609
614
|
"aria-invalid": G || void 0,
|
|
610
615
|
"aria-describedby": G ? ie : void 0,
|
|
611
616
|
onChange: (e) => we(e.target.value),
|
|
612
617
|
onBlur: (e) => ce("from", e.target.value),
|
|
613
618
|
onKeyDown: $e("from"),
|
|
614
|
-
className:
|
|
615
|
-
state:
|
|
619
|
+
className: Qe({
|
|
620
|
+
state: _e("from")
|
|
616
621
|
})
|
|
617
622
|
}
|
|
618
623
|
)
|
|
@@ -629,7 +634,7 @@ const ka = {
|
|
|
629
634
|
/* @__PURE__ */ r(
|
|
630
635
|
"label",
|
|
631
636
|
{
|
|
632
|
-
htmlFor:
|
|
637
|
+
htmlFor: Ke,
|
|
633
638
|
className: "ds:text-[length:var(--font-size-xs)] ds:text-muted-foreground",
|
|
634
639
|
children: n("inputs.dateRangePicker.endLabel", "End date")
|
|
635
640
|
}
|
|
@@ -637,24 +642,24 @@ const ka = {
|
|
|
637
642
|
/* @__PURE__ */ r(
|
|
638
643
|
"input",
|
|
639
644
|
{
|
|
640
|
-
id:
|
|
645
|
+
id: Ke,
|
|
641
646
|
type: "text",
|
|
642
647
|
inputMode: "numeric",
|
|
643
648
|
value: Ne,
|
|
644
|
-
placeholder:
|
|
645
|
-
"aria-invalid":
|
|
646
|
-
"aria-describedby":
|
|
649
|
+
placeholder: m.toUpperCase(),
|
|
650
|
+
"aria-invalid": K || void 0,
|
|
651
|
+
"aria-describedby": K ? ie : void 0,
|
|
647
652
|
onChange: (e) => Se(e.target.value),
|
|
648
653
|
onBlur: (e) => ce("to", e.target.value),
|
|
649
654
|
onKeyDown: $e("to"),
|
|
650
|
-
className:
|
|
651
|
-
state:
|
|
655
|
+
className: Qe({
|
|
656
|
+
state: _e("to")
|
|
652
657
|
})
|
|
653
658
|
}
|
|
654
659
|
)
|
|
655
660
|
] })
|
|
656
661
|
] }),
|
|
657
|
-
G ||
|
|
662
|
+
G || K ? /* @__PURE__ */ r(
|
|
658
663
|
"p",
|
|
659
664
|
{
|
|
660
665
|
id: ie,
|
|
@@ -664,27 +669,27 @@ const ka = {
|
|
|
664
669
|
"inputs.dateRangePicker.invalidDate",
|
|
665
670
|
"Enter a date as {{format}}",
|
|
666
671
|
{
|
|
667
|
-
format:
|
|
672
|
+
format: m.toUpperCase()
|
|
668
673
|
}
|
|
669
674
|
)
|
|
670
675
|
}
|
|
671
676
|
) : null
|
|
672
677
|
] }),
|
|
673
678
|
/* @__PURE__ */ u("div", { className: "ds:flex ds:gap-[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:
|
|
679
|
+
!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: Me.map((e, t) => {
|
|
675
680
|
const d = `${Te}-pg${t}`, o = e.presets.map((P) => {
|
|
676
|
-
const
|
|
681
|
+
const me = P === N;
|
|
677
682
|
return /* @__PURE__ */ u(
|
|
678
683
|
"button",
|
|
679
684
|
{
|
|
680
685
|
type: "button",
|
|
681
|
-
"aria-pressed":
|
|
682
|
-
onClick: () =>
|
|
683
|
-
className:
|
|
686
|
+
"aria-pressed": me,
|
|
687
|
+
onClick: () => Kt(P),
|
|
688
|
+
className: oa({ active: me }),
|
|
684
689
|
children: [
|
|
685
690
|
/* @__PURE__ */ r("span", { className: "ds:min-w-0 ds:truncate", children: P.label }),
|
|
686
|
-
|
|
687
|
-
|
|
691
|
+
me ? /* @__PURE__ */ r(
|
|
692
|
+
ka,
|
|
688
693
|
{
|
|
689
694
|
"aria-hidden": "true",
|
|
690
695
|
className: "ds:size-4 ds:shrink-0 ds:text-primary"
|
|
@@ -695,7 +700,7 @@ const ka = {
|
|
|
695
700
|
P.label
|
|
696
701
|
);
|
|
697
702
|
});
|
|
698
|
-
return
|
|
703
|
+
return St && e.group ? /* @__PURE__ */ u(
|
|
699
704
|
"div",
|
|
700
705
|
{
|
|
701
706
|
role: "group",
|
|
@@ -706,7 +711,7 @@ const ka = {
|
|
|
706
711
|
"div",
|
|
707
712
|
{
|
|
708
713
|
id: d,
|
|
709
|
-
className:
|
|
714
|
+
className: ia(),
|
|
710
715
|
children: e.group
|
|
711
716
|
}
|
|
712
717
|
),
|
|
@@ -714,47 +719,47 @@ const ka = {
|
|
|
714
719
|
]
|
|
715
720
|
},
|
|
716
721
|
e.group
|
|
717
|
-
) : /* @__PURE__ */ r(
|
|
722
|
+
) : /* @__PURE__ */ r(_t, { children: o }, e.group || "_ungrouped");
|
|
718
723
|
}) }) : null,
|
|
719
|
-
/* @__PURE__ */ u("div", { role: "region", "aria-labelledby":
|
|
720
|
-
/* @__PURE__ */ r("span", { id:
|
|
724
|
+
/* @__PURE__ */ u("div", { role: "region", "aria-labelledby": Ce, children: [
|
|
725
|
+
/* @__PURE__ */ r("span", { id: Ce, className: "ds:sr-only", children: n("inputs.dateRangePicker.gridLabel", "Calendar") }),
|
|
721
726
|
c ? /* @__PURE__ */ r(
|
|
722
|
-
|
|
727
|
+
da,
|
|
723
728
|
{
|
|
724
729
|
mode: "range",
|
|
725
730
|
selected: a.from ? { from: a.from, to: a.to } : void 0,
|
|
726
|
-
onSelect:
|
|
727
|
-
month:
|
|
731
|
+
onSelect: Gt,
|
|
732
|
+
month: bt,
|
|
728
733
|
onMonthChange: ne,
|
|
729
|
-
numberOfMonths:
|
|
730
|
-
weekStartsOn:
|
|
731
|
-
disabled:
|
|
734
|
+
numberOfMonths: Pt,
|
|
735
|
+
weekStartsOn: A,
|
|
736
|
+
disabled: wt,
|
|
732
737
|
locale: c,
|
|
733
|
-
labels:
|
|
738
|
+
labels: vt,
|
|
734
739
|
dir: re.dir(),
|
|
735
740
|
showOutsideDays: !0,
|
|
736
741
|
fixedWeeks: !0,
|
|
737
742
|
pagedNavigation: !0,
|
|
738
|
-
classNames:
|
|
739
|
-
modifiers:
|
|
740
|
-
modifiersClassNames:
|
|
741
|
-
components: { Chevron:
|
|
743
|
+
classNames: ua,
|
|
744
|
+
modifiers: It,
|
|
745
|
+
modifiersClassNames: ca,
|
|
746
|
+
components: { Chevron: la }
|
|
742
747
|
}
|
|
743
|
-
) : /* @__PURE__ */ r(
|
|
748
|
+
) : /* @__PURE__ */ r(Ut, {})
|
|
744
749
|
] })
|
|
745
750
|
] }),
|
|
746
751
|
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: [
|
|
747
752
|
/* @__PURE__ */ r(
|
|
748
|
-
|
|
753
|
+
va,
|
|
749
754
|
{
|
|
750
|
-
id:
|
|
755
|
+
id: Dt,
|
|
751
756
|
label: n(
|
|
752
757
|
"inputs.dateRangePicker.compareLabel",
|
|
753
758
|
"Compare to previous period"
|
|
754
759
|
),
|
|
755
760
|
size: "sm",
|
|
756
761
|
checked: D,
|
|
757
|
-
onCheckedChange:
|
|
762
|
+
onCheckedChange: Tt
|
|
758
763
|
}
|
|
759
764
|
),
|
|
760
765
|
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: [
|
|
@@ -765,24 +770,24 @@ const ka = {
|
|
|
765
770
|
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)]"
|
|
766
771
|
}
|
|
767
772
|
),
|
|
768
|
-
`${k(h.from,
|
|
773
|
+
`${k(h.from, m, { locale: c })} – ${k(h.to, m, { locale: c })}`
|
|
769
774
|
] }) : null,
|
|
770
775
|
D ? /* @__PURE__ */ r(
|
|
771
776
|
Q.Root,
|
|
772
777
|
{
|
|
773
778
|
value: Oe,
|
|
774
|
-
onValueChange:
|
|
779
|
+
onValueChange: Ot,
|
|
775
780
|
onKeyDown: Le.onKeyDown,
|
|
776
781
|
"aria-label": n(
|
|
777
782
|
"inputs.dateRangePicker.compareModeLabel",
|
|
778
783
|
"Comparison period"
|
|
779
784
|
),
|
|
780
|
-
className: `${
|
|
781
|
-
children:
|
|
785
|
+
className: `${He()} ds:ms-auto`,
|
|
786
|
+
children: Da.map((e) => /* @__PURE__ */ r(
|
|
782
787
|
Q.Item,
|
|
783
788
|
{
|
|
784
789
|
value: e.value,
|
|
785
|
-
className:
|
|
790
|
+
className: Ue(),
|
|
786
791
|
children: n(
|
|
787
792
|
`inputs.dateRangePicker.compareMode.${e.value}`,
|
|
788
793
|
e.fallback
|
|
@@ -800,11 +805,11 @@ const ka = {
|
|
|
800
805
|
role: "status",
|
|
801
806
|
"aria-live": "polite",
|
|
802
807
|
className: "type-body-sm ds:min-w-0 ds:truncate ds:text-muted-foreground",
|
|
803
|
-
children:
|
|
808
|
+
children: Ft
|
|
804
809
|
}
|
|
805
810
|
),
|
|
806
811
|
/* @__PURE__ */ u("div", { className: "ds:flex ds:shrink-0 ds:gap-[var(--spacing-xs)]", children: [
|
|
807
|
-
|
|
812
|
+
at ? /* @__PURE__ */ r(
|
|
808
813
|
"button",
|
|
809
814
|
{
|
|
810
815
|
type: "button",
|
|
@@ -813,7 +818,7 @@ const ka = {
|
|
|
813
818
|
children: n("inputs.dateRangePicker.clear", "Clear")
|
|
814
819
|
}
|
|
815
820
|
) : null,
|
|
816
|
-
p === "apply" ? /* @__PURE__ */ u(
|
|
821
|
+
p === "apply" ? /* @__PURE__ */ u($t, { children: [
|
|
817
822
|
/* @__PURE__ */ r(
|
|
818
823
|
"button",
|
|
819
824
|
{
|
|
@@ -837,7 +842,7 @@ const ka = {
|
|
|
837
842
|
"button",
|
|
838
843
|
{
|
|
839
844
|
type: "button",
|
|
840
|
-
onClick:
|
|
845
|
+
onClick: Vt,
|
|
841
846
|
className: J({ intent: "primary" }),
|
|
842
847
|
children: n("inputs.dateRangePicker.done", "Done")
|
|
843
848
|
}
|
|
@@ -852,9 +857,9 @@ const ka = {
|
|
|
852
857
|
) });
|
|
853
858
|
}
|
|
854
859
|
);
|
|
855
|
-
|
|
860
|
+
wa.displayName = "DateRangePicker";
|
|
856
861
|
export {
|
|
857
|
-
|
|
858
|
-
|
|
862
|
+
wa as D,
|
|
863
|
+
Pa as d
|
|
859
864
|
};
|
|
860
|
-
//# sourceMappingURL=date-range-picker-
|
|
865
|
+
//# sourceMappingURL=date-range-picker-CFk-5O3R.js.map
|