@alfadocs/ui-kit-debug 1.121.0 → 1.122.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 (214) hide show
  1. package/dist/_chunks/addDays-CuE8wLqb.js +9 -0
  2. package/dist/_chunks/addDays-CuE8wLqb.js.map +1 -0
  3. package/dist/_chunks/{anamnesis-summary-rows-BbAREK-3.js → anamnesis-summary-rows-CtcULkvc.js} +2 -2
  4. package/dist/_chunks/{anamnesis-summary-rows-BbAREK-3.js.map → anamnesis-summary-rows-CtcULkvc.js.map} +1 -1
  5. package/dist/_chunks/{antenatal-schedule-timeline-86YVlMYJ.js → antenatal-schedule-timeline-XHbig8On.js} +3 -3
  6. package/dist/_chunks/{antenatal-schedule-timeline-86YVlMYJ.js.map → antenatal-schedule-timeline-XHbig8On.js.map} +1 -1
  7. package/dist/_chunks/{appointment-timeline-CC7nmBOH.js → appointment-timeline-Czd4PBkF.js} +2 -2
  8. package/dist/_chunks/{appointment-timeline-CC7nmBOH.js.map → appointment-timeline-Czd4PBkF.js.map} +1 -1
  9. package/dist/_chunks/{balance-badge-cell-DPjab0eJ.js → balance-badge-cell-DtxbGJcA.js} +2 -2
  10. package/dist/_chunks/{balance-badge-cell-DPjab0eJ.js.map → balance-badge-cell-DtxbGJcA.js.map} +1 -1
  11. package/dist/_chunks/{bill-line-table-DUMEHnQ4.js → bill-line-table-HrynB7ND.js} +2 -2
  12. package/dist/_chunks/{bill-line-table-DUMEHnQ4.js.map → bill-line-table-HrynB7ND.js.map} +1 -1
  13. package/dist/_chunks/{calendar-appointment-editor-dialog-rw02sXGw.js → calendar-appointment-editor-dialog-CiCmsBCH.js} +5 -5
  14. package/dist/_chunks/{calendar-appointment-editor-dialog-rw02sXGw.js.map → calendar-appointment-editor-dialog-CiCmsBCH.js.map} +1 -1
  15. package/dist/_chunks/{cycle-calculator-C8nWAeTk.js → cycle-calculator-WFhMfJHt.js} +4 -3
  16. package/dist/_chunks/{cycle-calculator-C8nWAeTk.js.map → cycle-calculator-WFhMfJHt.js.map} +1 -1
  17. package/dist/_chunks/{data-grid-Bbf8t4z3.js → data-grid-C71BhGDw.js} +2 -2
  18. package/dist/_chunks/{data-grid-Bbf8t4z3.js.map → data-grid-C71BhGDw.js.map} +1 -1
  19. package/dist/_chunks/{date-picker-DBVTj6lO.js → date-picker-BmVBVpVu.js} +3 -3
  20. package/dist/_chunks/{date-picker-DBVTj6lO.js.map → date-picker-BmVBVpVu.js.map} +1 -1
  21. package/dist/_chunks/{date-picker-variants-J1EeAhIH.js → date-picker-variants-DmfVRNDB.js} +184 -188
  22. package/dist/_chunks/date-picker-variants-DmfVRNDB.js.map +1 -0
  23. package/dist/_chunks/{date-range-panel-CT6nXjRM.js → date-range-panel-CT9Pk-HF.js} +2 -2
  24. package/dist/_chunks/{date-range-panel-CT6nXjRM.js.map → date-range-panel-CT9Pk-HF.js.map} +1 -1
  25. package/dist/_chunks/{date-range-picker-PTRpDkXT.js → date-range-picker-2Up_FRrM.js} +40 -39
  26. package/dist/_chunks/{date-range-picker-PTRpDkXT.js.map → date-range-picker-2Up_FRrM.js.map} +1 -1
  27. package/dist/_chunks/{date-time-picker-CJnqiQoT.js → date-time-picker-C6b_Vymc.js} +2 -2
  28. package/dist/_chunks/{date-time-picker-CJnqiQoT.js.map → date-time-picker-C6b_Vymc.js.map} +1 -1
  29. package/dist/_chunks/{default-tabs-Cxkw1Ws0.js → default-tabs-RvCI5uN0.js} +3 -3
  30. package/dist/_chunks/{default-tabs-Cxkw1Ws0.js.map → default-tabs-RvCI5uN0.js.map} +1 -1
  31. package/dist/_chunks/{due-date-calculator-c1NJPw9F.js → due-date-calculator-CALlODZe.js} +4 -4
  32. package/dist/_chunks/{due-date-calculator-c1NJPw9F.js.map → due-date-calculator-CALlODZe.js.map} +1 -1
  33. package/dist/_chunks/{gestational-age-calculator-Cg4Gq42R.js → gestational-age-calculator-mB6brTlp.js} +5 -5
  34. package/dist/_chunks/{gestational-age-calculator-Cg4Gq42R.js.map → gestational-age-calculator-mB6brTlp.js.map} +1 -1
  35. package/dist/_chunks/{hcg-doubling-BjTa_77t.js → hcg-doubling-Dhdt3Jyd.js} +3 -3
  36. package/dist/_chunks/{hcg-doubling-BjTa_77t.js.map → hcg-doubling-Dhdt3Jyd.js.map} +1 -1
  37. package/dist/_chunks/{invoice-upload-list-CsFsRgbt.js → invoice-upload-list-C95s5Q7m.js} +3 -3
  38. package/dist/_chunks/{invoice-upload-list-CsFsRgbt.js.map → invoice-upload-list-C95s5Q7m.js.map} +1 -1
  39. package/dist/_chunks/{kit-extensions-C3oL0WTp.js → kit-extensions-DUaIYyMD.js} +4 -4
  40. package/dist/_chunks/{kit-extensions-C3oL0WTp.js.map → kit-extensions-DUaIYyMD.js.map} +1 -1
  41. package/dist/_chunks/{link-cell-renderer-NFNGdAGt.js → link-cell-renderer-BEaLczk2.js} +2 -2
  42. package/dist/_chunks/{link-cell-renderer-NFNGdAGt.js.map → link-cell-renderer-BEaLczk2.js.map} +1 -1
  43. package/dist/_chunks/{map-view-h6ngp2xi.js → map-view-QWdQLHi9.js} +543 -495
  44. package/dist/_chunks/map-view-QWdQLHi9.js.map +1 -0
  45. package/dist/_chunks/{parse-BLBWPIgE.js → parse-BFur8Byx.js} +2 -2
  46. package/dist/_chunks/{parse-BLBWPIgE.js.map → parse-BFur8Byx.js.map} +1 -1
  47. package/dist/_chunks/{patient-details-C4dHR4iu.js → patient-details-Cba9HQj_.js} +2 -2
  48. package/dist/_chunks/{patient-details-C4dHR4iu.js.map → patient-details-Cba9HQj_.js.map} +1 -1
  49. package/dist/_chunks/{patient-field-row-0QP8KCVp.js → patient-field-row-CtDihADs.js} +2 -2
  50. package/dist/_chunks/{patient-field-row-0QP8KCVp.js.map → patient-field-row-CtDihADs.js.map} +1 -1
  51. package/dist/_chunks/{patient-summary-card-x0-AhCyC.js → patient-summary-card-DnLdbtsw.js} +2 -2
  52. package/dist/_chunks/{patient-summary-card-x0-AhCyC.js.map → patient-summary-card-DnLdbtsw.js.map} +1 -1
  53. package/dist/_chunks/practice-results-BCLqPdgn.js +2683 -0
  54. package/dist/_chunks/practice-results-BCLqPdgn.js.map +1 -0
  55. package/dist/_chunks/{pregnancy-dating-BO6diQMZ.js → pregnancy-dating-BNI32qNw.js} +5 -5
  56. package/dist/_chunks/{pregnancy-dating-BO6diQMZ.js.map → pregnancy-dating-BNI32qNw.js.map} +1 -1
  57. package/dist/_chunks/{radiograph-panel.agent-Dcv16n7u.js → radiograph-panel.agent-B-r3BoqU.js} +3 -3
  58. package/dist/_chunks/{radiograph-panel.agent-Dcv16n7u.js.map → radiograph-panel.agent-B-r3BoqU.js.map} +1 -1
  59. package/dist/_chunks/{reserved.agent-DRSZ8UcL.js → reserved.agent-CCwsOb3M.js} +8 -7
  60. package/dist/_chunks/{reserved.agent-DRSZ8UcL.js.map → reserved.agent-CCwsOb3M.js.map} +1 -1
  61. package/dist/_chunks/{send-registration-link-form-DuZQuKnI.js → send-registration-link-form-BjkXr0TD.js} +3 -3
  62. package/dist/_chunks/{send-registration-link-form-DuZQuKnI.js.map → send-registration-link-form-BjkXr0TD.js.map} +1 -1
  63. package/dist/_chunks/{slot-grid-b4eZXokb.js → slot-grid-DEZRB4Yb.js} +234 -207
  64. package/dist/_chunks/slot-grid-DEZRB4Yb.js.map +1 -0
  65. package/dist/_chunks/subDays-DC99JK7a.js +8 -0
  66. package/dist/_chunks/{subDays-Bsoy023P.js.map → subDays-DC99JK7a.js.map} +1 -1
  67. package/dist/_chunks/{task-editor-Czcx9B-3.js → task-editor-C05yx7JJ.js} +2 -2
  68. package/dist/_chunks/{task-editor-Czcx9B-3.js.map → task-editor-C05yx7JJ.js.map} +1 -1
  69. package/dist/_chunks/{toolbar-DoKcoE2q.js → toolbar-Dznu_Dou.js} +2 -2
  70. package/dist/_chunks/{toolbar-DoKcoE2q.js.map → toolbar-Dznu_Dou.js.map} +1 -1
  71. package/dist/_chunks/{use-appointment-details-read-B-SXnszJ.js → use-appointment-details-read-Bm408XzX.js} +2 -2
  72. package/dist/_chunks/{use-appointment-details-read-B-SXnszJ.js.map → use-appointment-details-read-Bm408XzX.js.map} +1 -1
  73. package/dist/agent-catalog.json +3 -3
  74. package/dist/agent-i18n/en.json +1 -1
  75. package/dist/browser-support.js +1 -1
  76. package/dist/components/appointment-details-panel/index.js +1 -1
  77. package/dist/components/appointment-timeline/index.js +1 -1
  78. package/dist/components/bill-line-table/index.js +1 -1
  79. package/dist/components/bill-table/index.js +1 -1
  80. package/dist/components/booking/index.js +1 -1
  81. package/dist/components/cycle-calculator/index.js +1 -1
  82. package/dist/components/data-grid/index.js +2 -2
  83. package/dist/components/data-table/index.js +1 -1
  84. package/dist/components/date-picker/index.js +1 -1
  85. package/dist/components/date-range-picker/index.js +1 -1
  86. package/dist/components/date-time-picker/index.js +1 -1
  87. package/dist/components/due-date-calculator/index.js +2 -2
  88. package/dist/components/gestational-age-calculator/index.js +1 -1
  89. package/dist/components/hcg-doubling/index.js +1 -1
  90. package/dist/components/invoice-upload-list/index.js +1 -1
  91. package/dist/components/map-view/index.d.ts +1 -1
  92. package/dist/components/map-view/index.d.ts.map +1 -1
  93. package/dist/components/map-view/index.js +1 -1
  94. package/dist/components/map-view/map-view.d.ts +18 -0
  95. package/dist/components/map-view/map-view.d.ts.map +1 -1
  96. package/dist/components/patient-details/index.js +1 -1
  97. package/dist/components/patient-summary-card/index.js +1 -1
  98. package/dist/components/patient-table/index.js +1 -1
  99. package/dist/components/practice-results/index.js +1 -1
  100. package/dist/components/practice-results/practice-results-slot-card.d.ts +38 -0
  101. package/dist/components/practice-results/practice-results-slot-card.d.ts.map +1 -0
  102. package/dist/components/practice-results/practice-results.d.ts +32 -2
  103. package/dist/components/practice-results/practice-results.d.ts.map +1 -1
  104. package/dist/components/pregnancy-dating/index.js +1 -1
  105. package/dist/components/radiograph-panel/index.js +1 -1
  106. package/dist/components/rich-text-editor/index.js +1 -1
  107. package/dist/components/slot-grid/index.js +1 -1
  108. package/dist/components/slot-grid/slot-grid.d.ts +19 -0
  109. package/dist/components/slot-grid/slot-grid.d.ts.map +1 -1
  110. package/dist/components/task-editor/index.js +1 -1
  111. package/dist/core.css +1 -1
  112. package/dist/host-compat.css +9 -1
  113. package/dist/i18n/locales/ar.d.ts +5 -0
  114. package/dist/i18n/locales/ar.d.ts.map +1 -1
  115. package/dist/i18n/locales/ar.js +6 -1
  116. package/dist/i18n/locales/ar.js.map +1 -1
  117. package/dist/i18n/locales/de.d.ts +5 -0
  118. package/dist/i18n/locales/de.d.ts.map +1 -1
  119. package/dist/i18n/locales/de.js +6 -1
  120. package/dist/i18n/locales/de.js.map +1 -1
  121. package/dist/i18n/locales/el.d.ts +5 -0
  122. package/dist/i18n/locales/el.d.ts.map +1 -1
  123. package/dist/i18n/locales/el.js +6 -1
  124. package/dist/i18n/locales/el.js.map +1 -1
  125. package/dist/i18n/locales/en.d.ts +5 -0
  126. package/dist/i18n/locales/en.d.ts.map +1 -1
  127. package/dist/i18n/locales/en.js +5 -0
  128. package/dist/i18n/locales/en.js.map +1 -1
  129. package/dist/i18n/locales/es.d.ts +5 -0
  130. package/dist/i18n/locales/es.d.ts.map +1 -1
  131. package/dist/i18n/locales/es.js +6 -1
  132. package/dist/i18n/locales/es.js.map +1 -1
  133. package/dist/i18n/locales/fr.d.ts +5 -0
  134. package/dist/i18n/locales/fr.d.ts.map +1 -1
  135. package/dist/i18n/locales/fr.js +6 -1
  136. package/dist/i18n/locales/fr.js.map +1 -1
  137. package/dist/i18n/locales/hi.d.ts +5 -0
  138. package/dist/i18n/locales/hi.d.ts.map +1 -1
  139. package/dist/i18n/locales/hi.js +6 -1
  140. package/dist/i18n/locales/hi.js.map +1 -1
  141. package/dist/i18n/locales/it.d.ts +5 -0
  142. package/dist/i18n/locales/it.d.ts.map +1 -1
  143. package/dist/i18n/locales/it.js +6 -1
  144. package/dist/i18n/locales/it.js.map +1 -1
  145. package/dist/i18n/locales/ja.d.ts +5 -0
  146. package/dist/i18n/locales/ja.d.ts.map +1 -1
  147. package/dist/i18n/locales/ja.js +6 -1
  148. package/dist/i18n/locales/ja.js.map +1 -1
  149. package/dist/i18n/locales/nl.d.ts +5 -0
  150. package/dist/i18n/locales/nl.d.ts.map +1 -1
  151. package/dist/i18n/locales/nl.js +6 -1
  152. package/dist/i18n/locales/nl.js.map +1 -1
  153. package/dist/i18n/locales/pl.d.ts +5 -0
  154. package/dist/i18n/locales/pl.d.ts.map +1 -1
  155. package/dist/i18n/locales/pl.js +6 -1
  156. package/dist/i18n/locales/pl.js.map +1 -1
  157. package/dist/i18n/locales/pt.d.ts +5 -0
  158. package/dist/i18n/locales/pt.d.ts.map +1 -1
  159. package/dist/i18n/locales/pt.js +6 -1
  160. package/dist/i18n/locales/pt.js.map +1 -1
  161. package/dist/i18n/locales/ro.d.ts +5 -0
  162. package/dist/i18n/locales/ro.d.ts.map +1 -1
  163. package/dist/i18n/locales/ro.js +6 -1
  164. package/dist/i18n/locales/ro.js.map +1 -1
  165. package/dist/i18n/locales/ru.d.ts +5 -0
  166. package/dist/i18n/locales/ru.d.ts.map +1 -1
  167. package/dist/i18n/locales/ru.js +6 -1
  168. package/dist/i18n/locales/ru.js.map +1 -1
  169. package/dist/i18n/locales/sq.d.ts +5 -0
  170. package/dist/i18n/locales/sq.d.ts.map +1 -1
  171. package/dist/i18n/locales/sq.js +6 -1
  172. package/dist/i18n/locales/sq.js.map +1 -1
  173. package/dist/i18n/locales/sv.d.ts +5 -0
  174. package/dist/i18n/locales/sv.d.ts.map +1 -1
  175. package/dist/i18n/locales/sv.js +6 -1
  176. package/dist/i18n/locales/sv.js.map +1 -1
  177. package/dist/i18n/locales/tr.d.ts +5 -0
  178. package/dist/i18n/locales/tr.d.ts.map +1 -1
  179. package/dist/i18n/locales/tr.js +6 -1
  180. package/dist/i18n/locales/tr.js.map +1 -1
  181. package/dist/i18n/locales/zh.d.ts +5 -0
  182. package/dist/i18n/locales/zh.d.ts.map +1 -1
  183. package/dist/i18n/locales/zh.js +6 -1
  184. package/dist/i18n/locales/zh.js.map +1 -1
  185. package/dist/index.js +30 -30
  186. package/dist/locales/ar.json +6 -1
  187. package/dist/locales/de.json +6 -1
  188. package/dist/locales/el.json +6 -1
  189. package/dist/locales/en.json +5 -0
  190. package/dist/locales/es.json +6 -1
  191. package/dist/locales/fr.json +6 -1
  192. package/dist/locales/hi.json +6 -1
  193. package/dist/locales/it.json +6 -1
  194. package/dist/locales/ja.json +6 -1
  195. package/dist/locales/nl.json +6 -1
  196. package/dist/locales/pl.json +6 -1
  197. package/dist/locales/pt.json +6 -1
  198. package/dist/locales/ro.json +6 -1
  199. package/dist/locales/ru.json +6 -1
  200. package/dist/locales/sq.json +6 -1
  201. package/dist/locales/sv.json +6 -1
  202. package/dist/locales/tr.json +6 -1
  203. package/dist/locales/zh.json +6 -1
  204. package/dist/patterns/anamnesis/index.js +1 -1
  205. package/dist/patterns/calendar/index.js +1 -1
  206. package/dist/patterns/send-registration-link-form/index.js +1 -1
  207. package/dist/tokens.css +1 -1
  208. package/package.json +1 -1
  209. package/dist/_chunks/date-picker-variants-J1EeAhIH.js.map +0 -1
  210. package/dist/_chunks/map-view-h6ngp2xi.js.map +0 -1
  211. package/dist/_chunks/practice-results-yCresv86.js +0 -2326
  212. package/dist/_chunks/practice-results-yCresv86.js.map +0 -1
  213. package/dist/_chunks/slot-grid-b4eZXokb.js.map +0 -1
  214. package/dist/_chunks/subDays-Bsoy023P.js +0 -8
