@alfadocs/ui-kit-debug 0.89.0 → 0.93.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.
Files changed (201) hide show
  1. package/dist/_chunks/{antenatal-schedule-timeline-UiZQze4P.js → antenatal-schedule-timeline-BMMpi2lb.js} +17 -17
  2. package/dist/_chunks/{antenatal-schedule-timeline-UiZQze4P.js.map → antenatal-schedule-timeline-BMMpi2lb.js.map} +1 -1
  3. package/dist/_chunks/{appointment-timeline-CwpbQGC1.js → appointment-timeline-BB-c1LeR.js} +2 -2
  4. package/dist/_chunks/{appointment-timeline-CwpbQGC1.js.map → appointment-timeline-BB-c1LeR.js.map} +1 -1
  5. package/dist/_chunks/{ar-C9FRRqJs.js → ar-THMLfSoN.js} +22 -22
  6. package/dist/_chunks/{ar-C9FRRqJs.js.map → ar-THMLfSoN.js.map} +1 -1
  7. package/dist/_chunks/{booking-DEwmDprH.js → booking-BSpSMmJ2.js} +4 -4
  8. package/dist/_chunks/{booking-DEwmDprH.js.map → booking-BSpSMmJ2.js.map} +1 -1
  9. package/dist/_chunks/{cycle-calculator-DXSNIWFk.js → cycle-calculator-DNvvr0bP.js} +3 -3
  10. package/dist/_chunks/{cycle-calculator-DXSNIWFk.js.map → cycle-calculator-DNvvr0bP.js.map} +1 -1
  11. package/dist/_chunks/date-picker-BP_W6VtE.js +265 -0
  12. package/dist/_chunks/date-picker-BP_W6VtE.js.map +1 -0
  13. package/dist/_chunks/{date-picker-variants-D9B6hg15.js → date-picker-variants-eL6HjWvw.js} +966 -841
  14. package/dist/_chunks/{date-picker-variants-D9B6hg15.js.map → date-picker-variants-eL6HjWvw.js.map} +1 -1
  15. package/dist/_chunks/date-range-picker-Cc4DLAL2.js +824 -0
  16. package/dist/_chunks/date-range-picker-Cc4DLAL2.js.map +1 -0
  17. package/dist/_chunks/{date-time-picker-BU-j0qj4.js → date-time-picker-695QvBGj.js} +2 -2
  18. package/dist/_chunks/{date-time-picker-BU-j0qj4.js.map → date-time-picker-695QvBGj.js.map} +1 -1
  19. package/dist/_chunks/{de-C3_KZ6mR.js → de-DmZ-8rTN.js} +4 -4
  20. package/dist/_chunks/{de-C3_KZ6mR.js.map → de-DmZ-8rTN.js.map} +1 -1
  21. package/dist/_chunks/{due-date-calculator-BR_GuqHH.js → due-date-calculator-BEcdoy_E.js} +3 -3
  22. package/dist/_chunks/{due-date-calculator-BR_GuqHH.js.map → due-date-calculator-BEcdoy_E.js.map} +1 -1
  23. package/dist/_chunks/{el-v9xDKHgu.js → el-Bela9mxs.js} +6 -6
  24. package/dist/_chunks/{el-v9xDKHgu.js.map → el-Bela9mxs.js.map} +1 -1
  25. package/dist/_chunks/{es-Lgmjq9Rp.js → es-BNncHKex.js} +10 -10
  26. package/dist/_chunks/{es-Lgmjq9Rp.js.map → es-BNncHKex.js.map} +1 -1
  27. package/dist/_chunks/{fr-INS1OD7m.js → fr-CH8ADfhN.js} +12 -12
  28. package/dist/_chunks/{fr-INS1OD7m.js.map → fr-CH8ADfhN.js.map} +1 -1
  29. package/dist/_chunks/{gestational-age-calculator-DBIcxfjP.js → gestational-age-calculator-CuGkVqKp.js} +5 -5
  30. package/dist/_chunks/{gestational-age-calculator-DBIcxfjP.js.map → gestational-age-calculator-CuGkVqKp.js.map} +1 -1
  31. package/dist/_chunks/{hcg-doubling-BgCkds8R.js → hcg-doubling-fZ6qQN08.js} +2 -2
  32. package/dist/_chunks/{hcg-doubling-BgCkds8R.js.map → hcg-doubling-fZ6qQN08.js.map} +1 -1
  33. package/dist/_chunks/{hi-BUYtlosF.js → hi-Bppfxp8l.js} +16 -16
  34. package/dist/_chunks/{hi-BUYtlosF.js.map → hi-Bppfxp8l.js.map} +1 -1
  35. package/dist/_chunks/{isSameWeek-BUNsv4OO.js → isSameWeek-CK4HS9lH.js} +2 -2
  36. package/dist/_chunks/{isSameWeek-BUNsv4OO.js.map → isSameWeek-CK4HS9lH.js.map} +1 -1
  37. package/dist/_chunks/{it-VfsdUqeV.js → it-B4ySaRyK.js} +24 -24
  38. package/dist/_chunks/{it-VfsdUqeV.js.map → it-B4ySaRyK.js.map} +1 -1
  39. package/dist/_chunks/{ja-Dfk9qwzE.js → ja-CGF6Io9P.js} +12 -12
  40. package/dist/_chunks/{ja-Dfk9qwzE.js.map → ja-CGF6Io9P.js.map} +1 -1
  41. package/dist/_chunks/{link-cell-renderer-BzITwSXq.js → link-cell-renderer-DQjZeoAr.js} +214 -197
  42. package/dist/_chunks/link-cell-renderer-DQjZeoAr.js.map +1 -0
  43. package/dist/_chunks/{nl-Crxwg0IZ.js → nl-DuShqwuV.js} +12 -12
  44. package/dist/_chunks/{nl-Crxwg0IZ.js.map → nl-DuShqwuV.js.map} +1 -1
  45. package/dist/_chunks/parse-DvA97ro9.js +1601 -0
  46. package/dist/_chunks/parse-DvA97ro9.js.map +1 -0
  47. package/dist/_chunks/{patient-details-Dggsz-ki.js → patient-details-DrhlTrLf.js} +2 -2
  48. package/dist/_chunks/{patient-details-Dggsz-ki.js.map → patient-details-DrhlTrLf.js.map} +1 -1
  49. package/dist/_chunks/{patient-table-ps4byVwA.js → patient-table-DU_zFZoq.js} +2 -2
  50. package/dist/_chunks/{patient-table-ps4byVwA.js.map → patient-table-DU_zFZoq.js.map} +1 -1
  51. package/dist/_chunks/{pl-IdHtxWTl.js → pl-CKQwX9Fk.js} +22 -22
  52. package/dist/_chunks/{pl-IdHtxWTl.js.map → pl-CKQwX9Fk.js.map} +1 -1
  53. package/dist/_chunks/{pregnancy-dating-CvIRwWaG.js → pregnancy-dating-BdFl-rB1.js} +5 -5
  54. package/dist/_chunks/{pregnancy-dating-CvIRwWaG.js.map → pregnancy-dating-BdFl-rB1.js.map} +1 -1
  55. package/dist/_chunks/{pt-CY2m2bBz.js → pt-_njpXyOZ.js} +16 -16
  56. package/dist/_chunks/{pt-CY2m2bBz.js.map → pt-_njpXyOZ.js.map} +1 -1
  57. package/dist/_chunks/{radiograph-panel.agent-C93AXgtV.js → radiograph-panel.agent-rnrQZtK3.js} +3 -3
  58. package/dist/_chunks/{radiograph-panel.agent-C93AXgtV.js.map → radiograph-panel.agent-rnrQZtK3.js.map} +1 -1
  59. package/dist/_chunks/{ro-qoxLkXED.js → ro-3X6_4FcN.js} +14 -14
  60. package/dist/_chunks/{ro-qoxLkXED.js.map → ro-3X6_4FcN.js.map} +1 -1
  61. package/dist/_chunks/{ru-BVZlxoKf.js → ru-bAcgmnS-.js} +20 -20
  62. package/dist/_chunks/{ru-BVZlxoKf.js.map → ru-bAcgmnS-.js.map} +1 -1
  63. package/dist/_chunks/{sq--eT8hIiD.js → sq-jYFqr4Ga.js} +6 -6
  64. package/dist/_chunks/{sq--eT8hIiD.js.map → sq-jYFqr4Ga.js.map} +1 -1
  65. package/dist/_chunks/subDays-BcNi04uf.js +8 -0
  66. package/dist/_chunks/{subDays-fEHRx4hg.js.map → subDays-BcNi04uf.js.map} +1 -1
  67. package/dist/_chunks/{sv-BGNQ5gX6.js → sv-BSGEJ-8B.js} +10 -10
  68. package/dist/_chunks/{sv-BGNQ5gX6.js.map → sv-BSGEJ-8B.js.map} +1 -1
  69. package/dist/_chunks/{tr-B2NEu6Gy.js → tr-CTpgUtw6.js} +14 -14
  70. package/dist/_chunks/{tr-B2NEu6Gy.js.map → tr-CTpgUtw6.js.map} +1 -1
  71. package/dist/_chunks/{zh-CN-DClT1wDk.js → zh-CN-BgM0Io2O.js} +22 -22
  72. package/dist/_chunks/{zh-CN-DClT1wDk.js.map → zh-CN-BgM0Io2O.js.map} +1 -1
  73. package/dist/agent-catalog.json +93 -2
  74. package/dist/agent-i18n/en.json +8 -2
  75. package/dist/components/_shared/calendar-class-names.d.ts +5 -0
  76. package/dist/components/_shared/calendar-class-names.d.ts.map +1 -1
  77. package/dist/components/_shared/date-picker-variants.d.ts +23 -1
  78. package/dist/components/_shared/date-picker-variants.d.ts.map +1 -1
  79. package/dist/components/_shared/index.d.ts +2 -2
  80. package/dist/components/_shared/index.d.ts.map +1 -1
  81. package/dist/components/appointment-timeline/index.js +1 -1
  82. package/dist/components/booking/index.js +1 -1
  83. package/dist/components/cycle-calculator/index.js +1 -1
  84. package/dist/components/data-table/filters/date-range-filter.d.ts +13 -0
  85. package/dist/components/data-table/filters/date-range-filter.d.ts.map +1 -1
  86. package/dist/components/data-table/index.js +1 -1
  87. package/dist/components/date-picker/date-picker.d.ts.map +1 -1
  88. package/dist/components/date-picker/index.js +1 -1
  89. package/dist/components/date-range-picker/date-range-picker.agent.d.ts.map +1 -1
  90. package/dist/components/date-range-picker/date-range-picker.d.ts +79 -1
  91. package/dist/components/date-range-picker/date-range-picker.d.ts.map +1 -1
  92. package/dist/components/date-range-picker/index.d.ts +1 -1
  93. package/dist/components/date-range-picker/index.d.ts.map +1 -1
  94. package/dist/components/date-range-picker/index.js +1 -1
  95. package/dist/components/date-time-picker/index.js +1 -1
  96. package/dist/components/due-date-calculator/index.js +2 -2
  97. package/dist/components/gestational-age-calculator/index.js +1 -1
  98. package/dist/components/hcg-doubling/index.js +1 -1
  99. package/dist/components/patient-details/index.js +1 -1
  100. package/dist/components/patient-table/index.js +1 -1
  101. package/dist/components/pregnancy-dating/index.js +1 -1
  102. package/dist/components/radiograph-panel/index.js +1 -1
  103. package/dist/i18n/locales/ar.d.ts +24 -0
  104. package/dist/i18n/locales/ar.d.ts.map +1 -1
  105. package/dist/i18n/locales/ar.js +24 -0
  106. package/dist/i18n/locales/ar.js.map +1 -1
  107. package/dist/i18n/locales/de.d.ts +24 -0
  108. package/dist/i18n/locales/de.d.ts.map +1 -1
  109. package/dist/i18n/locales/de.js +24 -0
  110. package/dist/i18n/locales/de.js.map +1 -1
  111. package/dist/i18n/locales/el.d.ts +24 -0
  112. package/dist/i18n/locales/el.d.ts.map +1 -1
  113. package/dist/i18n/locales/el.js +24 -0
  114. package/dist/i18n/locales/el.js.map +1 -1
  115. package/dist/i18n/locales/en.d.ts +24 -0
  116. package/dist/i18n/locales/en.d.ts.map +1 -1
  117. package/dist/i18n/locales/en.js +24 -0
  118. package/dist/i18n/locales/en.js.map +1 -1
  119. package/dist/i18n/locales/es.d.ts +24 -0
  120. package/dist/i18n/locales/es.d.ts.map +1 -1
  121. package/dist/i18n/locales/es.js +24 -0
  122. package/dist/i18n/locales/es.js.map +1 -1
  123. package/dist/i18n/locales/fr.d.ts +24 -0
  124. package/dist/i18n/locales/fr.d.ts.map +1 -1
  125. package/dist/i18n/locales/fr.js +24 -0
  126. package/dist/i18n/locales/fr.js.map +1 -1
  127. package/dist/i18n/locales/hi.d.ts +24 -0
  128. package/dist/i18n/locales/hi.d.ts.map +1 -1
  129. package/dist/i18n/locales/hi.js +24 -0
  130. package/dist/i18n/locales/hi.js.map +1 -1
  131. package/dist/i18n/locales/it.d.ts +24 -0
  132. package/dist/i18n/locales/it.d.ts.map +1 -1
  133. package/dist/i18n/locales/it.js +24 -0
  134. package/dist/i18n/locales/it.js.map +1 -1
  135. package/dist/i18n/locales/ja.d.ts +24 -0
  136. package/dist/i18n/locales/ja.d.ts.map +1 -1
  137. package/dist/i18n/locales/ja.js +24 -0
  138. package/dist/i18n/locales/ja.js.map +1 -1
  139. package/dist/i18n/locales/nl.d.ts +24 -0
  140. package/dist/i18n/locales/nl.d.ts.map +1 -1
  141. package/dist/i18n/locales/nl.js +24 -0
  142. package/dist/i18n/locales/nl.js.map +1 -1
  143. package/dist/i18n/locales/pl.d.ts +24 -0
  144. package/dist/i18n/locales/pl.d.ts.map +1 -1
  145. package/dist/i18n/locales/pl.js +24 -0
  146. package/dist/i18n/locales/pl.js.map +1 -1
  147. package/dist/i18n/locales/pt.d.ts +24 -0
  148. package/dist/i18n/locales/pt.d.ts.map +1 -1
  149. package/dist/i18n/locales/pt.js +24 -0
  150. package/dist/i18n/locales/pt.js.map +1 -1
  151. package/dist/i18n/locales/ro.d.ts +24 -0
  152. package/dist/i18n/locales/ro.d.ts.map +1 -1
  153. package/dist/i18n/locales/ro.js +24 -0
  154. package/dist/i18n/locales/ro.js.map +1 -1
  155. package/dist/i18n/locales/ru.d.ts +24 -0
  156. package/dist/i18n/locales/ru.d.ts.map +1 -1
  157. package/dist/i18n/locales/ru.js +24 -0
  158. package/dist/i18n/locales/ru.js.map +1 -1
  159. package/dist/i18n/locales/sq.d.ts +24 -0
  160. package/dist/i18n/locales/sq.d.ts.map +1 -1
  161. package/dist/i18n/locales/sq.js +24 -0
  162. package/dist/i18n/locales/sq.js.map +1 -1
  163. package/dist/i18n/locales/sv.d.ts +24 -0
  164. package/dist/i18n/locales/sv.d.ts.map +1 -1
  165. package/dist/i18n/locales/sv.js +24 -0
  166. package/dist/i18n/locales/sv.js.map +1 -1
  167. package/dist/i18n/locales/tr.d.ts +24 -0
  168. package/dist/i18n/locales/tr.d.ts.map +1 -1
  169. package/dist/i18n/locales/tr.js +24 -0
  170. package/dist/i18n/locales/tr.js.map +1 -1
  171. package/dist/i18n/locales/zh.d.ts +24 -0
  172. package/dist/i18n/locales/zh.d.ts.map +1 -1
  173. package/dist/i18n/locales/zh.js +24 -0
  174. package/dist/i18n/locales/zh.js.map +1 -1
  175. package/dist/index.js +15 -15
  176. package/dist/locales/ar.json +24 -0
  177. package/dist/locales/de.json +24 -0
  178. package/dist/locales/el.json +24 -0
  179. package/dist/locales/en.json +24 -0
  180. package/dist/locales/es.json +24 -0
  181. package/dist/locales/fr.json +24 -0
  182. package/dist/locales/hi.json +24 -0
  183. package/dist/locales/it.json +24 -0
  184. package/dist/locales/ja.json +24 -0
  185. package/dist/locales/nl.json +24 -0
  186. package/dist/locales/pl.json +24 -0
  187. package/dist/locales/pt.json +24 -0
  188. package/dist/locales/ro.json +24 -0
  189. package/dist/locales/ru.json +24 -0
  190. package/dist/locales/sq.json +24 -0
  191. package/dist/locales/sv.json +24 -0
  192. package/dist/locales/tr.json +24 -0
  193. package/dist/locales/zh.json +24 -0
  194. package/dist/tokens.css +1 -1
  195. package/package.json +1 -1
  196. package/dist/_chunks/date-picker-ffmyjvlI.js +0 -1845
  197. package/dist/_chunks/date-picker-ffmyjvlI.js.map +0 -1
  198. package/dist/_chunks/date-range-picker-DSOH50-f.js +0 -325
  199. package/dist/_chunks/date-range-picker-DSOH50-f.js.map +0 -1
  200. package/dist/_chunks/link-cell-renderer-BzITwSXq.js.map +0 -1
  201. package/dist/_chunks/subDays-fEHRx4hg.js +0 -8
