@elliemae/ds-form-date-time-picker 3.18.0-next.0 → 3.18.0-next.2

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 (140) hide show
  1. package/dist/cjs/config/useControlledDateTimePicker.js +7 -4
  2. package/dist/cjs/config/useControlledDateTimePicker.js.map +2 -2
  3. package/dist/cjs/config/useGlobalKeyHandlers.js.map +2 -2
  4. package/dist/cjs/parts/ClearButton/ClearButton.js +4 -10
  5. package/dist/cjs/parts/ClearButton/ClearButton.js.map +3 -3
  6. package/dist/cjs/parts/ControlledDateTimePickerContent.js +3 -8
  7. package/dist/cjs/parts/ControlledDateTimePickerContent.js.map +3 -3
  8. package/dist/cjs/parts/DateInputs/DDInput.js +2 -2
  9. package/dist/cjs/parts/DateInputs/DDInput.js.map +2 -2
  10. package/dist/cjs/parts/DateInputs/DateInputs.js +5 -19
  11. package/dist/cjs/parts/DateInputs/DateInputs.js.map +3 -3
  12. package/dist/cjs/parts/DateInputs/MMInput.js +2 -2
  13. package/dist/cjs/parts/DateInputs/MMInput.js.map +2 -2
  14. package/dist/cjs/parts/DateInputs/YYYYInput.js +2 -2
  15. package/dist/cjs/parts/DateInputs/YYYYInput.js.map +2 -2
  16. package/dist/cjs/parts/Pickers/Calendar/CalendarContent.js +3 -8
  17. package/dist/cjs/parts/Pickers/Calendar/CalendarContent.js.map +3 -3
  18. package/dist/cjs/parts/Pickers/Calendar/CalendarFooter.js +3 -8
  19. package/dist/cjs/parts/Pickers/Calendar/CalendarFooter.js.map +3 -3
  20. package/dist/cjs/parts/Pickers/Calendar/CalendarHead.js +6 -27
  21. package/dist/cjs/parts/Pickers/Calendar/CalendarHead.js.map +2 -2
  22. package/dist/cjs/parts/Pickers/Calendar/CalendarIconTrigger.js +4 -16
  23. package/dist/cjs/parts/Pickers/Calendar/CalendarIconTrigger.js.map +3 -3
  24. package/dist/cjs/parts/Pickers/Calendar/CalendarWrapper.js +6 -9
  25. package/dist/cjs/parts/Pickers/Calendar/CalendarWrapper.js.map +3 -3
  26. package/dist/cjs/parts/Pickers/Calendar/Day.js +3 -5
  27. package/dist/cjs/parts/Pickers/Calendar/Day.js.map +2 -2
  28. package/dist/cjs/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js.map +1 -1
  29. package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.js +3 -9
  30. package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.js.map +3 -3
  31. package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js +4 -9
  32. package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js.map +3 -3
  33. package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +4 -9
  34. package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js.map +3 -3
  35. package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js +6 -9
  36. package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js.map +3 -3
  37. package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js.map +2 -2
  38. package/dist/cjs/parts/Pickers/TimeWheel/HoursList.js +5 -22
  39. package/dist/cjs/parts/Pickers/TimeWheel/HoursList.js.map +3 -3
  40. package/dist/cjs/parts/Pickers/TimeWheel/MeridiemList.js +6 -23
  41. package/dist/cjs/parts/Pickers/TimeWheel/MeridiemList.js.map +3 -3
  42. package/dist/cjs/parts/Pickers/TimeWheel/MinutesList.js +5 -22
  43. package/dist/cjs/parts/Pickers/TimeWheel/MinutesList.js.map +3 -3
  44. package/dist/cjs/parts/Pickers/TimeWheel/Styleds.js.map +1 -1
  45. package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelContent.js +3 -12
  46. package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelContent.js.map +2 -2
  47. package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelFooter.js +3 -8
  48. package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelFooter.js.map +3 -3
  49. package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js +4 -9
  50. package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js.map +3 -3
  51. package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelWrapper.js +6 -9
  52. package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelWrapper.js.map +3 -3
  53. package/dist/cjs/parts/Styleds.js.map +1 -1
  54. package/dist/cjs/parts/TimeInputs/HHInput.js +2 -2
  55. package/dist/cjs/parts/TimeInputs/HHInput.js.map +2 -2
  56. package/dist/cjs/parts/TimeInputs/MeridiemInput.js +2 -2
  57. package/dist/cjs/parts/TimeInputs/MeridiemInput.js.map +2 -2
  58. package/dist/cjs/parts/TimeInputs/MinutesInput.js +2 -2
  59. package/dist/cjs/parts/TimeInputs/MinutesInput.js.map +2 -2
  60. package/dist/cjs/parts/TimeInputs/TimeInputs.js +5 -19
  61. package/dist/cjs/parts/TimeInputs/TimeInputs.js.map +3 -3
  62. package/dist/cjs/sharedTypes.js.map +1 -1
  63. package/dist/cjs/utils/dateHelpers.js.map +1 -1
  64. package/dist/esm/config/useControlledDateTimePicker.js +8 -5
  65. package/dist/esm/config/useControlledDateTimePicker.js.map +2 -2
  66. package/dist/esm/config/useGlobalKeyHandlers.js.map +2 -2
  67. package/dist/esm/parts/ClearButton/ClearButton.js +4 -10
  68. package/dist/esm/parts/ClearButton/ClearButton.js.map +3 -3
  69. package/dist/esm/parts/ControlledDateTimePickerContent.js +3 -8
  70. package/dist/esm/parts/ControlledDateTimePickerContent.js.map +3 -3
  71. package/dist/esm/parts/DateInputs/DDInput.js +2 -2
  72. package/dist/esm/parts/DateInputs/DDInput.js.map +2 -2
  73. package/dist/esm/parts/DateInputs/DateInputs.js +5 -19
  74. package/dist/esm/parts/DateInputs/DateInputs.js.map +3 -3
  75. package/dist/esm/parts/DateInputs/MMInput.js +2 -2
  76. package/dist/esm/parts/DateInputs/MMInput.js.map +2 -2
  77. package/dist/esm/parts/DateInputs/YYYYInput.js +2 -2
  78. package/dist/esm/parts/DateInputs/YYYYInput.js.map +2 -2
  79. package/dist/esm/parts/Pickers/Calendar/CalendarContent.js +3 -8
  80. package/dist/esm/parts/Pickers/Calendar/CalendarContent.js.map +3 -3
  81. package/dist/esm/parts/Pickers/Calendar/CalendarFooter.js +3 -8
  82. package/dist/esm/parts/Pickers/Calendar/CalendarFooter.js.map +3 -3
  83. package/dist/esm/parts/Pickers/Calendar/CalendarHead.js +6 -27
  84. package/dist/esm/parts/Pickers/Calendar/CalendarHead.js.map +2 -2
  85. package/dist/esm/parts/Pickers/Calendar/CalendarIconTrigger.js +4 -16
  86. package/dist/esm/parts/Pickers/Calendar/CalendarIconTrigger.js.map +3 -3
  87. package/dist/esm/parts/Pickers/Calendar/CalendarWrapper.js +6 -9
  88. package/dist/esm/parts/Pickers/Calendar/CalendarWrapper.js.map +3 -3
  89. package/dist/esm/parts/Pickers/Calendar/Day.js +3 -5
  90. package/dist/esm/parts/Pickers/Calendar/Day.js.map +2 -2
  91. package/dist/esm/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js.map +1 -1
  92. package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.js +3 -9
  93. package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.js.map +3 -3
  94. package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js +4 -9
  95. package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js.map +3 -3
  96. package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +4 -9
  97. package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js.map +3 -3
  98. package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js +6 -9
  99. package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js.map +3 -3
  100. package/dist/esm/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js.map +2 -2
  101. package/dist/esm/parts/Pickers/TimeWheel/HoursList.js +5 -22
  102. package/dist/esm/parts/Pickers/TimeWheel/HoursList.js.map +3 -3
  103. package/dist/esm/parts/Pickers/TimeWheel/MeridiemList.js +6 -23
  104. package/dist/esm/parts/Pickers/TimeWheel/MeridiemList.js.map +3 -3
  105. package/dist/esm/parts/Pickers/TimeWheel/MinutesList.js +5 -22
  106. package/dist/esm/parts/Pickers/TimeWheel/MinutesList.js.map +3 -3
  107. package/dist/esm/parts/Pickers/TimeWheel/Styleds.js.map +1 -1
  108. package/dist/esm/parts/Pickers/TimeWheel/TimeWheelContent.js +3 -12
  109. package/dist/esm/parts/Pickers/TimeWheel/TimeWheelContent.js.map +2 -2
  110. package/dist/esm/parts/Pickers/TimeWheel/TimeWheelFooter.js +3 -8
  111. package/dist/esm/parts/Pickers/TimeWheel/TimeWheelFooter.js.map +3 -3
  112. package/dist/esm/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js +4 -9
  113. package/dist/esm/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js.map +3 -3
  114. package/dist/esm/parts/Pickers/TimeWheel/TimeWheelWrapper.js +6 -9
  115. package/dist/esm/parts/Pickers/TimeWheel/TimeWheelWrapper.js.map +3 -3
  116. package/dist/esm/parts/Styleds.js.map +1 -1
  117. package/dist/esm/parts/TimeInputs/HHInput.js +2 -2
  118. package/dist/esm/parts/TimeInputs/HHInput.js.map +2 -2
  119. package/dist/esm/parts/TimeInputs/MeridiemInput.js +2 -2
  120. package/dist/esm/parts/TimeInputs/MeridiemInput.js.map +2 -2
  121. package/dist/esm/parts/TimeInputs/MinutesInput.js +2 -2
  122. package/dist/esm/parts/TimeInputs/MinutesInput.js.map +2 -2
  123. package/dist/esm/parts/TimeInputs/TimeInputs.js +5 -19
  124. package/dist/esm/parts/TimeInputs/TimeInputs.js.map +3 -3
  125. package/dist/esm/utils/dateHelpers.js.map +1 -1
  126. package/dist/types/config/useControlledDateTimePicker.d.ts +1 -0
  127. package/dist/types/config/useGlobalKeyHandlers.d.ts +2 -2
  128. package/dist/types/parts/DateInputs/DDInput.d.ts +3 -2
  129. package/dist/types/parts/DateInputs/MMInput.d.ts +4 -3
  130. package/dist/types/parts/DateInputs/YYYYInput.d.ts +3 -2
  131. package/dist/types/parts/Pickers/Calendar/Styleds.d.ts +11 -11
  132. package/dist/types/parts/Pickers/CalendarWithTimeWheel/Styleds.d.ts +4 -4
  133. package/dist/types/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.d.ts +1 -1
  134. package/dist/types/parts/Pickers/TimeWheel/Styleds.d.ts +24 -0
  135. package/dist/types/parts/Styleds.d.ts +17 -10
  136. package/dist/types/parts/TimeInputs/HHInput.d.ts +3 -2
  137. package/dist/types/parts/TimeInputs/MeridiemInput.d.ts +3 -2
  138. package/dist/types/parts/TimeInputs/MinutesInput.d.ts +3 -2
  139. package/dist/types/sharedTypes.d.ts +1 -1
  140. package/package.json +11 -11
