@elliemae/ds-form-date-time-picker 3.80.0-next.8 → 3.80.0-next.80

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 (157) hide show
  1. package/dist/cjs/config/useControlledDateTimePicker.js +14 -1
  2. package/dist/cjs/config/useControlledDateTimePicker.js.map +2 -2
  3. package/dist/cjs/config/useGlobalKeyHandlers.js +9 -2
  4. package/dist/cjs/config/useGlobalKeyHandlers.js.map +2 -2
  5. package/dist/cjs/constants/index.js +15 -1
  6. package/dist/cjs/constants/index.js.map +2 -2
  7. package/dist/cjs/parts/ClearButton/ClearButton.js +3 -1
  8. package/dist/cjs/parts/ClearButton/ClearButton.js.map +2 -2
  9. package/dist/cjs/parts/ClearButton/useClearButton.js +4 -2
  10. package/dist/cjs/parts/ClearButton/useClearButton.js.map +2 -2
  11. package/dist/cjs/parts/ControlledDateTimePickerContent.js +20 -6
  12. package/dist/cjs/parts/ControlledDateTimePickerContent.js.map +2 -2
  13. package/dist/cjs/parts/DateInputs/DDInput.js +4 -2
  14. package/dist/cjs/parts/DateInputs/DDInput.js.map +2 -2
  15. package/dist/cjs/parts/DateInputs/DateInputs.js +12 -8
  16. package/dist/cjs/parts/DateInputs/DateInputs.js.map +2 -2
  17. package/dist/cjs/parts/DateInputs/MMInput.js +4 -2
  18. package/dist/cjs/parts/DateInputs/MMInput.js.map +2 -2
  19. package/dist/cjs/parts/DateInputs/YYYYInput.js +4 -2
  20. package/dist/cjs/parts/DateInputs/YYYYInput.js.map +2 -2
  21. package/dist/cjs/parts/DateInputs/useDateInputs.js +2 -1
  22. package/dist/cjs/parts/DateInputs/useDateInputs.js.map +2 -2
  23. package/dist/cjs/parts/Pickers/Calendar/CalendarBody.js +18 -14
  24. package/dist/cjs/parts/Pickers/Calendar/CalendarBody.js.map +2 -2
  25. package/dist/cjs/parts/Pickers/Calendar/CalendarContent.js +1 -1
  26. package/dist/cjs/parts/Pickers/Calendar/CalendarContent.js.map +2 -2
  27. package/dist/cjs/parts/Pickers/Calendar/CalendarHead.js +1 -1
  28. package/dist/cjs/parts/Pickers/Calendar/CalendarHead.js.map +2 -2
  29. package/dist/cjs/parts/Pickers/Calendar/CalendarIconTrigger.js +6 -1
  30. package/dist/cjs/parts/Pickers/Calendar/CalendarIconTrigger.js.map +2 -2
  31. package/dist/cjs/parts/Pickers/Calendar/CalendarWeekDays.js +27 -22
  32. package/dist/cjs/parts/Pickers/Calendar/CalendarWeekDays.js.map +2 -2
  33. package/dist/cjs/parts/Pickers/Calendar/Day.js +4 -3
  34. package/dist/cjs/parts/Pickers/Calendar/Day.js.map +2 -2
  35. package/dist/cjs/parts/Pickers/Calendar/Styleds.js +18 -5
  36. package/dist/cjs/parts/Pickers/Calendar/Styleds.js.map +2 -2
  37. package/dist/cjs/parts/Pickers/Calendar/usePopperTriggerLogic.js +12 -3
  38. package/dist/cjs/parts/Pickers/Calendar/usePopperTriggerLogic.js.map +2 -2
  39. package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +6 -1
  40. package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js.map +2 -2
  41. package/dist/cjs/parts/Pickers/PickersIcons.js +2 -1
  42. package/dist/cjs/parts/Pickers/PickersIcons.js.map +2 -2
  43. package/dist/cjs/parts/Pickers/TimeWheel/HoursList.js +8 -7
  44. package/dist/cjs/parts/Pickers/TimeWheel/HoursList.js.map +2 -2
  45. package/dist/cjs/parts/Pickers/TimeWheel/MeridiemList.js +11 -9
  46. package/dist/cjs/parts/Pickers/TimeWheel/MeridiemList.js.map +2 -2
  47. package/dist/cjs/parts/Pickers/TimeWheel/MinutesList.js +8 -7
  48. package/dist/cjs/parts/Pickers/TimeWheel/MinutesList.js.map +2 -2
  49. package/dist/cjs/parts/Pickers/TimeWheel/Styleds.js +18 -5
  50. package/dist/cjs/parts/Pickers/TimeWheel/Styleds.js.map +2 -2
  51. package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelContent.js +2 -2
  52. package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelContent.js.map +2 -2
  53. package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js +6 -1
  54. package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js.map +2 -2
  55. package/dist/cjs/parts/Pickers/TimeWheel/usePopperTriggerLogic.js +4 -3
  56. package/dist/cjs/parts/Pickers/TimeWheel/usePopperTriggerLogic.js.map +2 -2
  57. package/dist/cjs/parts/Styleds.js +19 -40
  58. package/dist/cjs/parts/Styleds.js.map +2 -2
  59. package/dist/cjs/parts/TimeInputs/HHInput.js +4 -2
  60. package/dist/cjs/parts/TimeInputs/HHInput.js.map +2 -2
  61. package/dist/cjs/parts/TimeInputs/MeridiemInput.js +4 -2
  62. package/dist/cjs/parts/TimeInputs/MeridiemInput.js.map +2 -2
  63. package/dist/cjs/parts/TimeInputs/MinutesInput.js +4 -2
  64. package/dist/cjs/parts/TimeInputs/MinutesInput.js.map +2 -2
  65. package/dist/cjs/parts/TimeInputs/TimeInputs.js +12 -11
  66. package/dist/cjs/parts/TimeInputs/TimeInputs.js.map +2 -2
  67. package/dist/cjs/parts/TimeInputs/useTimeInputs.js +2 -1
  68. package/dist/cjs/parts/TimeInputs/useTimeInputs.js.map +2 -2
  69. package/dist/cjs/react-desc-prop-types.js +6 -2
  70. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  71. package/dist/cjs/slot-arguments-polymorphic-typescript.js.map +1 -1
  72. package/dist/cjs/typescript-testing/slot-props.js +73 -0
  73. package/dist/cjs/typescript-testing/slot-props.js.map +2 -2
  74. package/dist/esm/config/useControlledDateTimePicker.js +14 -1
  75. package/dist/esm/config/useControlledDateTimePicker.js.map +2 -2
  76. package/dist/esm/config/useGlobalKeyHandlers.js +9 -2
  77. package/dist/esm/config/useGlobalKeyHandlers.js.map +2 -2
  78. package/dist/esm/constants/index.js +15 -1
  79. package/dist/esm/constants/index.js.map +2 -2
  80. package/dist/esm/parts/ClearButton/ClearButton.js +3 -1
  81. package/dist/esm/parts/ClearButton/ClearButton.js.map +2 -2
  82. package/dist/esm/parts/ClearButton/useClearButton.js +4 -2
  83. package/dist/esm/parts/ClearButton/useClearButton.js.map +2 -2
  84. package/dist/esm/parts/ControlledDateTimePickerContent.js +20 -6
  85. package/dist/esm/parts/ControlledDateTimePickerContent.js.map +2 -2
  86. package/dist/esm/parts/DateInputs/DDInput.js +4 -2
  87. package/dist/esm/parts/DateInputs/DDInput.js.map +2 -2
  88. package/dist/esm/parts/DateInputs/DateInputs.js +12 -8
  89. package/dist/esm/parts/DateInputs/DateInputs.js.map +2 -2
  90. package/dist/esm/parts/DateInputs/MMInput.js +4 -2
  91. package/dist/esm/parts/DateInputs/MMInput.js.map +2 -2
  92. package/dist/esm/parts/DateInputs/YYYYInput.js +4 -2
  93. package/dist/esm/parts/DateInputs/YYYYInput.js.map +2 -2
  94. package/dist/esm/parts/DateInputs/useDateInputs.js +2 -1
  95. package/dist/esm/parts/DateInputs/useDateInputs.js.map +2 -2
  96. package/dist/esm/parts/Pickers/Calendar/CalendarBody.js +18 -14
  97. package/dist/esm/parts/Pickers/Calendar/CalendarBody.js.map +2 -2
  98. package/dist/esm/parts/Pickers/Calendar/CalendarContent.js +1 -1
  99. package/dist/esm/parts/Pickers/Calendar/CalendarContent.js.map +2 -2
  100. package/dist/esm/parts/Pickers/Calendar/CalendarHead.js +1 -1
  101. package/dist/esm/parts/Pickers/Calendar/CalendarHead.js.map +2 -2
  102. package/dist/esm/parts/Pickers/Calendar/CalendarIconTrigger.js +6 -1
  103. package/dist/esm/parts/Pickers/Calendar/CalendarIconTrigger.js.map +2 -2
  104. package/dist/esm/parts/Pickers/Calendar/CalendarWeekDays.js +27 -22
  105. package/dist/esm/parts/Pickers/Calendar/CalendarWeekDays.js.map +2 -2
  106. package/dist/esm/parts/Pickers/Calendar/Day.js +4 -3
  107. package/dist/esm/parts/Pickers/Calendar/Day.js.map +2 -2
  108. package/dist/esm/parts/Pickers/Calendar/Styleds.js +24 -7
  109. package/dist/esm/parts/Pickers/Calendar/Styleds.js.map +2 -2
  110. package/dist/esm/parts/Pickers/Calendar/usePopperTriggerLogic.js +12 -3
  111. package/dist/esm/parts/Pickers/Calendar/usePopperTriggerLogic.js.map +2 -2
  112. package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +6 -1
  113. package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js.map +2 -2
  114. package/dist/esm/parts/Pickers/PickersIcons.js +2 -1
  115. package/dist/esm/parts/Pickers/PickersIcons.js.map +2 -2
  116. package/dist/esm/parts/Pickers/TimeWheel/HoursList.js +8 -7
  117. package/dist/esm/parts/Pickers/TimeWheel/HoursList.js.map +2 -2
  118. package/dist/esm/parts/Pickers/TimeWheel/MeridiemList.js +11 -9
  119. package/dist/esm/parts/Pickers/TimeWheel/MeridiemList.js.map +2 -2
  120. package/dist/esm/parts/Pickers/TimeWheel/MinutesList.js +8 -7
  121. package/dist/esm/parts/Pickers/TimeWheel/MinutesList.js.map +2 -2
  122. package/dist/esm/parts/Pickers/TimeWheel/Styleds.js +24 -7
  123. package/dist/esm/parts/Pickers/TimeWheel/Styleds.js.map +2 -2
  124. package/dist/esm/parts/Pickers/TimeWheel/TimeWheelContent.js +2 -2
  125. package/dist/esm/parts/Pickers/TimeWheel/TimeWheelContent.js.map +2 -2
  126. package/dist/esm/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js +6 -1
  127. package/dist/esm/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js.map +2 -2
  128. package/dist/esm/parts/Pickers/TimeWheel/usePopperTriggerLogic.js +4 -3
  129. package/dist/esm/parts/Pickers/TimeWheel/usePopperTriggerLogic.js.map +2 -2
  130. package/dist/esm/parts/Styleds.js +25 -42
  131. package/dist/esm/parts/Styleds.js.map +2 -2
  132. package/dist/esm/parts/TimeInputs/HHInput.js +4 -2
  133. package/dist/esm/parts/TimeInputs/HHInput.js.map +2 -2
  134. package/dist/esm/parts/TimeInputs/MeridiemInput.js +4 -2
  135. package/dist/esm/parts/TimeInputs/MeridiemInput.js.map +2 -2
  136. package/dist/esm/parts/TimeInputs/MinutesInput.js +4 -2
  137. package/dist/esm/parts/TimeInputs/MinutesInput.js.map +2 -2
  138. package/dist/esm/parts/TimeInputs/TimeInputs.js +12 -11
  139. package/dist/esm/parts/TimeInputs/TimeInputs.js.map +2 -2
  140. package/dist/esm/parts/TimeInputs/useTimeInputs.js +2 -1
  141. package/dist/esm/parts/TimeInputs/useTimeInputs.js.map +2 -2
  142. package/dist/esm/react-desc-prop-types.js +6 -2
  143. package/dist/esm/react-desc-prop-types.js.map +2 -2
  144. package/dist/esm/typescript-testing/slot-props.js +73 -0
  145. package/dist/esm/typescript-testing/slot-props.js.map +2 -2
  146. package/dist/types/config/useControlledDateTimePicker.d.ts +2 -0
  147. package/dist/types/config/useGlobalKeyHandlers.d.ts +3 -1
  148. package/dist/types/constants/index.d.ts +48 -0
  149. package/dist/types/parts/DateInputs/DDInput.d.ts +2 -1
  150. package/dist/types/parts/DateInputs/MMInput.d.ts +2 -1
  151. package/dist/types/parts/DateInputs/YYYYInput.d.ts +2 -1
  152. package/dist/types/parts/Styleds.d.ts +8 -11
  153. package/dist/types/parts/TimeInputs/HHInput.d.ts +2 -1
  154. package/dist/types/parts/TimeInputs/MeridiemInput.d.ts +2 -1
  155. package/dist/types/parts/TimeInputs/MinutesInput.d.ts +2 -1
  156. package/dist/types/slot-arguments-polymorphic-typescript.d.ts +18 -2
  157. package/package.json +12 -12