@@ -0,0 +1,824 @@
1
+ import { jsx as r, jsxs as c, Fragment as xt } from "react/jsx-runtime";
2
+ import { forwardRef as Pt, useState as y, useRef as ie, useId as E, useCallback as Ge, useEffect as Me, useMemo as Nt, useImperativeHandle as Dt, Fragment as Ct } from "react";
3
+ import { useTranslation as wt } from "react-i18next";
4
+ import * as j from "@radix-ui/react-popover";
5
+ import * as q from "@radix-ui/react-radio-group";
6
+ import { u as Ve } from "./use-controllable-state-BiY4xTzM.js";
7
+ import { u as St } from "./form-field-context-B3APVHKx.js";
8
+ import { S as It } from "./switch-OILsBLWo.js";
9
+ import { u as Ot } from "./registry-DvAUVLHh.js";
10
+ import { l as Tt, m as Et, u as Gt, g as Mt, b as Vt, f as h, n as Fe, s as Ke, o as Ft, q as Kt, k as de, a as Lt, d as $t, t as At, r as Le, v as $e, w as Ae, p as Wt, x as jt, D as qt, C as _t, y as zt, e as Bt, z as _, h as Yt, j as Ut, i as le, c as Ht } from "./date-picker-variants-eL6HjWvw.js";
11
+ import { s as G } from "./subDays-BcNi04uf.js";
12
+ import { C as Qt } from "./calendar-days-BGWklvE-.js";
13
+ import { C as Jt } from "./check-DrFSN__t.js";
14
+ import { i as We } from "./isSameDay-DUEiAT0G.js";
15
+ import { p as Xt } from "./parse-DvA97ro9.js";
16
+ function Zt(s, l, f) {
17
+ return Tt(s, -1, f);
18
+ }
19
+ function je(s, l, f) {
20
+ return Et(s, -1, f);
21
+ }
22
+ const ea = {
23
+ id: "date-range-picker",
24
+ capabilities: [
25
+ "range_pick",
26
+ "open",
27
+ "close",
28
+ "confirm",
29
+ // apply — commit the draft range
30
+ "dismiss",
31
+ // cancel — discard the draft
32
+ "set_value"
33
+ // set_granularity + compare_toggle
34
+ ],
35
+ state: {
36
+ range: {
37
+ type: "{ from: iso-date | null, to: iso-date | null }",
38
+ descriptionKey: "ui.agent.dateRangePicker.state.range",
39
+ description: "Currently-selected ISO date range endpoints, each possibly null.",
40
+ read: (s) => {
41
+ var f, m;
42
+ const l = s.getRange();
43
+ return {
44
+ from: ((f = l.from) == null ? void 0 : f.toISOString()) ?? null,
45
+ to: ((m = l.to) == null ? void 0 : m.toISOString()) ?? null
46
+ };
47
+ }
48
+ },
49
+ isOpen: {
50
+ type: "boolean",
51
+ descriptionKey: "ui.agent.dateRangePicker.state.isOpen",
52
+ description: "Whether the range calendar popover is open.",
53
+ read: (s) => s.isOpen()
54
+ },
55
+ granularity: {
56
+ type: "'day' | 'week' | 'month' | 'quarter' | null",
57
+ descriptionKey: "ui.agent.dateRangePicker.state.granularity",
58
+ description: "Selected time granularity (Range Cockpit), or null when the control is disabled.",
59
+ read: (s) => s.getGranularity() ?? null
60
+ },
61
+ compareRange: {
62
+ type: "{ from: iso-date | null, to: iso-date | null } | null",
63
+ descriptionKey: "ui.agent.dateRangePicker.state.compareRange",
64
+ description: "Resolved comparison period when compare-to-previous-period is on, else null.",
65
+ read: (s) => {
66
+ var f, m;
67
+ const l = s.getCompareRange();
68
+ return l ? {
69
+ from: ((f = l.from) == null ? void 0 : f.toISOString()) ?? null,
70
+ to: ((m = l.to) == null ? void 0 : m.toISOString()) ?? null
71
+ } : null;
72
+ }
73
+ }
74
+ },
75
+ actions: {
76
+ set_range: {
77
+ safety: "write",
78
+ argsType: "{ from: string, to: string }",
79
+ argsSchema: {
80
+ type: "object",
81
+ properties: {
82
+ from: {
83
+ type: "string",
84
+ format: "date",
85
+ description: "ISO start date (inclusive)."
86
+ },
87
+ to: {
88
+ type: "string",
89
+ format: "date",
90
+ description: "ISO end date (inclusive)."
91
+ }
92
+ },
93
+ required: ["from", "to"]
94
+ },
95
+ idempotent: !0,
96
+ descriptionKey: "ui.agent.dateRangePicker.actions.setRange",
97
+ description: "Replace the selected range with the given ISO endpoints.",
98
+ examples: [
99
+ {
100
+ args: { from: "2026-06-01", to: "2026-06-30" },
101
+ note: "Select all of June 2026."
102
+ }
103
+ ],
104
+ invoke: (s, l) => {
105
+ s.setRange({ from: new Date(l.from), to: new Date(l.to) });
106
+ }
107
+ },
108
+ clear: {
109
+ // Discards the selected range — loses the user's input.
110
+ safety: "destructive",
111
+ idempotent: !0,
112
+ descriptionKey: "ui.agent.dateRangePicker.actions.clear",
113
+ description: "Clear the selected range.",
114
+ invoke: (s) => {
115
+ s.clear();
116
+ }
117
+ },
118
+ open: {
119
+ safety: "read",
120
+ idempotent: !0,
121
+ descriptionKey: "ui.agent.dateRangePicker.actions.open",
122
+ description: "Open the range calendar popover.",
123
+ invoke: (s) => {
124
+ s.open();
125
+ }
126
+ },
127
+ close: {
128
+ safety: "read",
129
+ idempotent: !0,
130
+ descriptionKey: "ui.agent.dateRangePicker.actions.close",
131
+ description: "Close the range calendar popover.",
132
+ invoke: (s) => {
133
+ s.close();
134
+ }
135
+ },
136
+ apply: {
137
+ // Commits the current draft — in `commitMode="apply"` this is what runs
138
+ // the downstream query, so it is a write, not read.
139
+ safety: "write",
140
+ idempotent: !0,
141
+ descriptionKey: "ui.agent.dateRangePicker.actions.apply",
142
+ description: "Commit the current draft range (as the Apply / Done button).",
143
+ invoke: (s) => {
144
+ s.apply();
145
+ }
146
+ },
147
+ cancel: {
148
+ safety: "read",
149
+ idempotent: !0,
150
+ descriptionKey: "ui.agent.dateRangePicker.actions.cancel",
151
+ description: "Discard the draft and close without committing.",
152
+ invoke: (s) => {
153
+ s.cancel();
154
+ }
155
+ },
156
+ set_granularity: {
157
+ safety: "write",
158
+ argsType: "{ granularity: 'day' | 'week' | 'month' | 'quarter' }",
159
+ argsSchema: {
160
+ type: "object",
161
+ properties: {
162
+ granularity: {
163
+ type: "string",
164
+ enum: ["day", "week", "month", "quarter"],
165
+ description: "Time grain to query the range at."
166
+ }
167
+ },
168
+ required: ["granularity"]
169
+ },
170
+ idempotent: !0,
171
+ descriptionKey: "ui.agent.dateRangePicker.actions.setGranularity",
172
+ description: "Set the time granularity (Range Cockpit).",
173
+ examples: [{ args: { granularity: "month" }, note: "Query by month." }],
174
+ invoke: (s, l) => {
175
+ s.setGranularity(l.granularity);
176
+ }
177
+ },
178
+ toggle_compare: {
179
+ safety: "write",
180
+ argsType: "{ enabled: boolean }",
181
+ argsSchema: {
182
+ type: "object",
183
+ properties: {
184
+ enabled: {
185
+ type: "boolean",
186
+ description: "Whether to compare against the previous period."
187
+ }
188
+ },
189
+ required: ["enabled"]
190
+ },
191
+ idempotent: !0,
192
+ descriptionKey: "ui.agent.dateRangePicker.actions.toggleCompare",
193
+ description: "Turn compare-to-previous-period on or off (Range Cockpit).",
194
+ examples: [
195
+ { args: { enabled: !0 }, note: "Enable period comparison." }
196
+ ],
197
+ invoke: (s, l) => {
198
+ s.setCompare(l.enabled);
199
+ }
200
+ }
201
+ },
202
+ domHooks: {
203
+ root: {
204
+ attr: "data-component",
205
+ value: "date-range-picker",
206
+ description: "Marks the DateRangePicker wrapper."
207
+ },
208
+ instanceId: {
209
+ attr: "data-component-id",
210
+ sourceProp: "id",
211
+ description: "Sourced from the id prop."
212
+ }
213
+ }
214
+ }, ta = [
215
+ { value: "day", fallback: "Day" },
216
+ { value: "week", fallback: "Week" },
217
+ { value: "month", fallback: "Month" },
218
+ { value: "quarter", fallback: "Quarter" }
219
+ ], aa = [
220
+ { value: "previous", fallback: "Previous period" },
221
+ { value: "lastYear", fallback: "Same period last year" }
222
+ ], ra = Pt(
223
+ ({
224
+ value: s,
225
+ defaultValue: l,
226
+ onChange: f,
227
+ commitMode: m = "auto",
228
+ onApply: P,
229
+ onCancel: N,
230
+ showClear: qe = !0,
231
+ numberOfMonths: _e = 2,
232
+ granularity: ce,
233
+ defaultGranularity: ue,
234
+ onGranularityChange: ze,
235
+ compare: pe = !1,
236
+ defaultCompare: Be = !1,
237
+ defaultCompareMode: Ye = "previous",
238
+ onCompareChange: D,
239
+ weekStartsOn: M,
240
+ minDate: z,
241
+ maxDate: B,
242
+ presets: Y,
243
+ mergePresets: Ue = !1,
244
+ size: me = "md",
245
+ chrome: He = "input",
246
+ disabled: Qe,
247
+ placeholder: Je,
248
+ className: Xe,
249
+ id: Ze
250
+ }, et) => {
251
+ const { t: n, i18n: fe } = wt(), V = St(), U = Ze ?? V.id, ge = V.disabled || Qe, tt = V.invalid ? "error" : "default", u = Gt(fe.language), p = Mt(fe.language), at = Je ?? n("inputs.dateRangePicker.placeholder", "Select date range"), [rt, ve] = Ve({
252
+ value: s,
253
+ defaultValue: l ?? {},
254
+ onChange: f
255
+ }), i = rt ?? {}, [C, b] = y(!1), [a, w] = y(i), [st, H] = y(i.from ?? /* @__PURE__ */ new Date()), [ye, he] = y(""), [be, ke] = y(""), [S, F] = y(!1), [I, K] = y(!1), L = ce !== void 0 || ue !== void 0, [$, Q] = Ve({
256
+ value: ce,
257
+ defaultValue: ue ?? "day",
258
+ onChange: ze
259
+ }), [J, nt] = y(Be), [Re, ot] = y(Ye), it = ie(null), x = ie(!1), xe = E(), Pe = E(), Ne = E(), De = E(), X = E(), dt = E(), k = Ge(
260
+ (e) => {
261
+ ve(e);
262
+ },
263
+ [ve]
264
+ ), lt = Vt(z, B), ct = (e) => (z ? Ht(e, z) : !1) || (B ? le(e, B) : !1);
265
+ Me(() => {
266
+ C && (w(i), F(!1), K(!1), x.current = !1);
267
+ }, [C]), Me(() => {
268
+ S || he(
269
+ a.from ? h(a.from, p, { locale: u }) : ""
270
+ ), I || ke(a.to ? h(a.to, p, { locale: u }) : "");
271
+ }, [a.from, a.to, p, u]);
272
+ const Ce = [
273
+ {
274
+ label: n("inputs.dateRangePicker.presets.today", "Today"),
275
+ range: () => {
276
+ const e = /* @__PURE__ */ new Date();
277
+ return { from: e, to: e };
278
+ }
279
+ },
280
+ {
281
+ label: n("inputs.dateRangePicker.presets.yesterday", "Yesterday"),
282
+ range: () => {
283
+ const e = G(/* @__PURE__ */ new Date(), 1);
284
+ return { from: e, to: e };
285
+ }
286
+ },
287
+ {
288
+ label: n("inputs.dateRangePicker.presets.last7", "Last 7 days"),
289
+ range: () => ({
290
+ from: G(/* @__PURE__ */ new Date(), 6),
291
+ to: /* @__PURE__ */ new Date()
292
+ })
293
+ },
294
+ {
295
+ label: n("inputs.dateRangePicker.presets.thisWeek", "This week"),
296
+ range: () => ({
297
+ // `weekStartsOn` (when set) overrides the locale's first day; when
298
+ // undefined date-fns falls back to the locale.
299
+ from: Ke(/* @__PURE__ */ new Date(), { locale: u, weekStartsOn: M }),
300
+ to: Fe(/* @__PURE__ */ new Date(), { locale: u, weekStartsOn: M })
301
+ })
302
+ },
303
+ {
304
+ label: n("inputs.dateRangePicker.presets.lastWeek", "Last week"),
305
+ range: () => {
306
+ const e = Zt(/* @__PURE__ */ new Date());
307
+ return {
308
+ from: Ke(e, { locale: u, weekStartsOn: M }),
309
+ to: Fe(e, { locale: u, weekStartsOn: M })
310
+ };
311
+ }
312
+ },
313
+ {
314
+ label: n("inputs.dateRangePicker.presets.thisMonth", "This month"),
315
+ range: () => ({
316
+ from: Kt(/* @__PURE__ */ new Date()),
317
+ to: Ft(/* @__PURE__ */ new Date())
318
+ })
319
+ },
320
+ {
321
+ label: n("inputs.dateRangePicker.presets.last30", "Last 30 days"),
322
+ range: () => ({
323
+ from: G(/* @__PURE__ */ new Date(), 29),
324
+ to: /* @__PURE__ */ new Date()
325
+ })
326
+ }
327
+ ], A = Y ? Ue ? [...Ce, ...Y] : Y : Ce, we = (() => {
328
+ const e = [], t = /* @__PURE__ */ new Map();
329
+ for (const d of A) {
330
+ const o = d.group ?? "";
331
+ t.has(o) || (t.set(o, []), e.push(o)), t.get(o).push(d);
332
+ }
333
+ return e.map((d) => ({ group: d, presets: t.get(d) }));
334
+ })(), ut = we.some((e) => e.group !== ""), O = (e, t = Re) => {
335
+ if (!e.from || !e.to) return;
336
+ if (t === "lastYear")
337
+ return { from: je(e.from), to: je(e.to) };
338
+ const d = de(e.to, e.from), o = G(e.from, 1);
339
+ return { from: G(o, d), to: o };
340
+ }, T = pe && J, v = T ? O(a) : void 0, pt = (() => {
341
+ if (!(v != null && v.from) || !v.to) return;
342
+ const e = v.from, t = v.to, d = {
343
+ compareStart: e,
344
+ compareEnd: t
345
+ };
346
+ return de(t, e) >= 2 && (d.compareMiddle = { from: Lt(e, 1), to: G(t, 1) }), d;
347
+ })(), Se = (e) => {
348
+ const t = {};
349
+ return L && (t.granularity = $ ?? void 0), T && (t.compareRange = O(e)), t.granularity || t.compareRange ? t : void 0;
350
+ }, mt = (e) => {
351
+ const t = e;
352
+ ot(t), T && (D == null || D(!0, O(a, t)));
353
+ }, Z = (e) => {
354
+ nt(e), D == null || D(e, e ? O(a) : void 0);
355
+ }, ee = Ge(
356
+ (e) => {
357
+ w(e), m === "auto" && e.from && e.to && k(e);
358
+ },
359
+ [m, k]
360
+ ), ft = (e) => {
361
+ F(!1), K(!1), ee({ from: e == null ? void 0 : e.from, to: e == null ? void 0 : e.to });
362
+ }, gt = (e) => {
363
+ const t = e.range();
364
+ F(!1), K(!1), w(t), H(t.from), m === "auto" && (k(t), P == null || P(t, Se(t)), x.current = !0, b(!1));
365
+ }, te = (e, t) => {
366
+ const d = e === "from" ? F : K;
367
+ if (t.trim() === "") {
368
+ d(!1), ee(
369
+ e === "from" ? { from: void 0, to: a.to } : { from: a.from, to: void 0 }
370
+ );
371
+ return;
372
+ }
373
+ const o = Xt(t, p, /* @__PURE__ */ new Date(), { locale: u });
374
+ if (!Ut(o) || ct(o)) {
375
+ d(!0);
376
+ return;
377
+ }
378
+ d(!1);
379
+ let R;
380
+ e === "from" ? R = a.to && le(o, a.to) ? { from: o, to: void 0 } : { from: o, to: a.to } : R = a.from && le(a.from, o) ? { from: o, to: void 0 } : { from: a.from, to: o }, H(o), ee(R);
381
+ }, Ie = (e) => (t) => {
382
+ t.key === "Enter" && (t.preventDefault(), te(e, e === "from" ? ye : be));
383
+ }, vt = () => {
384
+ w({}), F(!1), K(!1), m === "auto" && k({});
385
+ }, yt = !!(a.from && a.to), ht = !a.from && !a.to, Oe = (yt || ht) && !S && !I, ae = () => {
386
+ Oe && (k(a), P == null || P(a, Se(a))), x.current = !0, b(!1);
387
+ }, bt = () => {
388
+ x.current = !0, b(!1);
389
+ }, re = () => {
390
+ m === "apply" && (N == null || N()), w(i), b(!1);
391
+ }, kt = (e) => {
392
+ if (e) {
393
+ x.current = !1, b(!0);
394
+ return;
395
+ }
396
+ m === "apply" && !x.current && (N == null || N()), w(i), x.current = !1, b(!1);
397
+ }, se = (e) => {
398
+ if (!i.from || !i.to) return !1;
399
+ const t = e.range();
400
+ return We(t.from, i.from) && We(t.to, i.to);
401
+ }, Te = (() => {
402
+ if (i.from && i.to) {
403
+ const e = h(i.from, p, { locale: u }), t = h(i.to, p, { locale: u });
404
+ return `${e} – ${t}`;
405
+ }
406
+ return i.from ? h(i.from, p, { locale: u }) : "";
407
+ })(), W = a.from ? a.to ? null : "end" : "start", Rt = (() => {
408
+ if (!a.from)
409
+ return n("inputs.dateRangePicker.selectStart", "Select start date");
410
+ if (!a.to)
411
+ return n("inputs.dateRangePicker.selectEnd", "Select end date");
412
+ const e = de(a.to, a.from) + 1, t = h(a.from, p, { locale: u }), d = h(a.to, p, { locale: u }), o = n("inputs.dateRangePicker.days", { count: e });
413
+ return `${t} – ${d} · ${o}`;
414
+ })(), g = ie({
415
+ currentValue: i,
416
+ open: C,
417
+ getGranularity: () => L ? $ ?? void 0 : void 0,
418
+ setGranularity: (e) => Q(e),
419
+ getCompareRange: () => T ? O(i) : void 0,
420
+ setCompare: (e) => Z(e),
421
+ getActivePreset: () => {
422
+ var e;
423
+ return (e = A.find(se)) == null ? void 0 : e.label;
424
+ },
425
+ getActiveEnd: () => W,
426
+ apply: () => ae(),
427
+ cancel: () => re()
428
+ });
429
+ g.current = {
430
+ currentValue: i,
431
+ open: C,
432
+ getGranularity: () => L ? $ ?? void 0 : void 0,
433
+ setGranularity: (e) => Q(e),
434
+ getCompareRange: () => T ? O(i) : void 0,
435
+ setCompare: (e) => Z(e),
436
+ getActivePreset: () => {
437
+ var e;
438
+ return (e = A.find(se)) == null ? void 0 : e.label;
439
+ },
440
+ getActiveEnd: () => W,
441
+ apply: () => ae(),
442
+ cancel: () => re()
443
+ };
444
+ const ne = Nt(
445
+ () => ({
446
+ getRange: () => g.current.currentValue,
447
+ setRange: (e) => k(e),
448
+ clear: () => k({}),
449
+ isOpen: () => g.current.open,
450
+ open: () => b(!0),
451
+ close: () => b(!1),
452
+ getGranularity: () => g.current.getGranularity(),
453
+ setGranularity: (e) => g.current.setGranularity(e),
454
+ getCompareRange: () => g.current.getCompareRange(),
455
+ setCompare: (e) => g.current.setCompare(e),
456
+ getActivePreset: () => g.current.getActivePreset(),
457
+ getActiveEnd: () => g.current.getActiveEnd(),
458
+ apply: () => g.current.apply(),
459
+ cancel: () => g.current.cancel()
460
+ }),
461
+ [k]
462
+ );
463
+ Dt(et, () => ne, [ne]), Ot(ea, ne, U);
464
+ const Ee = (e) => e === "from" ? S ? "error" : W === "start" ? "active" : "default" : I ? "error" : W === "end" ? "active" : "default";
465
+ return /* @__PURE__ */ r(j.Root, { open: C, onOpenChange: kt, children: /* @__PURE__ */ c(
466
+ "div",
467
+ {
468
+ className: Xe,
469
+ "data-component": "date-range-picker",
470
+ "data-component-id": U,
471
+ children: [
472
+ /* @__PURE__ */ r(j.Trigger, { asChild: !0, disabled: ge, children: /* @__PURE__ */ c(
473
+ "button",
474
+ {
475
+ ref: it,
476
+ id: U,
477
+ type: "button",
478
+ disabled: ge,
479
+ "aria-describedby": V.describedBy || void 0,
480
+ "aria-invalid": V.invalid || void 0,
481
+ "aria-haspopup": "dialog",
482
+ "aria-expanded": C,
483
+ className: At({ size: me, tone: tt, chrome: He }),
484
+ children: [
485
+ /* @__PURE__ */ r(
486
+ "span",
487
+ {
488
+ className: [
489
+ // Truncate so a long value/placeholder ellipsises instead of
490
+ // running under the absolutely-positioned calendar icon (the
491
+ // trigger reserves the icon's space via `pe-10`). `min-w-0`
492
+ // lets the flex child shrink below its content width so
493
+ // `truncate` engages.
494
+ "ds:min-w-0 ds:flex-1 ds:truncate ds:text-start",
495
+ Te ? "ds:text-foreground" : "ds:text-muted-foreground"
496
+ ].join(" "),
497
+ children: Te || at
498
+ }
499
+ ),
500
+ /* @__PURE__ */ r(
501
+ "span",
502
+ {
503
+ "aria-hidden": "true",
504
+ className: $t({ size: me }),
505
+ children: /* @__PURE__ */ r(Qt, {})
506
+ }
507
+ )
508
+ ]
509
+ }
510
+ ) }),
511
+ /* @__PURE__ */ r(j.Portal, { children: /* @__PURE__ */ r(
512
+ j.Content,
513
+ {
514
+ sideOffset: 4,
515
+ align: "start",
516
+ role: "dialog",
517
+ "aria-label": n(
518
+ "inputs.dateRangePicker.title",
519
+ "Select date range"
520
+ ),
521
+ className: Yt(),
522
+ children: /* @__PURE__ */ c("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
523
+ /* @__PURE__ */ c("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
524
+ /* @__PURE__ */ c("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
525
+ /* @__PURE__ */ r(
526
+ "h2",
527
+ {
528
+ id: xe,
529
+ className: "type-body-sm ds:font-semibold ds:text-foreground",
530
+ children: n("inputs.dateRangePicker.title", "Select date range")
531
+ }
532
+ ),
533
+ L ? /* @__PURE__ */ r(
534
+ q.Root,
535
+ {
536
+ value: $ ?? "day",
537
+ onValueChange: (e) => Q(e),
538
+ "aria-label": n(
539
+ "inputs.dateRangePicker.granularityLabel",
540
+ "Granularity"
541
+ ),
542
+ className: $e(),
543
+ children: ta.map((e) => /* @__PURE__ */ r(
544
+ q.Item,
545
+ {
546
+ value: e.value,
547
+ className: Le(),
548
+ children: n(
549
+ `inputs.dateRangePicker.granularity.${e.value}`,
550
+ e.fallback
551
+ )
552
+ },
553
+ e.value
554
+ ))
555
+ }
556
+ ) : null
557
+ ] }),
558
+ /* @__PURE__ */ c("div", { className: "ds:flex ds:items-end ds:gap-[var(--spacing-xs)]", children: [
559
+ /* @__PURE__ */ c("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
560
+ /* @__PURE__ */ r(
561
+ "label",
562
+ {
563
+ htmlFor: Pe,
564
+ className: "ds:text-[length:var(--font-size-xs)] ds:text-muted-foreground",
565
+ children: n("inputs.dateRangePicker.startLabel", "Start date")
566
+ }
567
+ ),
568
+ /* @__PURE__ */ r(
569
+ "input",
570
+ {
571
+ id: Pe,
572
+ type: "text",
573
+ inputMode: "numeric",
574
+ value: ye,
575
+ placeholder: p.toUpperCase(),
576
+ "aria-invalid": S || void 0,
577
+ "aria-describedby": S ? X : void 0,
578
+ onChange: (e) => he(e.target.value),
579
+ onBlur: (e) => te("from", e.target.value),
580
+ onKeyDown: Ie("from"),
581
+ className: Ae({
582
+ state: Ee("from")
583
+ })
584
+ }
585
+ )
586
+ ] }),
587
+ /* @__PURE__ */ r(
588
+ "span",
589
+ {
590
+ "aria-hidden": "true",
591
+ className: "ds:pb-[var(--spacing-xs)] ds:text-muted-foreground",
592
+ children: "–"
593
+ }
594
+ ),
595
+ /* @__PURE__ */ c("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
596
+ /* @__PURE__ */ r(
597
+ "label",
598
+ {
599
+ htmlFor: Ne,
600
+ className: "ds:text-[length:var(--font-size-xs)] ds:text-muted-foreground",
601
+ children: n("inputs.dateRangePicker.endLabel", "End date")
602
+ }
603
+ ),
604
+ /* @__PURE__ */ r(
605
+ "input",
606
+ {
607
+ id: Ne,
608
+ type: "text",
609
+ inputMode: "numeric",
610
+ value: be,
611
+ placeholder: p.toUpperCase(),
612
+ "aria-invalid": I || void 0,
613
+ "aria-describedby": I ? X : void 0,
614
+ onChange: (e) => ke(e.target.value),
615
+ onBlur: (e) => te("to", e.target.value),
616
+ onKeyDown: Ie("to"),
617
+ className: Ae({
618
+ state: Ee("to")
619
+ })
620
+ }
621
+ )
622
+ ] })
623
+ ] }),
624
+ S || I ? /* @__PURE__ */ r(
625
+ "p",
626
+ {
627
+ id: X,
628
+ role: "alert",
629
+ className: "ds:text-[length:var(--font-size-xs)] ds:text-destructive",
630
+ children: n(
631
+ "inputs.dateRangePicker.invalidDate",
632
+ "Enter a date as {{format}}",
633
+ {
634
+ format: p.toUpperCase()
635
+ }
636
+ )
637
+ }
638
+ ) : null
639
+ ] }),
640
+ /* @__PURE__ */ c("div", { className: "ds:flex ds:gap-[var(--spacing-md)]", children: [
641
+ A.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: we.map((e, t) => {
642
+ const d = `${xe}-pg${t}`, o = e.presets.map((R) => {
643
+ const oe = se(R);
644
+ return /* @__PURE__ */ c(
645
+ "button",
646
+ {
647
+ type: "button",
648
+ "aria-pressed": oe,
649
+ onClick: () => gt(R),
650
+ className: Wt({ active: oe }),
651
+ children: [
652
+ /* @__PURE__ */ r("span", { className: "ds:min-w-0 ds:truncate", children: R.label }),
653
+ oe ? /* @__PURE__ */ r(
654
+ Jt,
655
+ {
656
+ "aria-hidden": "true",
657
+ className: "ds:size-4 ds:shrink-0 ds:text-primary"
658
+ }
659
+ ) : null
660
+ ]
661
+ },
662
+ R.label
663
+ );
664
+ });
665
+ return ut && e.group ? /* @__PURE__ */ c(
666
+ "div",
667
+ {
668
+ role: "group",
669
+ "aria-labelledby": d,
670
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
671
+ children: [
672
+ /* @__PURE__ */ r(
673
+ "div",
674
+ {
675
+ id: d,
676
+ className: jt(),
677
+ children: e.group
678
+ }
679
+ ),
680
+ o
681
+ ]
682
+ },
683
+ e.group
684
+ ) : /* @__PURE__ */ r(Ct, { children: o }, e.group || "_ungrouped");
685
+ }) }) : null,
686
+ /* @__PURE__ */ c("div", { role: "region", "aria-labelledby": De, children: [
687
+ /* @__PURE__ */ r("span", { id: De, className: "ds:sr-only", children: n("inputs.dateRangePicker.gridLabel", "Calendar") }),
688
+ /* @__PURE__ */ r(
689
+ qt,
690
+ {
691
+ mode: "range",
692
+ selected: a.from ? { from: a.from, to: a.to } : void 0,
693
+ onSelect: ft,
694
+ month: st,
695
+ onMonthChange: H,
696
+ numberOfMonths: _e,
697
+ weekStartsOn: M,
698
+ disabled: lt,
699
+ locale: u,
700
+ showOutsideDays: !0,
701
+ fixedWeeks: !0,
702
+ pagedNavigation: !0,
703
+ classNames: Bt,
704
+ modifiers: pt,
705
+ modifiersClassNames: zt,
706
+ components: { Chevron: _t }
707
+ }
708
+ )
709
+ ] })
710
+ ] }),
711
+ pe ? /* @__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: [
712
+ /* @__PURE__ */ r(
713
+ It,
714
+ {
715
+ id: dt,
716
+ label: n(
717
+ "inputs.dateRangePicker.compareLabel",
718
+ "Compare to previous period"
719
+ ),
720
+ size: "sm",
721
+ checked: J,
722
+ onCheckedChange: Z
723
+ }
724
+ ),
725
+ T && v ? /* @__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: [
726
+ /* @__PURE__ */ r(
727
+ "span",
728
+ {
729
+ "aria-hidden": "true",
730
+ 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)]"
731
+ }
732
+ ),
733
+ `${h(v.from, p, { locale: u })} – ${h(v.to, p, { locale: u })}`
734
+ ] }) : null,
735
+ J ? /* @__PURE__ */ r(
736
+ q.Root,
737
+ {
738
+ value: Re,
739
+ onValueChange: mt,
740
+ "aria-label": n(
741
+ "inputs.dateRangePicker.compareModeLabel",
742
+ "Comparison period"
743
+ ),
744
+ className: `${$e()} ds:ms-auto`,
745
+ children: aa.map((e) => /* @__PURE__ */ r(
746
+ q.Item,
747
+ {
748
+ value: e.value,
749
+ className: Le(),
750
+ children: n(
751
+ `inputs.dateRangePicker.compareMode.${e.value}`,
752
+ e.fallback
753
+ )
754
+ },
755
+ e.value
756
+ ))
757
+ }
758
+ ) : null
759
+ ] }) : null,
760
+ /* @__PURE__ */ c("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-md)] ds:border-t ds:border-border ds:pt-[var(--spacing-sm)]", children: [
761
+ /* @__PURE__ */ r(
762
+ "div",
763
+ {
764
+ role: "status",
765
+ "aria-live": "polite",
766
+ className: "type-body-sm ds:min-w-0 ds:truncate ds:text-muted-foreground",
767
+ children: Rt
768
+ }
769
+ ),
770
+ /* @__PURE__ */ c("div", { className: "ds:flex ds:shrink-0 ds:gap-[var(--spacing-xs)]", children: [
771
+ qe ? /* @__PURE__ */ r(
772
+ "button",
773
+ {
774
+ type: "button",
775
+ onClick: vt,
776
+ className: _({ intent: "ghost" }),
777
+ children: n("inputs.dateRangePicker.clear", "Clear")
778
+ }
779
+ ) : null,
780
+ m === "apply" ? /* @__PURE__ */ c(xt, { children: [
781
+ /* @__PURE__ */ r(
782
+ "button",
783
+ {
784
+ type: "button",
785
+ onClick: re,
786
+ className: _({ intent: "ghost" }),
787
+ children: n("inputs.dateRangePicker.cancel", "Cancel")
788
+ }
789
+ ),
790
+ /* @__PURE__ */ r(
791
+ "button",
792
+ {
793
+ type: "button",
794
+ disabled: !Oe,
795
+ onClick: ae,
796
+ className: _({ intent: "primary" }),
797
+ children: n("inputs.dateRangePicker.apply", "Apply")
798
+ }
799
+ )
800
+ ] }) : /* @__PURE__ */ r(
801
+ "button",
802
+ {
803
+ type: "button",
804
+ onClick: bt,
805
+ className: _({ intent: "primary" }),
806
+ children: n("inputs.dateRangePicker.done", "Done")
807
+ }
808
+ )
809
+ ] })
810
+ ] })
811
+ ] })
812
+ }
813
+ ) })
814
+ ]
815
+ }
816
+ ) });
817
+ }
818
+ );
819
+ ra.displayName = "DateRangePicker";
820
+ export {
821
+ ra as D,
822
+ ea as d
823
+ };
824
+ //# sourceMappingURL=date-range-picker-Cc4DLAL2.js.map