impact-nova 2.2.9 → 2.4.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 (154) hide show
  1. package/dist/components/data/ag-grid-react/headers/utils/filter-utils.js +9 -9
  2. package/dist/components/data-display/calendar/calendar-day-picker-components.js +69 -56
  3. package/dist/components/data-display/calendar/calendar-padding-week.utils.d.ts +5 -0
  4. package/dist/components/data-display/calendar/calendar-padding-week.utils.js +6 -0
  5. package/dist/components/data-display/calendar/calendar.types.d.ts +1 -1
  6. package/dist/components/forms/combobox/combobox.js +185 -160
  7. package/dist/components/forms/combobox/combobox.types.d.ts +2 -0
  8. package/dist/filter-shell/index.d.ts +12 -0
  9. package/dist/filter-shell/index.js +9 -0
  10. package/dist/filter-shell/utils/buildFilterFieldValidationRules.d.ts +1 -0
  11. package/dist/filter-shell/utils/validateVisibleRequiredFilterFields.d.ts +1 -0
  12. package/dist/filter-shell/utils/validationNavigation.utils.d.ts +26 -0
  13. package/dist/filter-shell/utils/validationNavigation.utils.js +38 -0
  14. package/dist/form-engine/field-dependency-graph.d.ts +17 -0
  15. package/dist/form-engine/field-dependency-graph.js +90 -0
  16. package/dist/form-engine/index.d.ts +9 -0
  17. package/dist/form-engine/index.js +16 -0
  18. package/dist/form-engine/is-empty-value.d.ts +1 -0
  19. package/dist/form-engine/is-empty-value.js +8 -0
  20. package/dist/form-engine/types.d.ts +17 -0
  21. package/dist/form-react/Fields/ButtonsGroupField.d.ts +3 -0
  22. package/dist/form-react/Fields/ButtonsGroupField.js +52 -0
  23. package/dist/form-react/Fields/CheckboxField.d.ts +3 -0
  24. package/dist/form-react/Fields/CheckboxField.js +46 -0
  25. package/dist/form-react/Fields/ChipsField.d.ts +3 -0
  26. package/dist/form-react/Fields/ChipsField.js +146 -0
  27. package/dist/form-react/Fields/DateInputField.d.ts +8 -0
  28. package/dist/form-react/Fields/DateInputField.js +134 -0
  29. package/dist/form-react/Fields/DateRangeField.d.ts +8 -0
  30. package/dist/form-react/Fields/DateRangeField.js +57 -0
  31. package/dist/form-react/Fields/DividerField.d.ts +3 -0
  32. package/dist/form-react/Fields/DividerField.js +9 -0
  33. package/dist/form-react/Fields/DividerWithLabelField.d.ts +3 -0
  34. package/dist/form-react/Fields/DividerWithLabelField.js +31 -0
  35. package/dist/form-react/Fields/FileUploadField.d.ts +3 -0
  36. package/dist/form-react/Fields/FileUploadField.js +42 -0
  37. package/dist/form-react/Fields/FillFormByFileUploadField.d.ts +3 -0
  38. package/dist/form-react/Fields/FillFormByFileUploadField.js +65 -0
  39. package/dist/form-react/Fields/FillFormByPasteField.d.ts +3 -0
  40. package/dist/form-react/Fields/FillFormByPasteField.js +106 -0
  41. package/dist/form-react/Fields/LabelField.d.ts +3 -0
  42. package/dist/form-react/Fields/LabelField.js +14 -0
  43. package/dist/form-react/Fields/MonthRangeField.d.ts +8 -0
  44. package/dist/form-react/Fields/MonthRangeField.js +72 -0
  45. package/dist/form-react/Fields/MultiMonthPickerField.d.ts +8 -0
  46. package/dist/form-react/Fields/MultiMonthPickerField.js +46 -0
  47. package/dist/form-react/Fields/MultiWeekPickerField.d.ts +8 -0
  48. package/dist/form-react/Fields/MultiWeekPickerField.js +47 -0
  49. package/dist/form-react/Fields/NumericComboboxField.d.ts +18 -0
  50. package/dist/form-react/Fields/NumericComboboxField.js +51 -0
  51. package/dist/form-react/Fields/RadioField.d.ts +3 -0
  52. package/dist/form-react/Fields/RadioField.js +68 -0
  53. package/dist/form-react/Fields/SelectField.d.ts +3 -0
  54. package/dist/form-react/Fields/SelectField.js +76 -0
  55. package/dist/form-react/Fields/SwitchField.d.ts +3 -0
  56. package/dist/form-react/Fields/SwitchField.js +47 -0
  57. package/dist/form-react/Fields/TextAreaField.d.ts +3 -0
  58. package/dist/form-react/Fields/TextAreaField.js +41 -0
  59. package/dist/form-react/Fields/TextField.d.ts +3 -0
  60. package/dist/form-react/Fields/TextField.js +75 -0
  61. package/dist/form-react/Fields/TextFieldWithBackendValidation.d.ts +3 -0
  62. package/dist/form-react/Fields/TextFieldWithBackendValidation.js +117 -0
  63. package/dist/form-react/Fields/WeekRangePicker.d.ts +8 -0
  64. package/dist/form-react/Fields/WeekRangePicker.js +71 -0
  65. package/dist/form-react/ReactHooksForm.d.ts +3 -0
  66. package/dist/form-react/ReactHooksForm.js +132 -0
  67. package/dist/form-react/components/ArrayFieldRenderer.d.ts +13 -0
  68. package/dist/form-react/components/ArrayFieldRenderer.js +90 -0
  69. package/dist/form-react/components/FieldRenderer.d.ts +16 -0
  70. package/dist/form-react/components/FieldRenderer.js +68 -0
  71. package/dist/form-react/components/FormFieldRow.d.ts +13 -0
  72. package/dist/form-react/components/FormFieldRow.js +47 -0
  73. package/dist/form-react/components/FormFileUploadWrapper.d.ts +22 -0
  74. package/dist/form-react/components/FormFileUploadWrapper.js +88 -0
  75. package/dist/form-react/components/ObjectFieldRenderer.d.ts +13 -0
  76. package/dist/form-react/components/ObjectFieldRenderer.js +46 -0
  77. package/dist/form-react/components/SetToEmptyWrapper.d.ts +16 -0
  78. package/dist/form-react/components/SetToEmptyWrapper.js +49 -0
  79. package/dist/form-react/fields.d.ts +23 -0
  80. package/dist/form-react/fields.js +40 -0
  81. package/dist/form-react/hooks/useCascadingForm.d.ts +17 -0
  82. package/dist/form-react/hooks/useCascadingForm.js +122 -0
  83. package/dist/form-react/hooks/useFieldVisibility.d.ts +14 -0
  84. package/dist/form-react/hooks/useFieldVisibility.js +60 -0
  85. package/dist/form-react/hooks/useFillFormByFileUpload.d.ts +33 -0
  86. package/dist/form-react/hooks/useFillFormByFileUpload.js +199 -0
  87. package/dist/form-react/hooks/useFillFormByPaste.d.ts +33 -0
  88. package/dist/form-react/hooks/useFillFormByPaste.js +104 -0
  89. package/dist/form-react/hooks/useFormFieldChangeSubscription.d.ts +13 -0
  90. package/dist/form-react/hooks/useFormFieldChangeSubscription.js +42 -0
  91. package/dist/form-react/hooks/useReactHookForm.d.ts +3 -0
  92. package/dist/form-react/hooks/useReactHookForm.js +161 -0
  93. package/dist/form-react/hooks/useSelectOptions.d.ts +8 -0
  94. package/dist/form-react/hooks/useSelectOptions.js +116 -0
  95. package/dist/form-react/index.d.ts +62 -0
  96. package/dist/form-react/index.js +97 -0
  97. package/dist/form-react/registry/defaultFieldRegistrations.d.ts +2 -0
  98. package/dist/form-react/registry/defaultFieldRegistrations.js +30 -0
  99. package/dist/form-react/registry/fieldRegistry.d.ts +14 -0
  100. package/dist/form-react/registry/fieldRegistry.js +19 -0
  101. package/dist/form-react/registry/resolveFieldComponent.d.ts +10 -0
  102. package/dist/form-react/registry/resolveFieldComponent.js +137 -0
  103. package/dist/form-react/types/fields.types.d.ts +402 -0
  104. package/dist/form-react/types/fieldsOutput.types.d.ts +73 -0
  105. package/dist/form-react/types/reactHookForm.types.d.ts +196 -0
  106. package/dist/form-react/utils/batchFormFieldUpdates.d.ts +14 -0
  107. package/dist/form-react/utils/batchFormFieldUpdates.js +13 -0
  108. package/dist/form-react/utils/buildFieldValidationRules.d.ts +6 -0
  109. package/dist/form-react/utils/buildFieldValidationRules.js +13 -0
  110. package/dist/form-react/utils/buildSelectRemountKey.d.ts +14 -0
  111. package/dist/form-react/utils/buildSelectRemountKey.js +14 -0
  112. package/dist/form-react/utils/calendar-boundary.d.ts +3 -0
  113. package/dist/form-react/utils/calendar-boundary.js +33 -0
  114. package/dist/form-react/utils/date.utils.d.ts +31 -0
  115. package/dist/form-react/utils/date.utils.js +86 -0
  116. package/dist/form-react/utils/evaluateFieldValidation.d.ts +19 -0
  117. package/dist/form-react/utils/evaluateFieldValidation.js +53 -0
  118. package/dist/form-react/utils/fieldDefaults.utils.d.ts +6 -0
  119. package/dist/form-react/utils/fieldDefaults.utils.js +25 -0
  120. package/dist/form-react/utils/fieldPath.utils.d.ts +23 -0
  121. package/dist/form-react/utils/fieldPath.utils.js +26 -0
  122. package/dist/form-react/utils/fieldRangeValidation.utils.d.ts +3 -0
  123. package/dist/form-react/utils/fieldRangeValidation.utils.js +24 -0
  124. package/dist/form-react/utils/fieldRendererUtils.d.ts +10 -0
  125. package/dist/form-react/utils/fieldRendererUtils.js +47 -0
  126. package/dist/form-react/utils/fieldTestIds.d.ts +3 -0
  127. package/dist/form-react/utils/fieldTestIds.js +13 -0
  128. package/dist/form-react/utils/formDate.utils.d.ts +13 -0
  129. package/dist/form-react/utils/formDate.utils.js +9 -0
  130. package/dist/form-react/utils/formValidationFeedback.utils.d.ts +32 -0
  131. package/dist/form-react/utils/formValidationFeedback.utils.js +153 -0
  132. package/dist/form-react/utils/icons.d.ts +5 -0
  133. package/dist/form-react/utils/icons.js +10 -0
  134. package/dist/form-react/utils/optionFlag.d.ts +11 -0
  135. package/dist/form-react/utils/optionFlag.js +17 -0
  136. package/dist/form-react/utils/pastedValues.d.ts +1 -0
  137. package/dist/form-react/utils/resolveFormSubmittable.d.ts +18 -0
  138. package/dist/form-react/utils/resolveFormSubmittable.js +32 -0
  139. package/dist/form-react/utils/select-option-filter-values.d.ts +5 -0
  140. package/dist/form-react/utils/select-option-filter-values.js +30 -0
  141. package/dist/form-react/utils/serializeFormStateForQueryKey.d.ts +1 -0
  142. package/dist/form-react/utils/serializeFormStateForQueryKey.js +21 -0
  143. package/dist/form-react/utils/stableSerialize.d.ts +5 -0
  144. package/dist/form-react/utils/stableSerialize.js +11 -0
  145. package/dist/form-react/utils/validateVisibleRequiredFormFields.d.ts +21 -0
  146. package/dist/form-react/utils/validateVisibleRequiredFormFields.js +64 -0
  147. package/dist/form-react/utils/validationUtils.d.ts +3 -0
  148. package/dist/form-react/utils/validationUtils.js +77 -0
  149. package/dist/impact-nova.css +1 -1
  150. package/dist/lib/primitives/use-field-chrome.js +16 -16
  151. package/dist/llms/rules/installation.js +1 -1
  152. package/dist/llms/rules/real-world-patterns.js +1 -1
  153. package/dist/llms/rules/requirements.js +1 -1
  154. package/package.json +21 -2