@@ -58,6 +58,7 @@ const MeridiemA11yLayer = () => {
58
58
  currMeridiemBtnRef,
59
59
  meridiem,
60
60
  instanceUid,
61
+ readOnlyHelperMsgId,
61
62
  latestInteractionRegion,
62
63
  currFocusDescriber,
63
64
  getIsDisabledTime,
@@ -86,7 +87,8 @@ const MeridiemA11yLayer = () => {
86
87
  role: "listbox",
87
88
  "aria-label": "Meridiem",
88
89
  "aria-orientation": "vertical",
89
- "aria-disabled": readOnly || applyAriaDisabled,
90
+ "aria-disabled": applyAriaDisabled || readOnly ? true : void 0,
91
+ "aria-describedby": readOnly ? readOnlyHelperMsgId : void 0,
90
92
  "aria-invalid": isCurrentMeridiemInvalid,
91
93
  "aria-activedescendant": isAmCurrent ? amId : pmId,
92
94
  tabIndex: 0,
@@ -122,7 +124,7 @@ const MeridiemVisualLayer = ({ isFocusedWheel }) => {
122
124
  const hasDisabledStyles = readOnly || applyAriaDisabled;
123
125
  const arrowColor = !hasDisabledStyles ? ["brand-primary", "700"] : void 0;
124
126
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
125
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
127
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, { getOwnerProps: getProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
126
128
  import_Styleds.StyledWheelChangeTimeBtn,
127
129
  {
128
130
  "aria-label": "set am meridiem",
@@ -142,8 +144,8 @@ const MeridiemVisualLayer = ({ isFocusedWheel }) => {
142
144
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallUp, { color: arrowColor })
143
145
  }
144
146
  ) }),
145
- currMeridiem === "AM" || currMeridiem === "" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, { "aria-hidden": "true" }) : null,
146
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
147
+ currMeridiem === "AM" || currMeridiem === "" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, { "aria-hidden": "true", getOwnerProps: getProps }) : null,
148
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, { "aria-hidden": "true", getOwnerProps: getProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
147
149
  import_Styleds.StyledTimeBtn,
148
150
  {
149
151
  $isTheItemVisuallyInTheCenter: isAmCurrent,
@@ -161,7 +163,7 @@ const MeridiemVisualLayer = ({ isFocusedWheel }) => {
161
163
  children: "AM"
162
164
  }
163
165
  ) }),
164
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
166
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, { "aria-hidden": "true", getOwnerProps: getProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
165
167
  import_Styleds.StyledTimeBtn,
166
168
  {
167
169
  $isTheItemVisuallyInTheCenter: isPmCurrent,
@@ -179,8 +181,8 @@ const MeridiemVisualLayer = ({ isFocusedWheel }) => {
179
181
  children: "PM"
180
182
  }
181
183
  ) }),