@@ -3,7 +3,7 @@ import { useState as v } from "react";
3
3
  import { useTranslation as h } from "react-i18next";
4
4
  import { c as m } from "./index-D2ZczOXr.js";
5
5
  import { B as x } from "./button-DohK_Ak_.js";
6
- import { D } from "./date-range-picker-PTRpDkXT.js";
6
+ import { D } from "./date-range-picker-2Up_FRrM.js";
7
7
  import { f as r, t as i } from "./export-files-BByoK9Cg.js";
8
8
  import { b as R } from "./accessible-target-D3j6F-AG.js";
9
9
  const T = m("ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"), k = m(
@@ -59,4 +59,4 @@ function M({
59
59
  export {
60
60
  M as DateRangeFilterPanel
61
61
  };
62
- //# sourceMappingURL=date-range-panel-CT6nXjRM.js.map
62
+ //# sourceMappingURL=date-range-panel-CT9Pk-HF.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-range-panel-CT6nXjRM.js","sources":["../../src/components/data-grid/filters/date-range-panel.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* DataGrid date-range filter panel (design § 6.1). */\n/* */\n/* Loaded with React.lazy from `filter-trigger.tsx`, so DateRangePicker */\n/* and its calendar stay out of the grid chunk until a date filter opens. */\n/* Writes `{ type: 'inRange', dateFrom, dateTo }` with calendar days */\n/* (`YYYY-MM-DD`), either end open. Server mode defaults to */\n/* `commitMode: 'apply'`, so one range is one request. */\n/* -------------------------------------------------------------------- */\n\nimport { useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { cva } from 'class-variance-authority';\nimport { Button } from '../../button/button';\nimport { DateRangePicker, type DateRangeValue } from '../../date-range-picker';\nimport {\n fromIsoDate,\n toIsoDate,\n} from '../../_shared/table-filters/calendar-day';\nimport type { DateRangeFilterModel } from '../../_shared/table-toolbar/seam';\nimport { accessibleTargetBlockClass } from '../data-grid.variants';\nimport type { DataGridColumnFilter } from '../types';\nimport type { DataGridFilterPanelProps } from './filter-panels';\n\nconst panelVariants = cva('ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]');\nconst actionsVariants = cva(\n 'ds:flex ds:flex-wrap ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:border-t ds:border-[color:var(--border)] ds:pt-[var(--spacing-xs)]',\n);\n\nexport function DateRangeFilterPanel({\n columnLabel,\n value,\n dataMode,\n onApply,\n config,\n}: DataGridFilterPanelProps & {\n config: Extract<DataGridColumnFilter, { kind: 'dateRange' }>;\n}) {\n const { t } = useTranslation('ui');\n const current = value as DateRangeFilterModel | undefined;\n const [range, setRange] = useState<DateRangeValue>(() => ({\n from: fromIsoDate(current?.dateFrom),\n to: fromIsoDate(current?.dateTo),\n }));\n const commitMode =\n config.commitMode ?? (dataMode === 'server' ? 'apply' : 'auto');\n\n function commit(next: DateRangeValue) {\n setRange(next);\n if (!next.from && !next.to) {\n onApply(null);\n return;\n }\n onApply({\n type: 'inRange',\n dateFrom: toIsoDate(next.from),\n dateTo: toIsoDate(next.to),\n });\n }\n\n return (\n <div data-filter-kind=\"dateRange\" className={panelVariants()}>\n <DateRangePicker\n value={range}\n onChange={commit}\n commitMode={commitMode}\n size=\"sm\"\n // A column filter has no room for the two-month rail-and-title layout.\n compact\n aria-label={t('dataGrid.filter.button', { column: columnLabel })}\n />\n <div className={actionsVariants()}>\n <Button\n intent=\"ghost\"\n size=\"sm\"\n type=\"button\"\n className={accessibleTargetBlockClass}\n onClick={() => onApply(null)}\n >\n {t('dataTable.selectFilter.clear')}\n </Button>\n </div>\n </div>\n );\n}\n"],"names":["panelVariants","cva","actionsVariants","DateRangeFilterPanel","columnLabel","value","dataMode","onApply","config","t","useTranslation","current","range","setRange","useState","fromIsoDate","commitMode","commit","next","toIsoDate","jsx","DateRangePicker","Button","accessibleTargetBlockClass"],"mappings":";;;;;;;;AAwBA,MAAMA,IAAgBC,EAAI,gDAAgD,GACpEC,IAAkBD;AAAA,EACtB;AACF;AAEO,SAASE,EAAqB;AAAA,EACnC,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AACF,GAEG;AACD,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,IAAI,GAC3BC,IAAUN,GACV,CAACO,GAAOC,CAAQ,IAAIC,EAAyB,OAAO;AAAA,IACxD,MAAMC,EAAYJ,KAAA,gBAAAA,EAAS,QAAQ;AAAA,IACnC,IAAII,EAAYJ,KAAA,gBAAAA,EAAS,MAAM;AAAA,EAAA,EAC/B,GACIK,IACJR,EAAO,eAAeF,MAAa,WAAW,UAAU;AAE1D,WAASW,EAAOC,GAAsB;AAEpC,QADAL,EAASK,CAAI,GACT,CAACA,EAAK,QAAQ,CAACA,EAAK,IAAI;AAC1B,MAAAX,EAAQ,IAAI;AACZ;AAAA,IACF;AACA,IAAAA,EAAQ;AAAA,MACN,MAAM;AAAA,MACN,UAAUY,EAAUD,EAAK,IAAI;AAAA,MAC7B,QAAQC,EAAUD,EAAK,EAAE;AAAA,IAAA,CAC1B;AAAA,EACH;AAEA,2BACG,OAAA,EAAI,oBAAiB,aAAY,WAAWlB,KAC3C,UAAA;AAAA,IAAA,gBAAAoB;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAOT;AAAA,QACP,UAAUK;AAAA,QACV,YAAAD;AAAA,QACA,MAAK;AAAA,QAEL,SAAO;AAAA,QACP,cAAYP,EAAE,0BAA0B,EAAE,QAAQL,GAAa;AAAA,MAAA;AAAA,IAAA;AAAA,IAEjE,gBAAAgB,EAAC,OAAA,EAAI,WAAWlB,EAAA,GACd,UAAA,gBAAAkB;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,QAAO;AAAA,QACP,MAAK;AAAA,QACL,MAAK;AAAA,QACL,WAAWC;AAAA,QACX,SAAS,MAAMhB,EAAQ,IAAI;AAAA,QAE1B,YAAE,8BAA8B;AAAA,MAAA;AAAA,IAAA,EACnC,CACF;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"date-range-panel-CT9Pk-HF.js","sources":["../../src/components/data-grid/filters/date-range-panel.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* DataGrid date-range filter panel (design § 6.1). */\n/* */\n/* Loaded with React.lazy from `filter-trigger.tsx`, so DateRangePicker */\n/* and its calendar stay out of the grid chunk until a date filter opens. */\n/* Writes `{ type: 'inRange', dateFrom, dateTo }` with calendar days */\n/* (`YYYY-MM-DD`), either end open. Server mode defaults to */\n/* `commitMode: 'apply'`, so one range is one request. */\n/* -------------------------------------------------------------------- */\n\nimport { useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { cva } from 'class-variance-authority';\nimport { Button } from '../../button/button';\nimport { DateRangePicker, type DateRangeValue } from '../../date-range-picker';\nimport {\n fromIsoDate,\n toIsoDate,\n} from '../../_shared/table-filters/calendar-day';\nimport type { DateRangeFilterModel } from '../../_shared/table-toolbar/seam';\nimport { accessibleTargetBlockClass } from '../data-grid.variants';\nimport type { DataGridColumnFilter } from '../types';\nimport type { DataGridFilterPanelProps } from './filter-panels';\n\nconst panelVariants = cva('ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]');\nconst actionsVariants = cva(\n 'ds:flex ds:flex-wrap ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:border-t ds:border-[color:var(--border)] ds:pt-[var(--spacing-xs)]',\n);\n\nexport function DateRangeFilterPanel({\n columnLabel,\n value,\n dataMode,\n onApply,\n config,\n}: DataGridFilterPanelProps & {\n config: Extract<DataGridColumnFilter, { kind: 'dateRange' }>;\n}) {\n const { t } = useTranslation('ui');\n const current = value as DateRangeFilterModel | undefined;\n const [range, setRange] = useState<DateRangeValue>(() => ({\n from: fromIsoDate(current?.dateFrom),\n to: fromIsoDate(current?.dateTo),\n }));\n const commitMode =\n config.commitMode ?? (dataMode === 'server' ? 'apply' : 'auto');\n\n function commit(next: DateRangeValue) {\n setRange(next);\n if (!next.from && !next.to) {\n onApply(null);\n return;\n }\n onApply({\n type: 'inRange',\n dateFrom: toIsoDate(next.from),\n dateTo: toIsoDate(next.to),\n });\n }\n\n return (\n <div data-filter-kind=\"dateRange\" className={panelVariants()}>\n <DateRangePicker\n value={range}\n onChange={commit}\n commitMode={commitMode}\n size=\"sm\"\n // A column filter has no room for the two-month rail-and-title layout.\n compact\n aria-label={t('dataGrid.filter.button', { column: columnLabel })}\n />\n <div className={actionsVariants()}>\n <Button\n intent=\"ghost\"\n size=\"sm\"\n type=\"button\"\n className={accessibleTargetBlockClass}\n onClick={() => onApply(null)}\n >\n {t('dataTable.selectFilter.clear')}\n </Button>\n </div>\n </div>\n );\n}\n"],"names":["panelVariants","cva","actionsVariants","DateRangeFilterPanel","columnLabel","value","dataMode","onApply","config","t","useTranslation","current","range","setRange","useState","fromIsoDate","commitMode","commit","next","toIsoDate","jsx","DateRangePicker","Button","accessibleTargetBlockClass"],"mappings":";;;;;;;;AAwBA,MAAMA,IAAgBC,EAAI,gDAAgD,GACpEC,IAAkBD;AAAA,EACtB;AACF;AAEO,SAASE,EAAqB;AAAA,EACnC,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AACF,GAEG;AACD,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,IAAI,GAC3BC,IAAUN,GACV,CAACO,GAAOC,CAAQ,IAAIC,EAAyB,OAAO;AAAA,IACxD,MAAMC,EAAYJ,KAAA,gBAAAA,EAAS,QAAQ;AAAA,IACnC,IAAII,EAAYJ,KAAA,gBAAAA,EAAS,MAAM;AAAA,EAAA,EAC/B,GACIK,IACJR,EAAO,eAAeF,MAAa,WAAW,UAAU;AAE1D,WAASW,EAAOC,GAAsB;AAEpC,QADAL,EAASK,CAAI,GACT,CAACA,EAAK,QAAQ,CAACA,EAAK,IAAI;AAC1B,MAAAX,EAAQ,IAAI;AACZ;AAAA,IACF;AACA,IAAAA,EAAQ;AAAA,MACN,MAAM;AAAA,MACN,UAAUY,EAAUD,EAAK,IAAI;AAAA,MAC7B,QAAQC,EAAUD,EAAK,EAAE;AAAA,IAAA,CAC1B;AAAA,EACH;AAEA,2BACG,OAAA,EAAI,oBAAiB,aAAY,WAAWlB,KAC3C,UAAA;AAAA,IAAA,gBAAAoB;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAOT;AAAA,QACP,UAAUK;AAAA,QACV,YAAAD;AAAA,QACA,MAAK;AAAA,QAEL,SAAO;AAAA,QACP,cAAYP,EAAE,0BAA0B,EAAE,QAAQL,GAAa;AAAA,MAAA;AAAA,IAAA;AAAA,IAEjE,gBAAAgB,EAAC,OAAA,EAAI,WAAWlB,EAAA,GACd,UAAA,gBAAAkB;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,QAAO;AAAA,QACP,MAAK;AAAA,QACL,MAAK;AAAA,QACL,WAAWC;AAAA,QACX,SAAS,MAAMhB,EAAQ,IAAI;AAAA,QAE1B,YAAE,8BAA8B;AAAA,MAAA;AAAA,IAAA,EACnC,CACF;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,23 +1,24 @@
1
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";
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 _t, Fragment as qt } from "react";
3
3
  import { useTranslation as Bt } from "react-i18next";
4
4
  import * as H from "@radix-ui/react-popover";
5
5
  import { u as zt, f as Yt } from "./non-modal-tab-exit-j3CPOuE3.js";
6
6
  import * as Q from "@radix-ui/react-radio-group";
7
7
  import { S as Ut } from "./spinner-CoflYlEx.js";
8
- import { g as Ht, h as Qt, u as Jt, c as Xt, j as Ye, k as Zt, s as ea, b as ta, d as aa, t as ra, l as Ue, m as He, r as Qe, p as sa, n as na, D as oa, C as ia, o as da, e as la, q as J, f as ca, a as ve, i as ua } from "./date-picker-variants-J1EeAhIH.js";
8
+ import { f as Ht, g as Qt, u as Jt, b as Xt, h as Ye, j as Zt, s as ea, c as ta, t as aa, k as Ue, l as He, r as Qe, p as ra, m as sa, D as na, C as oa, n as ia, d as da, o as J, e as la, a as ve, i as ca } from "./date-picker-variants-DmfVRNDB.js";
9
9
  import { u as Je } from "./use-select-on-arrow-Cr4iBuW5.js";
10
10
  import { u as ye } from "./use-controllable-state-BiY4xTzM.js";
11
- import { u as pa, a as ma } from "./form-field-context-DtiROUJV.js";
12
- import { S as fa } from "./switch-DO6uC4HJ.js";
13
- import { u as ga } from "./registry-DvAUVLHh.js";
14
- import { u as va, g as ya } from "./date-locale-OG-MupVD.js";
15
- import { f as k, d as he, a as Xe, i as ha } from "./format-ql5WTsYT.js";
16
- import { s as V } from "./subDays-Bsoy023P.js";
11
+ import { u as ua, a as pa } from "./form-field-context-DtiROUJV.js";
12
+ import { S as ma } from "./switch-DO6uC4HJ.js";
13
+ import { u as fa } from "./registry-DvAUVLHh.js";
14
+ import { u as ga, g as va } from "./date-locale-OG-MupVD.js";
15
+ import { f as k, d as he, a as Xe, i as ya } from "./format-ql5WTsYT.js";
16
+ import { s as V } from "./subDays-DC99JK7a.js";
17
17
  import { s as Ze } from "./normalizeDates-BBNNIR-v.js";
18
+ import { a as ha } from "./addDays-CuE8wLqb.js";
18
19
  import { C as ba } from "./calendar-days-BGWklvE-.js";
19
20
  import { C as ka } from "./check-DrFSN__t.js";
20
- import { p as Ra } from "./parse-BLBWPIgE.js";
21
+ import { p as Ra } from "./parse-BFur8Byx.js";
21
22
  function xa(s, l, g) {
22
23
  return Ht(s, -1, g);
23
24
  }
@@ -256,15 +257,15 @@ const Pa = {
256
257
  className: pt,
257
258
  id: mt
258
259
  }, ft) => {
259
- const { t: n, i18n: re } = Bt("ui"), F = pa(), se = ma(F, mt), xe = F.disabled || ct, gt = F.invalid ? "error" : "default", c = va(re.language), vt = Jt(), f = ya(re.language), yt = ut ?? n("inputs.dateRangePicker.placeholder", "Select date range"), [ht, Pe] = ye({
260
+ const { t: n, i18n: re } = Bt("ui"), F = ua(), se = pa(F, mt), xe = F.disabled || ct, gt = F.invalid ? "error" : "default", c = ga(re.language), vt = Jt(), f = va(re.language), yt = ut ?? n("inputs.dateRangePicker.placeholder", "Select date range"), [ht, Pe] = ye({
260
261
  value: s,
261
262
  defaultValue: l ?? {},
262
263
  onChange: g
263
- }), i = ht ?? {}, [O, R] = b(!1), [a, T] = b(i), [bt, ne] = b(i.from ?? /* @__PURE__ */ new Date()), [De, Ne] = b(""), [we, 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(
264
- (e) => _.includes(e.value)
264
+ }), i = ht ?? {}, [O, R] = b(!1), [a, T] = b(i), [bt, ne] = b(i.from ?? /* @__PURE__ */ new Date()), [De, Ne] = b(""), [we, Se] = b(""), [G, L] = b(!1), [K, $] = b(!1), _ = be !== void 0 || ke !== void 0, q = Z && Z.length > 0 ? Z : void 0, Ie = q ? tt.filter(
265
+ (e) => q.includes(e.value)
265
266
  ) : tt, W = (e) => {
266
267
  var t;
267
- return !_ || _.includes(e) ? e : ((t = Ie[0]) == null ? void 0 : t.value) ?? e;
268
+ return !q || q.includes(e) ? e : ((t = Ie[0]) == null ? void 0 : t.value) ?? e;
268
269
  }, [kt, oe] = ye({
269
270
  value: be,
270
271
  defaultValue: W(ke ?? "day"),
@@ -281,7 +282,7 @@ const Pa = {
281
282
  Pe(e);
282
283
  },
283
284
  [Pe]
284
- ), Nt = Xt(ee, te), wt = (e) => (ee ? ua(e, ee) : !1) || (te ? ve(e, te) : !1);
285
+ ), Nt = Xt(ee, te), wt = (e) => (ee ? ca(e, ee) : !1) || (te ? ve(e, te) : !1);
285
286
  ze(() => {
286
287
  O && (T(i), E(C ?? !1), L(!1), $(!1), N.current = !1);
287
288
  }, [O]), ze(() => {
@@ -363,10 +364,10 @@ const Pa = {
363
364
  compareStart: e,
364
365
  compareEnd: t
365
366
  };
366
- return he(t, e) >= 2 && (d.compareMiddle = { from: ta(e, 1), to: V(t, 1) }), d;
367
+ return he(t, e) >= 2 && (d.compareMiddle = { from: ha(e, 1), to: V(t, 1) }), d;
367
368
  })(), Ae = (e) => {
368
369
  const t = {};
369
- return q && (t.granularity = B), Y && (t.compareRange = y(e)), t.granularity || t.compareRange ? t : void 0;
370
+ return _ && (t.granularity = B), Y && (t.compareRange = y(e)), t.granularity || t.compareRange ? t : void 0;
370
371
  }, Fe = Je(), Le = Je(), Ot = (e) => {
371
372
  Le.noteSelection();
372
373
  const t = e;
@@ -392,7 +393,7 @@ const Pa = {
392
393
  return;
393
394
  }
394
395
  const o = Ra(t, f, /* @__PURE__ */ new Date(), { locale: c });
395
- if (!ha(o) || wt(o)) {
396
+ if (!ya(o) || wt(o)) {
396
397
  d(!0);
397
398
  return;
398
399
  }
@@ -422,7 +423,7 @@ const Pa = {
422
423
  if (!i.from || !i.to) return !1;
423
424
  const t = e.range();
424
425
  return Xe(t.from, i.from) && Xe(t.to, i.to);
425
- }, w = de.find(At), qe = (() => {
426
+ }, w = de.find(At), _e = (() => {
426
427
  if (i.from && i.to) {
427
428
  const e = k(i.from, f, { locale: c }), t = k(i.to, f, { locale: c });
428
429
  return `${e} – ${t}`;
@@ -438,7 +439,7 @@ const Pa = {
438
439
  })(), v = ge({
439
440
  currentValue: i,
440
441
  open: O,
441
- getGranularity: () => q ? B : void 0,
442
+ getGranularity: () => _ ? B : void 0,
442
443
  setGranularity: (e) => oe(W(e)),
443
444
  getCompareRange: () => Ve ? y(i) : void 0,
444
445
  // Imperative/agent path commits directly (like setRange/clear), so
@@ -457,7 +458,7 @@ const Pa = {
457
458
  v.current = {
458
459
  currentValue: i,
459
460
  open: O,
460
- getGranularity: () => q ? B : void 0,
461
+ getGranularity: () => _ ? B : void 0,
461
462
  setGranularity: (e) => oe(W(e)),
462
463
  getCompareRange: () => Ve ? y(i) : void 0,
463
464
  setCompare: (e) => {
@@ -490,11 +491,11 @@ const Pa = {
490
491
  }),
491
492
  [x]
492
493
  );
493
- qt(ft, () => me, [me]), ga(Pa, me, se);
494
+ _t(ft, () => me, [me]), fa(Pa, me, se);
494
495
  const Lt = zt(!0, {
495
496
  getAnchor: Yt,
496
497
  onReturnToTrigger: () => je(!1)
497
- }), _e = (e) => e === "from" ? G ? "error" : U === "start" ? "active" : "default" : K ? "error" : U === "end" ? "active" : "default";
498
+ }), qe = (e) => e === "from" ? G ? "error" : U === "start" ? "active" : "default" : K ? "error" : U === "end" ? "active" : "default";
498
499
  return /* @__PURE__ */ r(H.Root, { open: O, onOpenChange: je, children: /* @__PURE__ */ u(
499
500
  "div",
500
501
  {
@@ -513,7 +514,7 @@ const Pa = {
513
514
  "aria-invalid": F.invalid || void 0,
514
515
  "aria-haspopup": "dialog",
515
516
  "aria-expanded": O,
516
- className: ra({ size: Re, tone: gt, chrome: lt }),
517
+ className: aa({ size: Re, tone: gt, chrome: lt }),
517
518
  children: [
518
519
  /* @__PURE__ */ r(
519
520
  "span",
@@ -525,16 +526,16 @@ const Pa = {
525
526
  // lets the flex child shrink below its content width so
526
527
  // `truncate` engages.
527
528
  "ds:min-w-0 ds:flex-1 ds:truncate ds:text-start",
528
- qe ? "ds:text-foreground" : "ds:text-muted-foreground"
529
+ _e ? "ds:text-foreground" : "ds:text-muted-foreground"
529
530
  ].join(" "),
530
- children: qe || yt
531
+ children: _e || yt
531
532
  }
532
533
  ),
533
534
  /* @__PURE__ */ r(
534
535
  "span",
535
536
  {
536
537
  "aria-hidden": "true",
537
- className: aa({ size: Re }),
538
+ className: ta({ size: Re }),
538
539
  children: /* @__PURE__ */ r(ba, {})
539
540
  }
540
541
  )
@@ -553,7 +554,7 @@ const Pa = {
553
554
  "Select date range"
554
555
  ),
555
556
  "data-component": "date-range-picker-content",
556
- className: ca(),
557
+ className: la(),
557
558
  children: /* @__PURE__ */ u("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
558
559
  /* @__PURE__ */ u("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
559
560
  /* @__PURE__ */ u("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
@@ -565,7 +566,7 @@ const Pa = {
565
566
  children: n("inputs.dateRangePicker.title", "Select date range")
566
567
  }
567
568
  ),
568
- q ? /* @__PURE__ */ r(
569
+ _ ? /* @__PURE__ */ r(
569
570
  Q.Root,
570
571
  {
571
572
  value: B,
@@ -619,7 +620,7 @@ const Pa = {
619
620
  onBlur: (e) => ce("from", e.target.value),
620
621
  onKeyDown: $e("from"),
621
622
  className: Qe({
622
- state: _e("from")
623
+ state: qe("from")
623
624
  })
624
625
  }
625
626
  )
@@ -655,7 +656,7 @@ const Pa = {
655
656
  onBlur: (e) => ce("to", e.target.value),
656
657
  onKeyDown: $e("to"),
657
658
  className: Qe({
658
- state: _e("to")
659
+ state: qe("to")
659
660
  })
660
661
  }
661
662
  )
@@ -687,7 +688,7 @@ const Pa = {
687
688
  type: "button",
688
689
  "aria-pressed": fe,
689
690
  onClick: () => Kt(P),
690
- className: sa({ active: fe }),
691
+ className: ra({ active: fe }),
691
692
  children: [
692
693
  /* @__PURE__ */ r("span", { className: "ds:min-w-0 ds:truncate", children: P.label }),
693
694
  fe ? /* @__PURE__ */ r(
@@ -713,7 +714,7 @@ const Pa = {
713
714
  "div",
714
715
  {
715
716
  id: d,
716
- className: na(),
717
+ className: sa(),
717
718
  children: e.group
718
719
  }
719
720
  ),
@@ -721,12 +722,12 @@ const Pa = {
721
722
  ]
722
723
  },
723
724
  e.group
724
- ) : /* @__PURE__ */ r(_t, { children: o }, e.group || "_ungrouped");
725
+ ) : /* @__PURE__ */ r(qt, { children: o }, e.group || "_ungrouped");
725
726
  }) }) : null,
726
727
  /* @__PURE__ */ u("div", { role: "region", "aria-labelledby": Ce, children: [
727
728
  /* @__PURE__ */ r("span", { id: Ce, className: "ds:sr-only", children: n("inputs.dateRangePicker.gridLabel", "Calendar") }),
728
729
  c ? /* @__PURE__ */ r(
729
- oa,
730
+ na,
730
731
  {
731
732
  mode: "range",
732
733
  selected: a.from ? { from: a.from, to: a.to } : void 0,
@@ -742,17 +743,17 @@ const Pa = {
742
743
  showOutsideDays: !0,
743
744
  fixedWeeks: !0,
744
745
  pagedNavigation: !0,
745
- classNames: la,
746
+ classNames: da,
746
747
  modifiers: It,
747
- modifiersClassNames: da,
748
- components: { Chevron: ia }
748
+ modifiersClassNames: ia,
749
+ components: { Chevron: oa }
749
750
  }
750
751
  ) : /* @__PURE__ */ r(Ut, {})
751
752
  ] })
752
753
  ] }),
753
754
  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: [
754
755
  /* @__PURE__ */ r(
755
- fa,
756
+ ma,
756
757
  {
757
758
  id: Dt,
758
759
  label: n(
@@ -864,4 +865,4 @@ export {
864
865
  Na as D,
865
866
  Pa as d
866
867
  };
867
- //# sourceMappingURL=date-range-picker-PTRpDkXT.js.map
868
+ //# sourceMappingURL=date-range-picker-2Up_FRrM.js.map