@@ -1,4 +1,4 @@
1
- import { DEFAULT_DATE_DISPLAY_FORMAT as O, isoToDisplay as S, getTodayStr as b, getYesterdayStr as W, getMonthRange as F, getYearRange as x } from "./date-utils.js";
1
+ import { DEFAULT_DATE_DISPLAY_FORMAT as O, isoToDisplay as C, getTodayStr as b, getYesterdayStr as W, getMonthRange as S, getYearRange as F } from "./date-utils.js";
2
2
  const v = {
3
3
  yes: !0,
4
4
  true: !0,
@@ -96,14 +96,14 @@ function E(i, n = !1, e = !1) {
96
96
  if (a === "today") return { operator: "equals", value: b() };
97
97
  if (a === "yesterday") return { operator: "equals", value: W() };
98
98
  if (/^\d{4}$/.test(t)) {
99
- const r = x(Number(t));
99
+ const r = F(Number(t));
100
100
  return { operator: "inRange", value: r.from, valueTo: r.to };
101
101
  }
102
102
  const o = t.match(/^([a-zA-Z]+)\s*(\d{4})$/);
103
103
  if (o) {
104
104
  const r = $[o[1].toLowerCase()];
105
105
  if (r) {
106
- const l = F(r, Number(o[2]));
106
+ const l = S(r, Number(o[2]));
107
107
  return { operator: "inRange", value: l.from, valueTo: l.to };
108
108
  }
109
109
  }
@@ -137,7 +137,7 @@ function m(i, n = O) {
137
137
  if (Array.isArray(i))
138
138
  return i.map((e) => m(e, n)).join(", ");
139
139
  if (/^\d{4}-\d{2}-\d{2}/.test(i)) {
140
- const e = S(i, n);
140
+ const e = C(i, n);
141
141
  if (e) return e;
142
142
  }
143
143
  return i;
@@ -175,7 +175,7 @@ function N(i, n = O) {
175
175
  return e;
176
176
  }
177
177
  }
178
- const C = {
178
+ const x = {
179
179
  contains: "contains",
180
180
  notContains: "notContains",
181
181
  equals: "equals",
@@ -211,7 +211,7 @@ function A(i, n, e = O) {
211
211
  }
212
212
  const t = n;
213
213
  if ("type" in t && t.type) {
214
- const s = t.type, c = C[s] || s, p = t.filter !== void 0 ? String(t.filter) : t.dateFrom !== void 0 ? String(t.dateFrom) : "", a = t.filterTo !== void 0 ? String(t.filterTo) : t.dateTo !== void 0 ? String(t.dateTo) : void 0;
214
+ const s = t.type, c = x[s] || s, p = t.filter !== void 0 ? String(t.filter) : t.dateFrom !== void 0 ? String(t.dateFrom) : "", a = t.filterTo !== void 0 ? String(t.filterTo) : t.dateTo !== void 0 ? String(t.dateTo) : void 0;
215
215
  return N({
216
216
  operator: c,
217
217
  value: p,
@@ -269,7 +269,7 @@ function h(i) {
269
269
  }
270
270
  }
271
271
  function M(i, n, e) {
272
- return e === "number" ? "number" : e === "date" ? "date" : e === "select" || e === "set" || Array.isArray(n) ? i === "notEqual" || i === "notContains" ? "text" : "set" : typeof n == "string" && /^\d{4}-\d{2}-\d{2}/.test(n) ? "date" : ["greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual", "inRange"].includes(i) && n && !I(n) && !isNaN(Number(n)) || typeof n == "string" && n && /^-?\d+(\.\d+)?$/.test(n.trim()) ? "number" : "text";
272
+ return e === "number" ? "number" : e === "date" ? "date" : e === "text" ? "text" : e === "select" || e === "set" || Array.isArray(n) ? i === "notEqual" || i === "notContains" ? "text" : "set" : typeof n == "string" && /^\d{4}-\d{2}-\d{2}/.test(n) ? "date" : ["greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual", "inRange"].includes(i) && n && !I(n) && !isNaN(Number(n)) || typeof n == "string" && n && /^-?\d+(\.\d+)?$/.test(n.trim()) ? "number" : "text";
273
273
  }
274
274
  function I(i) {
275
275
  return Array.isArray(i);
@@ -443,7 +443,7 @@ function V(i) {
443
443
  return o.conditions.flatMap((d) => p(d));
444
444
  if ("filterType" in o && o.filterType === "multi" && o.filterModels)
445
445
  return o.filterModels?.filter((d) => d != null).flatMap((d) => p(d)) ?? [];
446
- const r = o, l = "type" in r && r.type ? r.type : "equals", u = r.filterType === "set" ? "equals" : C[l] || "contains", f = r.values, g = r.filter !== void 0 ? String(r.filter) : r.dateFrom !== void 0 ? String(r.dateFrom) : f ? f.filter((d) => d != null) : "";
446
+ const r = o, l = "type" in r && r.type ? r.type : "equals", u = r.filterType === "set" ? "equals" : x[l] || "contains", f = r.values, g = r.filter !== void 0 ? String(r.filter) : r.dateFrom !== void 0 ? String(r.dateFrom) : f ? f.filter((d) => d != null) : "";
447
447
  return [{
448
448
  id: R(),
449
449
  columnId: t,
@@ -462,7 +462,7 @@ function V(i) {
462
462
  };
463
463
  }
464
464
  export {
465
- C as agToInternalOperator,
465
+ x as agToInternalOperator,
466
466
  V as convertFromAgGridFilterModel,
467
467
  k as convertToAgGridFilterModel,
468
468
  D as createEmptyRule,
@@ -1,52 +1,53 @@
1
- import { jsx as n, jsxs as k } from "react/jsx-runtime";
1
+ import { jsx as n, jsxs as R } from "react/jsx-runtime";
2
2
  import * as p from "react";
3
3
  import "react-day-picker";
4
4
  import { ChevronRight as C } from "impact-nova-icons";
5
- import { cn as d } from "../../../lib/utils.js";
5
+ import { cn as s } from "../../../lib/utils.js";
6
6
  import { Button as N } from "../../primitives/button/button.js";
7
7
  import { Select as D } from "../../forms/select/select.js";
8
- import { CalendarCaptionHeader as z } from "./calendar-caption-header.js";
9
- import { CalendarDayButton as O } from "./calendar-day-button.js";
8
+ import { CalendarCaptionHeader as Y } from "./calendar-caption-header.js";
9
+ import { CalendarDayButton as z } from "./calendar-day-button.js";
10
10
  import { PanelIndexContext as h } from "./calendar-panel-context.js";
11
- import { CalendarWeekNumberCell as W } from "./calendar-week-number-cell.js";
11
+ import { CalendarWeekNumberCell as O } from "./calendar-week-number-cell.js";
12
12
  import { getAvailableMonths as A } from "./calendar-month-utils.js";
13
- function X({
13
+ import { isCalendarPaddingWeek as F } from "./calendar-padding-week.utils.js";
14
+ function _({
14
15
  buttonVariant: u,
15
16
  pickerType: f,
16
- currentMonth: i,
17
+ currentMonth: d,
17
18
  monthsFull: w,
18
19
  resolvedStartMonth: b,
19
- resolvedEndMonth: I,
20
+ resolvedEndMonth: k,
20
21
  availableYears: v,
21
- weekStartsOn: M,
22
- previousMonthLabel: x,
23
- nextMonthLabel: g,
24
- monthPlaceholder: S,
25
- yearPlaceholder: y,
26
- weekNumberLabel: B,
27
- weekLabel: P,
22
+ weekStartsOn: I,
23
+ previousMonthLabel: g,
24
+ nextMonthLabel: x,
25
+ monthPlaceholder: M,
26
+ yearPlaceholder: P,
27
+ weekNumberLabel: S,
28
+ weekLabel: W,
28
29
  onMonthChange: m,
29
- onWeekSelect: R,
30
- components: Y
30
+ onWeekSelect: y,
31
+ components: B
31
32
  }) {
32
33
  return {
33
- Root: ({ className: e, rootRef: t, ...a }) => /* @__PURE__ */ n("div", { "data-slot": "calendar", ref: t, className: d(e), ...a }),
34
+ Root: ({ className: e, rootRef: t, ...a }) => /* @__PURE__ */ n("div", { "data-slot": "calendar", ref: t, className: s(e), ...a }),
34
35
  Chevron: ({ className: e, orientation: t, ...a }) => t === "left" ? /* @__PURE__ */ n(
35
36
  C,
36
37
  {
37
38
  size: 16,
38
- className: d("rotate-180 text-content", e),
39
+ className: s("rotate-180 text-content", e),
39
40
  ...a
40
41
  }
41
- ) : t === "right" ? /* @__PURE__ */ n(C, { size: 16, className: d("text-content", e), ...a }) : /* @__PURE__ */ n("span", {}),
42
+ ) : t === "right" ? /* @__PURE__ */ n(C, { size: 16, className: s("text-content", e), ...a }) : /* @__PURE__ */ n("span", {}),
42
43
  PreviousMonthButton: (e) => /* @__PURE__ */ n(
43
44
  N,
44
45
  {
45
46
  variant: u,
46
47
  size: "icon",
47
48
  className: "h-7 w-7",
48
- "aria-label": x,
49
- title: x,
49
+ "aria-label": g,
50
+ title: g,
50
51
  ...e
51
52
  }
52
53
  ),
@@ -56,35 +57,35 @@ function X({
56
57
  variant: u,
57
58
  size: "icon",
58
59
  className: "h-7 w-7",
59
- "aria-label": g,
60
- title: g,
60
+ "aria-label": x,
61
+ title: x,
61
62
  ...e
62
63
  }
63
64
  ),
64
65
  MonthCaption: ({ displayIndex: e, calendarMonth: t, ...a }) => /* @__PURE__ */ n(h.Provider, { value: e, children: /* @__PURE__ */ n("div", { ...a }) }),
65
- Month: ({ calendarMonth: e, displayIndex: t, className: a, children: r, ...l }) => {
66
- const o = p.Children.toArray(r), s = o[o.length - 1], c = o.slice(0, -1);
67
- return /* @__PURE__ */ k("div", { className: d(a), ...l, children: [
68
- c.length > 0 ? /* @__PURE__ */ n(z, { children: c }) : null,
69
- s
66
+ Month: ({ calendarMonth: e, displayIndex: t, className: a, children: l, ...r }) => {
67
+ const o = p.Children.toArray(l), i = o[o.length - 1], c = o.slice(0, -1);
68
+ return /* @__PURE__ */ R("div", { className: s(a), ...r, children: [
69
+ c.length > 0 ? /* @__PURE__ */ n(Y, { children: c }) : null,
70
+ i
70
71
  ] });
71
72
  },
72
- Months: ({ className: e, children: t, ...a }) => /* @__PURE__ */ n("div", { "data-slot": "day-months", className: d(e), ...a, children: t }),
73
+ Months: ({ className: e, children: t, ...a }) => /* @__PURE__ */ n("div", { "data-slot": "day-months", className: s(e), ...a, children: t }),
73
74
  MonthsDropdown: ({ value: e }) => {
74
- const t = p.useContext(h), a = t > 0, l = new Date(i.getFullYear(), i.getMonth() + t, 1).getFullYear(), o = A(
75
- l,
75
+ const t = p.useContext(h), a = t > 0, r = new Date(d.getFullYear(), d.getMonth() + t, 1).getFullYear(), o = A(
76
+ r,
76
77
  w,
77
78
  b,
78
- I
79
+ k
79
80
  );
80
81
  return /* @__PURE__ */ n(
81
82
  D,
82
83
  {
83
- value: o.find((s) => s.value === e?.toString()),
84
- onChange: (s) => {
85
- if (s && "value" in s) {
86
- const c = parseInt(s.value);
87
- m(a ? new Date(l, c - 1, 1) : new Date(l, c, 1));
84
+ value: o.find((i) => i.value === e?.toString()),
85
+ onChange: (i) => {
86
+ if (i && "value" in i) {
87
+ const c = parseInt(i.value);
88
+ m(a ? new Date(r, c - 1, 1) : new Date(r, c, 1));
88
89
  }
89
90
  },
90
91
  scrollToSelectedOnOpen: !0,
@@ -93,7 +94,7 @@ function X({
93
94
  menuWidth: "160px",
94
95
  isSearchable: !0,
95
96
  isClearable: !1,
96
- placeholder: S
97
+ placeholder: M
97
98
  }
98
99
  );
99
100
  },
@@ -102,19 +103,19 @@ function X({
102
103
  return /* @__PURE__ */ n(
103
104
  D,
104
105
  {
105
- value: v.find((r) => r.value === e?.toString()),
106
- onChange: (r) => {
107
- if (r && "value" in r) {
108
- const l = parseInt(r.value);
106
+ value: v.find((l) => l.value === e?.toString()),
107
+ onChange: (l) => {
108
+ if (l && "value" in l) {
109
+ const r = parseInt(l.value);
109
110
  if (a) {
110
111
  const o = new Date(
111
- i.getFullYear(),
112
- i.getMonth() + 1,
112
+ d.getFullYear(),
113
+ d.getMonth() + 1,
113
114
  1
114
115
  ).getMonth();
115
- m(new Date(l, o - 1, 1));
116
+ m(new Date(r, o - 1, 1));
116
117
  } else
117
- m(new Date(l, i.getMonth(), 1));
118
+ m(new Date(r, d.getMonth(), 1));
118
119
  }
119
120
  },
120
121
  scrollToSelectedOnOpen: !0,
@@ -123,26 +124,38 @@ function X({
123
124
  menuWidth: "140px",
124
125
  isSearchable: !0,
125
126
  isClearable: !1,
126
- placeholder: y
127
+ placeholder: P
128
+ }
129
+ );
130
+ },
131
+ DayButton: (e) => /* @__PURE__ */ n(z, { ...e, pickerType: f }),
132
+ Week: ({ week: e, className: t, children: a, ...l }) => {
133
+ const r = F(e);
134
+ return /* @__PURE__ */ n(
135
+ "tr",
136
+ {
137
+ className: s(t, r && "invisible"),
138
+ "aria-hidden": r || void 0,
139
+ ...l,
140
+ children: a
127
141
  }
128
142
  );
129
143
  },
130
- DayButton: (e) => /* @__PURE__ */ n(O, { ...e, pickerType: f }),
131
144
  WeekNumber: ({ week: e, ...t }) => /* @__PURE__ */ n(
132
- W,
145
+ O,
133
146
  {
134
147
  week: e,
135
- weekStartsOn: M,
148
+ weekStartsOn: I,
136
149
  pickerType: f,
137
- weekNumberLabel: B,
138
- weekLabel: P,
139
- onWeekSelect: R,
150
+ weekNumberLabel: S,
151
+ weekLabel: W,
152
+ onWeekSelect: y,
140
153
  ...t
141
154
  }
142
155
  ),
143
- ...Y
156
+ ...B
144
157
  };
145
158
  }
146
159
  export {
147
- X as buildCalendarDayPickerComponents
160
+ _ as buildCalendarDayPickerComponents
148
161
  };
@@ -0,0 +1,5 @@
1
+ export declare function isCalendarPaddingWeek(week: {
2
+ days: Array<{
3
+ outside?: boolean;
4
+ }>;
5
+ }): boolean;
@@ -0,0 +1,6 @@
1
+ function n(e) {
2
+ return e.days.length > 0 && e.days.every((d) => d.outside);
3
+ }
4
+ export {
5
+ n as isCalendarPaddingWeek
6
+ };
@@ -54,6 +54,6 @@ export interface CalendarProps extends Omit<React.ComponentProps<typeof DayPicke
54
54
  monthMode?: "single" | "multiple" | "range";
55
55
  selectedMonths?: MonthSelection | MonthSelection[] | MonthRange;
56
56
  onMonthSelect?: (months: MonthSelection | MonthSelection[] | MonthRange | undefined) => void;
57
- /** Always render 6 week rows to prevent layout shift when navigating months. Default true. */
57
+ /** Always render 6 week rows to prevent layout shift when navigating months. Default true. Padding weeks (all days outside the month) are visually hidden via the Week component. */
58
58
  fixedWeeks?: boolean;
59
59
  }