impact-nova 2.5.13 → 2.5.14

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 (148) hide show
  1. package/dist/components/data/data-table/build-column-tree-from-grid.d.ts +0 -1
  2. package/dist/components/data/data-table/build-column-tree-from-grid.js +50 -55
  3. package/dist/components/data/data-table/data-table-column-apply.d.ts +0 -2
  4. package/dist/components/data/data-table/data-table-column-apply.js +73 -84
  5. package/dist/components/data/data-table/data-table-column-list.js +64 -94
  6. package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +6 -12
  7. package/dist/components/data/data-table/data-table-column-tree-cache.js +131 -250
  8. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +0 -5
  9. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +11 -28
  10. package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +0 -10
  11. package/dist/components/data/data-table/use-data-table-column-list-sync.js +196 -250
  12. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
  13. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
  14. package/dist/components/data/nested-list/components/NestedListContent.d.ts +2 -10
  15. package/dist/components/data/nested-list/components/NestedListContent.js +138 -253
  16. package/dist/components/data/nested-list/components/SortableItem.d.ts +1 -2
  17. package/dist/components/data/nested-list/components/SortableItem.js +60 -62
  18. package/dist/components/data/nested-list/hooks/useNestedListDragDrop.d.ts +20 -10
  19. package/dist/components/data/nested-list/hooks/useNestedListDragDrop.js +233 -44
  20. package/dist/components/data/nested-list/nested-list-constants.d.ts +1 -4
  21. package/dist/components/data/nested-list/nested-list-constants.js +4 -10
  22. package/dist/components/data/nested-list/nested-list.js +336 -322
  23. package/dist/components/data/nested-list/nested-list.types.d.ts +0 -17
  24. package/dist/components/data-display/calendar/calendar-apply-validation.d.ts +2 -0
  25. package/dist/components/data-display/calendar/calendar-apply-validation.js +64 -67
  26. package/dist/components/data-display/calendar/calendar-available-view.d.ts +27 -0
  27. package/dist/components/data-display/calendar/calendar-available-view.js +85 -0
  28. package/dist/components/data-display/calendar/calendar-config.js +1 -1
  29. package/dist/components/data-display/calendar/calendar-day-picker-components.d.ts +4 -2
  30. package/dist/components/data-display/calendar/calendar-day-picker-components.js +234 -164
  31. package/dist/components/data-display/calendar/calendar-day-picker-view.js +77 -76
  32. package/dist/components/data-display/calendar/calendar-fiscal-day-cell.d.ts +9 -0
  33. package/dist/components/data-display/calendar/calendar-fiscal-day-cell.js +45 -0
  34. package/dist/components/data-display/calendar/calendar-fiscal-period-nav.d.ts +6 -0
  35. package/dist/components/data-display/calendar/calendar-fiscal-period-nav.js +34 -18
  36. package/dist/components/data-display/calendar/calendar-footer.js +21 -21
  37. package/dist/components/data-display/calendar/calendar-injected-week-row.d.ts +5 -0
  38. package/dist/components/data-display/calendar/calendar-injected-week-row.js +92 -0
  39. package/dist/components/data-display/calendar/calendar-leading-week.utils.d.ts +16 -0
  40. package/dist/components/data-display/calendar/calendar-leading-week.utils.js +51 -0
  41. package/dist/components/data-display/calendar/calendar-month-picker-panel.js +50 -49
  42. package/dist/components/data-display/calendar/calendar-month-utils.d.ts +5 -0
  43. package/dist/components/data-display/calendar/calendar-month-utils.js +85 -64
  44. package/dist/components/data-display/calendar/calendar-orphan-week.d.ts +23 -0
  45. package/dist/components/data-display/calendar/calendar-padding-week.utils.d.ts +3 -1
  46. package/dist/components/data-display/calendar/calendar-padding-week.utils.js +7 -5
  47. package/dist/components/data-display/calendar/calendar-period-cell.js +45 -46
  48. package/dist/components/data-display/calendar/calendar-quarter-panes.js +33 -31
  49. package/dist/components/data-display/calendar/calendar-selection-appearance.d.ts +10 -0
  50. package/dist/components/data-display/calendar/calendar-selection-appearance.js +53 -39
  51. package/dist/components/data-display/calendar/calendar-selection.d.ts +25 -0
  52. package/dist/components/data-display/calendar/calendar-selection.js +52 -23
  53. package/dist/components/data-display/calendar/calendar-week-number-cell.d.ts +2 -1
  54. package/dist/components/data-display/calendar/calendar-week-number-cell.js +59 -45
  55. package/dist/components/data-display/calendar/calendar-week-utils.d.ts +15 -4
  56. package/dist/components/data-display/calendar/calendar-week-utils.js +59 -50
  57. package/dist/components/data-display/calendar/calendar-year-panes.d.ts +3 -0
  58. package/dist/components/data-display/calendar/calendar-year-panes.js +53 -49
  59. package/dist/components/data-display/calendar/calendar.js +146 -143
  60. package/dist/components/data-display/calendar/calendar.types.d.ts +5 -0
  61. package/dist/components/data-display/calendar/use-calendar-day-picker-config.d.ts +2 -1
  62. package/dist/components/data-display/calendar/use-calendar-day-picker-config.js +79 -74
  63. package/dist/components/data-display/calendar/use-calendar-state.d.ts +3 -1
  64. package/dist/components/data-display/calendar/use-calendar-state.js +394 -314
  65. package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
  66. package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
  67. package/dist/components/flows/filter-panel/filter-panel.js +4 -4
  68. package/dist/components/forms/date-picker/date-picker.js +60 -58
  69. package/dist/components/forms/date-picker/date-picker.types.d.ts +5 -0
  70. package/dist/components/forms/date-picker/date-range-picker.js +66 -64
  71. package/dist/components/forms/date-picker/fiscal-pass-through.d.ts +1 -0
  72. package/dist/components/forms/date-picker/fiscal-pass-through.js +3 -2
  73. package/dist/components/forms/date-picker/fiscal-picker-fixtures.d.ts +17 -0
  74. package/dist/components/forms/date-picker/month-picker.js +61 -59
  75. package/dist/components/forms/date-picker/month-range-picker.js +63 -61
  76. package/dist/components/forms/date-picker/multi-date-picker.js +51 -49
  77. package/dist/components/forms/date-picker/multi-month-picker.js +49 -47
  78. package/dist/components/forms/date-picker/multi-quarter-picker.js +51 -47
  79. package/dist/components/forms/date-picker/multi-week-picker.js +53 -51
  80. package/dist/components/forms/date-picker/multi-year-picker.js +53 -49
  81. package/dist/components/forms/date-picker/quarter-picker.js +51 -47
  82. package/dist/components/forms/date-picker/quarter-range-picker.js +50 -46
  83. package/dist/components/forms/date-picker/week-picker.js +130 -126
  84. package/dist/components/forms/date-picker/week-range-picker.js +159 -155
  85. package/dist/components/forms/date-picker/year-picker.js +52 -48
  86. package/dist/components/forms/date-picker/year-range-picker.js +52 -48
  87. package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
  88. package/dist/components/forms/select/components/Submenu.js +3 -2
  89. package/dist/form-react/Fields/DateInputField.js +51 -50
  90. package/dist/form-react/Fields/DateRangeField.js +14 -13
  91. package/dist/form-react/Fields/MonthRangeField.js +29 -28
  92. package/dist/form-react/Fields/MultiMonthPickerField.js +13 -12
  93. package/dist/form-react/Fields/MultiWeekPickerField.js +35 -27
  94. package/dist/form-react/Fields/MultiYearPickerField.d.ts +8 -0
  95. package/dist/form-react/Fields/MultiYearPickerField.js +57 -0
  96. package/dist/form-react/Fields/WeekRangePicker.js +33 -32
  97. package/dist/form-react/Fields/YearPickerField.d.ts +8 -0
  98. package/dist/form-react/Fields/YearPickerField.js +57 -0
  99. package/dist/form-react/Fields/YearRangePickerField.d.ts +8 -0
  100. package/dist/form-react/Fields/YearRangePickerField.js +57 -0
  101. package/dist/form-react/registry/defaultFieldRegistrations.d.ts +1 -1
  102. package/dist/form-react/registry/defaultFieldRegistrations.js +16 -13
  103. package/dist/form-react/types/fields.types.d.ts +69 -1
  104. package/dist/form-react/types/fieldsOutput.types.d.ts +8 -2
  105. package/dist/form-react/utils/fieldDefaults.utils.js +1 -1
  106. package/dist/impact-nova-components.css +13 -6
  107. package/dist/impact-nova.css +1 -1
  108. package/dist/lib/fiscal-calendar/index.d.ts +2 -2
  109. package/dist/lib/fiscal-calendar/index.js +26 -28
  110. package/dist/lib/fiscal-calendar/types.d.ts +0 -7
  111. package/dist/lib/fiscal-calendar/week-selection.d.ts +3 -4
  112. package/dist/lib/fiscal-calendar/week-selection.js +52 -79
  113. package/dist/llms/rules/ag-grid.js +1 -1
  114. package/dist/llms/rules/installation.js +1 -1
  115. package/dist/llms/rules/requirements.js +1 -1
  116. package/package.json +1 -1
  117. package/dist/components/data/data-table/column-picker-authority.d.ts +0 -34
  118. package/dist/components/data/data-table/column-picker-authority.js +0 -116
  119. package/dist/components/data/data-table/column-picker-drop-validation.d.ts +0 -7
  120. package/dist/components/data/data-table/column-picker-drop-validation.js +0 -37
  121. package/dist/components/data/data-table/data-table-column-list-tree-apply.d.ts +0 -10
  122. package/dist/components/data/data-table/data-table-column-list-tree-apply.js +0 -79
  123. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.d.ts +0 -26
  124. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.js +0 -195
  125. package/dist/components/data/data-table/data-table-picker-column-eligibility.d.ts +0 -1
  126. package/dist/components/data/data-table/data-table-picker-column-eligibility.js +0 -7
  127. package/dist/components/data/data-table/reconcile-column-tree-from-grid.d.ts +0 -12
  128. package/dist/components/data/data-table/reconcile-column-tree-from-grid.js +0 -12
  129. package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.d.ts +0 -24
  130. package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.js +0 -128
  131. package/dist/components/data/nested-list/nested-list-display-utils.d.ts +0 -11
  132. package/dist/components/data/nested-list/nested-list-display-utils.js +0 -74
  133. package/dist/components/data/nested-list/nested-list-drop-engine.d.ts +0 -31
  134. package/dist/components/data/nested-list/nested-list-drop-engine.js +0 -209
  135. package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.d.ts +0 -26
  136. package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.js +0 -67
  137. package/dist/components/data/nested-list/nested-list-item-tree-mutations.d.ts +0 -4
  138. package/dist/components/data/nested-list/nested-list-item-tree-mutations.js +0 -43
  139. package/dist/components/data/nested-list/nested-list-lazy-flat-rows.d.ts +0 -3
  140. package/dist/components/data/nested-list/nested-list-lazy-flat-rows.js +0 -34
  141. package/dist/components/data/nested-list/nested-list-row-estimates.d.ts +0 -9
  142. package/dist/components/data/nested-list/nested-list-row-estimates.js +0 -14
  143. package/dist/components/data/nested-list/nested-list-scroll-anchor.d.ts +0 -36
  144. package/dist/components/data/nested-list/nested-list-scroll-anchor.js +0 -47
  145. package/dist/components/data/nested-list/nested-list-virtual-drop.d.ts +0 -59
  146. package/dist/components/data/nested-list/nested-list-virtual-drop.js +0 -341
  147. package/dist/lib/hash/fnv1a128.d.ts +0 -16
  148. package/dist/lib/hash/fnv1a128.js +0 -21