@@ -34,7 +34,6 @@ module.exports = __toCommonJS(CalendarHead_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_react = require("react");
37
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
37
  var import_ds_button = require("@elliemae/ds-button");
39
38
  var import_ds_icons = require("@elliemae/ds-icons");
40
39
  var import_ControlledDateTimePickerDatatestid = require("../../../ControlledDateTimePickerDatatestid.js");
@@ -72,28 +71,8 @@ const CalendarHead = () => {
72
71
  nextYearBtnRef,
73
72
  latestInteractionRegion,
74
73
  currFocusDescriber,
75
- props
74
+ getProps
76
75
  } = (0, import_react.useContext)(import_ControlledDateTimePickerCTX.ControlledDateTimePickerContext);
77
- const ariaAndDataPropsPrevYear = (0, import_react.useMemo)(
78
- () => (0, import_ds_props_helpers.getPropsPerDatatestid)(props[import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.CALENDAR.PREV_YEAR]),
79
- [props]
80
- );
81
- const ariaAndDataPropsPrevMonth = (0, import_react.useMemo)(
82
- () => (0, import_ds_props_helpers.getPropsPerDatatestid)(props[import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.CALENDAR.PREV_MONTH]),
83
- [props]
84
- );
85
- const ariaAndDataPropsHeaderLabel = (0, import_react.useMemo)(
86
- () => (0, import_ds_props_helpers.getPropsPerDatatestid)(props[import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.CALENDAR.HEADER_LABEL]),
87
- [props]
88
- );
89
- const ariaAndDataPropsNextMonth = (0, import_react.useMemo)(
90
- () => (0, import_ds_props_helpers.getPropsPerDatatestid)(props[import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.CALENDAR.NEXT_MONTH]),
91
- [props]
92
- );
93
- const ariaAndDataPropsNextYear = (0, import_react.useMemo)(
94
- () => (0, import_ds_props_helpers.getPropsPerDatatestid)(props[import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.CALENDAR.NEXT_YEAR]),
95
- [props]
96
- );
97
76
  const handlePrevYearRef = (0, import_react.useCallback)(
98
77
  (ButtonDomNode) => {
99
78
  prevYearBtnRef.current = ButtonDomNode;
@@ -140,7 +119,7 @@ const CalendarHead = () => {
140
119
  tabIndex: isControllerOnly ? -1 : 0,
141
120
  "data-testid": import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.CALENDAR.PREV_YEAR,
142
121
  type: "button",
143
- ...ariaAndDataPropsPrevYear,
122
+ getOwnerProps: getProps,
144
123
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronDoubleLeft, { height: 14, width: 14, fill: "#25292f" })
145
124
  }
146
125
  ),
@@ -157,7 +136,7 @@ const CalendarHead = () => {
157
136
  onFocus: onPrevMonthFocus,
158
137
  "data-testid": import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.CALENDAR.PREV_MONTH,
159
138
  type: "button",
160
- ...ariaAndDataPropsPrevMonth,
139
+ getOwnerProps: getProps,
161
140
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronLeft, { height: 14, width: 14, fill: "#25292f" })
162
141
  }
163
142
  ),
@@ -165,7 +144,7 @@ const CalendarHead = () => {
165
144
  import_Styleds.StyledHeaderLabel,
166
145
  {
167
146
  "data-testid": import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.CALENDAR.HEADER_LABEL,
168
- ...ariaAndDataPropsHeaderLabel,
147
+ getOwnerProps: getProps,
169
148
  children: currentFormatedDate
170
149
  }
171
150
  ),
@@ -181,7 +160,7 @@ const CalendarHead = () => {
181
160
  onFocus: onNextMonthFocus,
182
161
  "data-testid": import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.CALENDAR.NEXT_MONTH,
183
162
  type: "button",
184
- ...ariaAndDataPropsNextMonth,
163
+ getOwnerProps: getProps,
185
164
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronRight, { height: 14, width: 14, fill: "#25292f" })
186
165
  }
187
166
  ),
@@ -197,7 +176,7 @@ const CalendarHead = () => {
197
176
  onFocus: onNextYearFocus,
198
177
  "data-testid": import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.CALENDAR.NEXT_YEAR,
199
178
  type: "button",
200
- ...ariaAndDataPropsNextYear,
179
+ getOwnerProps: getProps,
201
180
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronDoubleRight, { height: 14, width: 14, fill: "#25292f" })
202
181
  }