182
- currMeridiem === "PM" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, { "aria-hidden": "true" }) : null,
183
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
184
+ currMeridiem === "PM" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, { "aria-hidden": "true", getOwnerProps: getProps }) : null,
185
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, { getOwnerProps: getProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
184
186
  import_Styleds.StyledWheelChangeTimeBtn,
185
187
  {
186
188
  "aria-label": "set pm meridiem",
@@ -204,7 +206,7 @@ const MeridiemVisualLayer = ({ isFocusedWheel }) => {
204
206
  };
205
207
  const MeridiemList = () => {
206
208
  const [isFocusedWheel, setIsFocusedWheel] = (0, import_react.useState)(false);
207
- const { trackFocusTimewheelCurrMeridiem } = (0, import_react.useContext)(import_ControlledDateTimePickerCTX.ControlledDateTimePickerContext);
209
+ const { trackFocusTimewheelCurrMeridiem, getProps } = (0, import_react.useContext)(import_ControlledDateTimePickerCTX.ControlledDateTimePickerContext);
208
210
  const handleWheelFocus = (0, import_react.useCallback)(() => {
209
211
  setIsFocusedWheel(true);
210
212
  trackFocusTimewheelCurrMeridiem();
@@ -215,7 +217,7 @@ const MeridiemList = () => {
215
217
  },
216
218
  [setIsFocusedWheel]
217
219
  );
218
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Styleds.StyledWheelList, { onFocus: handleWheelFocus, onBlur: handleWheelBlur, children: [
220
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Styleds.StyledWheelList, { onFocus: handleWheelFocus, onBlur: handleWheelBlur, getOwnerProps: getProps, children: [
219
221
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MeridiemA11yLayer, {}),
220
222
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MeridiemVisualLayer, { isFocusedWheel })
221
223
  ] });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/parts/Pickers/TimeWheel/MeridiemList.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport { ChevronSmallDown, ChevronSmallUp, type SvgIconT } from '@elliemae/ds-icons';\nimport React, { useCallback, useContext, useState } from 'react';\nimport { ControlledDateTimePickerDatatestid } from '../../../constants/index.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { StyledTimeBtn, StyledWheelChangeTimeBtn, StyledWheelList, StyledWheelListItem } from './Styleds.js';\nimport { TimeWheelContext } from './TimeWheelContext.js';\n\nconst srOnlyStyle: React.CSSProperties = {\n position: 'absolute',\n width: '1px',\n height: '1px',\n padding: 0,\n margin: '-1px',\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n whiteSpace: 'nowrap',\n border: 0,\n pointerEvents: 'none',\n};\n\n/**\n * A11y layer: the true semantic contract for screen readers and keyboard users.\n * It is visually hidden and pointer-event-free \u2014 it exists solely to provide a\n * valid, focused listbox with two options that AT can read and keyboard can operate.\n * The visual layer below is fully aria-hidden; this layer is the single source of\n * truth for all assistive technology interaction.\n */\nconst MeridiemA11yLayer = (): JSX.Element => {\n const { currMeridiem, handleCurrMeridiemOnKeyDown } = useContext(TimeWheelContext);\n const {\n currMeridiemBtnRef,\n meridiem,\n instanceUid,\n latestInteractionRegion,\n currFocusDescriber,\n getIsDisabledTime,\n hours,\n minutes,\n props: { readOnly, applyAriaDisabled },\n } = useContext(ControlledDateTimePickerContext);\n\n const isAmCurrent = !currMeridiem || currMeridiem === 'AM';\n const amId = `${instanceUid}-meridiem-am`;\n const pmId = `${instanceUid}-meridiem-pm`;\n const hourMinuteString = `${hours || '01'}:${minutes || '00'}`;\n const isCurrentMeridiemInvalid = isAmCurrent\n ? getIsDisabledTime(`${hourMinuteString} AM`)\n : getIsDisabledTime(`${hourMinuteString} PM`);\n\n const handleListboxRef = useCallback(\n (listboxDomNode: HTMLDivElement) => {\n setTimeout(() => {\n currMeridiemBtnRef.current = listboxDomNode;\n if (latestInteractionRegion === 'timewheel' && currFocusDescriber === 'timewheel-curr-meridiem')\n listboxDomNode?.focus?.();\n });\n },\n [currFocusDescriber, latestInteractionRegion, currMeridiemBtnRef],\n );\n\n return (\n <div\n role=\"listbox\"\n aria-label=\"Meridiem\"\n aria-orientation=\"vertical\"\n aria-disabled={readOnly || applyAriaDisabled}\n aria-invalid={isCurrentMeridiemInvalid}\n aria-activedescendant={isAmCurrent ? amId : pmId}\n tabIndex={0}\n onKeyDown={handleCurrMeridiemOnKeyDown}\n ref={handleListboxRef}\n style={srOnlyStyle}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.CURRENT_MERIDIEM}\n >\n <div role=\"option\" id={amId} aria-selected={meridiem === 'AM'}>\n AM\n </div>\n <div role=\"option\" id={pmId} aria-selected={meridiem === 'PM'}>\n PM\n </div>\n </div>\n );\n};\n\n/**\n * Visual layer: the presentation surface that mouse users see and interact with.\n * All elements are aria-hidden \u2014 AT never reaches this layer. The chevron buttons\n * and AM/PM items are click-only affordances; on click they update state and redirect\n * focus to the a11y layer above so keyboard can continue from there. No ARIA roles,\n * labels, or keyboard handlers live here.\n */\nconst MeridiemVisualLayer = ({ isFocusedWheel }: { isFocusedWheel: boolean }): JSX.Element => {\n const { currMeridiem, handleTimeWheelBtnChangeMeridiem } = useContext(TimeWheelContext);\n const {\n prevMeridiemBtnRef,\n currMeridiemBtnRef,\n nextMeridiemBtnRef,\n getIsDisabledTime,\n hours,\n minutes,\n meridiem,\n getProps,\n props: { readOnly, applyAriaDisabled },\n } = useContext(ControlledDateTimePickerContext);\n\n const isAmCurrent = !currMeridiem || currMeridiem === 'AM';\n const isPmCurrent = currMeridiem === 'PM';\n const hourMinuteString = `${hours || '01'}:${minutes || '00'}`;\n const isNotAValidAm = getIsDisabledTime(`${hourMinuteString} AM`);\n const isNotAValidPm = getIsDisabledTime(`${hourMinuteString} PM`);\n\n const hasDisabledStyles = readOnly || applyAriaDisabled;\n const arrowColor = !hasDisabledStyles ? (['brand-primary', '700'] as SvgIconT.ColorType) : undefined;\n\n return (\n <>\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n aria-label=\"set am meridiem\"\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.PREV_MERIDIEM}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => {\n handleTimeWheelBtnChangeMeridiem('AM', e);\n currMeridiemBtnRef.current?.focus();\n }}\n innerRef={prevMeridiemBtnRef}\n tabIndex={-1}\n type=\"button\"\n applyAriaDisabled={applyAriaDisabled}\n readOnly={readOnly}\n getOwnerProps={getProps}\n >\n <ChevronSmallUp color={arrowColor} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n {currMeridiem === 'AM' || currMeridiem === '' ? <StyledWheelListItem aria-hidden=\"true\" /> : null}\n <StyledWheelListItem aria-hidden=\"true\">\n <StyledTimeBtn\n $isTheItemVisuallyInTheCenter={isAmCurrent}\n $isNotAValidSelection={isNotAValidAm}\n $selected={isAmCurrent && !!meridiem}\n $isUnset={!meridiem}\n $isFocusedWheel={isFocusedWheel}\n data-testid={\n ControlledDateTimePickerDatatestid.TIMEWHEEL[\n isAmCurrent ? 'CURRENT_MERIDIEM_VISUAL_ELEMENT' : 'MERIDIEM_VISUAL_ELEMENT'\n ]\n }\n onClick={(e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => {\n handleTimeWheelBtnChangeMeridiem('AM', e);\n currMeridiemBtnRef.current?.focus();\n }}\n getOwnerProps={getProps}\n $readOnly={readOnly || applyAriaDisabled}\n >\n AM\n </StyledTimeBtn>\n </StyledWheelListItem>\n <StyledWheelListItem aria-hidden=\"true\">\n <StyledTimeBtn\n $isTheItemVisuallyInTheCenter={isPmCurrent}\n $selected={isPmCurrent && !!meridiem}\n $isNotAValidSelection={isNotAValidPm}\n $isUnset={!meridiem}\n $isFocusedWheel={isFocusedWheel}\n data-testid={\n ControlledDateTimePickerDatatestid.TIMEWHEEL[\n isPmCurrent ? 'CURRENT_MERIDIEM_VISUAL_ELEMENT' : 'MERIDIEM_VISUAL_ELEMENT'\n ]\n }\n onClick={(e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => {\n handleTimeWheelBtnChangeMeridiem('PM', e);\n currMeridiemBtnRef.current?.focus();\n }}\n getOwnerProps={getProps}\n $readOnly={readOnly || applyAriaDisabled}\n >\n PM\n </StyledTimeBtn>\n </StyledWheelListItem>\n {currMeridiem === 'PM' ? <StyledWheelListItem aria-hidden=\"true\" /> : null}\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n aria-label=\"set pm meridiem\"\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.NEXT_MERIDIEM}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => {\n handleTimeWheelBtnChangeMeridiem('PM', e);\n currMeridiemBtnRef.current?.focus();\n }}\n innerRef={nextMeridiemBtnRef}\n tabIndex={-1}\n type=\"button\"\n applyAriaDisabled={applyAriaDisabled}\n readOnly={readOnly}\n getOwnerProps={getProps}\n >\n <ChevronSmallDown color={arrowColor} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n </>\n );\n};\n\nexport const MeridiemList = (): JSX.Element => {\n const [isFocusedWheel, setIsFocusedWheel] = useState(false);\n const { trackFocusTimewheelCurrMeridiem } = useContext(ControlledDateTimePickerContext);\n\n const handleWheelFocus = useCallback(() => {\n setIsFocusedWheel(true);\n trackFocusTimewheelCurrMeridiem();\n }, [setIsFocusedWheel, trackFocusTimewheelCurrMeridiem]);\n\n const handleWheelBlur = useCallback(\n (e: React.FocusEvent<HTMLDivElement>) => {\n if (!e.currentTarget.contains(e.relatedTarget as Node)) setIsFocusedWheel(false);\n },\n [setIsFocusedWheel],\n );\n\n return (\n <StyledWheelList onFocus={handleWheelFocus} onBlur={handleWheelBlur}>\n <MeridiemA11yLayer />\n <MeridiemVisualLayer isFocusedWheel={isFocusedWheel} />\n </StyledWheelList>\n );\n};\n\nexport default MeridiemList;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+DnB;AA7DJ,sBAAgE;AAChE,mBAAyD;AACzD,uBAAmD;AACnD,yCAAgD;AAChD,qBAA8F;AAC9F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J;AAEO,MAAM,eAAe,MAAmB;AAC7C,QAAM,CAAC,gBAAgB,iBAAiB,QAAI,uBAAS,KAAK;AAC1D,QAAM,EAAE,gCAAgC,QAAI,yBAAW,kEAA+B;AAEtF,QAAM,uBAAmB,0BAAY,MAAM;AACzC,sBAAkB,IAAI;AACtB,oCAAgC;AAAA,EAClC,GAAG,CAAC,mBAAmB,+BAA+B,CAAC;AAEvD,QAAM,sBAAkB;AAAA,IACtB,CAAC,MAAwC;AACvC,UAAI,CAAC,EAAE,cAAc,SAAS,EAAE,aAAqB,EAAG,mBAAkB,KAAK;AAAA,IACjF;AAAA,IACA,CAAC,iBAAiB;AAAA,EACpB;AAEA,SACE,6CAAC,kCAAgB,SAAS,kBAAkB,QAAQ,iBAClD;AAAA,gDAAC,qBAAkB;AAAA,IACnB,4CAAC,uBAAoB,gBAAgC;AAAA,KACvD;AAEJ;AAEA,IAAO,uBAAQ;",
4
+ "sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport { ChevronSmallDown, ChevronSmallUp, type SvgIconT } from '@elliemae/ds-icons';\nimport React, { useCallback, useContext, useState } from 'react';\nimport { ControlledDateTimePickerDatatestid } from '../../../constants/index.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { StyledTimeBtn, StyledWheelChangeTimeBtn, StyledWheelList, StyledWheelListItem } from './Styleds.js';\nimport { TimeWheelContext } from './TimeWheelContext.js';\n\nconst srOnlyStyle: React.CSSProperties = {\n position: 'absolute',\n width: '1px',\n height: '1px',\n padding: 0,\n margin: '-1px',\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n whiteSpace: 'nowrap',\n border: 0,\n pointerEvents: 'none',\n};\n\n/**\n * A11y layer: the true semantic contract for screen readers and keyboard users.\n * It is visually hidden and pointer-event-free \u2014 it exists solely to provide a\n * valid, focused listbox with two options that AT can read and keyboard can operate.\n * The visual layer below is fully aria-hidden; this layer is the single source of\n * truth for all assistive technology interaction.\n */\nconst MeridiemA11yLayer = (): JSX.Element => {\n const { currMeridiem, handleCurrMeridiemOnKeyDown } = useContext(TimeWheelContext);\n const {\n currMeridiemBtnRef,\n meridiem,\n instanceUid,\n readOnlyHelperMsgId,\n latestInteractionRegion,\n currFocusDescriber,\n getIsDisabledTime,\n hours,\n minutes,\n props: { readOnly, applyAriaDisabled },\n } = useContext(ControlledDateTimePickerContext);\n\n const isAmCurrent = !currMeridiem || currMeridiem === 'AM';\n const amId = `${instanceUid}-meridiem-am`;\n const pmId = `${instanceUid}-meridiem-pm`;\n const hourMinuteString = `${hours || '01'}:${minutes || '00'}`;\n const isCurrentMeridiemInvalid = isAmCurrent\n ? getIsDisabledTime(`${hourMinuteString} AM`)\n : getIsDisabledTime(`${hourMinuteString} PM`);\n\n const handleListboxRef = useCallback(\n (listboxDomNode: HTMLDivElement) => {\n setTimeout(() => {\n currMeridiemBtnRef.current = listboxDomNode;\n if (latestInteractionRegion === 'timewheel' && currFocusDescriber === 'timewheel-curr-meridiem')\n listboxDomNode?.focus?.();\n });\n },\n [currFocusDescriber, latestInteractionRegion, currMeridiemBtnRef],\n );\n\n return (\n <div\n role=\"listbox\"\n aria-label=\"Meridiem\"\n aria-orientation=\"vertical\"\n aria-disabled={applyAriaDisabled || readOnly ? true : undefined}\n aria-describedby={readOnly ? readOnlyHelperMsgId : undefined}\n aria-invalid={isCurrentMeridiemInvalid}\n aria-activedescendant={isAmCurrent ? amId : pmId}\n tabIndex={0}\n onKeyDown={handleCurrMeridiemOnKeyDown}\n ref={handleListboxRef}\n style={srOnlyStyle}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.CURRENT_MERIDIEM}\n >\n <div role=\"option\" id={amId} aria-selected={meridiem === 'AM'}>\n AM\n </div>\n <div role=\"option\" id={pmId} aria-selected={meridiem === 'PM'}>\n PM\n </div>\n </div>\n );\n};\n\n/**\n * Visual layer: the presentation surface that mouse users see and interact with.\n * All elements are aria-hidden \u2014 AT never reaches this layer. The chevron buttons\n * and AM/PM items are click-only affordances; on click they update state and redirect\n * focus to the a11y layer above so keyboard can continue from there. No ARIA roles,\n * labels, or keyboard handlers live here.\n */\nconst MeridiemVisualLayer = ({ isFocusedWheel }: { isFocusedWheel: boolean }): JSX.Element => {\n const { currMeridiem, handleTimeWheelBtnChangeMeridiem } = useContext(TimeWheelContext);\n const {\n prevMeridiemBtnRef,\n currMeridiemBtnRef,\n nextMeridiemBtnRef,\n getIsDisabledTime,\n hours,\n minutes,\n meridiem,\n getProps,\n props: { readOnly, applyAriaDisabled },\n } = useContext(ControlledDateTimePickerContext);\n\n const isAmCurrent = !currMeridiem || currMeridiem === 'AM';\n const isPmCurrent = currMeridiem === 'PM';\n const hourMinuteString = `${hours || '01'}:${minutes || '00'}`;\n const isNotAValidAm = getIsDisabledTime(`${hourMinuteString} AM`);\n const isNotAValidPm = getIsDisabledTime(`${hourMinuteString} PM`);\n\n const hasDisabledStyles = readOnly || applyAriaDisabled;\n const arrowColor = !hasDisabledStyles ? (['brand-primary', '700'] as SvgIconT.ColorType) : undefined;\n\n return (\n <>\n <StyledWheelListItem getOwnerProps={getProps}>\n <StyledWheelChangeTimeBtn\n aria-label=\"set am meridiem\"\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.PREV_MERIDIEM}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => {\n handleTimeWheelBtnChangeMeridiem('AM', e);\n currMeridiemBtnRef.current?.focus();\n }}\n innerRef={prevMeridiemBtnRef}\n tabIndex={-1}\n type=\"button\"\n applyAriaDisabled={applyAriaDisabled}\n readOnly={readOnly}\n getOwnerProps={getProps}\n >\n <ChevronSmallUp color={arrowColor} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n {currMeridiem === 'AM' || currMeridiem === '' ? (\n <StyledWheelListItem aria-hidden=\"true\" getOwnerProps={getProps} />\n ) : null}\n <StyledWheelListItem aria-hidden=\"true\" getOwnerProps={getProps}>\n <StyledTimeBtn\n $isTheItemVisuallyInTheCenter={isAmCurrent}\n $isNotAValidSelection={isNotAValidAm}\n $selected={isAmCurrent && !!meridiem}\n $isUnset={!meridiem}\n $isFocusedWheel={isFocusedWheel}\n data-testid={\n ControlledDateTimePickerDatatestid.TIMEWHEEL[\n isAmCurrent ? 'CURRENT_MERIDIEM_VISUAL_ELEMENT' : 'MERIDIEM_VISUAL_ELEMENT'\n ]\n }\n onClick={(e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => {\n handleTimeWheelBtnChangeMeridiem('AM', e);\n currMeridiemBtnRef.current?.focus();\n }}\n getOwnerProps={getProps}\n $readOnly={readOnly || applyAriaDisabled}\n >\n AM\n </StyledTimeBtn>\n </StyledWheelListItem>\n <StyledWheelListItem aria-hidden=\"true\" getOwnerProps={getProps}>\n <StyledTimeBtn\n $isTheItemVisuallyInTheCenter={isPmCurrent}\n $selected={isPmCurrent && !!meridiem}\n $isNotAValidSelection={isNotAValidPm}\n $isUnset={!meridiem}\n $isFocusedWheel={isFocusedWheel}\n data-testid={\n ControlledDateTimePickerDatatestid.TIMEWHEEL[\n isPmCurrent ? 'CURRENT_MERIDIEM_VISUAL_ELEMENT' : 'MERIDIEM_VISUAL_ELEMENT'\n ]\n }\n onClick={(e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => {\n handleTimeWheelBtnChangeMeridiem('PM', e);\n currMeridiemBtnRef.current?.focus();\n }}\n getOwnerProps={getProps}\n $readOnly={readOnly || applyAriaDisabled}\n >\n PM\n </StyledTimeBtn>\n </StyledWheelListItem>\n {currMeridiem === 'PM' ? <StyledWheelListItem aria-hidden=\"true\" getOwnerProps={getProps} /> : null}\n <StyledWheelListItem getOwnerProps={getProps}>\n <StyledWheelChangeTimeBtn\n aria-label=\"set pm meridiem\"\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.NEXT_MERIDIEM}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => {\n handleTimeWheelBtnChangeMeridiem('PM', e);\n currMeridiemBtnRef.current?.focus();\n }}\n innerRef={nextMeridiemBtnRef}\n tabIndex={-1}\n type=\"button\"\n applyAriaDisabled={applyAriaDisabled}\n readOnly={readOnly}\n getOwnerProps={getProps}\n >\n <ChevronSmallDown color={arrowColor} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n </>\n );\n};\n\nexport const MeridiemList = (): JSX.Element => {\n const [isFocusedWheel, setIsFocusedWheel] = useState(false);\n const { trackFocusTimewheelCurrMeridiem, getProps } = useContext(ControlledDateTimePickerContext);\n\n const handleWheelFocus = useCallback(() => {\n setIsFocusedWheel(true);\n trackFocusTimewheelCurrMeridiem();\n }, [setIsFocusedWheel, trackFocusTimewheelCurrMeridiem]);\n\n const handleWheelBlur = useCallback(\n (e: React.FocusEvent<HTMLDivElement>) => {\n if (!e.currentTarget.contains(e.relatedTarget as Node)) setIsFocusedWheel(false);\n },\n [setIsFocusedWheel],\n );\n\n return (\n <StyledWheelList onFocus={handleWheelFocus} onBlur={handleWheelBlur} getOwnerProps={getProps}>\n <MeridiemA11yLayer />\n <MeridiemVisualLayer isFocusedWheel={isFocusedWheel} />\n </StyledWheelList>\n );\n};\n\nexport default MeridiemList;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgEnB;AA9DJ,sBAAgE;AAChE,mBAAyD;AACzD,uBAAmD;AACnD,yCAAgD;AAChD,qBAA8F;AAC9F,8BAAiC;AAEjC,MAAM,cAAmC;AAAA,EACvC,UAAU;AAAA,EACV,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM;AAAA,EACN,YAAY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7C,QAAM,CAAC,gBAAgB,iBAAiB,QAAI,uBAAS,KAAK;AAC1D,QAAM,EAAE,iCAAiC,SAAS,QAAI,yBAAW,kEAA+B;AAEhG,QAAM,uBAAmB,0BAAY,MAAM;AACzC,sBAAkB,IAAI;AACtB,oCAAgC;AAAA,EAClC,GAAG,CAAC,mBAAmB,+BAA+B,CAAC;AAEvD,QAAM,sBAAkB;AAAA,IACtB,CAAC,MAAwC;AACvC,UAAI,CAAC,EAAE,cAAc,SAAS,EAAE,aAAqB,EAAG,mBAAkB,KAAK;AAAA,IACjF;AAAA,IACA,CAAC,iBAAiB;AAAA,EACpB;AAEA,SACE,6CAAC,kCAAgB,SAAS,kBAAkB,QAAQ,iBAAiB,eAAe,UAClF;AAAA,gDAAC,qBAAkB;AAAA,IACnB,4CAAC,uBAAoB,gBAAgC;AAAA,KACvD;AAEJ;AAEA,IAAO,uBAAQ;",
6
6
  "names": []
7
7
  }
@@ -62,6 +62,7 @@ const MinutesList = () => {
62
62
  latestInteractionRegion,
63
63
  trackFocusTimewheelCurrMinute,
64
64
  getProps,
65
+ readOnlyHelperMsgId,
65
66
  props: { readOnly, applyAriaDisabled }
66
67
  } = (0, import_react.useContext)(import_ControlledDateTimePickerCTX.ControlledDateTimePickerContext);
67
68
  const handleCurrMeridiemRef = (0, import_react.useCallback)(
@@ -87,8 +88,8 @@ const MinutesList = () => {
87
88
  );
88
89
  const hasDisabledStyles = readOnly || applyAriaDisabled;
89
90
  const arrowColor = !hasDisabledStyles ? ["brand-primary", "700"] : void 0;
90
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Styleds.StyledWheelList, { onFocus: handleWheelFocus, onBlur: handleWheelBlur, children: [
91
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
91
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Styleds.StyledWheelList, { onFocus: handleWheelFocus, onBlur: handleWheelBlur, getOwnerProps: getProps, children: [
92
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, { getOwnerProps: getProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
92
93
  import_Styleds.StyledWheelChangeTimeBtn,
93
94
  {
94
95
  "aria-label": "subtract one minute",
@@ -107,7 +108,7 @@ const MinutesList = () => {
107
108
  ) }),
108
109
  visibleMinutes.map((minutesString) => {
109
110
  const key = `timewheel-minutes-${minutesString || ""}`;
110
- if (!minutesString) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, {}, key);
111
+ if (!minutesString) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, { getOwnerProps: getProps }, key);
111
112
  const currMinutesTimeString = `${currHourNum}:${minutesString} ${currMeridiem}`;
112
113
  const isEmptyCurrValueCurrentListItem = !minutes && (0, import_numberHelpers.convertToPositiveNumberIfPossible)(minutesString) === currMinuteNum;
113
114
  const isTheItemVisuallyInTheCenter = isEmptyCurrValueCurrentListItem || minutes === minutesString;
@@ -123,13 +124,13 @@ const MinutesList = () => {
123
124
  "aria-label": `${minutesString} minutes`,
124
125
  "aria-valuemin": 0,
125
126
  "aria-valuemax": 59,
126
- "aria-disabled": readOnly || applyAriaDisabled,
127
+ "aria-disabled": applyAriaDisabled || readOnly ? true : void 0,
128
+ "aria-describedby": readOnly ? readOnlyHelperMsgId : void 0,
127
129
  "aria-invalid": isNotAValidSelection,
128
- "aria-readonly": readOnly || applyAriaDisabled,
129
130
  onKeyDown: isTheItemVisuallyInTheCenter ? handleCurrMinutesOnKeyDown : void 0,
130
131
  innerRef: isTheItemVisuallyInTheCenter ? handleCurrMeridiemRef : void 0
131
132
  };
132
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
133
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, { getOwnerProps: getProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
133
134
  import_Styleds.StyledTimeBtn,
134
135
  {
135
136
  $isTheItemVisuallyInTheCenter: isTheItemVisuallyInTheCenter,
@@ -148,7 +149,7 @@ const MinutesList = () => {
148
149
  }
149
150
  ) }, key);
150
151
  }),
151
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
152
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Styleds.StyledWheelListItem, { getOwnerProps: getProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
152
153
  import_Styleds.StyledWheelChangeTimeBtn,
153
154
  {
154
155
  "aria-label": "add one minute",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/parts/Pickers/TimeWheel/MinutesList.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable complexity */\nimport { ChevronSmallDown, ChevronSmallUp, type SvgIconT } from '@elliemae/ds-icons';\nimport React, { useCallback, useContext, useState } from 'react';\nimport { ControlledDateTimePickerDatatestid } from '../../../constants/index.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { convertToPositiveNumberIfPossible } from '../../../utils/numberHelpers.js';\nimport { StyledTimeBtn, StyledWheelChangeTimeBtn, StyledWheelList, StyledWheelListItem } from './Styleds.js';\nimport { TimeWheelContext } from './TimeWheelContext.js';\n\nexport const MinutesList = (): JSX.Element => {\n const {\n currHourNum,\n currMinuteNum,\n currMeridiem,\n visibleMinutes,\n handlePrevMinute,\n handleNextMinute,\n handleTimeWheelBtnChangeMinutes,\n handleCurrMinutesOnKeyDown,\n } = useContext(TimeWheelContext);\n const {\n prevMinutesBtnRef,\n currMinutesBtnRef,\n nextMinutesBtnRef,\n getIsDisabledTime,\n minutes,\n currFocusDescriber,\n latestInteractionRegion,\n trackFocusTimewheelCurrMinute,\n getProps,\n props: { readOnly, applyAriaDisabled },\n } = useContext(ControlledDateTimePickerContext);\n\n const handleCurrMeridiemRef = useCallback(\n (ButtonDomNode: HTMLDivElement) => {\n setTimeout(() => {\n currMinutesBtnRef.current = ButtonDomNode;\n if (latestInteractionRegion === 'timewheel' && currFocusDescriber === 'timewheel-curr-minute')\n ButtonDomNode?.focus?.();\n });\n },\n [currFocusDescriber, latestInteractionRegion, currMinutesBtnRef],\n );\n\n const [isFocusedWheel, setIsFocusedWheel] = useState(false);\n\n const handleWheelFocus = useCallback(() => {\n setIsFocusedWheel(true);\n trackFocusTimewheelCurrMinute();\n }, [setIsFocusedWheel, trackFocusTimewheelCurrMinute]);\n\n const handleWheelBlur = useCallback(\n (e: React.FocusEvent<HTMLDivElement>) => {\n if (!e.currentTarget.contains(e.relatedTarget as Node)) setIsFocusedWheel(false);\n },\n [setIsFocusedWheel],\n );\n\n const hasDisabledStyles = readOnly || applyAriaDisabled;\n\n const arrowColor = !hasDisabledStyles ? (['brand-primary', '700'] as SvgIconT.ColorType) : undefined;\n return (\n <StyledWheelList onFocus={handleWheelFocus} onBlur={handleWheelBlur}>\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n aria-label=\"subtract one minute\"\n buttonType=\"raw\"\n size=\"m\"\n onClick={handlePrevMinute}\n innerRef={prevMinutesBtnRef}\n tabIndex={-1}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.PREV_MINUTE}\n applyAriaDisabled={applyAriaDisabled}\n readOnly={readOnly}\n type=\"button\"\n getOwnerProps={getProps}\n >\n <ChevronSmallUp color={arrowColor} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n {visibleMinutes.map((minutesString) => {\n const key = `timewheel-minutes-${minutesString || ''}`;\n if (!minutesString) return <StyledWheelListItem key={key} />;\n const currMinutesTimeString = `${currHourNum}:${minutesString} ${currMeridiem}`;\n const isEmptyCurrValueCurrentListItem =\n !minutes && convertToPositiveNumberIfPossible(minutesString) === currMinuteNum;\n const isTheItemVisuallyInTheCenter = isEmptyCurrValueCurrentListItem || minutes === minutesString;\n const isNotAValidSelection = getIsDisabledTime(currMinutesTimeString);\n\n const tabIndex = isTheItemVisuallyInTheCenter ? 0 : -1;\n const isSelected = minutes.length === 2 && convertToPositiveNumberIfPossible(minutesString) === currMinuteNum;\n const btnProps = {\n role: 'spinbutton',\n ...(isSelected && {\n 'aria-valuenow': convertToPositiveNumberIfPossible(minutesString),\n 'aria-valuetext': `${minutesString} minutes`,\n }),\n 'aria-label': `${minutesString} minutes`,\n 'aria-valuemin': 0,\n 'aria-valuemax': 59,\n 'aria-disabled': readOnly || applyAriaDisabled,\n 'aria-invalid': isNotAValidSelection,\n 'aria-readonly': readOnly || applyAriaDisabled,\n onKeyDown: isTheItemVisuallyInTheCenter ? handleCurrMinutesOnKeyDown : undefined,\n innerRef: isTheItemVisuallyInTheCenter ? handleCurrMeridiemRef : undefined,\n };\n return (\n <StyledWheelListItem key={key}>\n <StyledTimeBtn\n $isTheItemVisuallyInTheCenter={isTheItemVisuallyInTheCenter}\n $isNotAValidSelection={isNotAValidSelection}\n $selected={isSelected}\n $isUnset={!minutes}\n $readOnly={readOnly || applyAriaDisabled}\n $isFocusedWheel={isFocusedWheel}\n data-testid={\n ControlledDateTimePickerDatatestid.TIMEWHEEL[isTheItemVisuallyInTheCenter ? 'CURRENT_MINUTE' : 'MINUTE']\n }\n onClick={(e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) =>\n handleTimeWheelBtnChangeMinutes(minutesString, e)\n }\n tabIndex={tabIndex}\n type=\"button\"\n {...btnProps}\n getOwnerProps={getProps}\n >\n {minutesString}\n </StyledTimeBtn>\n </StyledWheelListItem>\n );\n })}\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n aria-label=\"add one minute\"\n buttonType=\"raw\"\n size=\"m\"\n onClick={handleNextMinute}\n innerRef={nextMinutesBtnRef}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.NEXT_MINUTE}\n tabIndex={-1}\n applyAriaDisabled={applyAriaDisabled}\n readOnly={readOnly}\n type=\"button\"\n getOwnerProps={getProps}\n >\n <ChevronSmallDown color={arrowColor} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n </StyledWheelList>\n );\n};\n\nexport default MinutesList;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8DnB;AA7DJ,sBAAgE;AAChE,mBAAyD;AACzD,uBAAmD;AACnD,yCAAgD;AAChD,2BAAkD;AAClD,qBAA8F;AAC9F,8BAAiC;AAE1B,MAAM,cAAc,MAAmB;AAC5C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,wCAAgB;AAC/B,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,EAAE,UAAU,kBAAkB;AAAA,EACvC,QAAI,yBAAW,kEAA+B;AAE9C,QAAM,4BAAwB;AAAA,IAC5B,CAAC,kBAAkC;AACjC,iBAAW,MAAM;AACf,0BAAkB,UAAU;AAC5B,YAAI,4BAA4B,eAAe,uBAAuB;AACpE,yBAAe,QAAQ;AAAA,MAC3B,CAAC;AAAA,IACH;AAAA,IACA,CAAC,oBAAoB,yBAAyB,iBAAiB;AAAA,EACjE;AAEA,QAAM,CAAC,gBAAgB,iBAAiB,QAAI,uBAAS,KAAK;AAE1D,QAAM,uBAAmB,0BAAY,MAAM;AACzC,sBAAkB,IAAI;AACtB,kCAA8B;AAAA,EAChC,GAAG,CAAC,mBAAmB,6BAA6B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AAiB,YAAY;AAAA,QAC7B,gBAAgB;AAAA,QAChB,iBAAiB,YAAY;AAAA,QAC7B,WAAW,+BAA+B,6BAA6B;AAAA,QACvE,UAAU,+BAA+B,wBAAwB;AAAA,MACnE;AACA,aACE,4CAAC,sCACC;AAAA,QAAC;AAAA;AAAA,UACC,+BAA+B;AAAA,UAC/B,uBAAuB;AAAA,UACvB,WAAW;AAAA,UACX,UAAU,CAAC;AAAA,UACX,WAAW,YAAY;AAAA,UACvB,iBAAiB;AAAA,UACjB,eACE,oDAAmC,UAAU,+BAA+B,mBAAmB,QAAQ;AAAA,UAEzG,SAAS,CAAC,MACR,gCAAgC,eAAe,CAAC;AAAA,UAElD;AAAA,UACA,MAAK;AAAA,UACJ,GAAG;AAAA,UACJ,eAAe;AAAA,UAEd;AAAA;AAAA,MACH,KApBwB,GAqB1B;AAAA,IAEJ,CAAC;AAAA,IACD,4CAAC,sCACC;AAAA,MAAC;AAAA;AAAA,QACC,cAAW;AAAA,QACX,YAAW;AAAA,QACX,MAAK;AAAA,QACL,SAAS;AAAA,QACT,UAAU;AAAA,QACV,eAAa,oDAAmC,UAAU;AAAA,QAC1D,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA,MAAK;AAAA,QACL,eAAe;AAAA,QAEf,sDAAC,oCAAiB,OAAO,YAAY;AAAA;AAAA,IACvC,GACF;AAAA,KACF;AAEJ;AAEA,IAAO,sBAAQ;",
4
+ "sourcesContent": ["/* eslint-disable complexity */\nimport { ChevronSmallDown, ChevronSmallUp, type SvgIconT } from '@elliemae/ds-icons';\nimport React, { useCallback, useContext, useState } from 'react';\nimport { ControlledDateTimePickerDatatestid } from '../../../constants/index.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { convertToPositiveNumberIfPossible } from '../../../utils/numberHelpers.js';\nimport { StyledTimeBtn, StyledWheelChangeTimeBtn, StyledWheelList, StyledWheelListItem } from './Styleds.js';\nimport { TimeWheelContext } from './TimeWheelContext.js';\n\nexport const MinutesList = (): JSX.Element => {\n const {\n currHourNum,\n currMinuteNum,\n currMeridiem,\n visibleMinutes,\n handlePrevMinute,\n handleNextMinute,\n handleTimeWheelBtnChangeMinutes,\n handleCurrMinutesOnKeyDown,\n } = useContext(TimeWheelContext);\n const {\n prevMinutesBtnRef,\n currMinutesBtnRef,\n nextMinutesBtnRef,\n getIsDisabledTime,\n minutes,\n currFocusDescriber,\n latestInteractionRegion,\n trackFocusTimewheelCurrMinute,\n getProps,\n readOnlyHelperMsgId,\n props: { readOnly, applyAriaDisabled },\n } = useContext(ControlledDateTimePickerContext);\n\n const handleCurrMeridiemRef = useCallback(\n (ButtonDomNode: HTMLDivElement) => {\n setTimeout(() => {\n currMinutesBtnRef.current = ButtonDomNode;\n if (latestInteractionRegion === 'timewheel' && currFocusDescriber === 'timewheel-curr-minute')\n ButtonDomNode?.focus?.();\n });\n },\n [currFocusDescriber, latestInteractionRegion, currMinutesBtnRef],\n );\n\n const [isFocusedWheel, setIsFocusedWheel] = useState(false);\n\n const handleWheelFocus = useCallback(() => {\n setIsFocusedWheel(true);\n trackFocusTimewheelCurrMinute();\n }, [setIsFocusedWheel, trackFocusTimewheelCurrMinute]);\n\n const handleWheelBlur = useCallback(\n (e: React.FocusEvent<HTMLDivElement>) => {\n if (!e.currentTarget.contains(e.relatedTarget as Node)) setIsFocusedWheel(false);\n },\n [setIsFocusedWheel],\n );\n\n const hasDisabledStyles = readOnly || applyAriaDisabled;\n\n const arrowColor = !hasDisabledStyles ? (['brand-primary', '700'] as SvgIconT.ColorType) : undefined;\n return (\n <StyledWheelList onFocus={handleWheelFocus} onBlur={handleWheelBlur} getOwnerProps={getProps}>\n <StyledWheelListItem getOwnerProps={getProps}>\n <StyledWheelChangeTimeBtn\n aria-label=\"subtract one minute\"\n buttonType=\"raw\"\n size=\"m\"\n onClick={handlePrevMinute}\n innerRef={prevMinutesBtnRef}\n tabIndex={-1}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.PREV_MINUTE}\n applyAriaDisabled={applyAriaDisabled}\n readOnly={readOnly}\n type=\"button\"\n getOwnerProps={getProps}\n >\n <ChevronSmallUp color={arrowColor} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n {visibleMinutes.map((minutesString) => {\n const key = `timewheel-minutes-${minutesString || ''}`;\n if (!minutesString) return <StyledWheelListItem key={key} getOwnerProps={getProps} />;\n const currMinutesTimeString = `${currHourNum}:${minutesString} ${currMeridiem}`;\n const isEmptyCurrValueCurrentListItem =\n !minutes && convertToPositiveNumberIfPossible(minutesString) === currMinuteNum;\n const isTheItemVisuallyInTheCenter = isEmptyCurrValueCurrentListItem || minutes === minutesString;\n const isNotAValidSelection = getIsDisabledTime(currMinutesTimeString);\n\n const tabIndex = isTheItemVisuallyInTheCenter ? 0 : -1;\n const isSelected = minutes.length === 2 && convertToPositiveNumberIfPossible(minutesString) === currMinuteNum;\n const btnProps = {\n role: 'spinbutton',\n ...(isSelected && {\n 'aria-valuenow': convertToPositiveNumberIfPossible(minutesString),\n 'aria-valuetext': `${minutesString} minutes`,\n }),\n 'aria-label': `${minutesString} minutes`,\n 'aria-valuemin': 0,\n 'aria-valuemax': 59,\n 'aria-disabled': applyAriaDisabled || readOnly ? true : undefined,\n 'aria-describedby': readOnly ? readOnlyHelperMsgId : undefined,\n 'aria-invalid': isNotAValidSelection,\n onKeyDown: isTheItemVisuallyInTheCenter ? handleCurrMinutesOnKeyDown : undefined,\n innerRef: isTheItemVisuallyInTheCenter ? handleCurrMeridiemRef : undefined,\n };\n return (\n <StyledWheelListItem key={key} getOwnerProps={getProps}>\n <StyledTimeBtn\n $isTheItemVisuallyInTheCenter={isTheItemVisuallyInTheCenter}\n $isNotAValidSelection={isNotAValidSelection}\n $selected={isSelected}\n $isUnset={!minutes}\n $readOnly={readOnly || applyAriaDisabled}\n $isFocusedWheel={isFocusedWheel}\n data-testid={\n ControlledDateTimePickerDatatestid.TIMEWHEEL[isTheItemVisuallyInTheCenter ? 'CURRENT_MINUTE' : 'MINUTE']\n }\n onClick={(e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) =>\n handleTimeWheelBtnChangeMinutes(minutesString, e)\n }\n tabIndex={tabIndex}\n type=\"button\"\n {...btnProps}\n getOwnerProps={getProps}\n >\n {minutesString}\n </StyledTimeBtn>\n </StyledWheelListItem>\n );\n })}\n <StyledWheelListItem getOwnerProps={getProps}>\n <StyledWheelChangeTimeBtn\n aria-label=\"add one minute\"\n buttonType=\"raw\"\n size=\"m\"\n onClick={handleNextMinute}\n innerRef={nextMinutesBtnRef}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.NEXT_MINUTE}\n tabIndex={-1}\n applyAriaDisabled={applyAriaDisabled}\n readOnly={readOnly}\n type=\"button\"\n getOwnerProps={getProps}\n >\n <ChevronSmallDown color={arrowColor} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n </StyledWheelList>\n );\n};\n\nexport default MinutesList;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+DnB;AA9DJ,sBAAgE;AAChE,mBAAyD;AACzD,uBAAmD;AACnD,yCAAgD;AAChD,2BAAkD;AAClD,qBAA8F;AAC9F,8BAAiC;AAE1B,MAAM,cAAc,MAAmB;AAC5C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,wCAAgB;AAC/B,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,EAAE,UAAU,kBAAkB;AAAA,EACvC,QAAI,yBAAW,kEAA+B;AAE9C,QAAM,4BAAwB;AAAA,IA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A,QAEf,sDAAC,oCAAiB,OAAO,YAAY;AAAA;AAAA,IACvC,GACF;AAAA,KACF;AAEJ;AAEA,IAAO,sBAAQ;",
6
6
  "names": []
7
7
  }
@@ -130,7 +130,7 @@ const btnBgColorPerStatus = (props) => {
130
130
  `;
131
131
  };
132
132
  const cursor = (props) => {
133
- const cursorStyle = props.$readOnly || props.$isNotAValidSelection ? "not-allowed" : "pointer";
133
+ const cursorStyle = props.$isNotAValidSelection ? "not-allowed" : "pointer";
134
134
  return import_ds_system.css`
135
135
  cursor: ${cursorStyle};
136
136
  `;
@@ -156,7 +156,10 @@ const StyledIconTriggerButton = (0, import_ds_system.styled)(import_ds_button_v2
156
156
  width: 2rem;
157
157
  height: 2rem;
158
158
  `;
159
- const StyledWheelList = import_ds_system.styled.div`
159
+ const StyledWheelList = (0, import_ds_system.styled)("div", {
160
+ name: import_constants.DSControlledDateTimePickerName,
161
+ slot: import_constants.FORM_DATE_TIME_PICKER_SLOTS.TIMEWHEEL_WHEEL_LIST
162
+ })`
160
163
  width: 100%;
161
164
  height: 100%;
162
165
  margin: auto;
@@ -202,7 +205,10 @@ const StyledTimePickerHead = (0, import_ds_system.styled)(import_ds_grid.Grid, {
202
205
  align-items: center;
203
206
  background: ${({ theme }) => theme.colors.neutral["050"]};
204
207
  `;
205
- const StyledTimePickerWheelsLegend = import_ds_system.styled.div`
208
+ const StyledTimePickerWheelsLegend = (0, import_ds_system.styled)("div", {
209
+ name: import_constants.DSControlledDateTimePickerName,
210
+ slot: import_constants.FORM_DATE_TIME_PICKER_SLOTS.TIMEWHEEL_WHEELS_LEGEND
211
+ })`
206
212
  width: 100%;
207
213
  height: 100%;
208
214
  grid-area: TimePickerWheelsLegend;
@@ -213,7 +219,10 @@ const StyledTimePickerWheelsLegend = import_ds_system.styled.div`
213
219
  text-align: center;
214
220
  background: ${({ theme }) => theme.colors.neutral["050"]};
215
221
  `;
216
- const StyledTimePickerWheelWrapper = import_ds_system.styled.div`
222
+ const StyledTimePickerWheelWrapper = (0, import_ds_system.styled)("div", {
223
+ name: import_constants.DSControlledDateTimePickerName,
224
+ slot: import_constants.FORM_DATE_TIME_PICKER_SLOTS.TIMEWHEEL_WHEEL_WRAPPER
225
+ })`
217
226
  background-color: ${({ theme, $readOnlyStyles }) => $readOnlyStyles ? theme.colors.neutral["050"] : theme.colors.neutral["000"]};
218
227
  width: 100%;
219
228
  grid-area: VerticalWheelWrapper;
@@ -257,8 +266,12 @@ const StyledTimeBtn = (0, import_ds_system.styled)(import_ds_grid.Grid, {
257
266
  ${btnBgColorPerStatus}
258
267
  ${focusBorder}
259
268
  ${fontWeight}
269
+ ${import_ds_system.lockedStateInteractionCss}
260
270
  `;
261
- const StyledWheelListItem = import_ds_system.styled.div`
271
+ const StyledWheelListItem = (0, import_ds_system.styled)("div", {
272
+ name: import_constants.DSControlledDateTimePickerName,
273
+ slot: import_constants.FORM_DATE_TIME_PICKER_SLOTS.TIMEWHEEL_WHEEL_LIST_ITEM
274
+ })`
262
275
  margin: auto;
263
276
  width: 36px;
264
277
  height: 36px;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/parts/Pickers/TimeWheel/Styleds.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable prefer-destructuring */\n/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { Grid } from '@elliemae/ds-grid';\nimport { css, styled, type Theme } from '@elliemae/ds-system';\nimport { DSControlledDateTimePickerName, DSControlledDateTimePickerSlots } from '../../../constants/index.js';\n\ninterface StyledWheelListItemPropsT {\n $isTheItemVisuallyInTheCenter?: boolean;\n $selected?: boolean;\n $isNotAValidSelection?: boolean;\n $readOnly?: boolean;\n $isUnset?: boolean;\n $isFocusedWheel?: boolean;\n}\n\ninterface StyledTimePickerContainerT {\n showShadow?: boolean;\n isControllerOnly: boolean;\n}\n\n// Focus ring \u2014 always brand-700 regardless of validity or readOnly state.\n// Only rendered for the visually centred item when the wheel is focused and the item is not selected.\nconst focusBorder = (props: StyledWheelListItemPropsT & { theme: Theme }) => {\n const { theme, $isTheItemVisuallyInTheCenter, $selected, $isFocusedWheel } = props;\n if ($isTheItemVisuallyInTheCenter && !$selected && $isFocusedWheel)\n return css<StyledWheelListItemPropsT>`\n &:after {\n position: absolute;\n content: '';\n top: -2px;\n left: -2px;\n width: calc(100% + 4px);\n height: calc(100% + 4px);\n border-radius: 50%;\n border: 2px solid ${theme.colors.brand[700]};\n }\n `;\n return css``;\n};\n\n// Diagonal line for invalid items. Colour is neutral at rest in all states \u2014\n// the focus ring (::after) is the sole blue/brand focus signal.\nconst diagonalLine = (props: StyledWheelListItemPropsT & { theme: Theme }) => {\n const { theme, $selected, $isNotAValidSelection, $readOnly } = props;\n if (!$isNotAValidSelection) return css``;\n\n let beforeBgColor = theme.colors.neutral[500]; // idle not-selected\n if ($readOnly && !$selected) beforeBgColor = theme.colors.neutral[700]; // readOnly not-selected\n if ($selected) beforeBgColor = theme.colors.neutral['000']; // selected always white\n\n return css<StyledWheelListItemPropsT>`\n cursor: not-allowed;\n &:before {\n position: absolute;\n content: '';\n top: 48%;\n left: -1px;\n height: 1px;\n width: calc(100% + 2px);\n transform: rotate(45deg);\n background-color: ${beforeBgColor};\n }\n `;\n};\n\n// Text colour. On focus the invalid case resolves to brand-700 (not danger-900) for\n// consistency with the universal blue focus ring decision.\nconst fontColor = (props: StyledWheelListItemPropsT & { theme: Theme }) => {\n const { theme, $selected, $readOnly, $isNotAValidSelection, $isFocusedWheel, $isTheItemVisuallyInTheCenter } = props;\n\n let color = theme.colors.neutral[700]; // default\n if ($selected) color = theme.colors.neutral['000']; // selected always white\n\n // For items that can't receive :focus (meridiem visual layer), drive focused-center colour via props.\n // Hours/minutes also benefit from this \u2014 :focus below applies the same value.\n if ($isTheItemVisuallyInTheCenter && $isFocusedWheel && !$selected && !$readOnly) {\n color = theme.colors.brand[700]; // always brand, matches the blue focus ring\n }\n\n // Hover: valid not-selected not-readOnly \u2192 brand-700; all other cases \u2192 no change\n const hoverColor = !$selected && !$readOnly && !$isNotAValidSelection ? theme.colors.brand[700] : '';\n\n // Focus (:focus fires on hours/minutes; meridiem relies on the prop-driven path above)\n // Matches focus ring: always brand when interactive, no change when readOnly or selected\n const focusColor = !$selected && !$readOnly ? theme.colors.brand[700] : '';\n\n return css<StyledWheelListItemPropsT>`\n color: ${color};\n &:hover {\n color: ${hoverColor};\n }\n &:focus {\n color: ${focusColor};\n }\n `;\n};\n\n// Background colours at rest and on hover.\n// Hover matrix (readOnly always wins):\n// readOnly \u2192 selected: neutral-700 | not-selected: neutral-100\n// invalid \u2192 selected: danger-950 | not-selected: danger-200 hardcoded to #fffcfc due to contrast failure of danger-200 token\n// valid \u2192 selected: brand-800 | not-selected: brand-100\nconst btnBgColorPerStatus = (props: StyledWheelListItemPropsT & { theme: Theme }) => {\n const { theme, $selected, $isNotAValidSelection, $readOnly, $isFocusedWheel, $isTheItemVisuallyInTheCenter } = props;\n\n // Rest background: only selected items have a non-transparent background.\n let bgColor = '';\n if ($selected) {\n bgColor = theme.colors.brand[600];\n if ($isNotAValidSelection) bgColor = theme.colors.danger[900]; // invalid selected: red\n if ($readOnly) bgColor = theme.colors.neutral[500]; // readOnly always wins: grey\n }\n\n // When the wheel column is active (focused), drive the selected centre item to the\n // same colour as its hover state \u2014 :hover won't fire on keyboard navigation and\n // meridiem visual items can't receive :focus at all.\n if ($isTheItemVisuallyInTheCenter && $isFocusedWheel && $selected) {\n if ($readOnly) bgColor = theme.colors.neutral[700];\n else if ($isNotAValidSelection) bgColor = theme.colors.danger[950];\n else bgColor = theme.colors.brand[800];\n }\n\n // Hover background \u2014 new spec, clean if/else, no empty-string leaks.\n let hoverBgColor: string;\n if ($readOnly) {\n hoverBgColor = $selected ? theme.colors.neutral[700] : theme.colors.neutral[100];\n } else if ($isNotAValidSelection) {\n // TODO: danger[200] and danger[400] are currently the same token and both fail contrast\n // against common dimsum color combinations. Hardcoded until the theme token is fixed.\n hoverBgColor = $selected ? theme.colors.danger[950] : '#fffcfc'; // this is hardcoded because danger 200 fails contrast, pending theme token fix\n } else {\n hoverBgColor = $selected ? theme.colors.brand[800] : theme.colors.brand[100];\n }\n\n return css`\n background-color: ${bgColor};\n &:hover {\n background-color: ${hoverBgColor};\n }\n `;\n};\n\nconst cursor = (props: StyledWheelListItemPropsT & { theme: Theme }) => {\n const cursorStyle = props.$readOnly || props.$isNotAValidSelection ? 'not-allowed' : 'pointer';\n return css`\n cursor: ${cursorStyle};\n `;\n};\n\n// Font weight: selected \u2192 semibold at rest (no hover override needed, it is already semibold).\n// Not selected \u2192 semibold on hover only.\nconst fontWeight = (props: StyledWheelListItemPropsT & { theme: Theme }) => {\n const { theme, $selected } = props;\n if ($selected) {\n return css`\n font-weight: ${theme.fontWeights.semibold};\n `;\n }\n return css`\n &:hover {\n font-weight: ${theme.fontWeights.semibold};\n }\n `;\n};\n\nexport const StyledIconTriggerButton = styled(DSButtonV2, {\n name: DSControlledDateTimePickerName,\n slot: DSControlledDateTimePickerSlots.PICKER_ICONS.TIMEWHEEL,\n})`\n color: ${({ theme }) => theme.colors.brand['800']};\n width: 2rem;\n height: 2rem;\n`;\n\nexport const StyledWheelList = styled.div`\n width: 100%;\n height: 100%;\n margin: auto;\n padding: 0;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n &:focus-within {\n &:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border-radius: 2px;\n border: 2px solid ${({ theme }) => theme.colors.brand[700]};\n box-shadow: 0 0 2px ${({ theme }) => theme.colors.brand[700]};\n }\n }\n`;\n\nexport const StyledTimePickerContainer = styled('div', {\n name: DSControlledDateTimePickerName,\n slot: DSControlledDateTimePickerSlots.CONTROLLER_COMPONENT.TIMEWHEEL,\n})<StyledTimePickerContainerT>`\n display: grid;\n position: relative;\n grid-template-columns: 192px;\n grid-template-rows: 36px 30px auto;\n grid-template-areas:\n 'TimePickerHead'\n 'TimePickerWheelsLegend'\n 'VerticalWheelWrapper';\n`;\n\nexport const StyledTimePickerHead = styled(Grid, {\n name: DSControlledDateTimePickerName,\n slot: DSControlledDateTimePickerSlots.TIMEWHEEL.HEADER_LABEL,\n})`\n width: 100%;\n grid-area: TimePickerHead;\n justify-content: center;\n align-items: center;\n background: ${({ theme }) => theme.colors.neutral['050']};\n`;\n\nexport const StyledTimePickerWheelsLegend = styled.div`\n width: 100%;\n height: 100%;\n grid-area: TimePickerWheelsLegend;\n display: grid;\n grid-template-columns: ${({ theme }) => theme.space.xl} ${({ theme }) => theme.space.xl} ${({ theme }) =>\n theme.space.xl};\n align-items: center;\n justify-content: center;\n text-align: center;\n background: ${({ theme }) => theme.colors.neutral['050']};\n`;\n\nexport const StyledTimePickerWheelWrapper = styled.div<{ $readOnlyStyles?: boolean }>`\n background-color: ${({ theme, $readOnlyStyles }) =>\n $readOnlyStyles ? theme.colors.neutral['050'] : theme.colors.neutral['000']};\n width: 100%;\n grid-area: VerticalWheelWrapper;\n display: grid;\n grid-template-columns: ${({ theme }) => theme.space.xl} ${({ theme }) => theme.space.xl} ${({ theme }) =>\n theme.space.xl};\n grid-template-rows: 100%;\n & ul:not(:last-child) {\n position: relative;\n &:after {\n content: '';\n position: absolute;\n left: 100%;\n top: 5%;\n height: 90%;\n width: 1px;\n background: ${({ theme }) => theme.colors.neutral['300']};\n }\n }\n\n > *:not(:last-child) {\n border-right: 1px solid ${({ theme }) => theme.colors.neutral[200]};\n }\n`;\n\nexport const StyledTimeBtn = styled(Grid, {\n name: DSControlledDateTimePickerName,\n slot: DSControlledDateTimePickerSlots.TIMEWHEEL.TIME_BUTTON,\n})<StyledWheelListItemPropsT>`\n position: relative;\n height: ${({ theme }) => theme.space.s};\n width: ${({ theme }) => theme.space.s};\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n &:focus {\n outline: none;\n }\n ${cursor}\n ${fontColor}\n ${diagonalLine}\n ${btnBgColorPerStatus}\n ${focusBorder}\n ${fontWeight}\n`;\n\nexport const StyledWheelListItem = styled.div`\n margin: auto;\n width: 36px;\n height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n`;\n\nexport const StyledWheelChangeTimeBtn = styled(DSButtonV2, {\n name: DSControlledDateTimePickerName,\n slot: DSControlledDateTimePickerSlots.TIMEWHEEL.TIME_CHANGE_BUTTON,\n})`\n height: ${({ theme }) => theme.space.s};\n width: ${({ theme }) => theme.space.s};\n min-width: ${({ theme }) => theme.space.s};\n border-radius: 50%;\n`;\n\nexport const TimeWheelFooterMessage = styled('div', {\n name: DSControlledDateTimePickerName,\n slot: DSControlledDateTimePickerSlots.FOOTERS.TIMEWHEEL,\n})<{ $readOnlyStyles?: boolean }>`\n border-top: solid 1px ${({ theme }) => theme.colors.neutral[300]};\n padding: ${({ theme }) => theme.space.xxs2};\n color: ${({ theme }) => theme.colors.danger[900]};\n font-size: ${({ theme }) => theme.fontSizes.microText[200]};\n text-align: right;\n background-color: ${({ theme, $readOnlyStyles }) =>\n $readOnlyStyles ? theme.colors.neutral['050'] : theme.colors.neutral['000']};\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,0BAA2B;AAC3B,qBAAqB;AACrB,uBAAwC;AACxC,uBAAgF;AAkBhF,MAAM,cAAc,CAAC,UAAwD;AAC3E,QAAM,EAAE,OAAO,+BAA+B,WAAW,gBAAgB,IAAI;AAC7E,MAAI,iCAAiC,CAAC,aAAa;AACjD,WAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BASiB,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAGjD,SAAO;AACT;AAIA,MAAM,eAAe,CAAC,U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AAI,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;",
4
+ "sourcesContent": ["/* eslint-disable prefer-destructuring */\n/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { Grid } from '@elliemae/ds-grid';\nimport { css, styled, lockedStateInteractionCss, type Theme } from '@elliemae/ds-system';\nimport {\n DSControlledDateTimePickerName,\n DSControlledDateTimePickerSlots,\n FORM_DATE_TIME_PICKER_SLOTS,\n} from '../../../constants/index.js';\n\ninterface StyledWheelListItemPropsT {\n $isTheItemVisuallyInTheCenter?: boolean;\n $selected?: boolean;\n $isNotAValidSelection?: boolean;\n $readOnly?: boolean;\n $isUnset?: boolean;\n $isFocusedWheel?: boolean;\n}\n\ninterface StyledTimePickerContainerT {\n showShadow?: boolean;\n isControllerOnly: boolean;\n}\n\n// Focus ring \u2014 always brand-700 regardless of validity or readOnly state.\n// Only rendered for the visually centred item when the wheel is focused and the item is not selected.\nconst focusBorder = (props: StyledWheelListItemPropsT & { theme: Theme }) => {\n const { theme, $isTheItemVisuallyInTheCenter, $selected, $isFocusedWheel } = props;\n if ($isTheItemVisuallyInTheCenter && !$selected && $isFocusedWheel)\n return css<StyledWheelListItemPropsT>`\n &:after {\n position: absolute;\n content: '';\n top: -2px;\n left: -2px;\n width: calc(100% + 4px);\n height: calc(100% + 4px);\n border-radius: 50%;\n border: 2px solid ${theme.colors.brand[700]};\n }\n `;\n return css``;\n};\n\n// Diagonal line for invalid items. Colour is neutral at rest in all states \u2014\n// the focus ring (::after) is the sole blue/brand focus signal.\nconst diagonalLine = (props: StyledWheelListItemPropsT & { theme: Theme }) => {\n const { theme, $selected, $isNotAValidSelection, $readOnly } = props;\n if (!$isNotAValidSelection) return css``;\n\n let beforeBgColor = theme.colors.neutral[500]; // idle not-selected\n if ($readOnly && !$selected) beforeBgColor = theme.colors.neutral[700]; // readOnly not-selected\n if ($selected) beforeBgColor = theme.colors.neutral['000']; // selected always white\n\n return css<StyledWheelListItemPropsT>`\n cursor: not-allowed;\n &:before {\n position: absolute;\n content: '';\n top: 48%;\n left: -1px;\n height: 1px;\n width: calc(100% + 2px);\n transform: rotate(45deg);\n background-color: ${beforeBgColor};\n }\n `;\n};\n\n// Text colour. On focus the invalid case resolves to brand-700 (not danger-900) for\n// consistency with the universal blue focus ring decision.\nconst fontColor = (props: StyledWheelListItemPropsT & { theme: Theme }) => {\n const { theme, $selected, $readOnly, $isNotAValidSelection, $isFocusedWheel, $isTheItemVisuallyInTheCenter } = props;\n\n let color = theme.colors.neutral[700]; // default\n if ($selected) color = theme.colors.neutral['000']; // selected always white\n\n // For items that can't receive :focus (meridiem visual layer), drive focused-center colour via props.\n // Hours/minutes also benefit from this \u2014 :focus below applies the same value.\n if ($isTheItemVisuallyInTheCenter && $isFocusedWheel && !$selected && !$readOnly) {\n color = theme.colors.brand[700]; // always brand, matches the blue focus ring\n }\n\n // Hover: valid not-selected not-readOnly \u2192 brand-700; all other cases \u2192 no change\n const hoverColor = !$selected && !$readOnly && !$isNotAValidSelection ? theme.colors.brand[700] : '';\n\n // Focus (:focus fires on hours/minutes; meridiem relies on the prop-driven path above)\n // Matches focus ring: always brand when interactive, no change when readOnly or selected\n const focusColor = !$selected && !$readOnly ? theme.colors.brand[700] : '';\n\n return css<StyledWheelListItemPropsT>`\n color: ${color};\n &:hover {\n color: ${hoverColor};\n }\n &:focus {\n color: ${focusColor};\n }\n `;\n};\n\n// Background colours at rest and on hover.\n// Hover matrix (readOnly always wins):\n// readOnly \u2192 selected: neutral-700 | not-selected: neutral-100\n// invalid \u2192 selected: danger-950 | not-selected: danger-200 hardcoded to #fffcfc due to contrast failure of danger-200 token\n// valid \u2192 selected: brand-800 | not-selected: brand-100\nconst btnBgColorPerStatus = (props: StyledWheelListItemPropsT & { theme: Theme }) => {\n const { theme, $selected, $isNotAValidSelection, $readOnly, $isFocusedWheel, $isTheItemVisuallyInTheCenter } = props;\n\n // Rest background: only selected items have a non-transparent background.\n let bgColor = '';\n if ($selected) {\n bgColor = theme.colors.brand[600];\n if ($isNotAValidSelection) bgColor = theme.colors.danger[900]; // invalid selected: red\n if ($readOnly) bgColor = theme.colors.neutral[500]; // readOnly always wins: grey\n }\n\n // When the wheel column is active (focused), drive the selected centre item to the\n // same colour as its hover state \u2014 :hover won't fire on keyboard navigation and\n // meridiem visual items can't receive :focus at all.\n if ($isTheItemVisuallyInTheCenter && $isFocusedWheel && $selected) {\n if ($readOnly) bgColor = theme.colors.neutral[700];\n else if ($isNotAValidSelection) bgColor = theme.colors.danger[950];\n else bgColor = theme.colors.brand[800];\n }\n\n // Hover background \u2014 new spec, clean if/else, no empty-string leaks.\n let hoverBgColor: string;\n if ($readOnly) {\n hoverBgColor = $selected ? theme.colors.neutral[700] : theme.colors.neutral[100];\n } else if ($isNotAValidSelection) {\n // TODO: danger[200] and danger[400] are currently the same token and both fail contrast\n // against common dimsum color combinations. Hardcoded until the theme token is fixed.\n hoverBgColor = $selected ? theme.colors.danger[950] : '#fffcfc'; // this is hardcoded because danger 200 fails contrast, pending theme token fix\n } else {\n hoverBgColor = $selected ? theme.colors.brand[800] : theme.colors.brand[100];\n }\n\n return css`\n background-color: ${bgColor};\n &:hover {\n background-color: ${hoverBgColor};\n }\n `;\n};\n\n// readOnly / applyAriaDisabled are lock states: their not-allowed cursor comes from lockedStateInteractionCss\n// at the end of StyledTimeBtn. The invalid-selection cursor is not a lock state, so it stays here.\nconst cursor = (props: StyledWheelListItemPropsT & { theme: Theme }) => {\n const cursorStyle = props.$isNotAValidSelection ? 'not-allowed' : 'pointer';\n return css`\n cursor: ${cursorStyle};\n `;\n};\n\n// Font weight: selected \u2192 semibold at rest (no hover override needed, it is already semibold).\n// Not selected \u2192 semibold on hover only.\nconst fontWeight = (props: StyledWheelListItemPropsT & { theme: Theme }) => {\n const { theme, $selected } = props;\n if ($selected) {\n return css`\n font-weight: ${theme.fontWeights.semibold};\n `;\n }\n return css`\n &:hover {\n font-weight: ${theme.fontWeights.semibold};\n }\n `;\n};\n\nexport const StyledIconTriggerButton = styled(DSButtonV2, {\n name: DSControlledDateTimePickerName,\n slot: DSControlledDateTimePickerSlots.PICKER_ICONS.TIMEWHEEL,\n})`\n color: ${({ theme }) => theme.colors.brand['800']};\n width: 2rem;\n height: 2rem;\n`;\n\n// DEV-001: this element's :focus-within is the WCAG 2.4.11 focus indicator for the meridiem\n// column. Adding name/slot only adds attributes \u2014 it must not change the CSS below.\nexport const StyledWheelList = styled('div', {\n name: DSControlledDateTimePickerName,\n slot: FORM_DATE_TIME_PICKER_SLOTS.TIMEWHEEL_WHEEL_LIST,\n})`\n width: 100%;\n height: 100%;\n margin: auto;\n padding: 0;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n &:focus-within {\n &:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border-radius: 2px;\n border: 2px solid ${({ theme }) => theme.colors.brand[700]};\n box-shadow: 0 0 2px ${({ theme }) => theme.colors.brand[700]};\n }\n }\n`;\n\nexport const StyledTimePickerContainer = styled('div', {\n name: DSControlledDateTimePickerName,\n slot: DSControlledDateTimePickerSlots.CONTROLLER_COMPONENT.TIMEWHEEL,\n})<StyledTimePickerContainerT>`\n display: grid;\n position: relative;\n grid-template-columns: 192px;\n grid-template-rows: 36px 30px auto;\n grid-template-areas:\n 'TimePickerHead'\n 'TimePickerWheelsLegend'\n 'VerticalWheelWrapper';\n`;\n\nexport const StyledTimePickerHead = styled(Grid, {\n name: DSControlledDateTimePickerName,\n slot: DSControlledDateTimePickerSlots.TIMEWHEEL.HEADER_LABEL,\n})`\n width: 100%;\n grid-area: TimePickerHead;\n justify-content: center;\n align-items: center;\n background: ${({ theme }) => theme.colors.neutral['050']};\n`;\n\nexport const StyledTimePickerWheelsLegend = styled('div', {\n name: DSControlledDateTimePickerName,\n slot: FORM_DATE_TIME_PICKER_SLOTS.TIMEWHEEL_WHEELS_LEGEND,\n})`\n width: 100%;\n height: 100%;\n grid-area: TimePickerWheelsLegend;\n display: grid;\n grid-template-columns: ${({ theme }) => theme.space.xl} ${({ theme }) => theme.space.xl} ${({ theme }) =>\n theme.space.xl};\n align-items: center;\n justify-content: center;\n text-align: center;\n background: ${({ theme }) => theme.colors.neutral['050']};\n`;\n\nexport const StyledTimePickerWheelWrapper = styled('div', {\n name: DSControlledDateTimePickerName,\n slot: FORM_DATE_TIME_PICKER_SLOTS.TIMEWHEEL_WHEEL_WRAPPER,\n})<{ $readOnlyStyles?: boolean }>`\n background-color: ${({ theme, $readOnlyStyles }) =>\n $readOnlyStyles ? theme.colors.neutral['050'] : theme.colors.neutral['000']};\n width: 100%;\n grid-area: VerticalWheelWrapper;\n display: grid;\n grid-template-columns: ${({ theme }) => theme.space.xl} ${({ theme }) => theme.space.xl} ${({ theme }) =>\n theme.space.xl};\n grid-template-rows: 100%;\n & ul:not(:last-child) {\n position: relative;\n &:after {\n content: '';\n position: absolute;\n left: 100%;\n top: 5%;\n height: 90%;\n width: 1px;\n background: ${({ theme }) => theme.colors.neutral['300']};\n }\n }\n\n > *:not(:last-child) {\n border-right: 1px solid ${({ theme }) => theme.colors.neutral[200]};\n }\n`;\n\nexport const StyledTimeBtn = styled(Grid, {\n name: DSControlledDateTimePickerName,\n slot: DSControlledDateTimePickerSlots.TIMEWHEEL.TIME_BUTTON,\n})<StyledWheelListItemPropsT>`\n position: relative;\n height: ${({ theme }) => theme.space.s};\n width: ${({ theme }) => theme.space.s};\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n &:focus {\n outline: none;\n }\n ${cursor}\n ${fontColor}\n ${diagonalLine}\n ${btnBgColorPerStatus}\n ${focusBorder}\n ${fontWeight}\n ${lockedStateInteractionCss}\n`;\n\nexport const StyledWheelListItem = styled('div', {\n name: DSControlledDateTimePickerName,\n slot: FORM_DATE_TIME_PICKER_SLOTS.TIMEWHEEL_WHEEL_LIST_ITEM,\n})`\n margin: auto;\n width: 36px;\n height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n`;\n\nexport const StyledWheelChangeTimeBtn = styled(DSButtonV2, {\n name: DSControlledDateTimePickerName,\n slot: DSControlledDateTimePickerSlots.TIMEWHEEL.TIME_CHANGE_BUTTON,\n})`\n height: ${({ theme }) => theme.space.s};\n width: ${({ theme }) => theme.space.s};\n min-width: ${({ theme }) => theme.space.s};\n border-radius: 50%;\n`;\n\nexport const TimeWheelFooterMessage = styled('div', {\n name: DSControlledDateTimePickerName,\n slot: DSControlledDateTimePickerSlots.FOOTERS.TIMEWHEEL,\n})<{ $readOnlyStyles?: boolean }>`\n border-top: solid 1px ${({ theme }) => theme.colors.neutral[300]};\n padding: ${({ theme }) => theme.space.xxs2};\n color: ${({ theme }) => theme.colors.danger[900]};\n font-size: ${({ theme }) => theme.fontSizes.microText[200]};\n text-align: right;\n background-color: ${({ theme, $readOnlyStyles }) =>\n $readOnlyStyles ? theme.colors.neutral['050'] : theme.colors.neutral['000']};\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,0BAA2B;AAC3B,qBAAqB;AACrB,uBAAmE;AACnE,uBAIO;AAkBP,MAAM,cAAc,CAAC,UAAwD;AAC3E,QAAM,EAAE,OAAO,+BAA+B,WAAW,gBAAgB,IAAI;AAC7E,MAAI,iCAAiC,CAAC,aAAa;AACjD,WAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BASiB,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAGjD,SAAO;AACT;AAIA,MAAM,eAAe,CAAC,UAAwD;AAC5E,QAAM,EAAE,OAAO,WAAW,uBAAuB,UAAU,IAAI;AAC/D,MAAI,CAAC,sBAAuB,QAAO;AAEnC,MAAI,gBAAgB,MAAM,OAAO,QAAQ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AAM,MAAM,UAAU,UAAU,GAAG,CAAC;AAAA;AAAA,sBAEtC,CAAC,EAAE,OAAO,gBAAgB,MAC5C,kBAAkB,MAAM,OAAO,QAAQ,KAAK,IAAI,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;",
6
6
  "names": []
7
7
  }
@@ -67,12 +67,12 @@ const TimeWheelContent = import_react.default.memo(() => {
67
67
  children: `${hours || "__"}:${minutes || "__"} ${meridiem || "__"}`
68
68
  }
69
69
  ),
70
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Styleds.StyledTimePickerWheelsLegend, { children: [
70
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Styleds.StyledTimePickerWheelsLegend, { getOwnerProps: getProps, children: [
71
71
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "H" }),
72
72
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "M" }),
73
73
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "A" })
74
74
  ] }),
75
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Styleds.StyledTimePickerWheelWrapper, { $readOnlyStyles: readOnly || applyAriaDisabled, children: [
75
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Styleds.StyledTimePickerWheelWrapper, { $readOnlyStyles: readOnly || applyAriaDisabled, getOwnerProps: getProps, children: [
76
76
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_HoursList.HoursList, {}),
77
77
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_MinutesList.MinutesList, {}),
78
78
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_MeridiemList.MeridiemList, {})
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/parts/Pickers/TimeWheel/TimeWheelContent.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useContext } from 'react';\nimport { ControlledDateTimePickerDatatestid } from '../../../constants/index.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { HoursList } from './HoursList.js';\nimport { MeridiemList } from './MeridiemList.js';\nimport { MinutesList } from './MinutesList.js';\nimport {\n StyledTimePickerContainer,\n StyledTimePickerHead,\n StyledTimePickerWheelsLegend,\n StyledTimePickerWheelWrapper,\n} from './Styleds.js';\nimport { TimeWheelFooter } from './TimeWheelFooter.js';\n\nexport const TimeWheelContent = React.memo(() => {\n const {\n isControllerOnly,\n hours,\n minutes,\n meridiem,\n getProps,\n props: { readOnly, applyAriaDisabled },\n } = useContext(ControlledDateTimePickerContext);\n\n return (\n <StyledTimePickerContainer\n isControllerOnly={isControllerOnly}\n data-testid={ControlledDateTimePickerDatatestid.CONTROLLER_COMPONENT.TIMEWHEEL}\n getOwnerProps={getProps}\n role=\"region\"\n aria-label=\"timewheel\"\n >\n <StyledTimePickerHead\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.HEADER_LABEL}\n getOwnerProps={getProps}\n >{`${hours || '__'}:${minutes || '__'} ${meridiem || '__'}`}</StyledTimePickerHead>\n <StyledTimePickerWheelsLegend>\n <div>H</div>\n <div>M</div>\n <div>A</div>\n </StyledTimePickerWheelsLegend>\n <StyledTimePickerWheelWrapper $readOnlyStyles={readOnly || applyAriaDisabled}>\n <HoursList />\n <MinutesList />\n <MeridiemList />\n </StyledTimePickerWheelWrapper>\n <TimeWheelFooter />\n </StyledTimePickerContainer>\n );\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgCjB;AAhCN,mBAAkC;AAClC,uBAAmD;AACnD,yCAAgD;AAChD,uBAA0B;AAC1B,0BAA6B;AAC7B,yBAA4B;AAC5B,qBAKO;AACP,6BAAgC;AAEzB,MAAM,mBAAmB,aAAAA,QAAM,KAAK,MAAM;AAC/C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,EAAE,UAAU,kBAAkB;AAAA,EACvC,QAAI,yBAAW,kEAA+B;AAE9C,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAa,oDAAmC,qBAAqB;AAAA,MACrE,eAAe;AAAA,MACf,MAAK;AAAA,MACL,cAAW;AAAA,MAEX;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,eAAa,oDAAmC,UAAU;AAAA,YAC1D,eAAe;AAAA,YACf,aAAG,SAAS,IAAI,IAAI,WAAW,IAAI,IAAI,YAAY,IAAI;AAAA;AAAA,QAAG;AAAA,QAC5D,6CAAC,+CACC;AAAA,sDAAC,SAAI,eAAC;AAAA,UACN,4CAAC,SAAI,eAAC;AAAA,UACN,4CAAC,SAAI,eAAC;AAAA,WACR;AAAA,QACA,6CAAC,+CAA6B,iBAAiB,YAAY,mBACzD;AAAA,sDAAC,8BAAU;AAAA,UACX,4CAAC,kCAAY;AAAA,UACb,4CAAC,oCAAa;AAAA,WAChB;AAAA,QACA,4CAAC,0CAAgB;AAAA;AAAA;AAAA,EACnB;AAEJ,CAAC;",
4
+ "sourcesContent": ["import React, { useContext } from 'react';\nimport { ControlledDateTimePickerDatatestid } from '../../../constants/index.js';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { HoursList } from './HoursList.js';\nimport { MeridiemList } from './MeridiemList.js';\nimport { MinutesList } from './MinutesList.js';\nimport {\n StyledTimePickerContainer,\n StyledTimePickerHead,\n StyledTimePickerWheelsLegend,\n StyledTimePickerWheelWrapper,\n} from './Styleds.js';\nimport { TimeWheelFooter } from './TimeWheelFooter.js';\n\nexport const TimeWheelContent = React.memo(() => {\n const {\n isControllerOnly,\n hours,\n minutes,\n meridiem,\n getProps,\n props: { readOnly, applyAriaDisabled },\n } = useContext(ControlledDateTimePickerContext);\n\n return (\n <StyledTimePickerContainer\n isControllerOnly={isControllerOnly}\n data-testid={ControlledDateTimePickerDatatestid.CONTROLLER_COMPONENT.TIMEWHEEL}\n getOwnerProps={getProps}\n role=\"region\"\n aria-label=\"timewheel\"\n >\n <StyledTimePickerHead\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.HEADER_LABEL}\n getOwnerProps={getProps}\n >{`${hours || '__'}:${minutes || '__'} ${meridiem || '__'}`}</StyledTimePickerHead>\n <StyledTimePickerWheelsLegend getOwnerProps={getProps}>\n <div>H</div>\n <div>M</div>\n <div>A</div>\n </StyledTimePickerWheelsLegend>\n <StyledTimePickerWheelWrapper $readOnlyStyles={readOnly || applyAriaDisabled} getOwnerProps={getProps}>\n <HoursList />\n <MinutesList />\n <MeridiemList />\n </StyledTimePickerWheelWrapper>\n <TimeWheelFooter />\n </StyledTimePickerContainer>\n );\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgCjB;AAhCN,mBAAkC;AAClC,uBAAmD;AACnD,yCAAgD;AAChD,uBAA0B;AAC1B,0BAA6B;AAC7B,yBAA4B;AAC5B,qBAKO;AACP,6BAAgC;AAEzB,MAAM,mBAAmB,aAAAA,QAAM,KAAK,MAAM;AAC/C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,EAAE,UAAU,kBAAkB;AAAA,EACvC,QAAI,yBAAW,kEAA+B;AAE9C,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAa,oDAAmC,qBAAqB;AAAA,MACrE,eAAe;AAAA,MACf,MAAK;AAAA,MACL,cAAW;AAAA,MAEX;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,eAAa,oDAAmC,UAAU;AAAA,YAC1D,eAAe;AAAA,YACf,aAAG,SAAS,IAAI,IAAI,WAAW,IAAI,IAAI,YAAY,IAAI;AAAA;AAAA,QAAG;AAAA,QAC5D,6CAAC,+CAA6B,eAAe,UAC3C;AAAA,sDAAC,SAAI,eAAC;AAAA,UACN,4CAAC,SAAI,eAAC;AAAA,UACN,4CAAC,SAAI,eAAC;AAAA,WACR;AAAA,QACA,6CAAC,+CAA6B,iBAAiB,YAAY,mBAAmB,eAAe,UAC3F;AAAA,sDAAC,8BAAU;AAAA,UACX,4CAAC,kCAAY;AAAA,UACb,4CAAC,oCAAa;AAAA,WAChB;AAAA,QACA,4CAAC,0CAAgB;AAAA;AAAA;AAAA,EACnB;AAEJ,CAAC;",
6
6
  "names": ["React"]
7
7
  }
@@ -43,7 +43,7 @@ var import_TimeWheelContext = require("./TimeWheelContext.js");
43
43
  const TimeWheelIconTrigger = () => {
44
44
  const { handleSetTriggerRef, handleToggleTimePicker, handlePickerIconKeyDown } = (0, import_react.useContext)(import_TimeWheelContext.TimeWheelContext);
45
45
  const {
46
- props: { disabled, tabIndex },
46
+ props: { disabled, tabIndex, applyAriaDisabled, readOnly },
47
47
  getProps,
48
48
  ariaCurrentValueForInputs
49
49
  } = (0, import_react.useContext)(import_ControlledDateTimePickerCTX.ControlledDateTimePickerContext);
@@ -52,6 +52,9 @@ const TimeWheelIconTrigger = () => {
52
52
  import_Styleds.StyledIconTriggerButton,
53
53
  {
54
54
  "aria-label": `time picker context menu trigger, ${ariaCurrentValueForInputs}`,
55
+ applyAriaDisabled,
56
+ readOnly,
57
+ onDeliberateActivationWhileSoftLocked: handleToggleTimePicker,
55
58
  buttonType: "icon",
56
59
  size: import_ds_button_v2.BUTTON_SIZES.M,
57
60
  innerRef: handleSetTriggerRef,
@@ -67,6 +70,8 @@ const TimeWheelIconTrigger = () => {
67
70
  ),
68
71
  [
69
72
  ariaCurrentValueForInputs,
73
+ applyAriaDisabled,
74
+ readOnly,
70
75
  disabled,
71
76
  getProps,
72
77
  handlePickerIconKeyDown,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/parts/Pickers/TimeWheel/TimeWheelIconTrigger.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { BUTTON_SIZES } from '@elliemae/ds-button-v2';\nimport { RecentDocuments } from '@elliemae/ds-icons';\nimport { useContext, useMemo } from 'react';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { ControlledDateTimePickerDatatestid } from '../../../constants/index.js';\nimport { StyledIconTriggerButton } from './Styleds.js';\nimport { TimeWheelContext } from './TimeWheelContext.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 TimeWheelIconTrigger = (): JSX.Element => {\n const { handleSetTriggerRef, handleToggleTimePicker, handlePickerIconKeyDown } = useContext(TimeWheelContext);\n const {\n props: { disabled, tabIndex },\n getProps,\n ariaCurrentValueForInputs,\n } = useContext(ControlledDateTimePickerContext);\n return useMemo(\n () => (\n <StyledIconTriggerButton\n aria-label={`time picker context menu trigger, ${ariaCurrentValueForInputs}`}\n buttonType=\"icon\"\n size={BUTTON_SIZES.M}\n innerRef={handleSetTriggerRef}\n tabIndex={tabIndex}\n onClick={handleToggleTimePicker}\n onKeyDown={handlePickerIconKeyDown}\n data-testid={ControlledDateTimePickerDatatestid.PICKER_ICONS.TIMEWHEEL}\n disabled={disabled}\n type=\"button\"\n getOwnerProps={getProps}\n >\n <RecentDocuments color={disabled ? ['neutral', '500'] : ['brand-primary', '800']} />\n </StyledIconTriggerButton>\n ),\n [\n ariaCurrentValueForInputs,\n disabled,\n getProps,\n handlePickerIconKeyDown,\n handleSetTriggerRef,\n handleToggleTimePicker,\n tabIndex,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiCf;AAjCR,0BAA6B;AAC7B,sBAAgC;AAChC,mBAAoC;AACpC,yCAAgD;AAChD,uBAAmD;AACnD,qBAAwC;AACxC,8BAAiC;AAK1B,MAAM,uBAAuB,MAAmB;AACrD,QAAM,EAAE,qBAAqB,wBAAwB,wBAAwB,QAAI,yBAAW,wCAAgB;AAC5G,QAAM;AAAA,IACJ,OAAO,EAAE,UAAU,SAAS;AAAA,IAC5B;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,kEAA+B;AAC9C,aAAO;AAAA,IACL,MACE;AAAA,MAAC;AAAA;AAAA,QACC,cAAY,qCAAqC,yBAAyB;AAAA,QAC1E,YAAW;AAAA,QACX,MAAM,iCAAa;AAAA,QACnB,UAAU;AAAA,QACV;AAAA,QACA,SAAS;AAAA,QACT,WAAW;AAAA,QACX,eAAa,oDAAmC,aAAa;AAAA,QAC7D;AAAA,QACA,MAAK;AAAA,QACL,eAAe;AAAA,QAEf,sDAAC,mCAAgB,OAAO,WAAW,CAAC,WAAW,KAAK,IAAI,CAAC,iBAAiB,KAAK,GAAG;AAAA;AAAA,IACpF;AAAA,IAEF;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import { BUTTON_SIZES } from '@elliemae/ds-button-v2';\nimport { RecentDocuments } from '@elliemae/ds-icons';\nimport { useContext, useMemo } from 'react';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\nimport { ControlledDateTimePickerDatatestid } from '../../../constants/index.js';\nimport { StyledIconTriggerButton } from './Styleds.js';\nimport { TimeWheelContext } from './TimeWheelContext.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 TimeWheelIconTrigger = (): JSX.Element => {\n const { handleSetTriggerRef, handleToggleTimePicker, handlePickerIconKeyDown } = useContext(TimeWheelContext);\n const {\n props: { disabled, tabIndex, applyAriaDisabled, readOnly },\n getProps,\n ariaCurrentValueForInputs,\n } = useContext(ControlledDateTimePickerContext);\n return useMemo(\n () => (\n <StyledIconTriggerButton\n aria-label={`time picker context menu trigger, ${ariaCurrentValueForInputs}`}\n // opening a view-only popup is not an action of the soft lock (PUI-16695): the lock stays announced by DSButton\n // and the consumer's onClick stays withheld, only the toggle runs, deliberately\n applyAriaDisabled={applyAriaDisabled}\n readOnly={readOnly}\n onDeliberateActivationWhileSoftLocked={handleToggleTimePicker}\n buttonType=\"icon\"\n size={BUTTON_SIZES.M}\n innerRef={handleSetTriggerRef}\n tabIndex={tabIndex}\n onClick={handleToggleTimePicker}\n onKeyDown={handlePickerIconKeyDown}\n data-testid={ControlledDateTimePickerDatatestid.PICKER_ICONS.TIMEWHEEL}\n disabled={disabled}\n type=\"button\"\n getOwnerProps={getProps}\n >\n <RecentDocuments color={disabled ? ['neutral', '500'] : ['brand-primary', '800']} />\n </StyledIconTriggerButton>\n ),\n [\n ariaCurrentValueForInputs,\n applyAriaDisabled,\n readOnly,\n disabled,\n getProps,\n handlePickerIconKeyDown,\n handleSetTriggerRef,\n handleToggleTimePicker,\n tabIndex,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsCf;AAtCR,0BAA6B;AAC7B,sBAAgC;AAChC,mBAAoC;AACpC,yCAAgD;AAChD,uBAAmD;AACnD,qBAAwC;AACxC,8BAAiC;AAK1B,MAAM,uBAAuB,MAAmB;AACrD,QAAM,EAAE,qBAAqB,wBAAwB,wBAAwB,QAAI,yBAAW,wCAAgB;AAC5G,QAAM;AAAA,IACJ,OAAO,EAAE,UAAU,UAAU,mBAAmB,SAAS;AAAA,IACzD;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,kEAA+B;AAC9C,aAAO;AAAA,IACL,MACE;AAAA,MAAC;AAAA;AAAA,QACC,cAAY,qCAAqC,yBAAyB;AAAA,QAG1E;AAAA,QACA;AAAA,QACA,uCAAuC;AAAA,QACvC,YAAW;AAAA,QACX,MAAM,iCAAa;AAAA,QACnB,UAAU;AAAA,QACV;AAAA,QACA,SAAS;AAAA,QACT,WAAW;AAAA,QACX,eAAa,oDAAmC,aAAa;AAAA,QAC7D;AAAA,QACA,MAAK;AAAA,QACL,eAAe;AAAA,QAEf,sDAAC,mCAAgB,OAAO,WAAW,CAAC,WAAW,KAAK,IAAI,CAAC,iBAAiB,KAAK,GAAG;AAAA;AAAA,IACpF;AAAA,IAEF;AAAA,MACE;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
  }
@@ -48,14 +48,15 @@ const usePopperTriggerLogic = () => {
48
48
  const [referenceElement, setReferenceElement] = (0, import_react.useState)(null);
49
49
  const closeTimePicker = (0, import_react.useCallback)(() => {
50
50
  setShowTimePicker(false);
51
- onPickerClose();
52
- }, [onPickerClose]);
51
+ if (!isWithCalendarToo) onPickerClose();
52
+ }, [isWithCalendarToo, onPickerClose]);
53
53
  const handleToggleTimePicker = (0, import_react.useCallback)(() => {
54
54
  if (disabled) return;
55
55
  setShowTimePicker((oldShowCalendar) => {
56
+ if (isWithCalendarToo) return !oldShowCalendar;
56
57
  if (!oldShowCalendar) {
57
58
  onPickerOpen();
58
- if (!isWithCalendarToo) trackFocusTimewheelCurrHour();
59
+ trackFocusTimewheelCurrHour();
59
60
  } else onPickerClose();
60
61
  return !oldShowCalendar;
61
62
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/parts/Pickers/TimeWheel/usePopperTriggerLogic.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { useState, useCallback, useMemo, useContext } from 'react';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\n\ninterface PopperTriggerLogicT {\n referenceElement: HTMLButtonElement | null;\n showTimePicker: boolean;\n closeTimePicker: () => void;\n setShowTimePicker: TypescriptHelpersT.StateSetter<boolean>;\n handleToggleTimePicker: () => void;\n handleSetTriggerRef: (instance: HTMLButtonElement) => void;\n handleMenuWrapperKeyDown: (e: React.KeyboardEvent<HTMLElement>) => void;\n}\nexport const usePopperTriggerLogic = (): PopperTriggerLogicT => {\n const {\n pickerButtonRef,\n props: { onPickerClose, onPickerOpen, disabled },\n isWithCalendarToo,\n trackFocusTimewheelCurrHour,\n trackFocusPicker,\n latestInteractionRegion,\n currFocusDescriber,\n } = useContext(ControlledDateTimePickerContext);\n const [showTimePicker, setShowTimePicker] = useState(false);\n const [referenceElement, setReferenceElement] = useState<HTMLButtonElement | null>(null);\n const closeTimePicker = useCallback(() => {\n setShowTimePicker(false);\n onPickerClose();\n }, [onPickerClose]);\n const handleToggleTimePicker = useCallback(() => {\n if (disabled) return;\n setShowTimePicker((oldShowCalendar) => {\n if (!oldShowCalendar) {\n onPickerOpen();\n if (!isWithCalendarToo) trackFocusTimewheelCurrHour();\n } else onPickerClose();\n return !oldShowCalendar;\n });\n }, [disabled, isWithCalendarToo, onPickerClose, onPickerOpen, trackFocusTimewheelCurrHour]);\n\n const handleSetTriggerRef = useCallback(\n (newRef: HTMLButtonElement) => {\n pickerButtonRef.current = newRef;\n setReferenceElement(newRef);\n\n if (latestInteractionRegion === 'picker-icon' && currFocusDescriber === 'time-picker-icon') newRef?.focus();\n },\n [currFocusDescriber, latestInteractionRegion, pickerButtonRef],\n );\n const handleMenuWrapperKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLElement>) => {\n const { key } = e;\n if (key === 'Escape') {\n closeTimePicker();\n trackFocusPicker();\n }\n },\n [closeTimePicker, trackFocusPicker],\n );\n return useMemo(\n () => ({\n referenceElement,\n showTimePicker,\n setShowTimePicker,\n handleToggleTimePicker,\n handleSetTriggerRef,\n handleMenuWrapperKeyDown,\n closeTimePicker,\n }),\n [\n closeTimePicker,\n handleMenuWrapperKeyDown,\n handleSetTriggerRef,\n handleToggleTimePicker,\n referenceElement,\n showTimePicker,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA2D;AAE3D,yCAAgD;AAWzC,MAAM,wBAAwB,MAA2B;AAC9D,QAAM;AAAA,IACJ;AAAA,IACA,OAAO,EAAE,eAAe,cAAc,SAAS;AAAA,IAC/C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,kEAA+B;AAC9C,QAAM,CAAC,gBAAgB,iBAAiB,QAAI,uBAAS,KAAK;AAC1D,QAAM,CAAC,kBAAkB,mBAAmB,QAAI,uBAAmC,IAAI;AACvF,QAAM,sBAAkB,0BAAY,MAAM;AACxC,sBAAkB,KAAK;AACvB,kBAAc;AAAA,EAChB,GAAG,CAAC,aAAa,CAAC;AAClB,QAAM,6BAAyB,0BAAY,MAAM;AAC/C,QAAI,SAAU;AACd,sBAAkB,CAAC,oBAAoB;AACrC,UAAI,CAAC,iBAAiB;AACpB,qBAAa;AACb,YAAI,CAAC,kBAAmB,6BAA4B;AAAA,MACtD,MAAO,eAAc;AACrB,aAAO,CAAC;AAAA,IACV,CAAC;AAAA,EACH,GAAG,CAAC,UAAU,mBAAmB,eAAe,cAAc,2BAA2B,CAAC;AAE1F,QAAM,0BAAsB;AAAA,IAC1B,CAAC,WAA8B;AAC7B,sBAAgB,UAAU;AAC1B,0BAAoB,MAAM;AAE1B,UAAI,4BAA4B,iBAAiB,uBAAuB,mBAAoB,SAAQ,MAAM;AAAA,IAC5G;AAAA,IACA,CAAC,oBAAoB,yBAAyB,eAAe;AAAA,EAC/D;AACA,QAAM,+BAA2B;AAAA,IAC/B,CAAC,MAAwC;AACvC,YAAM,EAAE,IAAI,IAAI;AAChB,UAAI,QAAQ,UAAU;AACpB,wBAAgB;AAChB,yBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,CAAC,iBAAiB,gBAAgB;AAAA,EACpC;AACA,aAAO;AAAA,IACL,OAAO;AAAA,MACL;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,IACF;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import { useState, useCallback, useMemo, useContext } from 'react';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX.js';\n\ninterface PopperTriggerLogicT {\n referenceElement: HTMLButtonElement | null;\n showTimePicker: boolean;\n closeTimePicker: () => void;\n setShowTimePicker: TypescriptHelpersT.StateSetter<boolean>;\n handleToggleTimePicker: () => void;\n handleSetTriggerRef: (instance: HTMLButtonElement) => void;\n handleMenuWrapperKeyDown: (e: React.KeyboardEvent<HTMLElement>) => void;\n}\nexport const usePopperTriggerLogic = (): PopperTriggerLogicT => {\n const {\n pickerButtonRef,\n props: { onPickerClose, onPickerOpen, disabled },\n isWithCalendarToo,\n trackFocusTimewheelCurrHour,\n trackFocusPicker,\n latestInteractionRegion,\n currFocusDescriber,\n } = useContext(ControlledDateTimePickerContext);\n const [showTimePicker, setShowTimePicker] = useState(false);\n const [referenceElement, setReferenceElement] = useState<HTMLButtonElement | null>(null);\n // Mirror of the guard in `Calendar/usePopperTriggerLogic.tsx` \u2014 see the comment there. The flag\n // already gated the focus tracking below; it now gates the callbacks too.\n const closeTimePicker = useCallback(() => {\n setShowTimePicker(false);\n if (!isWithCalendarToo) onPickerClose();\n }, [isWithCalendarToo, onPickerClose]);\n const handleToggleTimePicker = useCallback(() => {\n if (disabled) return;\n setShowTimePicker((oldShowCalendar) => {\n if (isWithCalendarToo) return !oldShowCalendar;\n if (!oldShowCalendar) {\n onPickerOpen();\n trackFocusTimewheelCurrHour();\n } else onPickerClose();\n return !oldShowCalendar;\n });\n }, [disabled, isWithCalendarToo, onPickerClose, onPickerOpen, trackFocusTimewheelCurrHour]);\n\n const handleSetTriggerRef = useCallback(\n (newRef: HTMLButtonElement) => {\n pickerButtonRef.current = newRef;\n setReferenceElement(newRef);\n\n if (latestInteractionRegion === 'picker-icon' && currFocusDescriber === 'time-picker-icon') newRef?.focus();\n },\n [currFocusDescriber, latestInteractionRegion, pickerButtonRef],\n );\n const handleMenuWrapperKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLElement>) => {\n const { key } = e;\n if (key === 'Escape') {\n closeTimePicker();\n trackFocusPicker();\n }\n },\n [closeTimePicker, trackFocusPicker],\n );\n return useMemo(\n () => ({\n referenceElement,\n showTimePicker,\n setShowTimePicker,\n handleToggleTimePicker,\n handleSetTriggerRef,\n handleMenuWrapperKeyDown,\n closeTimePicker,\n }),\n [\n closeTimePicker,\n handleMenuWrapperKeyDown,\n handleSetTriggerRef,\n handleToggleTimePicker,\n referenceElement,\n showTimePicker,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA2D;AAE3D,yCAAgD;AAWzC,MAAM,wBAAwB,MAA2B;AAC9D,QAAM;AAAA,IACJ;AAAA,IACA,OAAO,EAAE,eAAe,cAAc,SAAS;AAAA,IAC/C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,kEAA+B;AAC9C,QAAM,CAAC,gBAAgB,iBAAiB,QAAI,uBAAS,KAAK;AAC1D,QAAM,CAAC,kBAAkB,mBAAmB,QAAI,uBAAmC,IAAI;AAGvF,Q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