@@ -1,6 +1,7 @@
1
1
  import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
2
  import { Tooltip as l, TooltipTrigger as n, TooltipContent as o } from "./tooltip.js";
3
- const d = (i, r, a) => /* @__PURE__ */ t(l, { children: [
3
+ import "react";
4
+ const p = (i, r, a) => /* @__PURE__ */ t(l, { children: [
4
5
  /* @__PURE__ */ e(n, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "inline-flex items-center justify-center h-full w-full", children: i }) }),
5
6
  /* @__PURE__ */ e(o, { variant: "tertiary", className: a, children: r })
6
7
  ] }), h = (i, r) => /* @__PURE__ */ t(l, { children: [
@@ -9,5 +10,5 @@ const d = (i, r, a) => /* @__PURE__ */ t(l, { children: [
9
10
  ] });
10
11
  export {
11
12
  h as defaultAccordionTooltipRender,
12
- d as defaultTabTooltipRender
13
+ p as defaultTabTooltipRender
13
14
  };
@@ -2,17 +2,17 @@ import { jsx as r, jsxs as h, Fragment as z } from "react/jsx-runtime";
2
2
  import * as o from "react";
3
3
  import { Person as G, Monitor as U, PriorityAlert as q, Locked as O, Reset as B } from "impact-nova-icons";
4
4
  import { cn as p } from "../../../lib/utils.js";
5
+ import { Kbd as $ } from "../../primitives/kbd/kbd.js";
6
+ import { keybindingToString as H } from "../../primitives/kbd/keybinding-display.js";
5
7
  import { OverflowTooltip as A } from "../../feedback/tooltip/overflow-tooltip.js";
6
- import { ModuleRegistry as $, AllCommunityModule as H } from "ag-grid-community";
7
- import { AllEnterpriseModule as V } from "ag-grid-enterprise";
8
- import { DataTable as J, DataTableContent as Q } from "../../data/data-table/data-table.js";
8
+ import { ModuleRegistry as V, AllCommunityModule as J } from "ag-grid-community";
9
+ import { AllEnterpriseModule as Q } from "ag-grid-enterprise";
10
+ import { DataTable as X, DataTableContent as Y } from "../../data/data-table/data-table.js";
9
11
  import { AG_CELL_NO_PADDING as F } from "../../data/ag-grid-react/cell-renderers/index.js";
10
- import { Kbd as X } from "../../primitives/kbd/kbd.js";
11
- import { keybindingToString as Y } from "../../primitives/kbd/keybinding-display.js";
12
12
  import { useCommandPalette as Z } from "./use-command-palette.js";
13
13
  import { COMMAND_SOURCE_LABELS as m, keybindingFromEvent as W, isReservedShortcut as ee } from "./utils.js";
14
14
  import { BadgeCellRenderer as te } from "../../data/ag-grid-react/cell-renderers/badge-cell-renderer.js";
15
- $.registerModules([H, V]);
15
+ V.registerModules([J, Q]);
16
16
  function re(a) {
17
17
  const t = a.data;
18
18
  return t ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2 min-w-0 h-full", children: [
@@ -69,7 +69,7 @@ function ne(a) {
69
69
  "flex items-center justify-end h-full w-full text-end",
70
70
  t.customisable ? "cursor-pointer" : "cursor-default opacity-70"
71
71
  ),
72
- children: /* @__PURE__ */ r(X, { keybinding: t.keybinding, size: "sm" })
72
+ children: /* @__PURE__ */ r($, { keybinding: t.keybinding, size: "sm" })
73
73
  }
74
74
  ) : t.customisable ? /* @__PURE__ */ r(
75
75
  "button",
@@ -133,7 +133,7 @@ function le({
133
133
  description: e.description || "",
134
134
  category: e.category || "General",
135
135
  keybinding: i,
136
- keybindingDisplay: i ? Y(i) : "",
136
+ keybindingDisplay: i ? H(i) : "",
137
137
  scope: e.scope,
138
138
  source: D,
139
139
  sourceColor: T ? "primary" : "neutral",
@@ -278,10 +278,10 @@ function le({
278
278
  u?.type === "conflict" ? /* @__PURE__ */ r(q, { className: "h-3.5 w-3.5 shrink-0" }) : u?.type === "reserved" ? /* @__PURE__ */ r(O, { className: "h-3.5 w-3.5 shrink-0" }) : c ? /* @__PURE__ */ r("span", { className: "shrink-0 text-base", children: "⌨️" }) : null,
279
279
  /* @__PURE__ */ r("span", { children: u ? u.text : L })
280
280
  ] }) : null;
281
- return /* @__PURE__ */ h(J, { className: p("flex flex-col w-full h-full border-t-0", a), children: [
281
+ return /* @__PURE__ */ h(X, { className: p("flex flex-col w-full h-full border-t-0", a), children: [
282
282
  s ? s(E) : E,
283
283
  /* @__PURE__ */ r(
284
- Q,
284
+ Y,
285
285
  {
286
286
  rowData: y,
287
287
  columnDefs: I,
@@ -6,8 +6,8 @@ import { cn as o } from "../../../lib/utils.js";
6
6
  import { MultiColorFilter as F, Cross as P, InfoBadge as u } from "impact-nova-icons";
7
7
  import { Button as D } from "../../primitives/button/button.js";
8
8
  import { Tooltip as c, TooltipTrigger as f, TooltipContent as h } from "../../feedback/tooltip/tooltip.js";
9
- import { OverflowTooltip as S } from "../../feedback/tooltip/overflow-tooltip.js";
10
- import { Kbd as j } from "../../primitives/kbd/kbd.js";
9
+ import { Kbd as S } from "../../primitives/kbd/kbd.js";
10
+ import { OverflowTooltip as j } from "../../feedback/tooltip/overflow-tooltip.js";
11
11
  import { useImpactNovaI18n as v } from "../../../i18n/use-impact-nova-i18n.js";
12
12
  import { useOverlayHostDismissNestedLayersOnNavigation as I } from "../../../lib/overlay/overlay-portal-context.js";
13
13
  import { preventDismissOnTooltipOutside as x } from "../../../lib/overlay/prevent-dismiss-on-tooltip-outside.js";
@@ -145,14 +145,14 @@ const O = ({
145
145
  ),
146
146
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1 min-w-0", children: [
147
147
  /* @__PURE__ */ e(
148
- S,
148
+ j,
149
149
  {
150
150
  triggerClassName: "truncate font-['Manrope'] block min-w-0",
151
151
  content: t.tooltipKeybinding ? /* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
152
152
  t.label,
153
153
  " ",
154
154
  /* @__PURE__ */ e(
155
- j,
155
+ S,
156
156
  {
157
157
  keybinding: t.tooltipKeybinding,
158
158
  size: "sm"
@@ -1,20 +1,20 @@
1
1
  import { jsx as s, jsxs as S } from "react/jsx-runtime";
2
2
  import * as r from "react";
3
- import { Cross as De, CalendarMonth as ge } from "impact-nova-icons";
3
+ import { Cross as ge, CalendarMonth as ye } from "impact-nova-icons";
4
4
  import { format as b } from "date-fns";
5
- import { cn as ye } from "../../../lib/utils.js";
6
- import { usePickerDismissActionsRef as ke, usePickerFooterDismissNudge as ve, isDateInputInvalid as Ce, resolveSingleValueDismissFlash as Ie, handlePickerEscapeKeyDown as Pe, handlePickerSurfacePointerDown as Me, maskDateInput as xe, parseDateInput as Re, resolveDateInputOnBlur as Se, resolveDateInputOnEnter as be } from "./date-input-behavior.js";
7
- import { Input as we } from "../input/input.js";
8
- import { Calendar as Te } from "../../data-display/calendar/calendar.js";
5
+ import { cn as ke } from "../../../lib/utils.js";
6
+ import { usePickerDismissActionsRef as ve, usePickerFooterDismissNudge as Ce, isDateInputInvalid as Ie, resolveSingleValueDismissFlash as Pe, handlePickerEscapeKeyDown as Me, handlePickerSurfacePointerDown as xe, maskDateInput as Re, parseDateInput as Se, resolveDateInputOnBlur as be, resolveDateInputOnEnter as we } from "./date-input-behavior.js";
7
+ import { Input as Te } from "../input/input.js";
8
+ import { Calendar as Ee } from "../../data-display/calendar/calendar.js";
9
9
  import { Tooltip as K, TooltipTrigger as j, TooltipContent as B } from "../../feedback/tooltip/tooltip.js";
10
- import { useImpactNovaI18n as Ee } from "../../../i18n/use-impact-nova-i18n.js";
11
- import { getDateFnsLocale as Ae } from "../../../i18n/getDateFnsLocale.js";
12
- import { createComponent as Ne } from "../../../lib/primitives/create-component.js";
13
- import { coerceSingleDateApply as Le, coerceSingleDate as Oe } from "./calendar-selection-adapters.js";
14
- import { buildDateBoundsMatcher as Ve } from "../../../lib/date-bounds-matcher.js";
15
- import { fiscalCalendarPassThrough as Ke } from "./fiscal-pass-through.js";
16
- import { DatePickerShell as je } from "./date-picker-shell.js";
17
- const et = Ne(
10
+ import { useImpactNovaI18n as Ae } from "../../../i18n/use-impact-nova-i18n.js";
11
+ import { getDateFnsLocale as Ne } from "../../../i18n/getDateFnsLocale.js";
12
+ import { createComponent as Le } from "../../../lib/primitives/create-component.js";
13
+ import { coerceSingleDateApply as Oe, coerceSingleDate as Ve } from "./calendar-selection-adapters.js";
14
+ import { buildDateBoundsMatcher as Ke } from "../../../lib/date-bounds-matcher.js";
15
+ import { fiscalCalendarPassThrough as je } from "./fiscal-pass-through.js";
16
+ import { DatePickerShell as Be } from "./date-picker-shell.js";
17
+ const tt = Le(
18
18
  "DatePicker",
19
19
  ({
20
20
  value: n,
@@ -37,13 +37,14 @@ const et = Ne(
37
37
  fiscalConfig: _,
38
38
  showPresets: $,
39
39
  showPeriodBoundaries: F,
40
- comparison: ee,
41
- onComparisonChange: te,
42
- ...ne
43
- }, re) => {
44
- const { locale: T, t: h } = Ee(), f = r.useMemo(() => Ae(T), [T]), ie = z ?? h("datePicker.selectDate"), g = r.useRef(null), E = r.useRef(null), I = r.useRef(null);
45
- r.useImperativeHandle(re, () => g.current);
46
- const [i, A] = r.useState(!1), N = ke(), { footerFlashKey: oe, footerFlashTarget: se, popoverHandlers: ce } = ve(a, i, N, E), y = r.useRef(!1), [x, o] = r.useState(null), k = n ? b(n, l, { locale: f }) : "", d = x?.input ?? k, P = i ? x?.pending ?? n : n, le = x?.viewMonth ?? n ?? /* @__PURE__ */ new Date(), u = r.useCallback(() => {
40
+ autoNavigateToAvailable: ee,
41
+ comparison: te,
42
+ onComparisonChange: ne,
43
+ ...re
44
+ }, ie) => {
45
+ const { locale: T, t: h } = Ae(), f = r.useMemo(() => Ne(T), [T]), oe = z ?? h("datePicker.selectDate"), g = r.useRef(null), E = r.useRef(null), I = r.useRef(null);
46
+ r.useImperativeHandle(ie, () => g.current);
47
+ const [i, A] = r.useState(!1), N = ve(), { footerFlashKey: se, footerFlashTarget: ce, popoverHandlers: le } = Ce(a, i, N, E), y = r.useRef(!1), [x, o] = r.useState(null), k = n ? b(n, l, { locale: f }) : "", d = x?.input ?? k, P = i ? x?.pending ?? n : n, ae = x?.viewMonth ?? n ?? /* @__PURE__ */ new Date(), u = r.useCallback(() => {
47
48
  o(null), A(!1);
48
49
  }, []), m = (e) => {
49
50
  if (!c) {
@@ -61,13 +62,13 @@ const et = Ne(
61
62
  r.useEffect(() => {
62
63
  g.current && I.current !== null && (g.current.setSelectionRange(I.current, I.current), I.current = null);
63
64
  }, [d]);
64
- const ae = (e) => {
65
- const t = Oe(e), D = t ? b(t, l, { locale: f }) : "";
65
+ const ue = (e) => {
66
+ const t = Ve(e), D = t ? b(t, l, { locale: f }) : "";
66
67
  o(
67
68
  (v) => v ? { ...v, pending: t, input: D, viewMonth: t ?? v.viewMonth } : null
68
69
  ), t && !a && (p?.(t), u());
69
70
  }, L = (e) => {
70
- const t = Le(e, P);
71
+ const t = Oe(e, P);
71
72
  p?.(t), u();
72
73
  }, R = () => {
73
74
  u();
@@ -82,27 +83,27 @@ const et = Ne(
82
83
  viewMonth: n ?? /* @__PURE__ */ new Date()
83
84
  }),
84
85
  [k, n]
85
- ), ue = (e) => {
86
- const t = xe(e.target.value, l, d);
86
+ ), pe = (e) => {
87
+ const t = Re(e.target.value, l, d);
87
88
  if (o((C) => ({ ...C ?? M(), input: t })), t === "") {
88
89
  o((C) => ({ ...C ?? M(), input: "", pending: void 0 })), a || p?.(void 0);
89
90
  return;
90
91
  }
91
- const { parsed: D, isValid: v } = Re(t, l, f);
92
+ const { parsed: D, isValid: v } = Se(t, l, f);
92
93
  v && D && (o((C) => ({
93
94
  ...C ?? M(),
94
95
  input: t,
95
96
  pending: D,
96
97
  viewMonth: D
97
98
  })), a || p?.(D));
98
- }, pe = r.useCallback(
99
+ }, fe = r.useCallback(
99
100
  (e) => {
100
101
  p?.(e), u();
101
102
  },
102
103
  [p, u]
103
- ), fe = () => {
104
+ ), de = () => {
104
105
  if (i) return;
105
- const e = Se(
106
+ const e = be(
106
107
  d,
107
108
  l,
108
109
  k,
@@ -122,19 +123,19 @@ const et = Ne(
122
123
  return;
123
124
  }
124
125
  o(null);
125
- }, de = () => {
126
+ }, me = () => {
126
127
  if (i && a) {
127
128
  L();
128
129
  return;
129
130
  }
130
- const e = be(d, l, f);
131
+ const e = we(d, l, f);
131
132
  if (e.parsed) {
132
- a && pe(e.parsed);
133
+ a && fe(e.parsed);
133
134
  return;
134
135
  }
135
136
  i || (y.current = !0, m(!0));
136
- }, V = (n ? b(n, l, { locale: f }) : "") !== d, me = Ce(d, l, f), he = r.useCallback(
137
- () => Ie(
137
+ }, V = (n ? b(n, l, { locale: f }) : "") !== d, he = Ie(d, l, f), De = r.useCallback(
138
+ () => Pe(
138
139
  P,
139
140
  n,
140
141
  (e, t) => e.getTime() === t.getTime()
@@ -144,10 +145,10 @@ const et = Ne(
144
145
  return r.useLayoutEffect(() => {
145
146
  N.current = {
146
147
  onDismiss: R,
147
- resolveFlash: he
148
+ resolveFlash: De
148
149
  };
149
150
  }), /* @__PURE__ */ s(
150
- je,
151
+ Be,
151
152
  {
152
153
  open: i,
153
154
  disabled: c,
@@ -156,7 +157,7 @@ const et = Ne(
156
157
  onOpenAutoFocus: (e) => {
157
158
  y.current || e.preventDefault(), y.current = !1;
158
159
  },
159
- popoverHandlers: ce,
160
+ popoverHandlers: le,
160
161
  trigger: /* @__PURE__ */ s(
161
162
  "div",
162
163
  {
@@ -164,29 +165,29 @@ const et = Ne(
164
165
  "data-component": "date-picker",
165
166
  "data-state": i ? "open" : "closed",
166
167
  "data-pending": V || void 0,
167
- onPointerDown: (e) => Me({
168
+ onPointerDown: (e) => xe({
168
169
  disabled: c,
169
170
  event: e,
170
171
  onOpen: () => m(!0),
171
172
  focusField: () => g.current?.focus()
172
173
  }),
173
174
  children: /* @__PURE__ */ s(
174
- we,
175
+ Te,
175
176
  {
176
177
  ref: g,
177
178
  value: d,
178
- onChange: ue,
179
- onBlur: fe,
179
+ onChange: pe,
180
+ onBlur: de,
180
181
  onClick: () => !c && m(!0),
181
182
  onKeyDown: (e) => {
182
- e.key === "Enter" && !c && (e.preventDefault(), de()), e.key === "ArrowDown" && !i && !c && (e.preventDefault(), y.current = !0, m(!0)), e.key === "Escape" && i && Pe(e, { open: i, onCancel: R });
183
+ e.key === "Enter" && !c && (e.preventDefault(), me()), e.key === "ArrowDown" && !i && !c && (e.preventDefault(), y.current = !0, m(!0)), e.key === "Escape" && i && Me(e, { open: i, onCancel: R });
183
184
  },
184
- placeholder: i ? l : ie,
185
+ placeholder: i ? l : oe,
185
186
  disabled: c,
186
187
  "data-form-control": "input",
187
- className: ye(
188
+ className: ke(
188
189
  "cursor-pointer",
189
- me ? "text-destructive" : V ? "text-content-placeholder" : "",
190
+ he ? "text-destructive" : V ? "text-content-placeholder" : "",
190
191
  Q
191
192
  ),
192
193
  suffix: /* @__PURE__ */ S("div", { className: "flex items-center gap-1", children: [
@@ -201,7 +202,7 @@ const et = Ne(
201
202
  e.stopPropagation(), O();
202
203
  },
203
204
  className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
204
- children: /* @__PURE__ */ s(De, { className: "size-3 hover:text-content" })
205
+ children: /* @__PURE__ */ s(ge, { className: "size-3 hover:text-content" })
205
206
  }
206
207
  ) }),
207
208
  /* @__PURE__ */ s(B, { variant: "tertiary", side: "top", children: h("calendar.clear") })
@@ -211,28 +212,28 @@ const et = Ne(
211
212
  e.stopPropagation(), c || (i ? u() : m(!0));
212
213
  }, onKeyDown: (e) => {
213
214
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), c || (y.current = !0, i ? u() : m(!0)));
214
- }, className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer", children: /* @__PURE__ */ s(ge, { className: "h-4 w-4 text-secondary-foreground" }) }) }),
215
+ }, className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer", children: /* @__PURE__ */ s(ye, { className: "h-4 w-4 text-secondary-foreground" }) }) }),
215
216
  /* @__PURE__ */ s(B, { variant: "tertiary", side: "top", children: h("datePicker.selectDate") })
216
217
  ] })
217
218
  ] }),
218
- ...ne
219
+ ...re
219
220
  }
220
221
  )
221
222
  }
222
223
  ),
223
224
  children: /* @__PURE__ */ s(
224
- Te,
225
+ Ee,
225
226
  {
226
227
  mode: "single",
227
228
  selected: P,
228
- footerFlashKey: oe,
229
- footerFlashTarget: se,
230
- onSelect: ae,
231
- month: le,
229
+ footerFlashKey: se,
230
+ footerFlashTarget: ce,
231
+ onSelect: ue,
232
+ month: ae,
232
233
  onMonthChange: (e) => o(
233
234
  (t) => t ? { ...t, viewMonth: e } : null
234
235
  ),
235
- disabled: Ve(H, q),
236
+ disabled: Ke(H, q),
236
237
  startMonth: G,
237
238
  endMonth: J,
238
239
  showFooter: a,
@@ -241,7 +242,7 @@ const et = Ne(
241
242
  onClear: O,
242
243
  captionLayout: "dropdown",
243
244
  ...w !== void 0 ? { weekStartsOn: w } : {},
244
- ...Ke({
245
+ ...je({
245
246
  calendarKind: U,
246
247
  fiscalMode: W,
247
248
  granularity: X,
@@ -250,8 +251,9 @@ const et = Ne(
250
251
  fiscalConfig: _,
251
252
  showPresets: $,
252
253
  showPeriodBoundaries: F,
253
- comparison: ee,
254
- onComparisonChange: te
254
+ autoNavigateToAvailable: ee,
255
+ comparison: te,
256
+ onComparisonChange: ne
255
257
  })
256
258
  }
257
259
  )
@@ -260,5 +262,5 @@ const et = Ne(
260
262
  }
261
263
  );
262
264
  export {
263
- et as DatePicker
265
+ tt as DatePicker
264
266
  };
@@ -13,6 +13,11 @@ export interface FiscalPickerProps {
13
13
  showPresets?: boolean;
14
14
  /** Draw `(` / `)` on fiscal period start/end days. Default false. */
15
15
  showPeriodBoundaries?: boolean;
16
+ /**
17
+ * When true and there is no selection, open on the first enabled period.
18
+ * Navigate only — does not select a value. Default false.
19
+ */
20
+ autoNavigateToAvailable?: boolean;
16
21
  comparison?: "prior-fy";
17
22
  onComparisonChange?: (value: YoYComparison | undefined) => void;
18
23
  }