203
182
  )
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/parts/Pickers/Calendar/CalendarHead.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable complexity, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */\nimport React, { useCallback, useContext, useMemo } from 'react';\nimport { getPropsPerDatatestid } from '@elliemae/ds-props-helpers';\nimport { BUTTON_SIZES } from '@elliemae/ds-button';\nimport { ChevronDoubleLeft, ChevronLeft, ChevronDoubleRight, ChevronRight } from '@elliemae/ds-icons';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid.js';\nimport { getMonthNameByMonthNumber } from '../../../utils/dateHelpers.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { StyledHeader, StyledHeaderButton, StyledHeaderLabel } from './Styleds.js';\nimport { CalendarContext } from './CalendarContext.js';\n\nconst useGetFormattedCurrentDate = () => {\n const { currentMonth, currentYear } = useContext(CalendarContext);\n\n const monthString = currentMonth >= 0 && currentMonth <= 11 ? `${getMonthNameByMonthNumber(currentMonth)} ` : '';\n\n return useMemo(() => `${monthString}${currentYear}`, [monthString, currentYear]);\n};\nexport const CalendarHead = (): JSX.Element => {\n const currentFormatedDate = useGetFormattedCurrentDate();\n const {\n handlePrevYear,\n handlePrevMonth,\n handleNextMonth,\n handleNextYear,\n handlePrevYearKeyDown,\n handlePrevMonthKeyDown,\n handleNextMonthKeyDown,\n handleNextYearKeyDown,\n onPrevYearFocus,\n onPrevMonthFocus,\n onNextMonthFocus,\n onNextYearFocus,\n } = useContext(CalendarContext);\n\n const {\n isControllerOnly,\n autoFocusPrevMonthArrow,\n prevYearBtnRef,\n prevMonthBtnRef,\n nextMonthBtnRef,\n nextYearBtnRef,\n latestInteractionRegion,\n currFocusDescriber,\n props,\n } = useContext(ControlledDateTimePickerContext);\n const ariaAndDataPropsPrevYear = useMemo(\n () => getPropsPerDatatestid(props[ControlledDateTimePickerDatatestid.CALENDAR.PREV_YEAR]),\n [props],\n );\n const ariaAndDataPropsPrevMonth = useMemo(\n () => getPropsPerDatatestid(props[ControlledDateTimePickerDatatestid.CALENDAR.PREV_MONTH]),\n [props],\n );\n const ariaAndDataPropsHeaderLabel = useMemo(\n () => getPropsPerDatatestid(props[ControlledDateTimePickerDatatestid.CALENDAR.HEADER_LABEL]),\n [props],\n );\n const ariaAndDataPropsNextMonth = useMemo(\n () => getPropsPerDatatestid(props[ControlledDateTimePickerDatatestid.CALENDAR.NEXT_MONTH]),\n [props],\n );\n const ariaAndDataPropsNextYear = useMemo(\n () => getPropsPerDatatestid(props[ControlledDateTimePickerDatatestid.CALENDAR.NEXT_YEAR]),\n [props],\n );\n\n const handlePrevYearRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\n prevYearBtnRef.current = ButtonDomNode;\n if (latestInteractionRegion === 'calendar-head' && currFocusDescriber === 'calendar-prev-year')\n ButtonDomNode?.focus?.();\n },\n [currFocusDescriber, latestInteractionRegion, prevYearBtnRef],\n );\n const handlePrevMonthRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\n prevMonthBtnRef.current = ButtonDomNode;\n if (latestInteractionRegion === 'calendar-head' && currFocusDescriber === 'calendar-prev-month')\n ButtonDomNode?.focus?.();\n },\n [currFocusDescriber, latestInteractionRegion, prevMonthBtnRef],\n );\n const handleNextMonthRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\n nextMonthBtnRef.current = ButtonDomNode;\n if (latestInteractionRegion === 'calendar-head' && currFocusDescriber === 'calendar-next-month')\n ButtonDomNode?.focus?.();\n },\n [currFocusDescriber, latestInteractionRegion, nextMonthBtnRef],\n );\n const handleNextYearRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\n nextYearBtnRef.current = ButtonDomNode;\n if (latestInteractionRegion === 'calendar-head' && currFocusDescriber === 'calendar-next-year')\n ButtonDomNode?.focus?.();\n },\n [currFocusDescriber, latestInteractionRegion, nextYearBtnRef],\n );\n\n return (\n <StyledHeader>\n <StyledHeaderButton\n aria-label=\"previous year\"\n buttonType=\"raw\"\n size={BUTTON_SIZES.M}\n onClick={handlePrevYear}\n innerRef={handlePrevYearRef}\n onKeyDown={handlePrevYearKeyDown}\n onFocus={onPrevYearFocus}\n tabIndex={isControllerOnly ? -1 : 0}\n data-testid={ControlledDateTimePickerDatatestid.CALENDAR.PREV_YEAR}\n type=\"button\"\n {...ariaAndDataPropsPrevYear}\n >\n <ChevronDoubleLeft height={14} width={14} fill=\"#25292f\" />\n </StyledHeaderButton>\n <StyledHeaderButton\n autoFocus={autoFocusPrevMonthArrow}\n aria-label=\"previous month\"\n buttonType=\"raw\"\n size={BUTTON_SIZES.M}\n onClick={handlePrevMonth}\n innerRef={handlePrevMonthRef}\n onKeyDown={handlePrevMonthKeyDown}\n onFocus={onPrevMonthFocus}\n data-testid={ControlledDateTimePickerDatatestid.CALENDAR.PREV_MONTH}\n type=\"button\"\n {...ariaAndDataPropsPrevMonth}\n // this is a tabstop for when the calendar is open\n >\n <ChevronLeft height={14} width={14} fill=\"#25292f\" />\n </StyledHeaderButton>\n <StyledHeaderLabel\n data-testid={ControlledDateTimePickerDatatestid.CALENDAR.HEADER_LABEL}\n {...ariaAndDataPropsHeaderLabel}\n >\n {currentFormatedDate}\n </StyledHeaderLabel>\n <StyledHeaderButton\n aria-label=\"next month\"\n buttonType=\"raw\"\n size={BUTTON_SIZES.M}\n onClick={handleNextMonth}\n innerRef={handleNextMonthRef}\n onKeyDown={handleNextMonthKeyDown}\n onFocus={onNextMonthFocus}\n data-testid={ControlledDateTimePickerDatatestid.CALENDAR.NEXT_MONTH}\n type=\"button\"\n {...ariaAndDataPropsNextMonth}\n >\n <ChevronRight height={14} width={14} fill=\"#25292f\" />\n </StyledHeaderButton>\n <StyledHeaderButton\n aria-label=\"next year\"\n buttonType=\"raw\"\n size={BUTTON_SIZES.M}\n onClick={handleNextYear}\n innerRef={handleNextYearRef}\n onKeyDown={handleNextYearKeyDown}\n onFocus={onNextYearFocus}\n data-testid={ControlledDateTimePickerDatatestid.CALENDAR.NEXT_YEAR}\n type=\"button\"\n {...ariaAndDataPropsNextYear}\n >\n <ChevronDoubleRight height={14} width={14} fill=\"#25292f\" />\n </StyledHeaderButton>\n </StyledHeader>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqGnB;AApGJ,mBAAwD;AACxD,8BAAsC;AACtC,uBAA6B;AAC7B,sBAAiF;AACjF,gDAAmD;AACnD,yBAA0C;AAC1C,yCAAgD;AAChD,qBAAoE;AACpE,6BAAgC;AAEhC,MAAM,6BAA6B,MAAM;AACvC,QAAM,EAAE,cAAc,YAAY,QAAI,yBAAW,sCAAe;AAEhE,QAAM,cAAc,gBAAgB,KAAK,gBAAgB,KAAK,OAAG,8CAA0B,YAAY,OAAO;AAE9G,aAAO,sBAAQ,MAAM,GAAG,cAAc,eAAe,CAAC,aAAa,WAAW,CAAC;AACjF;AACO,MAAM,eAAe,MAAmB;AAC7C,QAAM,sBAAsB,2BAA2B;AACvD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,sCAAe;AAE9B,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,kEAA+B;AAC9C,QAAM,+BAA2B;AAAA,IAC/B,UAAM,+CAAsB,MAAM,6EAAmC,SAAS,SAAS,CAAC;AAAA,IACxF,CAAC,KAAK;AAAA,EACR;AACA,QAAM,gCAA4B;AAAA,IAChC,UAAM,+CAAsB,MAAM,6EAAmC,SAAS,UAA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AAAA,QAEJ,sDAAC,sCAAmB,QAAQ,IAAI,OAAO,IAAI,MAAK,WAAU;AAAA;AAAA,IAC5D;AAAA,KACF;AAEJ;",
4
+ "sourcesContent": ["/* eslint-disable complexity, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */\nimport React, { useCallback, useContext, useMemo } from 'react';\nimport { BUTTON_SIZES } from '@elliemae/ds-button';\nimport { ChevronDoubleLeft, ChevronLeft, ChevronDoubleRight, ChevronRight } from '@elliemae/ds-icons';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid.js';\nimport { getMonthNameByMonthNumber } from '../../../utils/dateHelpers.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { StyledHeader, StyledHeaderButton, StyledHeaderLabel } from './Styleds.js';\nimport { CalendarContext } from './CalendarContext.js';\n\nconst useGetFormattedCurrentDate = () => {\n const { currentMonth, currentYear } = useContext(CalendarContext);\n\n const monthString = currentMonth >= 0 && currentMonth <= 11 ? `${getMonthNameByMonthNumber(currentMonth)} ` : '';\n\n return useMemo(() => `${monthString}${currentYear}`, [monthString, currentYear]);\n};\nexport const CalendarHead = (): JSX.Element => {\n const currentFormatedDate = useGetFormattedCurrentDate();\n const {\n handlePrevYear,\n handlePrevMonth,\n handleNextMonth,\n handleNextYear,\n handlePrevYearKeyDown,\n handlePrevMonthKeyDown,\n handleNextMonthKeyDown,\n handleNextYearKeyDown,\n onPrevYearFocus,\n onPrevMonthFocus,\n onNextMonthFocus,\n onNextYearFocus,\n } = useContext(CalendarContext);\n\n const {\n isControllerOnly,\n autoFocusPrevMonthArrow,\n prevYearBtnRef,\n prevMonthBtnRef,\n nextMonthBtnRef,\n nextYearBtnRef,\n latestInteractionRegion,\n currFocusDescriber,\n getProps,\n } = useContext(ControlledDateTimePickerContext);\n\n const handlePrevYearRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\n prevYearBtnRef.current = ButtonDomNode;\n if (latestInteractionRegion === 'calendar-head' && currFocusDescriber === 'calendar-prev-year')\n ButtonDomNode?.focus?.();\n },\n [currFocusDescriber, latestInteractionRegion, prevYearBtnRef],\n );\n const handlePrevMonthRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\n prevMonthBtnRef.current = ButtonDomNode;\n if (latestInteractionRegion === 'calendar-head' && currFocusDescriber === 'calendar-prev-month')\n ButtonDomNode?.focus?.();\n },\n [currFocusDescriber, latestInteractionRegion, prevMonthBtnRef],\n );\n const handleNextMonthRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\n nextMonthBtnRef.current = ButtonDomNode;\n if (latestInteractionRegion === 'calendar-head' && currFocusDescriber === 'calendar-next-month')\n ButtonDomNode?.focus?.();\n },\n [currFocusDescriber, latestInteractionRegion, nextMonthBtnRef],\n );\n const handleNextYearRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\n nextYearBtnRef.current = ButtonDomNode;\n if (latestInteractionRegion === 'calendar-head' && currFocusDescriber === 'calendar-next-year')\n ButtonDomNode?.focus?.();\n },\n [currFocusDescriber, latestInteractionRegion, nextYearBtnRef],\n );\n\n return (\n <StyledHeader>\n <StyledHeaderButton\n aria-label=\"previous year\"\n buttonType=\"raw\"\n size={BUTTON_SIZES.M}\n onClick={handlePrevYear}\n innerRef={handlePrevYearRef}\n onKeyDown={handlePrevYearKeyDown}\n onFocus={onPrevYearFocus}\n tabIndex={isControllerOnly ? -1 : 0}\n data-testid={ControlledDateTimePickerDatatestid.CALENDAR.PREV_YEAR}\n type=\"button\"\n getOwnerProps={getProps}\n >\n <ChevronDoubleLeft height={14} width={14} fill=\"#25292f\" />\n </StyledHeaderButton>\n <StyledHeaderButton\n autoFocus={autoFocusPrevMonthArrow}\n aria-label=\"previous month\"\n buttonType=\"raw\"\n size={BUTTON_SIZES.M}\n onClick={handlePrevMonth}\n innerRef={handlePrevMonthRef}\n onKeyDown={handlePrevMonthKeyDown}\n onFocus={onPrevMonthFocus}\n data-testid={ControlledDateTimePickerDatatestid.CALENDAR.PREV_MONTH}\n type=\"button\"\n getOwnerProps={getProps}\n // this is a tabstop for when the calendar is open\n >\n <ChevronLeft height={14} width={14} fill=\"#25292f\" />\n </StyledHeaderButton>\n <StyledHeaderLabel\n data-testid={ControlledDateTimePickerDatatestid.CALENDAR.HEADER_LABEL}\n getOwnerProps={getProps}\n >\n {currentFormatedDate}\n </StyledHeaderLabel>\n <StyledHeaderButton\n aria-label=\"next month\"\n buttonType=\"raw\"\n size={BUTTON_SIZES.M}\n onClick={handleNextMonth}\n innerRef={handleNextMonthRef}\n onKeyDown={handleNextMonthKeyDown}\n onFocus={onNextMonthFocus}\n data-testid={ControlledDateTimePickerDatatestid.CALENDAR.NEXT_MONTH}\n type=\"button\"\n getOwnerProps={getProps}\n >\n <ChevronRight height={14} width={14} fill=\"#25292f\" />\n </StyledHeaderButton>\n <StyledHeaderButton\n aria-label=\"next year\"\n buttonType=\"raw\"\n size={BUTTON_SIZES.M}\n onClick={handleNextYear}\n innerRef={handleNextYearRef}\n onKeyDown={handleNextYearKeyDown}\n onFocus={onNextYearFocus}\n data-testid={ControlledDateTimePickerDatatestid.CALENDAR.NEXT_YEAR}\n type=\"button\"\n getOwnerProps={getProps}\n >\n <ChevronDoubleRight height={14} width={14} fill=\"#25292f\" />\n </StyledHeaderButton>\n </StyledHeader>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgFnB;AA/EJ,mBAAwD;AACxD,uBAA6B;AAC7B,sBAAiF;AACjF,gDAAmD;AACnD,yBAA0C;AAC1C,yCAAgD;AAChD,qBAAoE;AACpE,6BAAgC;AAEhC,MAAM,6BAA6B,MAAM;AACvC,QAAM,EAAE,cAAc,YAAY,QAAI,yBAAW,sCAAe;AAEhE,QAAM,cAAc,gBAAgB,KAAK,gBAAgB,KAAK,OAAG,8CAA0B,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S;AAAA,QACT,eAAa,6EAAmC,SAAS;AAAA,QACzD,MAAK;AAAA,QACL,eAAe;AAAA,QAEf,sDAAC,sCAAmB,QAAQ,IAAI,OAAO,IAAI,MAAK,WAAU;AAAA;AAAA,IAC5D;AAAA,KACF;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -33,10 +33,9 @@ __export(CalendarIconTrigger_exports, {
33
33
  module.exports = __toCommonJS(CalendarIconTrigger_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
- var import_react = __toESM(require("react"));
36
+ var import_react = require("react");
37
37
  var import_ds_button = require("@elliemae/ds-button");
38
38
  var import_ds_icons = require("@elliemae/ds-icons");
39
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
40
39
  var import_ControlledDateTimePickerDatatestid = require("../../../ControlledDateTimePickerDatatestid.js");
41
40
  var import_ControlledDateTimePickerCTX = require("../../../ControlledDateTimePickerCTX.js");
42
41
  var import_CalendarContext = require("./CalendarContext.js");
@@ -44,14 +43,10 @@ var import_Styleds = require("./Styleds.js");
44
43
  const CalendarIconTrigger = () => {
45
44
  const { handleToggleCalendar, handleSetTriggerRef, handlePickerIconKeyDown } = (0, import_react.useContext)(import_CalendarContext.CalendarContext);
46
45
  const {
47
- props,
48
46
  props: { disabled },
47
+ getProps,
49
48
  ariaCurrentValueForInputs
50
49
  } = (0, import_react.useContext)(import_ControlledDateTimePickerCTX.ControlledDateTimePickerContext);
51
- const ariaAndDataProps = import_react.default.useMemo(
52
- () => (0, import_ds_props_helpers.getPropsPerDatatestid)(props[import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.PICKER_ICONS.CALENDAR]),
53
- [props]
54
- );
55
50
  return (0, import_react.useMemo)(
56
51
  () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
57
52
  import_Styleds.StyledIconTriggerButton,
@@ -65,18 +60,11 @@ const CalendarIconTrigger = () => {
65
60
  "data-testid": import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.PICKER_ICONS.CALENDAR,
66
61
  disabled,
67
62
  type: "button",
68
- ...ariaAndDataProps,
63
+ getOwnerProps: getProps,
69
64
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.DatePicker, {})
70
65
  }
71
66
  ),
72
- [
73
- ariaCurrentValueForInputs,
74
- handleSetTriggerRef,
75
- handleToggleCalendar,
76
- handlePickerIconKeyDown,
77
- disabled,
78
- ariaAndDataProps
79
- ]
67
+ [ariaCurrentValueForInputs, handleSetTriggerRef, handleToggleCalendar, handlePickerIconKeyDown, disabled, getProps]
80
68
  );
81
69
  };
82
70
  //# sourceMappingURL=CalendarIconTrigger.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/parts/Pickers/Calendar/CalendarIconTrigger.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useContext, useMemo } from 'react';\nimport { BUTTON_SIZES } from '@elliemae/ds-button';\nimport { DatePicker } from '@elliemae/ds-icons';\nimport { getPropsPerDatatestid } from '@elliemae/ds-props-helpers';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { CalendarContext } from './CalendarContext.js';\nimport { StyledIconTriggerButton } from './Styleds.js';\n// we memoize the Icon for maximum optimization\n// this is particularly usefull due to how usePopper needs to check the references\n// since references are saved in a immutable way, we make sure to shortcircuit useless-re-renders\nexport const CalendarIconTrigger = (): JSX.Element => {\n const { handleToggleCalendar, handleSetTriggerRef, handlePickerIconKeyDown } = useContext(CalendarContext);\n const {\n props,\n props: { disabled },\n ariaCurrentValueForInputs,\n } = useContext(ControlledDateTimePickerContext);\n const ariaAndDataProps = React.useMemo(\n () => getPropsPerDatatestid(props[ControlledDateTimePickerDatatestid.PICKER_ICONS.CALENDAR]),\n [props],\n );\n return useMemo(\n () => (\n <StyledIconTriggerButton\n aria-label={`date picker context menu trigger, ${ariaCurrentValueForInputs}`}\n buttonType=\"icon\"\n size={BUTTON_SIZES.M}\n innerRef={handleSetTriggerRef}\n onClick={handleToggleCalendar}\n onKeyDown={handlePickerIconKeyDown}\n data-testid={ControlledDateTimePickerDatatestid.PICKER_ICONS.CALENDAR}\n disabled={disabled}\n type=\"button\"\n {...ariaAndDataProps}\n >\n <DatePicker />\n </StyledIconTriggerButton>\n ),\n [\n ariaCurrentValueForInputs,\n handleSetTriggerRef,\n handleToggleCalendar,\n handlePickerIconKeyDown,\n disabled,\n ariaAndDataProps,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoCf;AApCR,mBAA2C;AAC3C,uBAA6B;AAC7B,sBAA2B;AAC3B,8BAAsC;AACtC,gDAAmD;AACnD,yCAAgD;AAChD,6BAAgC;AAChC,qBAAwC;AAIjC,MAAM,sBAAsB,MAAmB;AACpD,QAAM,EAAE,sBAAsB,qBAAqB,wBAAwB,QAAI,yBAAW,sCAAe;AACzG,QAAM;AAAA,IACJ;AAAA,IACA,OAAO,EAAE,SAAS;AAAA,IAClB;AAAA,EACF,QAAI,yBAAW,kEAA+B;AAC9C,QAAM,mBAAmB,aAAAA,QAAM;AAAA,IAC7B,UAAM,+CAAsB,MAAM,6EAAmC,aAAa,QAAQ,CAAC;AAAA,IAC3F,CAAC,KAAK;AAAA,EACR;AACA,aAAO;AAAA,IACL,MACE;AAAA,MAAC;AAAA;AAAA,QACC,cAAY,qCAAqC;AAAA,QACjD,YAAW;AAAA,QACX,MAAM,8BAAa;AAAA,QACnB,UAAU;AAAA,QACV,SAAS;AAAA,QACT,WAAW;AAAA,QACX,eAAa,6EAAmC,aAAa;AAAA,QAC7D;AAAA,QACA,MAAK;AAAA,QACJ,GAAG;AAAA,QAEJ,sDAAC,8BAAW;AAAA;AAAA,IACd;AAAA,IAEF;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
6
- "names": ["React"]
4
+ "sourcesContent": ["import React, { useContext, useMemo } from 'react';\nimport { BUTTON_SIZES } from '@elliemae/ds-button';\nimport { DatePicker } from '@elliemae/ds-icons';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { CalendarContext } from './CalendarContext.js';\nimport { StyledIconTriggerButton } from './Styleds.js';\n// we memoize the Icon for maximum optimization\n// this is particularly usefull due to how usePopper needs to check the references\n// since references are saved in a immutable way, we make sure to shortcircuit useless-re-renders\nexport const CalendarIconTrigger = (): JSX.Element => {\n const { handleToggleCalendar, handleSetTriggerRef, handlePickerIconKeyDown } = useContext(CalendarContext);\n const {\n props: { disabled },\n getProps,\n ariaCurrentValueForInputs,\n } = useContext(ControlledDateTimePickerContext);\n return useMemo(\n () => (\n <StyledIconTriggerButton\n aria-label={`date picker context menu trigger, ${ariaCurrentValueForInputs}`}\n buttonType=\"icon\"\n size={BUTTON_SIZES.M}\n innerRef={handleSetTriggerRef}\n onClick={handleToggleCalendar}\n onKeyDown={handlePickerIconKeyDown}\n data-testid={ControlledDateTimePickerDatatestid.PICKER_ICONS.CALENDAR}\n disabled={disabled}\n type=\"button\"\n getOwnerProps={getProps}\n >\n <DatePicker />\n </StyledIconTriggerButton>\n ),\n [ariaCurrentValueForInputs, handleSetTriggerRef, handleToggleCalendar, handlePickerIconKeyDown, disabled, getProps],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+Bf;AA/BR,mBAA2C;AAC3C,uBAA6B;AAC7B,sBAA2B;AAC3B,gDAAmD;AACnD,yCAAgD;AAChD,6BAAgC;AAChC,qBAAwC;AAIjC,MAAM,sBAAsB,MAAmB;AACpD,QAAM,EAAE,sBAAsB,qBAAqB,wBAAwB,QAAI,yBAAW,sCAAe;AACzG,QAAM;AAAA,IACJ,OAAO,EAAE,SAAS;AAAA,IAClB;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,kEAA+B;AAC9C,aAAO;AAAA,IACL,MACE;AAAA,MAAC;AAAA;AAAA,QACC,cAAY,qCAAqC;AAAA,QACjD,YAAW;AAAA,QACX,MAAM,8BAAa;AAAA,QACnB,UAAU;AAAA,QACV,SAAS;AAAA,QACT,WAAW;AAAA,QACX,eAAa,6EAAmC,aAAa;AAAA,QAC7D;AAAA,QACA,MAAK;AAAA,QACL,eAAe;AAAA,QAEf,sDAAC,8BAAW;AAAA;AAAA,IACd;AAAA,IAEF,CAAC,2BAA2B,qBAAqB,sBAAsB,yBAAyB,UAAU,QAAQ;AAAA,EACpH;AACF;",
6
+ "names": []
7
7
  }
@@ -33,31 +33,28 @@ __export(CalendarWrapper_exports, {
33
33
  module.exports = __toCommonJS(CalendarWrapper_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
- var import_react = __toESM(require("react"));
37
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
36
+ var import_react = require("react");
38
37
  var import_ds_popperjs = require("@elliemae/ds-popperjs");
39
38
  var import_ControlledDateTimePickerDatatestid = require("../../../ControlledDateTimePickerDatatestid.js");
40
39
  var import_ControlledDateTimePickerCTX = require("../../../ControlledDateTimePickerCTX.js");
41
40
  var import_CalendarContent = require("./CalendarContent.js");
42
41
  var import_CalendarContext = require("./CalendarContext.js");
42
+ var import_ds_system = require("@elliemae/ds-system");
43
+ const StyledPopper = (0, import_ds_system.styled)(import_ds_popperjs.DSPopperJS)``;
43
44
  const CalendarWrapper = () => {
44
- const { isControllerOnly, props } = (0, import_react.useContext)(import_ControlledDateTimePickerCTX.ControlledDateTimePickerContext);
45
- const ariaAndDataProps = import_react.default.useMemo(
46
- () => (0, import_ds_props_helpers.getPropsPerDatatestid)(props[import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.CONTEXTUAL_MENU.CALENDAR]),
47
- [props]
48
- );
45
+ const { isControllerOnly, getProps } = (0, import_react.useContext)(import_ControlledDateTimePickerCTX.ControlledDateTimePickerContext);
49
46
  const { referenceElement, closeCalendar } = (0, import_react.useContext)(import_CalendarContext.CalendarContext);
50
47
  if (isControllerOnly)
51
48
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_CalendarContent.CalendarContent, {});
52
49
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
53
- import_ds_popperjs.DSPopperJS,
50
+ StyledPopper,
54
51
  {
55
52
  showPopover: true,
56
53
  "data-testid": import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.CONTEXTUAL_MENU.CALENDAR,
57
54
  referenceElement,
58
55
  withoutArrow: true,
59
56
  onClickOutside: closeCalendar,
60
- ...ariaAndDataProps,
57
+ getOwnerProps: getProps,
61
58
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_CalendarContent.CalendarContent, {})
62
59
  }
63
60
  );
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/parts/Pickers/Calendar/CalendarWrapper.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useContext } from 'react';\nimport { getPropsPerDatatestid } from '@elliemae/ds-props-helpers';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { CalendarContent } from './CalendarContent.js';\nimport { CalendarContext } from './CalendarContext.js';\n\nexport const CalendarWrapper = (): JSX.Element => {\n const { isControllerOnly, props } = useContext(ControlledDateTimePickerContext);\n const ariaAndDataProps = React.useMemo(\n () => getPropsPerDatatestid(props[ControlledDateTimePickerDatatestid.CONTEXTUAL_MENU.CALENDAR]),\n [props],\n );\n const { referenceElement, closeCalendar } = useContext(CalendarContext);\n if (isControllerOnly) return <CalendarContent />;\n\n return (\n <DSPopperJS\n showPopover\n data-testid={ControlledDateTimePickerDatatestid.CONTEXTUAL_MENU.CALENDAR}\n referenceElement={referenceElement}\n withoutArrow\n onClickOutside={closeCalendar}\n {...ariaAndDataProps}\n >\n <CalendarContent />\n </DSPopperJS>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADeQ;AAf/B,mBAAkC;AAClC,8BAAsC;AACtC,yBAA2B;AAC3B,gDAAmD;AACnD,yCAAgD;AAChD,6BAAgC;AAChC,6BAAgC;AAEzB,MAAM,kBAAkB,MAAmB;AAChD,QAAM,EAAE,kBAAkB,MAAM,QAAI,yBAAW,kEAA+B;AAC9E,QAAM,mBAAmB,aAAAA,QAAM;AAAA,IAC7B,UAAM,+CAAsB,MAAM,6EAAmC,gBAAgB,QAAQ,CAAC;AAAA,IAC9F,CAAC,KAAK;AAAA,EACR;AACA,QAAM,EAAE,kBAAkB,cAAc,QAAI,yBAAW,sCAAe;AACtE,MAAI;AAAkB,WAAO,4CAAC,0CAAgB;AAE9C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAW;AAAA,MACX,eAAa,6EAAmC,gBAAgB;AAAA,MAChE;AAAA,MACA,cAAY;AAAA,MACZ,gBAAgB;AAAA,MACf,GAAG;AAAA,MAEJ,sDAAC,0CAAgB;AAAA;AAAA,EACnB;AAEJ;",
6
- "names": ["React"]
4
+ "sourcesContent": ["import React, { useContext } from 'react';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { CalendarContent } from './CalendarContent.js';\nimport { CalendarContext } from './CalendarContext.js';\nimport { styled } from '@elliemae/ds-system';\n\nconst StyledPopper = styled(DSPopperJS)``;\n\nexport const CalendarWrapper = (): JSX.Element => {\n const { isControllerOnly, getProps } = useContext(ControlledDateTimePickerContext);\n const { referenceElement, closeCalendar } = useContext(CalendarContext);\n if (isControllerOnly) return <CalendarContent />;\n\n return (\n <StyledPopper\n showPopover\n data-testid={ControlledDateTimePickerDatatestid.CONTEXTUAL_MENU.CALENDAR}\n referenceElement={referenceElement}\n withoutArrow\n onClickOutside={closeCalendar}\n getOwnerProps={getProps}\n >\n <CalendarContent />\n </StyledPopper>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADaQ;AAb/B,mBAAkC;AAClC,yBAA2B;AAC3B,gDAAmD;AACnD,yCAAgD;AAChD,6BAAgC;AAChC,6BAAgC;AAChC,uBAAuB;AAEvB,MAAM,mBAAe,yBAAO,6BAAU;AAE/B,MAAM,kBAAkB,MAAmB;AAChD,QAAM,EAAE,kBAAkB,SAAS,QAAI,yBAAW,kEAA+B;AACjF,QAAM,EAAE,kBAAkB,cAAc,QAAI,yBAAW,sCAAe;AACtE,MAAI;AAAkB,WAAO,4CAAC,0CAAgB;AAE9C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAW;AAAA,MACX,eAAa,6EAAmC,gBAAgB;AAAA,MAChE;AAAA,MACA,cAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,eAAe;AAAA,MAEf,sDAAC,0CAAgB;AAAA;AAAA,EACnB;AAEJ;",
6
+ "names": []
7
7
  }
@@ -34,7 +34,6 @@ module.exports = __toCommonJS(Day_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_react = require("react");
37
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
37
  var import_dateHelpers = require("../../../utils/dateHelpers.js");
39
38
  var import_constants = require("../../../utils/constants.js");
40
39
  var import_stringHelpers = require("../../../utils/stringHelpers.js");
@@ -48,7 +47,7 @@ const Day = ({ metaDay, colIndex, isInvisible }) => {
48
47
  const {
49
48
  handleChangeComposedDateString,
50
49
  dateStringFromProps,
51
- props,
50
+ getProps,
52
51
  props: { preventCloseOnSelection },
53
52
  getIsDisabledDay,
54
53
  getIsOutOfRangeDay,
@@ -118,7 +117,7 @@ const Day = ({ metaDay, colIndex, isInvisible }) => {
118
117
  [dayBtnRef, isFocused]
119
118
  );
120
119
  const handleOnDayFocus = (0, import_react.useCallback)(() => {
121
- trackFocusCalendarMetafocusedDay("calendar-days");
120
+ trackFocusCalendarMetafocusedDay();
122
121
  }, [trackFocusCalendarMetafocusedDay]);
123
122
  const dayClassModifiers = (0, import_react.useMemo)(
124
123
  () => `dayWrapper ${isSelected ? "selectedDay " : ""}${isDisabled ? "disabledDay " : ""}${isOutOfRange ? "outOfRangeDay " : ""}${isFocused ? "focusedDay " : ""}${isStartRangeDay ? "startRangeDay " : ""}${isDayInRangeImproper ? "inRangeImproperDay " : ""}${isDayInRange ? "inRangeDay " : ""}${isEndRangeDay ? "endRangeDay " : ""}${isCurrMonthDay ? "" : "notCurrentMonth"}`,
@@ -147,7 +146,6 @@ const Day = ({ metaDay, colIndex, isInvisible }) => {
147
146
  dataTestid = import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.CALENDAR.END_RANGE_DAY;
148
147
  if (isDayInRange)
149
148
  dataTestid = import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.CALENDAR.IN_RANGE_DAY;
150
- const ariaAndDataProps = (0, import_react.useMemo)(() => (0, import_ds_props_helpers.getPropsPerDatatestid)(props[dataTestid]), [dataTestid, props]);
151
149
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
152
150
  "div",
153
151
  {
@@ -173,7 +171,7 @@ const Day = ({ metaDay, colIndex, isInvisible }) => {
173
171
  "data-isfocused": isFocused,
174
172
  "data-testid": dataTestid,
175
173
  type: "button",
176
- ...ariaAndDataProps,
174
+ getOwnerProps: getProps,
177
175
  children: `${day.getDate()}`
178
176
  }
179
177
  )
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/parts/Pickers/Calendar/Day.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-statements */\n/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useContext, useCallback, useMemo } from 'react';\nimport { getPropsPerDatatestid } from '@elliemae/ds-props-helpers';\nimport {\n getDateStringFromDay,\n getDayFromDateString,\n getDateValuesFromDate,\n isSameDateMoment,\n compareTwoDatesDayEquality,\n} from '../../../utils/dateHelpers.js';\nimport { defaultMetaInfo, weekDays } from '../../../utils/constants.js';\nimport { getAriaDayFromDateString } from '../../../utils/stringHelpers.js';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { CalendarContext } from './CalendarContext.js';\nimport { StyledDayBtn } from './Styleds.js';\nimport type { DSControlledDateTimePickerT } from '../../../propTypes.js';\nimport type { DSControlledDateTimePickerInternalsT } from '../../../sharedTypes.js';\n\ninterface CalendarDayPropsT {\n metaDay: DSControlledDateTimePickerInternalsT.MetaMonthDay;\n colIndex?: number;\n isInvisible?: boolean;\n}\nconst displayNone = { display: 'none' };\n\nexport const Day = ({ metaDay, colIndex, isInvisible }: CalendarDayPropsT): JSX.Element => {\n const { day, isCurrMonthDay, isHidden, dayBtnRef, dayAsString } = metaDay;\n const {\n handleChangeComposedDateString,\n dateStringFromProps,\n props,\n props: { preventCloseOnSelection },\n getIsDisabledDay,\n getIsOutOfRangeDay,\n getIsStartRangeDay,\n getIsDayInRange,\n getIsEndRangeDay,\n appOnMonthChange,\n appOnDayChange,\n appOnYearChange,\n latestInteractionRegion,\n isWithTimeWheelToo,\n trackFocusCalendarMetafocusedDay,\n } = useContext(ControlledDateTimePickerContext);\n\n const { focusedDay, handleDayOnKeyDown, handleFocusMetaDayByDay, closeCalendar } = useContext(CalendarContext);\n const isFocusedMetaDay = focusedDay?.day ? compareTwoDatesDayEquality(metaDay?.day, focusedDay?.day) : false;\n const isSelected = useMemo(() => {\n const selectedDate = getDayFromDateString(dateStringFromProps);\n return selectedDate ? isSameDateMoment(day, selectedDate) : false;\n }, [dateStringFromProps, day]);\n const isFocused = latestInteractionRegion === 'calendar-days' && isFocusedMetaDay;\n const isDisabled = getIsDisabledDay(metaDay.dayAsString);\n const isOutOfRange = getIsOutOfRangeDay(metaDay.dayAsString);\n const isStartRangeDay = getIsStartRangeDay(metaDay.dayAsString);\n const isEndRangeDay = getIsEndRangeDay(metaDay.dayAsString);\n const isDayInRangeImproper = getIsDayInRange(metaDay.dayAsString);\n const isDayInRange = !isStartRangeDay && !isEndRangeDay && isDayInRangeImproper;\n\n const handleOnDayClick = useCallback(\n (e: DSControlledDateTimePickerT.OnInternalValuesChangeEvent) => {\n handleFocusMetaDayByDay(day);\n if (!isDisabled && !isOutOfRange) {\n const newDateString = getDateStringFromDay(day);\n const metaInfo = { ...defaultMetaInfo, newDateString };\n const { month, day: dayNumber, year } = getDateValuesFromDate(day);\n appOnMonthChange(`${month + 1}`, e, metaInfo);\n if (dayNumber) appOnDayChange(`${dayNumber}`, e, metaInfo);\n appOnYearChange(`${year}`, e, metaInfo);\n handleChangeComposedDateString(newDateString, metaInfo);\n trackFocusCalendarMetafocusedDay();\n if (!isWithTimeWheelToo && !preventCloseOnSelection) closeCalendar();\n }\n },\n [\n handleFocusMetaDayByDay,\n day,\n isDisabled,\n isOutOfRange,\n appOnMonthChange,\n appOnDayChange,\n appOnYearChange,\n handleChangeComposedDateString,\n trackFocusCalendarMetafocusedDay,\n isWithTimeWheelToo,\n preventCloseOnSelection,\n closeCalendar,\n ],\n );\n\n const handleInnerRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\n window.requestAnimationFrame(() => {\n dayBtnRef.current = ButtonDomNode;\n if (isFocused) ButtonDomNode?.focus?.();\n });\n },\n [dayBtnRef, isFocused],\n );\n\n const handleOnDayFocus = useCallback(() => {\n trackFocusCalendarMetafocusedDay('calendar-days');\n }, [trackFocusCalendarMetafocusedDay]);\n\n const dayClassModifiers = useMemo(\n () =>\n `dayWrapper ${isSelected ? 'selectedDay ' : ''}${isDisabled ? 'disabledDay ' : ''}${\n isOutOfRange ? 'outOfRangeDay ' : ''\n }${isFocused ? 'focusedDay ' : ''}${isStartRangeDay ? 'startRangeDay ' : ''}${\n isDayInRangeImproper ? 'inRangeImproperDay ' : ''\n }${isDayInRange ? 'inRangeDay ' : ''}${isEndRangeDay ? 'endRangeDay ' : ''}${\n isCurrMonthDay ? '' : 'notCurrentMonth'\n }`,\n [\n isSelected,\n isDisabled,\n isOutOfRange,\n isFocused,\n isStartRangeDay,\n isDayInRangeImproper,\n isDayInRange,\n isEndRangeDay,\n isCurrMonthDay,\n ],\n );\n\n let dataTestid: (typeof ControlledDateTimePickerDatatestid)['CALENDAR'][keyof (typeof ControlledDateTimePickerDatatestid)['CALENDAR']] =\n ControlledDateTimePickerDatatestid.CALENDAR.DAY;\n\n if (isSelected) dataTestid = ControlledDateTimePickerDatatestid.CALENDAR.SELECTED_DAY;\n if (isFocused) dataTestid = ControlledDateTimePickerDatatestid.CALENDAR.FOCUSED_DAY;\n if (isFocused && isSelected) dataTestid = ControlledDateTimePickerDatatestid.CALENDAR.SELECTED_FOCUSED_DAY;\n if (isStartRangeDay) dataTestid = ControlledDateTimePickerDatatestid.CALENDAR.START_RANGE_DAY;\n if (isEndRangeDay) dataTestid = ControlledDateTimePickerDatatestid.CALENDAR.END_RANGE_DAY;\n if (isDayInRange) dataTestid = ControlledDateTimePickerDatatestid.CALENDAR.IN_RANGE_DAY;\n const ariaAndDataProps = useMemo(() => getPropsPerDatatestid(props[dataTestid]), [dataTestid, props]);\n return (\n <div\n className={dayClassModifiers}\n style={isHidden ? displayNone : undefined}\n role={!isInvisible ? 'gridcell' : undefined}\n {...(Number.isInteger(colIndex) && { 'aria-colindex': colIndex })}\n >\n <StyledDayBtn\n aria-label={`${getAriaDayFromDateString(dayAsString)}, ${weekDays[metaDay.day.getDay()]}`}\n aria-disabled={isOutOfRange || isDisabled}\n aria-hidden={!!isInvisible}\n buttonType=\"raw\"\n size=\"m\"\n onClick={handleOnDayClick} // DSButton triggers this with \"spacebar\" and \"enter\" too...\n onFocus={handleOnDayFocus}\n onKeyDown={(e: React.KeyboardEvent<Element>) => {\n handleDayOnKeyDown(e, metaDay);\n }}\n innerRef={handleInnerRef}\n tabIndex={-1}\n data-isfocused={isFocused}\n data-testid={dataTestid}\n type=\"button\"\n {...ariaAndDataProps}\n >\n {`${day.getDate()}`}\n </StyledDayBtn>\n </div>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkJjB;AA/IN,mBAAwD;AACxD,8BAAsC;AACtC,yBAMO;AACP,uBAA0C;AAC1C,2BAAyC;AACzC,gDAAmD;AACnD,yCAAgD;AAChD,6BAAgC;AAChC,qBAA6B;AAS7B,MAAM,cAAc,EAAE,SAAS,OAAO;AAE/B,MAAM,MAAM,CAAC,EAAE,SAAS,UAAU,YAAY,MAAsC;AACzF,QAAM,EAAE,KAAK,gBAAgB,UAAU,WAAW,YAAY,IAAI;AAClE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,EAAE,wBAAwB;AAAA,IACjC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,y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B,SAAS;AAAA,MAE/D;AAAA,QAAC;AAAA;AAAA,UACC,cAAY,OAAG,+CAAyB,WAAW,MAAM,0BAAS,QAAQ,IAAI,OAAO,CAAC;AAAA,UACtF,iBAAe,gBAAgB;AAAA,UAC/B,eAAa,CAAC,CAAC;AAAA,UACf,YAAW;AAAA,UACX,MAAK;AAAA,UACL,SAAS;AAAA,UACT,SAAS;AAAA,UACT,WAAW,CAAC,MAAoC;AAC9C,+BAAmB,GAAG,OAAO;AAAA,UAC/B;AAAA,UACA,UAAU;AAAA,UACV,UAAU;AAAA,UACV,kBAAgB;AAAA,UAChB,eAAa;AAAA,UACb,MAAK;AAAA,UACJ,GAAG;AAAA,UAEH,aAAG,IAAI,QAAQ;AAAA;AAAA,MAClB;AAAA;AAAA,EACF;AAEJ;",
4
+ "sourcesContent": ["/* eslint-disable max-statements */\n/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useContext, useCallback, useMemo } from 'react';\nimport {\n getDateStringFromDay,\n getDayFromDateString,\n getDateValuesFromDate,\n isSameDateMoment,\n compareTwoDatesDayEquality,\n} from '../../../utils/dateHelpers.js';\nimport { defaultMetaInfo, weekDays } from '../../../utils/constants.js';\nimport { getAriaDayFromDateString } from '../../../utils/stringHelpers.js';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { CalendarContext } from './CalendarContext.js';\nimport { StyledDayBtn } from './Styleds.js';\nimport type { DSControlledDateTimePickerT } from '../../../propTypes.js';\nimport type { DSControlledDateTimePickerInternalsT } from '../../../sharedTypes.js';\n\ninterface CalendarDayPropsT {\n metaDay: DSControlledDateTimePickerInternalsT.MetaMonthDay;\n colIndex?: number;\n isInvisible?: boolean;\n}\nconst displayNone = { display: 'none' };\n\nexport const Day = ({ metaDay, colIndex, isInvisible }: CalendarDayPropsT): JSX.Element => {\n const { day, isCurrMonthDay, isHidden, dayBtnRef, dayAsString } = metaDay;\n const {\n handleChangeComposedDateString,\n dateStringFromProps,\n getProps,\n props: { preventCloseOnSelection },\n getIsDisabledDay,\n getIsOutOfRangeDay,\n getIsStartRangeDay,\n getIsDayInRange,\n getIsEndRangeDay,\n appOnMonthChange,\n appOnDayChange,\n appOnYearChange,\n latestInteractionRegion,\n isWithTimeWheelToo,\n trackFocusCalendarMetafocusedDay,\n } = useContext(ControlledDateTimePickerContext);\n\n const { focusedDay, handleDayOnKeyDown, handleFocusMetaDayByDay, closeCalendar } = useContext(CalendarContext);\n const isFocusedMetaDay = focusedDay?.day ? compareTwoDatesDayEquality(metaDay?.day, focusedDay?.day) : false;\n const isSelected = useMemo(() => {\n const selectedDate = getDayFromDateString(dateStringFromProps);\n return selectedDate ? isSameDateMoment(day, selectedDate) : false;\n }, [dateStringFromProps, day]);\n const isFocused = latestInteractionRegion === 'calendar-days' && isFocusedMetaDay;\n const isDisabled = getIsDisabledDay(metaDay.dayAsString);\n const isOutOfRange = getIsOutOfRangeDay(metaDay.dayAsString);\n const isStartRangeDay = getIsStartRangeDay(metaDay.dayAsString);\n const isEndRangeDay = getIsEndRangeDay(metaDay.dayAsString);\n const isDayInRangeImproper = getIsDayInRange(metaDay.dayAsString);\n const isDayInRange = !isStartRangeDay && !isEndRangeDay && isDayInRangeImproper;\n\n const handleOnDayClick = useCallback(\n (e: DSControlledDateTimePickerT.OnInternalValuesChangeEvent) => {\n handleFocusMetaDayByDay(day);\n if (!isDisabled && !isOutOfRange) {\n const newDateString = getDateStringFromDay(day);\n const metaInfo = { ...defaultMetaInfo, newDateString };\n const { month, day: dayNumber, year } = getDateValuesFromDate(day);\n appOnMonthChange(`${month + 1}`, e, metaInfo);\n if (dayNumber) appOnDayChange(`${dayNumber}`, e, metaInfo);\n appOnYearChange(`${year}`, e, metaInfo);\n handleChangeComposedDateString(newDateString, metaInfo);\n trackFocusCalendarMetafocusedDay();\n if (!isWithTimeWheelToo && !preventCloseOnSelection) closeCalendar();\n }\n },\n [\n handleFocusMetaDayByDay,\n day,\n isDisabled,\n isOutOfRange,\n appOnMonthChange,\n appOnDayChange,\n appOnYearChange,\n handleChangeComposedDateString,\n trackFocusCalendarMetafocusedDay,\n isWithTimeWheelToo,\n preventCloseOnSelection,\n closeCalendar,\n ],\n );\n\n const handleInnerRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\n window.requestAnimationFrame(() => {\n dayBtnRef.current = ButtonDomNode;\n if (isFocused) ButtonDomNode?.focus?.();\n });\n },\n [dayBtnRef, isFocused],\n );\n\n const handleOnDayFocus = useCallback(() => {\n trackFocusCalendarMetafocusedDay();\n }, [trackFocusCalendarMetafocusedDay]);\n\n const dayClassModifiers = useMemo(\n () =>\n `dayWrapper ${isSelected ? 'selectedDay ' : ''}${isDisabled ? 'disabledDay ' : ''}${\n isOutOfRange ? 'outOfRangeDay ' : ''\n }${isFocused ? 'focusedDay ' : ''}${isStartRangeDay ? 'startRangeDay ' : ''}${\n isDayInRangeImproper ? 'inRangeImproperDay ' : ''\n }${isDayInRange ? 'inRangeDay ' : ''}${isEndRangeDay ? 'endRangeDay ' : ''}${\n isCurrMonthDay ? '' : 'notCurrentMonth'\n }`,\n [\n isSelected,\n isDisabled,\n isOutOfRange,\n isFocused,\n isStartRangeDay,\n isDayInRangeImproper,\n isDayInRange,\n isEndRangeDay,\n isCurrMonthDay,\n ],\n );\n\n let dataTestid: (typeof ControlledDateTimePickerDatatestid)['CALENDAR'][keyof (typeof ControlledDateTimePickerDatatestid)['CALENDAR']] =\n ControlledDateTimePickerDatatestid.CALENDAR.DAY;\n\n if (isSelected) dataTestid = ControlledDateTimePickerDatatestid.CALENDAR.SELECTED_DAY;\n if (isFocused) dataTestid = ControlledDateTimePickerDatatestid.CALENDAR.FOCUSED_DAY;\n if (isFocused && isSelected) dataTestid = ControlledDateTimePickerDatatestid.CALENDAR.SELECTED_FOCUSED_DAY;\n if (isStartRangeDay) dataTestid = ControlledDateTimePickerDatatestid.CALENDAR.START_RANGE_DAY;\n if (isEndRangeDay) dataTestid = ControlledDateTimePickerDatatestid.CALENDAR.END_RANGE_DAY;\n if (isDayInRange) dataTestid = ControlledDateTimePickerDatatestid.CALENDAR.IN_RANGE_DAY;\n\n return (\n <div\n className={dayClassModifiers}\n style={isHidden ? displayNone : undefined}\n role={!isInvisible ? 'gridcell' : undefined}\n {...(Number.isInteger(colIndex) && { 'aria-colindex': colIndex })}\n >\n <StyledDayBtn\n aria-label={`${getAriaDayFromDateString(dayAsString)}, ${weekDays[metaDay.day.getDay()]}`}\n aria-disabled={isOutOfRange || isDisabled}\n aria-hidden={!!isInvisible}\n buttonType=\"raw\"\n size=\"m\"\n onClick={handleOnDayClick} // DSButton triggers this with \"spacebar\" and \"enter\" too...\n onFocus={handleOnDayFocus}\n onKeyDown={(e: React.KeyboardEvent<Element>) => {\n handleDayOnKeyDown(e, metaDay);\n }}\n innerRef={handleInnerRef}\n tabIndex={-1}\n data-isfocused={isFocused}\n data-testid={dataTestid}\n type=\"button\"\n getOwnerProps={getProps}\n >\n {`${day.getDate()}`}\n </StyledDayBtn>\n </div>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiJjB;AA9IN,mBAAwD;AACxD,yBAMO;AACP,uBAA0C;AAC1C,2BAAyC;AACzC,gDAAmD;AACnD,yCAAgD;AAChD,6BAAgC;AAChC,qBAA6B;AAS7B,MAAM,cAAc,EAAE,SAAS,OAAO;AAE/B,MAAM,MAAM,CAAC,EAAE,SAAS,UAAU,YAAY,MAAsC;AACzF,QAAM,EAAE,KAAK,gBAAgB,UAAU,WAAW,YAAY,IAAI;AAClE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,EAAE,wBAAwB;AAAA,IACjC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;A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A;AAAA,UACC,cAAY,OAAG,+CAAyB,WAAW,MAAM,0BAAS,QAAQ,IAAI,OAAO,CAAC;AAAA,UACtF,iBAAe,gBAAgB;AAAA,UAC/B,eAAa,CAAC,CAAC;AAAA,UACf,YAAW;AAAA,UACX,MAAK;AAAA,UACL,SAAS;AAAA,UACT,SAAS;AAAA,UACT,WAAW,CAAC,MAAoC;AAC9C,+BAAmB,GAAG,OAAO;AAAA,UAC/B;AAAA,UACA,UAAU;AAAA,UACV,UAAU;AAAA,UACV,kBAAgB;AAAA,UAChB,eAAa;AAAA,UACb,MAAK;AAAA,UACL,eAAe;AAAA,UAEd,aAAG,IAAI,QAAQ;AAAA;AAAA,MAClB;AAAA;AAAA,EACF;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-statements */\n/* eslint-disable max-lines */\nimport { useMemo, useCallback, useState, useEffect, createRef } from 'react';\n// eslint-disable-next-line max-len\nimport { useGetMonthYearFromDateStringOrEmptyStartingMonth } from '../../../utils/hooks/useGetMonthYearFromDateStringOrEmptyStartingMonth.js';\nimport {\n getFiveBySevenCurrentMonthDaysMatrix,\n sumFromDateValues,\n sumValuesToDate,\n getDateStringFromDay,\n} from '../../../utils/dateHelpers.js';\nimport type { DSControlledDateTimePickerInternalsT } from '../../../sharedTypes.js';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction sliceIntoChunks<T = any>(arr: Array<T>, chunkSize: number): Array<Array<T>> {\n const res = [];\n for (let i = 0; i < arr.length; i += chunkSize) {\n const chunk = arr.slice(i, i + chunkSize);\n res.push(chunk);\n }\n return res;\n}\ninterface UseCurrentDisplayedMonthYearLogicT {\n currentMonth: DSControlledDateTimePickerInternalsT.DateMonth;\n currentYear: number;\n daysArray: DSControlledDateTimePickerInternalsT.MetaMonthDay[];\n invisibleFirstDay?: DSControlledDateTimePickerInternalsT.MetaMonthDay;\n daysMatrixByWeekday: DSControlledDateTimePickerInternalsT.MetaMonthDay[][];\n invisibleLastDay?: DSControlledDateTimePickerInternalsT.MetaMonthDay;\n handlePrevMonth: () => void;\n handlePrevYear: () => void;\n handleNextMonth: () => void;\n handleNextYear: () => void;\n}\nexport const useCurrentDisplayedMonthYearLogic = (): UseCurrentDisplayedMonthYearLogicT => {\n const { month: monthFromDateString, year: yearFromDateString } = useGetMonthYearFromDateStringOrEmptyStartingMonth();\n const [currentMonth, setCurrentMonth] = useState(monthFromDateString);\n const [currentYear, setCurrentYear] = useState(yearFromDateString);\n\n // side-effects are really really controlled in this case so use-effect should be fine\n // don't add 200 side-effects to those or else Chaos would hunt us for the years to come\n useEffect(() => {\n setCurrentMonth(monthFromDateString);\n }, [monthFromDateString]);\n useEffect(() => {\n setCurrentYear(yearFromDateString);\n }, [yearFromDateString]);\n\n const daysArray = useMemo(() => {\n const newDaysArray = getFiveBySevenCurrentMonthDaysMatrix(currentMonth, currentYear);\n const hiddenPrevDay = sumValuesToDate(newDaysArray[0].day, {\n daysToSum: -1,\n });\n const hiddenPrevMetaday = {\n day: hiddenPrevDay,\n dayAsString: getDateStringFromDay(hiddenPrevDay),\n isPrevMonthDay: true,\n isNextMonthDay: false,\n isCurrMonthDay: false,\n dayBtnRef: createRef<HTMLButtonElement>(),\n isHidden: true,\n };\n const hiddenNextDay = sumValuesToDate(newDaysArray[newDaysArray.length - 1].day, {\n daysToSum: 1,\n });\n const hiddenNextMetaday = {\n day: hiddenNextDay,\n dayAsString: getDateStringFromDay(hiddenNextDay),\n isPrevMonthDay: false,\n isNextMonthDay: true,\n isCurrMonthDay: false,\n dayBtnRef: createRef<HTMLButtonElement>(),\n isHidden: true,\n };\n return [hiddenPrevMetaday, ...newDaysArray, hiddenNextMetaday];\n }, [currentMonth, currentYear]);\n\n const handlePrevYear = useCallback(() => {\n const { year: newYear } = sumFromDateValues({ month: currentMonth, year: currentYear }, { yearsToSum: -1 });\n setCurrentYear(newYear);\n }, [currentMonth, currentYear]);\n\n const handlePrevMonth = useCallback(() => {\n const { month: newMonth, year: newYear } = sumFromDateValues(\n { month: currentMonth, year: currentYear },\n { monthsToSum: -1 },\n );\n setCurrentMonth(newMonth);\n setCurrentYear(newYear);\n }, [currentMonth, currentYear]);\n\n const handleNextMonth = useCallback(() => {\n const { month: newMonth, year: newYear } = sumFromDateValues(\n { month: currentMonth, year: currentYear },\n { monthsToSum: 1 },\n );\n setCurrentMonth(newMonth);\n setCurrentYear(newYear);\n }, [currentMonth, currentYear]);\n\n const handleNextYear = useCallback(() => {\n const { year: newYear } = sumFromDateValues({ month: currentMonth, year: currentYear }, { yearsToSum: 1 });\n setCurrentYear(newYear);\n }, [currentMonth, currentYear]);\n\n const { invisibleFirstDay, daysMatrixByWeekday, invisibleLastDay } = useMemo(() => {\n const [invisible1stDay, ...otherDays] = [...daysArray];\n const invisibleDayLast = otherDays.pop();\n return {\n invisibleFirstDay: invisible1stDay,\n daysMatrixByWeekday: sliceIntoChunks<DSControlledDateTimePickerInternalsT.MetaMonthDay>(otherDays, 7),\n invisibleLastDay: invisibleDayLast,\n };\n }, [daysArray]);\n\n return useMemo(\n () => ({\n currentMonth,\n currentYear,\n daysArray,\n invisibleFirstDay,\n daysMatrixByWeekday,\n invisibleLastDay,\n handlePrevYear,\n handlePrevMonth,\n handleNextMonth,\n handleNextYear,\n }),\n [\n currentMonth,\n currentYear,\n daysArray,\n daysMatrixByWeekday,\n handleNextMonth,\n handleNextYear,\n handlePrevMonth,\n handlePrevYear,\n invisibleFirstDay,\n invisibleLastDay,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-statements */\n/* eslint-disable max-lines */\nimport { useMemo, useCallback, useState, useEffect, createRef } from 'react';\n// eslint-disable-next-line max-len\nimport { useGetMonthYearFromDateStringOrEmptyStartingMonth } from '../../../utils/hooks/useGetMonthYearFromDateStringOrEmptyStartingMonth.js';\nimport {\n getFiveBySevenCurrentMonthDaysMatrix,\n sumFromDateValues,\n sumValuesToDate,\n getDateStringFromDay,\n} from '../../../utils/dateHelpers.js';\nimport type { DSControlledDateTimePickerInternalsT } from '../../../sharedTypes.js';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction sliceIntoChunks<T = any>(arr: Array<T>, chunkSize: number): Array<Array<T>> {\n const res = [];\n for (let i = 0; i < arr.length; i += chunkSize) {\n const chunk = arr.slice(i, i + chunkSize);\n res.push(chunk);\n }\n return res;\n}\ninterface UseCurrentDisplayedMonthYearLogicT {\n currentMonth: DSControlledDateTimePickerInternalsT.DateMonth;\n currentYear: number;\n daysArray: DSControlledDateTimePickerInternalsT.MetaMonthDay[];\n invisibleFirstDay?: DSControlledDateTimePickerInternalsT.MetaMonthDay;\n daysMatrixByWeekday: DSControlledDateTimePickerInternalsT.MetaMonthDay[][];\n invisibleLastDay?: DSControlledDateTimePickerInternalsT.MetaMonthDay;\n handlePrevMonth: () => void;\n handlePrevYear: () => void;\n handleNextMonth: () => void;\n handleNextYear: () => void;\n}\nexport const useCurrentDisplayedMonthYearLogic = (): UseCurrentDisplayedMonthYearLogicT => {\n const { month: monthFromDateString, year: yearFromDateString } = useGetMonthYearFromDateStringOrEmptyStartingMonth();\n const [currentMonth, setCurrentMonth] = useState(monthFromDateString);\n const [currentYear, setCurrentYear] = useState(yearFromDateString);\n\n // side-effects are really really controlled in this case so use-effect should be fine\n // don't add 200 side-effects to those or else Chaos would hunt us for the years to come\n useEffect(() => {\n setCurrentMonth(monthFromDateString);\n }, [monthFromDateString]);\n useEffect(() => {\n setCurrentYear(yearFromDateString);\n }, [yearFromDateString]);\n\n const daysArray = useMemo(() => {\n const newDaysArray = getFiveBySevenCurrentMonthDaysMatrix(currentMonth, currentYear);\n const hiddenPrevDay = sumValuesToDate(newDaysArray[0].day, {\n daysToSum: -1,\n });\n const hiddenPrevMetaday = {\n day: hiddenPrevDay,\n dayAsString: getDateStringFromDay(hiddenPrevDay),\n isPrevMonthDay: true,\n isNextMonthDay: false,\n isCurrMonthDay: false,\n dayBtnRef: createRef<HTMLButtonElement>() as React.MutableRefObject<HTMLButtonElement>,\n isHidden: true,\n };\n const hiddenNextDay = sumValuesToDate(newDaysArray[newDaysArray.length - 1].day, {\n daysToSum: 1,\n });\n const hiddenNextMetaday = {\n day: hiddenNextDay,\n dayAsString: getDateStringFromDay(hiddenNextDay),\n isPrevMonthDay: false,\n isNextMonthDay: true,\n isCurrMonthDay: false,\n dayBtnRef: createRef<HTMLButtonElement>() as React.MutableRefObject<HTMLButtonElement>,\n isHidden: true,\n };\n return [hiddenPrevMetaday, ...newDaysArray, hiddenNextMetaday];\n }, [currentMonth, currentYear]);\n\n const handlePrevYear = useCallback(() => {\n const { year: newYear } = sumFromDateValues({ month: currentMonth, year: currentYear }, { yearsToSum: -1 });\n setCurrentYear(newYear);\n }, [currentMonth, currentYear]);\n\n const handlePrevMonth = useCallback(() => {\n const { month: newMonth, year: newYear } = sumFromDateValues(\n { month: currentMonth, year: currentYear },\n { monthsToSum: -1 },\n );\n setCurrentMonth(newMonth);\n setCurrentYear(newYear);\n }, [currentMonth, currentYear]);\n\n const handleNextMonth = useCallback(() => {\n const { month: newMonth, year: newYear } = sumFromDateValues(\n { month: currentMonth, year: currentYear },\n { monthsToSum: 1 },\n );\n setCurrentMonth(newMonth);\n setCurrentYear(newYear);\n }, [currentMonth, currentYear]);\n\n const handleNextYear = useCallback(() => {\n const { year: newYear } = sumFromDateValues({ month: currentMonth, year: currentYear }, { yearsToSum: 1 });\n setCurrentYear(newYear);\n }, [currentMonth, currentYear]);\n\n const { invisibleFirstDay, daysMatrixByWeekday, invisibleLastDay } = useMemo(() => {\n const [invisible1stDay, ...otherDays] = [...daysArray];\n const invisibleDayLast = otherDays.pop();\n return {\n invisibleFirstDay: invisible1stDay,\n daysMatrixByWeekday: sliceIntoChunks<DSControlledDateTimePickerInternalsT.MetaMonthDay>(otherDays, 7),\n invisibleLastDay: invisibleDayLast,\n };\n }, [daysArray]);\n\n return useMemo(\n () => ({\n currentMonth,\n currentYear,\n daysArray,\n invisibleFirstDay,\n daysMatrixByWeekday,\n invisibleLastDay,\n handlePrevYear,\n handlePrevMonth,\n handleNextMonth,\n handleNextYear,\n }),\n [\n currentMonth,\n currentYear,\n daysArray,\n daysMatrixByWeekday,\n handleNextMonth,\n handleNextYear,\n handlePrevMonth,\n handlePrevYear,\n invisibleFirstDay,\n invisibleLastDay,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mBAAqE;AAErE,+DAAkE;AAClE,yBAKO;AAIP,SAAS,gBAAyB,KAAe,WAAoC;AACnF,QAAM,MAAM,CAAC;AACb,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK,WAAW;AAC9C,UAAM,QAAQ,IAAI,MAAM,GAAG,IAAI,SAAS;AACxC,QAAI,KAAK,KAAK;AAAA,EAChB;AACA,SAAO;AACT;AAaO,MAAM,oCAAoC,MAA0C;AACzF,QAAM,EAAE,OAAO,qBAAqB,MAAM,mBAAmB,QAAI,4GAAkD;AACnH,QAAM,CAAC,cAAc,eAAe,QAAI,uBAAS,mBAAmB;AACpE,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,kBAAkB;AAIjE,8BAAU,MAAM;AACd,oBAAgB,mBAAmB;AAAA,EACrC,GAAG,CAAC,mBAAmB,CAAC;AACxB,8BAAU,MAAM;AACd,mBAAe,kBAAkB;AAAA,EACnC,GAAG,CAAC,kBAAkB,CAAC;AAEvB,QAAM,gBAAY,sBAAQ,MAAM;AAC9B,UAAM,mBAAe,yDAAqC,cAAc,WAAW;AACnF,UAAM,oBAAgB,oCAAgB,aAA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AAAA,IACnB;AACA,oBAAgB,QAAQ;AACxB,mBAAe,OAAO;AAAA,EACxB,GAAG,CAAC,cAAc,WAAW,CAAC;AAE9B,QAAM,qBAAiB,0BAAY,MAAM;AACvC,UAAM,EAAE,MAAM,QAAQ,QAAI,sCAAkB,EAAE,OAAO,cAAc,MAAM,YAAY,GAAG,EAAE,YAAY,EAAE,CAAC;AACzG,mBAAe,OAAO;AAAA,EACxB,GAAG,CAAC,cAAc,WAAW,CAAC;AAE9B,QAAM,EAAE,mBAAmB,qBAAqB,iBAAiB,QAAI,sBAAQ,MAAM;AACjF,UAAM,CAAC,iBAAiB,GAAG,SAAS,IAAI,CAAC,GAAG,SAAS;AACrD,UAAM,mBAAmB,UAAU,IAAI;AACvC,WAAO;AAAA,MACL,mBAAmB;AAAA,MACnB,qBAAqB,gBAAmE,WAAW,CAAC;AAAA,MACpG,kBAAkB;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,SAAS,CAAC;AAEd,aAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -33,25 +33,19 @@ __export(CalendarWithTimeWheelContent_exports, {
33
33
  module.exports = __toCommonJS(CalendarWithTimeWheelContent_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
- var import_react = __toESM(require("react"));
37
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
36
+ var import_react = require("react");
38
37
  var import_ControlledDateTimePickerDatatestid = require("../../../ControlledDateTimePickerDatatestid.js");
39
38
  var import_Styleds = require("./Styleds.js");
40
39
  var import_CalendarWithTimeWheelFooter = require("./CalendarWithTimeWheelFooter.js");
41
40
  var import_TimeWheelContent = require("../TimeWheel/TimeWheelContent.js");
42
41
  var import_ControlledDateTimePickerCTX = require("../../../ControlledDateTimePickerCTX.js");
43
42
  const CalendarWithTimeWheelContent = () => {
44
- const { isControllerOnly, props } = (0, import_react.useContext)(import_ControlledDateTimePickerCTX.ControlledDateTimePickerContext);
45
- const ariaAndDataProps = import_react.default.useMemo(
46
- () => (0, import_ds_props_helpers.getPropsPerDatatestid)(props[import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.CONTROLLER_COMPONENT.CALENDAR_TIMEWHEEL]),
47
- [props]
48
- );
43
+ const { getProps } = (0, import_react.useContext)(import_ControlledDateTimePickerCTX.ControlledDateTimePickerContext);
49
44
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
50
45
  import_Styleds.StyledCalendarWithTimeWheelWrapper,
51
46
  {
52
- isControllerOnly,
53
47
  "data-testid": import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.CONTROLLER_COMPONENT.CALENDAR_TIMEWHEEL,
54
- ...ariaAndDataProps,
48
+ getOwnerProps: getProps,
55
49
  children: [
56
50
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledCalendar, {}),
57
51
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TimeWheelContent.TimeWheelContent, {}),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useContext } from 'react';\nimport { getPropsPerDatatestid } from '@elliemae/ds-props-helpers';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid.js';\nimport { StyledCalendarWithTimeWheelWrapper, StyledCalendar } from './Styleds.js';\nimport { CalendarWithTimeWheelFooter } from './CalendarWithTimeWheelFooter.js';\nimport { TimeWheelContent } from '../TimeWheel/TimeWheelContent.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\n\nexport const CalendarWithTimeWheelContent = (): JSX.Element => {\n const { isControllerOnly, props } = useContext(ControlledDateTimePickerContext);\n const ariaAndDataProps = React.useMemo(\n () => getPropsPerDatatestid(props[ControlledDateTimePickerDatatestid.CONTROLLER_COMPONENT.CALENDAR_TIMEWHEEL]),\n [props],\n );\n return (\n <StyledCalendarWithTimeWheelWrapper\n isControllerOnly={isControllerOnly}\n data-testid={ControlledDateTimePickerDatatestid.CONTROLLER_COMPONENT.CALENDAR_TIMEWHEEL}\n {...ariaAndDataProps}\n >\n <StyledCalendar />\n <TimeWheelContent />\n <CalendarWithTimeWheelFooter />\n </StyledCalendarWithTimeWheelWrapper>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADenB;AAfJ,mBAAkC;AAClC,8BAAsC;AACtC,gDAAmD;AACnD,qBAAmE;AACnE,yCAA4C;AAC5C,8BAAiC;AACjC,yCAAgD;AAEzC,MAAM,+BAA+B,MAAmB;AAC7D,QAAM,EAAE,kBAAkB,MAAM,QAAI,yBAAW,kEAA+B;AAC9E,QAAM,mBAAmB,aAAAA,QAAM;AAAA,IAC7B,UAAM,+CAAsB,MAAM,6EAAmC,qBAAqB,kBAAkB,CAAC;AAAA,IAC7G,CAAC,KAAK;AAAA,EACR;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAa,6EAAmC,qBAAqB;AAAA,MACpE,GAAG;AAAA,MAEJ;AAAA,oDAAC,iCAAe;AAAA,QAChB,4CAAC,4CAAiB;AAAA,QAClB,4CAAC,kEAA4B;AAAA;AAAA;AAAA,EAC/B;AAEJ;",
6
- "names": ["React"]
4
+ "sourcesContent": ["import React, { useContext } from 'react';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid.js';\nimport { StyledCalendarWithTimeWheelWrapper, StyledCalendar } from './Styleds.js';\nimport { CalendarWithTimeWheelFooter } from './CalendarWithTimeWheelFooter.js';\nimport { TimeWheelContent } from '../TimeWheel/TimeWheelContent.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\n\nexport const CalendarWithTimeWheelContent = (): JSX.Element => {\n const { getProps } = useContext(ControlledDateTimePickerContext);\n return (\n <StyledCalendarWithTimeWheelWrapper\n data-testid={ControlledDateTimePickerDatatestid.CONTROLLER_COMPONENT.CALENDAR_TIMEWHEEL}\n getOwnerProps={getProps}\n >\n <StyledCalendar />\n <TimeWheelContent />\n <CalendarWithTimeWheelFooter />\n </StyledCalendarWithTimeWheelWrapper>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADUnB;AAVJ,mBAAkC;AAClC,gDAAmD;AACnD,qBAAmE;AACnE,yCAA4C;AAC5C,8BAAiC;AACjC,yCAAgD;AAEzC,MAAM,+BAA+B,MAAmB;AAC7D,QAAM,EAAE,SAAS,QAAI,yBAAW,kEAA+B;AAC/D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,6EAAmC,qBAAqB;AAAA,MACrE,eAAe;AAAA,MAEf;AAAA,oDAAC,iCAAe;AAAA,QAChB,4CAAC,4CAAiB;AAAA,QAClB,4CAAC,kEAA4B;AAAA;AAAA;AAAA,EAC/B;AAEJ;",
6
+ "names": []
7
7
  }
@@ -33,26 +33,21 @@ __export(CalendarWithTimeWheelFooter_exports, {
33
33
  module.exports = __toCommonJS(CalendarWithTimeWheelFooter_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
- var import_react = __toESM(require("react"));
37
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
36
+ var import_react = require("react");
38
37
  var import_ControlledDateTimePickerDatatestid = require("../../../ControlledDateTimePickerDatatestid.js");
39
38
  var import_ControlledDateTimePickerCTX = require("../../../ControlledDateTimePickerCTX.js");
40
39
  var import_Styleds = require("./Styleds.js");
41
40
  const CalendarWithTimeWheelFooter = () => {
42
41
  const {
43
- props,
44
- props: { pickerFooterMsg, hasError }
42
+ props: { pickerFooterMsg, hasError },
43
+ getProps
45
44
  } = (0, import_react.useContext)(import_ControlledDateTimePickerCTX.ControlledDateTimePickerContext);
46
- const ariaAndDataProps = import_react.default.useMemo(
47
- () => (0, import_ds_props_helpers.getPropsPerDatatestid)(props[import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.FOOTERS.CALENDAR_TIMEWHEEL]),
48
- [props]
49
- );
50
45
  return pickerFooterMsg !== void 0 && hasError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
51
46
  import_Styleds.CalendarWithTimeWheelFooterMessage,
52
47
  {
53
48
  role: "alert",
54
49
  "data-testid": import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.FOOTERS.CALENDAR_TIMEWHEEL,
55
- ...ariaAndDataProps,
50
+ getOwnerProps: getProps,
56
51
  children: pickerFooterMsg
57
52
  }
58
53
  ) : null;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useContext } from 'react';\nimport { getPropsPerDatatestid } from '@elliemae/ds-props-helpers';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { CalendarWithTimeWheelFooterMessage } from './Styleds.js';\n\nexport const CalendarWithTimeWheelFooter: React.ComponentType = () => {\n const {\n props,\n props: { pickerFooterMsg, hasError },\n } = useContext(ControlledDateTimePickerContext);\n const ariaAndDataProps = React.useMemo(\n () => getPropsPerDatatestid(props[ControlledDateTimePickerDatatestid.FOOTERS.CALENDAR_TIMEWHEEL]),\n [props],\n );\n return pickerFooterMsg !== undefined && hasError ? (\n <CalendarWithTimeWheelFooterMessage\n role=\"alert\"\n data-testid={ControlledDateTimePickerDatatestid.FOOTERS.CALENDAR_TIMEWHEEL}\n {...ariaAndDataProps}\n >\n {pickerFooterMsg}\n </CalendarWithTimeWheelFooterMessage>\n ) : null;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgBnB;AAhBJ,mBAAkC;AAClC,8BAAsC;AACtC,gDAAmD;AACnD,yCAAgD;AAChD,qBAAmD;AAE5C,MAAM,8BAAmD,MAAM;AACpE,QAAM;AAAA,IACJ;AAAA,IACA,OAAO,EAAE,iBAAiB,SAAS;AAAA,EACrC,QAAI,yBAAW,kEAA+B;AAC9C,QAAM,mBAAmB,aAAAA,QAAM;AAAA,IAC7B,UAAM,+CAAsB,MAAM,6EAAmC,QAAQ,kBAAkB,CAAC;AAAA,IAChG,CAAC,KAAK;AAAA,EACR;AACA,SAAO,oBAAoB,UAAa,WACtC;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,eAAa,6EAAmC,QAAQ;AAAA,MACvD,GAAG;AAAA,MAEH;AAAA;AAAA,EACH,IACE;AACN;",
6
- "names": ["React"]
4
+ "sourcesContent": ["import React, { useContext } from 'react';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { CalendarWithTimeWheelFooterMessage } from './Styleds.js';\n\nexport const CalendarWithTimeWheelFooter: React.ComponentType = () => {\n const {\n props: { pickerFooterMsg, hasError },\n getProps,\n } = useContext(ControlledDateTimePickerContext);\n return pickerFooterMsg !== undefined && hasError ? (\n <CalendarWithTimeWheelFooterMessage\n role=\"alert\"\n data-testid={ControlledDateTimePickerDatatestid.FOOTERS.CALENDAR_TIMEWHEEL}\n getOwnerProps={getProps}\n >\n {pickerFooterMsg}\n </CalendarWithTimeWheelFooterMessage>\n ) : null;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADWnB;AAXJ,mBAAkC;AAClC,gDAAmD;AACnD,yCAAgD;AAChD,qBAAmD;AAE5C,MAAM,8BAAmD,MAAM;AACpE,QAAM;AAAA,IACJ,OAAO,EAAE,iBAAiB,SAAS;AAAA,IACnC;AAAA,EACF,QAAI,yBAAW,kEAA+B;AAC9C,SAAO,oBAAoB,UAAa,WACtC;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,eAAa,6EAAmC,QAAQ;AAAA,MACxD,eAAe;AAAA,MAEd;AAAA;AAAA,EACH,IACE;AACN;",
6
+ "names": []
7
7
  }
@@ -33,8 +33,7 @@ __export(CalendarWithTimeWheelIconTrigger_exports, {
33
33
  module.exports = __toCommonJS(CalendarWithTimeWheelIconTrigger_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
- var import_react = __toESM(require("react"));
37
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
36
+ var import_react = require("react");
38
37
  var import_ds_button = require("@elliemae/ds-button");
39
38
  var import_ds_icons = require("@elliemae/ds-icons");
40
39
  var import_CalendarWithTimeWheelContext = require("./CalendarWithTimeWheelContext.js");
@@ -49,11 +48,7 @@ const CalendarWithTimeWheelIconTrigger = () => {
49
48
  ariaCurrentValueForInputs,
50
49
  disabled
51
50
  } = (0, import_react.useContext)(import_CalendarWithTimeWheelContext.CalendarWithTimeWheelContext);
52
- const { props } = (0, import_react.useContext)(import_ControlledDateTimePickerCTX.ControlledDateTimePickerContext);
53
- const ariaAndDataProps = import_react.default.useMemo(
54
- () => (0, import_ds_props_helpers.getPropsPerDatatestid)(props[import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.PICKER_ICONS.CALENDAR_TIMEWHEEL]),
55
- [props]
56
- );
51
+ const { getProps } = (0, import_react.useContext)(import_ControlledDateTimePickerCTX.ControlledDateTimePickerContext);
57
52
  return (0, import_react.useMemo)(
58
53
  () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
59
54
  import_Styleds.StyledIconTriggerButton,
@@ -67,14 +62,14 @@ const CalendarWithTimeWheelIconTrigger = () => {
67
62
  onKeyDown: handlePickerIconKeyDown,
68
63
  "data-testid": import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.PICKER_ICONS.CALENDAR_TIMEWHEEL,
69
64
  disabled,
70
- ...ariaAndDataProps,
65
+ getOwnerProps: getProps,
71
66
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.DatePicker, {})
72
67
  }
73
68
  ),
74
69
  [
75
- ariaAndDataProps,
76
70
  ariaCurrentValueForInputs,
77
71
  disabled,
72
+ getProps,
78
73
  handlePickerIconKeyDown,
79
74
  handleSetTriggerRef,
80
75
  handleToggleCalendarWithTimeWheel
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useContext, useMemo } from 'react';\nimport { getPropsPerDatatestid } from '@elliemae/ds-props-helpers';\nimport { BUTTON_SIZES } from '@elliemae/ds-button';\nimport { DatePicker } from '@elliemae/ds-icons';\nimport { CalendarWithTimeWheelContext } from './CalendarWithTimeWheelContext.js';\nimport { StyledIconTriggerButton } from './Styleds.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid.js';\n\n// we memoize the Icon for maximum optimization\n// this is particularly useful due to how usePopper needs to check the references\n// since references are saved in a immutable way, we make sure to shortcircuit useless-re-renders\nexport const CalendarWithTimeWheelIconTrigger = (): JSX.Element => {\n const {\n handleSetTriggerRef,\n handleToggleCalendarWithTimeWheel,\n handlePickerIconKeyDown,\n ariaCurrentValueForInputs,\n disabled,\n } = useContext(CalendarWithTimeWheelContext);\n const { props } = useContext(ControlledDateTimePickerContext);\n const ariaAndDataProps = React.useMemo(\n () => getPropsPerDatatestid(props[ControlledDateTimePickerDatatestid.PICKER_ICONS.CALENDAR_TIMEWHEEL]),\n [props],\n );\n return useMemo(\n () => (\n <StyledIconTriggerButton\n aria-label={`date time picker context menu trigger, ${ariaCurrentValueForInputs}`}\n buttonType=\"icon\"\n type=\"button\"\n size={BUTTON_SIZES.M}\n innerRef={handleSetTriggerRef}\n onClick={handleToggleCalendarWithTimeWheel}\n onKeyDown={handlePickerIconKeyDown}\n data-testid={ControlledDateTimePickerDatatestid.PICKER_ICONS.CALENDAR_TIMEWHEEL}\n disabled={disabled}\n {...ariaAndDataProps}\n >\n <DatePicker />\n </StyledIconTriggerButton>\n ),\n [\n ariaAndDataProps,\n ariaCurrentValueForInputs,\n disabled,\n handlePickerIconKeyDown,\n handleSetTriggerRef,\n handleToggleCalendarWithTimeWheel,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuCf;AAvCR,mBAA2C;AAC3C,8BAAsC;AACtC,uBAA6B;AAC7B,sBAA2B;AAC3B,0CAA6C;AAC7C,qBAAwC;AACxC,yCAAgD;AAChD,gDAAmD;AAK5C,MAAM,mCAAmC,MAAmB;AACjE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,gEAA4B;AAC3C,QAAM,EAAE,MAAM,QAAI,yBAAW,kEAA+B;AAC5D,QAAM,mBAAmB,aAAAA,QAAM;AAAA,IAC7B,UAAM,+CAAsB,MAAM,6EAAmC,aAAa,kBAAkB,CAAC;AAAA,IACrG,CAAC,KAAK;AAAA,EACR;AACA,aAAO;AAAA,IACL,MACE;AAAA,MAAC;AAAA;AAAA,QACC,cAAY,0CAA0C;AAAA,QACtD,YAAW;AAAA,QACX,MAAK;AAAA,QACL,MAAM,8BAAa;AAAA,QACnB,UAAU;AAAA,QACV,SAAS;AAAA,QACT,WAAW;AAAA,QACX,eAAa,6EAAmC,aAAa;AAAA,QAC7D;AAAA,QACC,GAAG;AAAA,QAEJ,sDAAC,8BAAW;AAAA;AAAA,IACd;AAAA,IAEF;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
6
- "names": ["React"]
4
+ "sourcesContent": ["import React, { useContext, useMemo } from 'react';\nimport { BUTTON_SIZES } from '@elliemae/ds-button';\nimport { DatePicker } from '@elliemae/ds-icons';\nimport { CalendarWithTimeWheelContext } from './CalendarWithTimeWheelContext.js';\nimport { StyledIconTriggerButton } from './Styleds.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid.js';\n\n// we memoize the Icon for maximum optimization\n// this is particularly useful due to how usePopper needs to check the references\n// since references are saved in a immutable way, we make sure to shortcircuit useless-re-renders\nexport const CalendarWithTimeWheelIconTrigger = (): JSX.Element => {\n const {\n handleSetTriggerRef,\n handleToggleCalendarWithTimeWheel,\n handlePickerIconKeyDown,\n ariaCurrentValueForInputs,\n disabled,\n } = useContext(CalendarWithTimeWheelContext);\n const { getProps } = useContext(ControlledDateTimePickerContext);\n return useMemo(\n () => (\n <StyledIconTriggerButton\n aria-label={`date time picker context menu trigger, ${ariaCurrentValueForInputs}`}\n buttonType=\"icon\"\n type=\"button\"\n size={BUTTON_SIZES.M}\n innerRef={handleSetTriggerRef}\n onClick={handleToggleCalendarWithTimeWheel}\n onKeyDown={handlePickerIconKeyDown}\n data-testid={ControlledDateTimePickerDatatestid.PICKER_ICONS.CALENDAR_TIMEWHEEL}\n disabled={disabled}\n getOwnerProps={getProps}\n >\n <DatePicker />\n </StyledIconTriggerButton>\n ),\n [\n ariaCurrentValueForInputs,\n disabled,\n getProps,\n handlePickerIconKeyDown,\n handleSetTriggerRef,\n handleToggleCalendarWithTimeWheel,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkCf;AAlCR,mBAA2C;AAC3C,uBAA6B;AAC7B,sBAA2B;AAC3B,0CAA6C;AAC7C,qBAAwC;AACxC,yCAAgD;AAChD,gDAAmD;AAK5C,MAAM,mCAAmC,MAAmB;AACjE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,gEAA4B;AAC3C,QAAM,EAAE,SAAS,QAAI,yBAAW,kEAA+B;AAC/D,aAAO;AAAA,IACL,MACE;AAAA,MAAC;AAAA;AAAA,QACC,cAAY,0CAA0C;AAAA,QACtD,YAAW;AAAA,QACX,MAAK;AAAA,QACL,MAAM,8BAAa;AAAA,QACnB,UAAU;AAAA,QACV,SAAS;AAAA,QACT,WAAW;AAAA,QACX,eAAa,6EAAmC,aAAa;AAAA,QAC7D;AAAA,QACA,eAAe;AAAA,QAEf,sDAAC,8BAAW;AAAA;AAAA,IACd;AAAA,IAEF;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
6
+ "names": []
7
7
  }