@elliemae/ds-form-date-time-picker 3.26.0 → 3.26.1-rc.1

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 (64) hide show
  1. package/dist/cjs/parts/ClearButton/ClearButton.js +7 -1
  2. package/dist/cjs/parts/ClearButton/ClearButton.js.map +2 -2
  3. package/dist/cjs/parts/ControlledDateTimePickerContent.js +2 -1
  4. package/dist/cjs/parts/ControlledDateTimePickerContent.js.map +2 -2
  5. package/dist/cjs/parts/DateInputs/DDInput.js +2 -0
  6. package/dist/cjs/parts/DateInputs/DDInput.js.map +2 -2
  7. package/dist/cjs/parts/DateInputs/DateInputs.js +5 -1
  8. package/dist/cjs/parts/DateInputs/DateInputs.js.map +2 -2
  9. package/dist/cjs/parts/DateInputs/MMInput.js +2 -0
  10. package/dist/cjs/parts/DateInputs/MMInput.js.map +2 -2
  11. package/dist/cjs/parts/DateInputs/YYYYInput.js +2 -0
  12. package/dist/cjs/parts/DateInputs/YYYYInput.js.map +2 -2
  13. package/dist/cjs/parts/Pickers/Calendar/CalendarIconTrigger.js +11 -2
  14. package/dist/cjs/parts/Pickers/Calendar/CalendarIconTrigger.js.map +2 -2
  15. package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +7 -2
  16. package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js.map +2 -2
  17. package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js +4 -2
  18. package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js.map +2 -2
  19. package/dist/cjs/parts/TimeInputs/HHInput.js +3 -1
  20. package/dist/cjs/parts/TimeInputs/HHInput.js.map +2 -2
  21. package/dist/cjs/parts/TimeInputs/MeridiemInput.js +3 -1
  22. package/dist/cjs/parts/TimeInputs/MeridiemInput.js.map +2 -2
  23. package/dist/cjs/parts/TimeInputs/MinutesInput.js +3 -1
  24. package/dist/cjs/parts/TimeInputs/MinutesInput.js.map +2 -2
  25. package/dist/cjs/parts/TimeInputs/TimeInputs.js +5 -1
  26. package/dist/cjs/parts/TimeInputs/TimeInputs.js.map +2 -2
  27. package/dist/cjs/react-desc-prop-types.js +2 -1
  28. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  29. package/dist/esm/parts/ClearButton/ClearButton.js +7 -1
  30. package/dist/esm/parts/ClearButton/ClearButton.js.map +2 -2
  31. package/dist/esm/parts/ControlledDateTimePickerContent.js +2 -1
  32. package/dist/esm/parts/ControlledDateTimePickerContent.js.map +2 -2
  33. package/dist/esm/parts/DateInputs/DDInput.js +2 -0
  34. package/dist/esm/parts/DateInputs/DDInput.js.map +2 -2
  35. package/dist/esm/parts/DateInputs/DateInputs.js +5 -1
  36. package/dist/esm/parts/DateInputs/DateInputs.js.map +2 -2
  37. package/dist/esm/parts/DateInputs/MMInput.js +2 -0
  38. package/dist/esm/parts/DateInputs/MMInput.js.map +2 -2
  39. package/dist/esm/parts/DateInputs/YYYYInput.js +2 -0
  40. package/dist/esm/parts/DateInputs/YYYYInput.js.map +2 -2
  41. package/dist/esm/parts/Pickers/Calendar/CalendarIconTrigger.js +11 -2
  42. package/dist/esm/parts/Pickers/Calendar/CalendarIconTrigger.js.map +2 -2
  43. package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +7 -2
  44. package/dist/esm/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js.map +2 -2
  45. package/dist/esm/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js +4 -2
  46. package/dist/esm/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js.map +2 -2
  47. package/dist/esm/parts/TimeInputs/HHInput.js +3 -1
  48. package/dist/esm/parts/TimeInputs/HHInput.js.map +2 -2
  49. package/dist/esm/parts/TimeInputs/MeridiemInput.js +3 -1
  50. package/dist/esm/parts/TimeInputs/MeridiemInput.js.map +2 -2
  51. package/dist/esm/parts/TimeInputs/MinutesInput.js +3 -1
  52. package/dist/esm/parts/TimeInputs/MinutesInput.js.map +2 -2
  53. package/dist/esm/parts/TimeInputs/TimeInputs.js +5 -1
  54. package/dist/esm/parts/TimeInputs/TimeInputs.js.map +2 -2
  55. package/dist/esm/react-desc-prop-types.js +2 -1
  56. package/dist/esm/react-desc-prop-types.js.map +2 -2
  57. package/dist/types/parts/DateInputs/DDInput.d.ts +2 -1
  58. package/dist/types/parts/DateInputs/MMInput.d.ts +2 -1
  59. package/dist/types/parts/DateInputs/YYYYInput.d.ts +2 -1
  60. package/dist/types/parts/TimeInputs/HHInput.d.ts +2 -1
  61. package/dist/types/parts/TimeInputs/MeridiemInput.d.ts +2 -1
  62. package/dist/types/parts/TimeInputs/MinutesInput.d.ts +2 -1
  63. package/dist/types/react-desc-prop-types.d.ts +2 -0
  64. package/package.json +9 -9
@@ -23,7 +23,8 @@ const HHInput = React2.memo(
23
23
  contextRef,
24
24
  autoFocusHourInput,
25
25
  isFocused,
26
- getProps
26
+ getProps,
27
+ tabIndex
27
28
  }) => {
28
29
  const validateOnChange = useCallback(
29
30
  (e) => {
@@ -49,6 +50,7 @@ const HHInput = React2.memo(
49
50
  if (isFocused)
50
51
  DomElem?.focus?.();
51
52
  },
53
+ tabIndex,
52
54
  placeholder,
53
55
  "data-testid": ControlledDateTimePickerDatatestid.TIME_INPUTS.HOUR,
54
56
  "aria-label": `hours input field ${ariaCurrentValueForInputs}`,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/TimeInputs/HHInput.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback } from 'react';\nimport { StyledHourInput } from '../Styleds.js';\nimport type { DSControlledDateTimePickerInternalsT } from '../../sharedTypes.js';\nimport type { ControlledDateTimePickerContextT } from '../../config/useControlledDateTimePicker.js';\nimport { ControlledDateTimePickerDatatestid } from '../../ControlledDateTimePickerDatatestid.js';\nconst regExpNumbers = /^[0-9]+$/;\nconst isInvalidHour = (hours: string) => {\n if (hours === '') return false;\n const numberOnly = regExpNumbers.test(hours);\n return hours.length > 2 || hours === '00' || !numberOnly || Number.parseInt(hours, 10) > 12;\n};\ninterface HHInputsPropsT {\n onChange: DSControlledDateTimePickerInternalsT.OnChangeFunc;\n onBlur: DSControlledDateTimePickerInternalsT.OnBlurFunc;\n onFocus: DSControlledDateTimePickerInternalsT.OnFocusFunc;\n onKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown;\n value: string;\n disabled: boolean;\n contextRef: React.MutableRefObject<HTMLInputElement | null>;\n placeholder: string;\n ariaCurrentValueForInputs: string;\n autoFocusHourInput: boolean;\n isFocused: boolean;\n getProps: ControlledDateTimePickerContextT['getProps'];\n}\nexport const HHInput = React.memo(\n ({\n onChange,\n onBlur,\n onFocus,\n onKeyDown,\n value,\n disabled,\n placeholder,\n ariaCurrentValueForInputs,\n contextRef,\n autoFocusHourInput,\n isFocused,\n getProps,\n }: HHInputsPropsT): JSX.Element => {\n const validateOnChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n if (isInvalidHour(e.target.value)) {\n e.preventDefault();\n return;\n }\n onChange(e);\n },\n [onChange],\n );\n return (\n <StyledHourInput\n autoFocus={autoFocusHourInput}\n onChange={validateOnChange}\n onBlur={onBlur}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n value={value}\n innerRef={(DomElem: HTMLInputElement) => {\n contextRef.current = DomElem;\n if (isFocused) DomElem?.focus?.();\n }}\n placeholder={placeholder}\n data-testid={ControlledDateTimePickerDatatestid.TIME_INPUTS.HOUR}\n aria-label={`hours input field ${ariaCurrentValueForInputs}`}\n disabled={disabled}\n aria-disabled={disabled}\n getOwnerProps={getProps}\n />\n );\n },\n);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACmDjB;AAnDN,OAAOA,UAAS,mBAAmB;AACnC,SAAS,uBAAuB;AAGhC,SAAS,0CAA0C;AACnD,MAAM,gBAAgB;AACtB,MAAM,gBAAgB,CAAC,UAAkB;AACvC,MAAI,UAAU;AAAI,WAAO;AACzB,QAAM,aAAa,cAAc,KAAK,KAAK;AAC3C,SAAO,MAAM,SAAS,KAAK,UAAU,QAAQ,CAAC,cAAc,OAAO,SAAS,OAAO,EAAE,IAAI;AAC3F;AAeO,MAAM,UAAUA,OAAM;AAAA,EAC3B,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,MAAmC;AACjC,UAAM,mBAAmB;AAAA,MACvB,CAAC,MAA2C;AAC1C,YAAI,cAAc,EAAE,OAAO,KAAK,GAAG;AACjC,YAAE,eAAe;AACjB;AAAA,QACF;AACA,iBAAS,CAAC;AAAA,MACZ;AAAA,MACA,CAAC,QAAQ;AAAA,IACX;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,QACX,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,CAAC,YAA8B;AACvC,qBAAW,UAAU;AACrB,cAAI;AAAW,qBAAS,QAAQ;AAAA,QAClC;AAAA,QACA;AAAA,QACA,eAAa,mCAAmC,YAAY;AAAA,QAC5D,cAAY,qBAAqB;AAAA,QACjC;AAAA,QACA,iBAAe;AAAA,QACf,eAAe;AAAA;AAAA,IACjB;AAAA,EAEJ;AACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback } from 'react';\nimport { StyledHourInput } from '../Styleds.js';\nimport type { DSControlledDateTimePickerInternalsT } from '../../sharedTypes.js';\nimport type { ControlledDateTimePickerContextT } from '../../config/useControlledDateTimePicker.js';\nimport { ControlledDateTimePickerDatatestid } from '../../ControlledDateTimePickerDatatestid.js';\nconst regExpNumbers = /^[0-9]+$/;\nconst isInvalidHour = (hours: string) => {\n if (hours === '') return false;\n const numberOnly = regExpNumbers.test(hours);\n return hours.length > 2 || hours === '00' || !numberOnly || Number.parseInt(hours, 10) > 12;\n};\ninterface HHInputsPropsT {\n onChange: DSControlledDateTimePickerInternalsT.OnChangeFunc;\n onBlur: DSControlledDateTimePickerInternalsT.OnBlurFunc;\n onFocus: DSControlledDateTimePickerInternalsT.OnFocusFunc;\n onKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown;\n value: string;\n disabled: boolean;\n contextRef: React.MutableRefObject<HTMLInputElement | null>;\n placeholder: string;\n ariaCurrentValueForInputs: string;\n autoFocusHourInput: boolean;\n isFocused: boolean;\n getProps: ControlledDateTimePickerContextT['getProps'];\n tabIndex?: WCAGTabIndex;\n}\nexport const HHInput = React.memo(\n ({\n onChange,\n onBlur,\n onFocus,\n onKeyDown,\n value,\n disabled,\n placeholder,\n ariaCurrentValueForInputs,\n contextRef,\n autoFocusHourInput,\n isFocused,\n getProps,\n tabIndex,\n }: HHInputsPropsT): JSX.Element => {\n const validateOnChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n if (isInvalidHour(e.target.value)) {\n e.preventDefault();\n return;\n }\n onChange(e);\n },\n [onChange],\n );\n return (\n <StyledHourInput\n autoFocus={autoFocusHourInput}\n onChange={validateOnChange}\n onBlur={onBlur}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n value={value}\n innerRef={(DomElem: HTMLInputElement) => {\n contextRef.current = DomElem;\n if (isFocused) DomElem?.focus?.();\n }}\n tabIndex={tabIndex}\n placeholder={placeholder}\n data-testid={ControlledDateTimePickerDatatestid.TIME_INPUTS.HOUR}\n aria-label={`hours input field ${ariaCurrentValueForInputs}`}\n disabled={disabled}\n aria-disabled={disabled}\n getOwnerProps={getProps}\n />\n );\n },\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACqDjB;AArDN,OAAOA,UAAS,mBAAmB;AACnC,SAAS,uBAAuB;AAGhC,SAAS,0CAA0C;AACnD,MAAM,gBAAgB;AACtB,MAAM,gBAAgB,CAAC,UAAkB;AACvC,MAAI,UAAU;AAAI,WAAO;AACzB,QAAM,aAAa,cAAc,KAAK,KAAK;AAC3C,SAAO,MAAM,SAAS,KAAK,UAAU,QAAQ,CAAC,cAAc,OAAO,SAAS,OAAO,EAAE,IAAI;AAC3F;AAgBO,MAAM,UAAUA,OAAM;AAAA,EAC3B,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,MAAmC;AACjC,UAAM,mBAAmB;AAAA,MACvB,CAAC,MAA2C;AAC1C,YAAI,cAAc,EAAE,OAAO,KAAK,GAAG;AACjC,YAAE,eAAe;AACjB;AAAA,QACF;AACA,iBAAS,CAAC;AAAA,MACZ;AAAA,MACA,CAAC,QAAQ;AAAA,IACX;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,QACX,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,CAAC,YAA8B;AACvC,qBAAW,UAAU;AACrB,cAAI;AAAW,qBAAS,QAAQ;AAAA,QAClC;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAa,mCAAmC,YAAY;AAAA,QAC5D,cAAY,qBAAqB;AAAA,QACjC;AAAA,QACA,iBAAe;AAAA,QACf,eAAe;AAAA;AAAA,IACjB;AAAA,EAEJ;AACF;",
6
6
  "names": ["React"]
7
7
  }
@@ -25,7 +25,8 @@ const MeridiemInput = React2.memo(
25
25
  ariaCurrentValueForInputs,
26
26
  contextRef,
27
27
  isFocused,
28
- getProps
28
+ getProps,
29
+ tabIndex
29
30
  }) => {
30
31
  const validateOnChange = useCallback(
31
32
  (e) => {
@@ -50,6 +51,7 @@ const MeridiemInput = React2.memo(
50
51
  if (isFocused)
51
52
  DomElem?.focus?.();
52
53
  },
54
+ tabIndex,
53
55
  "data-testid": ControlledDateTimePickerDatatestid.TIME_INPUTS.MERIDIEM,
54
56
  placeholder,
55
57
  "aria-label": `meridiem input field ${ariaCurrentValueForInputs}`,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/TimeInputs/MeridiemInput.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback } from 'react';\nimport { StyledMeridiemInput } from '../Styleds.js';\nimport type { DSControlledDateTimePickerInternalsT } from '../../sharedTypes.js';\nimport type { ControlledDateTimePickerContextT } from '../../config/useControlledDateTimePicker.js';\nimport { ControlledDateTimePickerDatatestid } from '../../ControlledDateTimePickerDatatestid.js';\n\nconst validFirstDigits = ['a', 'A', 'p', 'P'];\nconst validSecondDigits = ['m', 'M'];\nconst isInvalidMeridiem = (meridiem: string) => {\n if (meridiem === '') return false;\n const [firstDigit, secondDigit] = meridiem.split('');\n const isValidFirstDigit = (meridiem.length < 1 && !firstDigit) || validFirstDigits.includes(firstDigit);\n const isValidSecondDigit = !secondDigit || validSecondDigits.includes(secondDigit);\n return meridiem.length > 2 || !isValidFirstDigit || !isValidSecondDigit;\n};\n\ninterface MeridiemInputsPropsT {\n onChange: DSControlledDateTimePickerInternalsT.OnChangeFunc;\n onBlur: DSControlledDateTimePickerInternalsT.OnBlurFunc;\n onFocus: DSControlledDateTimePickerInternalsT.OnFocusFunc;\n onKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown;\n value: string;\n disabled: boolean;\n contextRef: React.MutableRefObject<HTMLInputElement | null>;\n placeholder: string;\n ariaCurrentValueForInputs: string;\n isFocused: boolean;\n getProps: ControlledDateTimePickerContextT['getProps'];\n}\nexport const MeridiemInput = React.memo(\n ({\n onChange,\n onBlur,\n onFocus,\n onKeyDown,\n value,\n disabled,\n placeholder,\n ariaCurrentValueForInputs,\n contextRef,\n isFocused,\n getProps,\n }: MeridiemInputsPropsT): JSX.Element => {\n const validateOnChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n if (isInvalidMeridiem(e?.target?.value)) {\n e.preventDefault();\n return;\n }\n onChange(e);\n },\n [onChange],\n );\n return (\n <StyledMeridiemInput\n onChange={validateOnChange}\n onBlur={onBlur}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n value={value}\n innerRef={(DomElem: HTMLInputElement) => {\n contextRef.current = DomElem;\n if (isFocused) DomElem?.focus?.();\n }}\n data-testid={ControlledDateTimePickerDatatestid.TIME_INPUTS.MERIDIEM}\n placeholder={placeholder}\n aria-label={`meridiem input field ${ariaCurrentValueForInputs}`}\n disabled={disabled}\n aria-disabled={disabled}\n getOwnerProps={getProps}\n />\n );\n },\n);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACsDjB;AAtDN,OAAOA,UAAS,mBAAmB;AACnC,SAAS,2BAA2B;AAGpC,SAAS,0CAA0C;AAEnD,MAAM,mBAAmB,CAAC,KAAK,KAAK,KAAK,GAAG;AAC5C,MAAM,oBAAoB,CAAC,KAAK,GAAG;AACnC,MAAM,oBAAoB,CAAC,aAAqB;AAC9C,MAAI,aAAa;AAAI,WAAO;AAC5B,QAAM,CAAC,YAAY,WAAW,IAAI,SAAS,MAAM,EAAE;AACnD,QAAM,oBAAqB,SAAS,SAAS,KAAK,CAAC,cAAe,iBAAiB,SAAS,UAAU;AACtG,QAAM,qBAAqB,CAAC,eAAe,kBAAkB,SAAS,WAAW;AACjF,SAAO,SAAS,SAAS,KAAK,CAAC,qBAAqB,CAAC;AACvD;AAeO,MAAM,gBAAgBA,OAAM;AAAA,EACjC,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,MAAyC;AACvC,UAAM,mBAAmB;AAAA,MACvB,CAAC,MAA2C;AAC1C,YAAI,kBAAkB,GAAG,QAAQ,KAAK,GAAG;AACvC,YAAE,eAAe;AACjB;AAAA,QACF;AACA,iBAAS,CAAC;AAAA,MACZ;AAAA,MACA,CAAC,QAAQ;AAAA,IACX;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,CAAC,YAA8B;AACvC,qBAAW,UAAU;AACrB,cAAI;AAAW,qBAAS,QAAQ;AAAA,QAClC;AAAA,QACA,eAAa,mCAAmC,YAAY;AAAA,QAC5D;AAAA,QACA,cAAY,wBAAwB;AAAA,QACpC;AAAA,QACA,iBAAe;AAAA,QACf,eAAe;AAAA;AAAA,IACjB;AAAA,EAEJ;AACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback } from 'react';\nimport { StyledMeridiemInput } from '../Styleds.js';\nimport type { DSControlledDateTimePickerInternalsT } from '../../sharedTypes.js';\nimport type { ControlledDateTimePickerContextT } from '../../config/useControlledDateTimePicker.js';\nimport { ControlledDateTimePickerDatatestid } from '../../ControlledDateTimePickerDatatestid.js';\n\nconst validFirstDigits = ['a', 'A', 'p', 'P'];\nconst validSecondDigits = ['m', 'M'];\nconst isInvalidMeridiem = (meridiem: string) => {\n if (meridiem === '') return false;\n const [firstDigit, secondDigit] = meridiem.split('');\n const isValidFirstDigit = (meridiem.length < 1 && !firstDigit) || validFirstDigits.includes(firstDigit);\n const isValidSecondDigit = !secondDigit || validSecondDigits.includes(secondDigit);\n return meridiem.length > 2 || !isValidFirstDigit || !isValidSecondDigit;\n};\n\ninterface MeridiemInputsPropsT {\n onChange: DSControlledDateTimePickerInternalsT.OnChangeFunc;\n onBlur: DSControlledDateTimePickerInternalsT.OnBlurFunc;\n onFocus: DSControlledDateTimePickerInternalsT.OnFocusFunc;\n onKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown;\n value: string;\n disabled: boolean;\n contextRef: React.MutableRefObject<HTMLInputElement | null>;\n placeholder: string;\n ariaCurrentValueForInputs: string;\n isFocused: boolean;\n getProps: ControlledDateTimePickerContextT['getProps'];\n tabIndex?: WCAGTabIndex;\n}\nexport const MeridiemInput = React.memo(\n ({\n onChange,\n onBlur,\n onFocus,\n onKeyDown,\n value,\n disabled,\n placeholder,\n ariaCurrentValueForInputs,\n contextRef,\n isFocused,\n getProps,\n tabIndex,\n }: MeridiemInputsPropsT): JSX.Element => {\n const validateOnChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n if (isInvalidMeridiem(e?.target?.value)) {\n e.preventDefault();\n return;\n }\n onChange(e);\n },\n [onChange],\n );\n return (\n <StyledMeridiemInput\n onChange={validateOnChange}\n onBlur={onBlur}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n value={value}\n innerRef={(DomElem: HTMLInputElement) => {\n contextRef.current = DomElem;\n if (isFocused) DomElem?.focus?.();\n }}\n tabIndex={tabIndex}\n data-testid={ControlledDateTimePickerDatatestid.TIME_INPUTS.MERIDIEM}\n placeholder={placeholder}\n aria-label={`meridiem input field ${ariaCurrentValueForInputs}`}\n disabled={disabled}\n aria-disabled={disabled}\n getOwnerProps={getProps}\n />\n );\n },\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACwDjB;AAxDN,OAAOA,UAAS,mBAAmB;AACnC,SAAS,2BAA2B;AAGpC,SAAS,0CAA0C;AAEnD,MAAM,mBAAmB,CAAC,KAAK,KAAK,KAAK,GAAG;AAC5C,MAAM,oBAAoB,CAAC,KAAK,GAAG;AACnC,MAAM,oBAAoB,CAAC,aAAqB;AAC9C,MAAI,aAAa;AAAI,WAAO;AAC5B,QAAM,CAAC,YAAY,WAAW,IAAI,SAAS,MAAM,EAAE;AACnD,QAAM,oBAAqB,SAAS,SAAS,KAAK,CAAC,cAAe,iBAAiB,SAAS,UAAU;AACtG,QAAM,qBAAqB,CAAC,eAAe,kBAAkB,SAAS,WAAW;AACjF,SAAO,SAAS,SAAS,KAAK,CAAC,qBAAqB,CAAC;AACvD;AAgBO,MAAM,gBAAgBA,OAAM;AAAA,EACjC,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,MAAyC;AACvC,UAAM,mBAAmB;AAAA,MACvB,CAAC,MAA2C;AAC1C,YAAI,kBAAkB,GAAG,QAAQ,KAAK,GAAG;AACvC,YAAE,eAAe;AACjB;AAAA,QACF;AACA,iBAAS,CAAC;AAAA,MACZ;AAAA,MACA,CAAC,QAAQ;AAAA,IACX;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,CAAC,YAA8B;AACvC,qBAAW,UAAU;AACrB,cAAI;AAAW,qBAAS,QAAQ;AAAA,QAClC;AAAA,QACA;AAAA,QACA,eAAa,mCAAmC,YAAY;AAAA,QAC5D;AAAA,QACA,cAAY,wBAAwB;AAAA,QACpC;AAAA,QACA,iBAAe;AAAA,QACf,eAAe;AAAA;AAAA,IACjB;AAAA,EAEJ;AACF;",
6
6
  "names": ["React"]
7
7
  }
@@ -22,7 +22,8 @@ const MinutesInput = React2.memo(
22
22
  ariaCurrentValueForInputs,
23
23
  contextRef,
24
24
  isFocused,
25
- getProps
25
+ getProps,
26
+ tabIndex
26
27
  }) => {
27
28
  const validateOnChange = useCallback(
28
29
  (e) => {
@@ -47,6 +48,7 @@ const MinutesInput = React2.memo(
47
48
  if (isFocused)
48
49
  DomElem?.focus?.();
49
50
  },
51
+ tabIndex,
50
52
  "data-testid": ControlledDateTimePickerDatatestid.TIME_INPUTS.MINUTE,
51
53
  placeholder,
52
54
  "aria-label": `minutes input field ${ariaCurrentValueForInputs}`,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/TimeInputs/MinutesInput.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback } from 'react';\nimport { StyledMinuteInput } from '../Styleds.js';\nimport type { DSControlledDateTimePickerInternalsT } from '../../sharedTypes.js';\nimport type { ControlledDateTimePickerContextT } from '../../config/useControlledDateTimePicker.js';\nimport { ControlledDateTimePickerDatatestid } from '../../ControlledDateTimePickerDatatestid.js';\nconst regExpNumbers = /^[0-9]+$/;\nconst isInvalidMinute = (minutes: string) => {\n if (minutes === '') return false;\n const numberOnly = regExpNumbers.test(minutes);\n return minutes.length > 2 || !numberOnly || Number.parseInt(minutes, 10) > 60;\n};\ninterface MinutesInputsPropsT {\n onChange: DSControlledDateTimePickerInternalsT.OnChangeFunc;\n onBlur: DSControlledDateTimePickerInternalsT.OnBlurFunc;\n onFocus: DSControlledDateTimePickerInternalsT.OnFocusFunc;\n onKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown;\n value: string;\n disabled: boolean;\n contextRef: React.MutableRefObject<HTMLInputElement | null>;\n placeholder: string;\n ariaCurrentValueForInputs: string;\n isFocused: boolean;\n getProps: ControlledDateTimePickerContextT['getProps'];\n}\nexport const MinutesInput = React.memo(\n ({\n onChange,\n onBlur,\n onFocus,\n onKeyDown,\n value,\n disabled,\n placeholder,\n ariaCurrentValueForInputs,\n contextRef,\n isFocused,\n getProps,\n }: MinutesInputsPropsT): JSX.Element => {\n const validateOnChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n if (isInvalidMinute(e?.target?.value)) {\n e.preventDefault();\n return;\n }\n onChange(e);\n },\n [onChange],\n );\n return (\n <StyledMinuteInput\n onChange={validateOnChange}\n onBlur={onBlur}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n value={value}\n innerRef={(DomElem: HTMLInputElement) => {\n contextRef.current = DomElem;\n if (isFocused) DomElem?.focus?.();\n }}\n data-testid={ControlledDateTimePickerDatatestid.TIME_INPUTS.MINUTE}\n placeholder={placeholder}\n aria-label={`minutes input field ${ariaCurrentValueForInputs}`}\n disabled={disabled}\n aria-disabled={disabled}\n getOwnerProps={getProps}\n />\n );\n },\n);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACiDjB;AAjDN,OAAOA,UAAS,mBAAmB;AACnC,SAAS,yBAAyB;AAGlC,SAAS,0CAA0C;AACnD,MAAM,gBAAgB;AACtB,MAAM,kBAAkB,CAAC,YAAoB;AAC3C,MAAI,YAAY;AAAI,WAAO;AAC3B,QAAM,aAAa,cAAc,KAAK,OAAO;AAC7C,SAAO,QAAQ,SAAS,KAAK,CAAC,cAAc,OAAO,SAAS,SAAS,EAAE,IAAI;AAC7E;AAcO,MAAM,eAAeA,OAAM;AAAA,EAChC,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,MAAwC;AACtC,UAAM,mBAAmB;AAAA,MACvB,CAAC,MAA2C;AAC1C,YAAI,gBAAgB,GAAG,QAAQ,KAAK,GAAG;AACrC,YAAE,eAAe;AACjB;AAAA,QACF;AACA,iBAAS,CAAC;AAAA,MACZ;AAAA,MACA,CAAC,QAAQ;AAAA,IACX;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,CAAC,YAA8B;AACvC,qBAAW,UAAU;AACrB,cAAI;AAAW,qBAAS,QAAQ;AAAA,QAClC;AAAA,QACA,eAAa,mCAAmC,YAAY;AAAA,QAC5D;AAAA,QACA,cAAY,uBAAuB;AAAA,QACnC;AAAA,QACA,iBAAe;AAAA,QACf,eAAe;AAAA;AAAA,IACjB;AAAA,EAEJ;AACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback } from 'react';\nimport { StyledMinuteInput } from '../Styleds.js';\nimport type { DSControlledDateTimePickerInternalsT } from '../../sharedTypes.js';\nimport type { ControlledDateTimePickerContextT } from '../../config/useControlledDateTimePicker.js';\nimport { ControlledDateTimePickerDatatestid } from '../../ControlledDateTimePickerDatatestid.js';\nconst regExpNumbers = /^[0-9]+$/;\nconst isInvalidMinute = (minutes: string) => {\n if (minutes === '') return false;\n const numberOnly = regExpNumbers.test(minutes);\n return minutes.length > 2 || !numberOnly || Number.parseInt(minutes, 10) > 60;\n};\ninterface MinutesInputsPropsT {\n onChange: DSControlledDateTimePickerInternalsT.OnChangeFunc;\n onBlur: DSControlledDateTimePickerInternalsT.OnBlurFunc;\n onFocus: DSControlledDateTimePickerInternalsT.OnFocusFunc;\n onKeyDown: DSControlledDateTimePickerInternalsT.OnKeyDown;\n value: string;\n disabled: boolean;\n contextRef: React.MutableRefObject<HTMLInputElement | null>;\n placeholder: string;\n ariaCurrentValueForInputs: string;\n isFocused: boolean;\n getProps: ControlledDateTimePickerContextT['getProps'];\n tabIndex?: WCAGTabIndex;\n}\nexport const MinutesInput = React.memo(\n ({\n onChange,\n onBlur,\n onFocus,\n onKeyDown,\n value,\n disabled,\n placeholder,\n ariaCurrentValueForInputs,\n contextRef,\n isFocused,\n getProps,\n tabIndex,\n }: MinutesInputsPropsT): JSX.Element => {\n const validateOnChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n if (isInvalidMinute(e?.target?.value)) {\n e.preventDefault();\n return;\n }\n onChange(e);\n },\n [onChange],\n );\n return (\n <StyledMinuteInput\n onChange={validateOnChange}\n onBlur={onBlur}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n value={value}\n innerRef={(DomElem: HTMLInputElement) => {\n contextRef.current = DomElem;\n if (isFocused) DomElem?.focus?.();\n }}\n tabIndex={tabIndex}\n data-testid={ControlledDateTimePickerDatatestid.TIME_INPUTS.MINUTE}\n placeholder={placeholder}\n aria-label={`minutes input field ${ariaCurrentValueForInputs}`}\n disabled={disabled}\n aria-disabled={disabled}\n getOwnerProps={getProps}\n />\n );\n },\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACmDjB;AAnDN,OAAOA,UAAS,mBAAmB;AACnC,SAAS,yBAAyB;AAGlC,SAAS,0CAA0C;AACnD,MAAM,gBAAgB;AACtB,MAAM,kBAAkB,CAAC,YAAoB;AAC3C,MAAI,YAAY;AAAI,WAAO;AAC3B,QAAM,aAAa,cAAc,KAAK,OAAO;AAC7C,SAAO,QAAQ,SAAS,KAAK,CAAC,cAAc,OAAO,SAAS,SAAS,EAAE,IAAI;AAC7E;AAeO,MAAM,eAAeA,OAAM;AAAA,EAChC,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,MAAwC;AACtC,UAAM,mBAAmB;AAAA,MACvB,CAAC,MAA2C;AAC1C,YAAI,gBAAgB,GAAG,QAAQ,KAAK,GAAG;AACrC,YAAE,eAAe;AACjB;AAAA,QACF;AACA,iBAAS,CAAC;AAAA,MACZ;AAAA,MACA,CAAC,QAAQ;AAAA,IACX;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,CAAC,YAA8B;AACvC,qBAAW,UAAU;AACrB,cAAI;AAAW,qBAAS,QAAQ;AAAA,QAClC;AAAA,QACA;AAAA,QACA,eAAa,mCAAmC,YAAY;AAAA,QAC5D;AAAA,QACA,cAAY,uBAAuB;AAAA,QACnC;AAAA,QACA,iBAAe;AAAA,QACf,eAAe;AAAA;AAAA,IACjB;AAAA,EAEJ;AACF;",
6
6
  "names": ["React"]
7
7
  }
@@ -36,7 +36,8 @@ const TimeInputs = () => {
36
36
  ariaCurrentValueForInputs,
37
37
  latestInteractionRegion,
38
38
  currFocusDescriber,
39
- getProps
39
+ getProps,
40
+ props: { tabIndex }
40
41
  } = useContext(ControlledDateTimePickerContext);
41
42
  return /* @__PURE__ */ jsxs(
42
43
  Grid,
@@ -58,6 +59,7 @@ const TimeInputs = () => {
58
59
  onFocus: onHoursFocus,
59
60
  onKeyDown: onHoursKeyDown,
60
61
  contextRef: hourInputRef,
62
+ tabIndex,
61
63
  placeholder: "HH",
62
64
  ariaCurrentValueForInputs,
63
65
  autoFocusHourInput,
@@ -76,6 +78,7 @@ const TimeInputs = () => {
76
78
  onFocus: onMinutesFocus,
77
79
  onKeyDown: onMinutesKeyDown,
78
80
  contextRef: minutesInputRef,
81
+ tabIndex,
79
82
  placeholder: "MM",
80
83
  ariaCurrentValueForInputs,
81
84
  disabled,
@@ -93,6 +96,7 @@ const TimeInputs = () => {
93
96
  onFocus: onMeridiemFocus,
94
97
  onKeyDown: onMeridiemKeyDown,
95
98
  contextRef: meridiemInputRef,
99
+ tabIndex,
96
100
  placeholder: "AM",
97
101
  ariaCurrentValueForInputs,
98
102
  disabled,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/TimeInputs/TimeInputs.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { ControlledDateTimePickerContext } from '../../ControlledDateTimePickerCTX.js';\nimport { HHInput } from './HHInput.js';\nimport { MinutesInput } from './MinutesInput.js';\nimport { MeridiemInput } from './MeridiemInput.js';\nimport { useTimeInputs } from './useTimeInputs.js';\nimport { fixedValues } from '../config.js';\nimport { StyledColonSeparator, StyledSeparator, StyledFocusWithIn } from '../Styleds.js';\n\nexport const TimeInputs = (): JSX.Element => {\n const {\n autoFocusHourInput,\n disabled,\n onHoursChange,\n onMinutesChange,\n onMeridiemChange,\n onHoursBlur,\n onMinutesBlur,\n onMeridiemBlur,\n onHoursFocus,\n onMeridiemFocus,\n onMinutesFocus,\n onHoursKeyDown,\n onMinutesKeyDown,\n onMeridiemKeyDown,\n } = useTimeInputs();\n\n // we do this here so HHInput,MinutesInput, MeridiemInput can be pure components memoized via React.memo\n const {\n hours,\n minutes,\n meridiem,\n hourInputRef,\n minutesInputRef,\n meridiemInputRef,\n ariaCurrentValueForInputs,\n latestInteractionRegion,\n currFocusDescriber,\n getProps,\n } = useContext(ControlledDateTimePickerContext);\n\n return (\n <Grid\n cols={[\n fixedValues.smallInputWidth,\n fixedValues.separatorWidth,\n fixedValues.smallInputWidth,\n fixedValues.separatorWidth,\n fixedValues.smallInputWidth,\n ]}\n >\n <StyledFocusWithIn>\n <HHInput\n value={hours}\n onChange={onHoursChange}\n onBlur={onHoursBlur}\n onFocus={onHoursFocus}\n onKeyDown={onHoursKeyDown}\n contextRef={hourInputRef}\n placeholder=\"HH\"\n ariaCurrentValueForInputs={ariaCurrentValueForInputs}\n autoFocusHourInput={autoFocusHourInput}\n disabled={disabled}\n isFocused={latestInteractionRegion === 'time-inputs' && currFocusDescriber === 'hour-input'}\n getProps={getProps}\n />\n </StyledFocusWithIn>\n <StyledColonSeparator alignItems=\"center\">:</StyledColonSeparator>\n <StyledFocusWithIn>\n <MinutesInput\n value={minutes}\n onChange={onMinutesChange}\n onBlur={onMinutesBlur}\n onFocus={onMinutesFocus}\n onKeyDown={onMinutesKeyDown}\n contextRef={minutesInputRef}\n placeholder=\"MM\"\n ariaCurrentValueForInputs={ariaCurrentValueForInputs}\n disabled={disabled}\n isFocused={latestInteractionRegion === 'time-inputs' && currFocusDescriber === 'minute-input'}\n getProps={getProps}\n />\n </StyledFocusWithIn>\n <StyledSeparator> </StyledSeparator>\n <StyledFocusWithIn>\n <MeridiemInput\n value={meridiem}\n onChange={onMeridiemChange}\n onBlur={onMeridiemBlur}\n onFocus={onMeridiemFocus}\n onKeyDown={onMeridiemKeyDown}\n contextRef={meridiemInputRef}\n placeholder=\"AM\"\n ariaCurrentValueForInputs={ariaCurrentValueForInputs}\n disabled={disabled}\n isFocused={latestInteractionRegion === 'time-inputs' && currFocusDescriber === 'meridiem-input'}\n getProps={getProps}\n />\n </StyledFocusWithIn>\n </Grid>\n );\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC2CnB,SAUI,KAVJ;AA3CJ,SAAgB,kBAAkB;AAClC,SAAS,YAAY;AACrB,SAAS,uCAAuC;AAChD,SAAS,eAAe;AACxB,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAC9B,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB,iBAAiB,yBAAyB;AAElE,MAAM,aAAa,MAAmB;AAC3C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,cAAc;AAGlB,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,WAAW,+BAA+B;AAE9C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,QACJ,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,YAAY;AAAA,MACd;AAAA,MAEA;AAAA,4BAAC,qBACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,YACP,UAAU;AAAA,YACV,QAAQ;AAAA,YACR,SAAS;AAAA,YACT,WAAW;AAAA,YACX,YAAY;AAAA,YACZ,aAAY;AAAA,YACZ;AAAA,YACA;AAAA,YACA;AAAA,YACA,WAAW,4BAA4B,iBAAiB,uBAAuB;AAAA,YAC/E;AAAA;AAAA,QACF,GACF;AAAA,QACA,oBAAC,wBAAqB,YAAW,UAAS,eAAC;AAAA,QAC3C,oBAAC,qBACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,YACP,UAAU;AAAA,YACV,QAAQ;AAAA,YACR,SAAS;AAAA,YACT,WAAW;AAAA,YACX,YAAY;AAAA,YACZ,aAAY;AAAA,YACZ;AAAA,YACA;AAAA,YACA,WAAW,4BAA4B,iBAAiB,uBAAuB;AAAA,YAC/E;AAAA;AAAA,QACF,GACF;AAAA,QACA,oBAAC,mBAAgB,eAAC;AAAA,QAClB,oBAAC,qBACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,YACP,UAAU;AAAA,YACV,QAAQ;AAAA,YACR,SAAS;AAAA,YACT,WAAW;AAAA,YACX,YAAY;AAAA,YACZ,aAAY;AAAA,YACZ;AAAA,YACA;AAAA,YACA,WAAW,4BAA4B,iBAAiB,uBAAuB;AAAA,YAC/E;AAAA;AAAA,QACF,GACF;AAAA;AAAA;AAAA,EACF;AAEJ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { ControlledDateTimePickerContext } from '../../ControlledDateTimePickerCTX.js';\nimport { HHInput } from './HHInput.js';\nimport { MinutesInput } from './MinutesInput.js';\nimport { MeridiemInput } from './MeridiemInput.js';\nimport { useTimeInputs } from './useTimeInputs.js';\nimport { fixedValues } from '../config.js';\nimport { StyledColonSeparator, StyledSeparator, StyledFocusWithIn } from '../Styleds.js';\n\nexport const TimeInputs = (): JSX.Element => {\n const {\n autoFocusHourInput,\n disabled,\n onHoursChange,\n onMinutesChange,\n onMeridiemChange,\n onHoursBlur,\n onMinutesBlur,\n onMeridiemBlur,\n onHoursFocus,\n onMeridiemFocus,\n onMinutesFocus,\n onHoursKeyDown,\n onMinutesKeyDown,\n onMeridiemKeyDown,\n } = useTimeInputs();\n\n // we do this here so HHInput,MinutesInput, MeridiemInput can be pure components memoized via React.memo\n const {\n hours,\n minutes,\n meridiem,\n hourInputRef,\n minutesInputRef,\n meridiemInputRef,\n ariaCurrentValueForInputs,\n latestInteractionRegion,\n currFocusDescriber,\n getProps,\n props: { tabIndex },\n } = useContext(ControlledDateTimePickerContext);\n\n return (\n <Grid\n cols={[\n fixedValues.smallInputWidth,\n fixedValues.separatorWidth,\n fixedValues.smallInputWidth,\n fixedValues.separatorWidth,\n fixedValues.smallInputWidth,\n ]}\n >\n <StyledFocusWithIn>\n <HHInput\n value={hours}\n onChange={onHoursChange}\n onBlur={onHoursBlur}\n onFocus={onHoursFocus}\n onKeyDown={onHoursKeyDown}\n contextRef={hourInputRef}\n tabIndex={tabIndex}\n placeholder=\"HH\"\n ariaCurrentValueForInputs={ariaCurrentValueForInputs}\n autoFocusHourInput={autoFocusHourInput}\n disabled={disabled}\n isFocused={latestInteractionRegion === 'time-inputs' && currFocusDescriber === 'hour-input'}\n getProps={getProps}\n />\n </StyledFocusWithIn>\n <StyledColonSeparator alignItems=\"center\">:</StyledColonSeparator>\n <StyledFocusWithIn>\n <MinutesInput\n value={minutes}\n onChange={onMinutesChange}\n onBlur={onMinutesBlur}\n onFocus={onMinutesFocus}\n onKeyDown={onMinutesKeyDown}\n contextRef={minutesInputRef}\n tabIndex={tabIndex}\n placeholder=\"MM\"\n ariaCurrentValueForInputs={ariaCurrentValueForInputs}\n disabled={disabled}\n isFocused={latestInteractionRegion === 'time-inputs' && currFocusDescriber === 'minute-input'}\n getProps={getProps}\n />\n </StyledFocusWithIn>\n <StyledSeparator> </StyledSeparator>\n <StyledFocusWithIn>\n <MeridiemInput\n value={meridiem}\n onChange={onMeridiemChange}\n onBlur={onMeridiemBlur}\n onFocus={onMeridiemFocus}\n onKeyDown={onMeridiemKeyDown}\n contextRef={meridiemInputRef}\n tabIndex={tabIndex}\n placeholder=\"AM\"\n ariaCurrentValueForInputs={ariaCurrentValueForInputs}\n disabled={disabled}\n isFocused={latestInteractionRegion === 'time-inputs' && currFocusDescriber === 'meridiem-input'}\n getProps={getProps}\n />\n </StyledFocusWithIn>\n </Grid>\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC4CnB,SAUI,KAVJ;AA5CJ,SAAgB,kBAAkB;AAClC,SAAS,YAAY;AACrB,SAAS,uCAAuC;AAChD,SAAS,eAAe;AACxB,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAC9B,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB,iBAAiB,yBAAyB;AAElE,MAAM,aAAa,MAAmB;AAC3C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,cAAc;AAGlB,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,SAAS;AAAA,EACpB,IAAI,WAAW,+BAA+B;AAE9C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,QACJ,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,YAAY;AAAA,MACd;AAAA,MAEA;AAAA,4BAAC,qBACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,YACP,UAAU;AAAA,YACV,QAAQ;AAAA,YACR,SAAS;AAAA,YACT,WAAW;AAAA,YACX,YAAY;AAAA,YACZ;AAAA,YACA,aAAY;AAAA,YACZ;AAAA,YACA;AAAA,YACA;AAAA,YACA,WAAW,4BAA4B,iBAAiB,uBAAuB;AAAA,YAC/E;AAAA;AAAA,QACF,GACF;AAAA,QACA,oBAAC,wBAAqB,YAAW,UAAS,eAAC;AAAA,QAC3C,oBAAC,qBACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,YACP,UAAU;AAAA,YACV,QAAQ;AAAA,YACR,SAAS;AAAA,YACT,WAAW;AAAA,YACX,YAAY;AAAA,YACZ;AAAA,YACA,aAAY;AAAA,YACZ;AAAA,YACA;AAAA,YACA,WAAW,4BAA4B,iBAAiB,uBAAuB;AAAA,YAC/E;AAAA;AAAA,QACF,GACF;AAAA,QACA,oBAAC,mBAAgB,eAAC;AAAA,QAClB,oBAAC,qBACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,YACP,UAAU;AAAA,YACV,QAAQ;AAAA,YACR,SAAS;AAAA,YACT,WAAW;AAAA,YACX,YAAY;AAAA,YACZ;AAAA,YACA,aAAY;AAAA,YACZ;AAAA,YACA;AAAA,YACA,WAAW,4BAA4B,iBAAiB,uBAAuB;AAAA,YAC/E;AAAA;AAAA,QACF,GACF;AAAA;AAAA;AAAA,EACF;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -83,7 +83,8 @@ const propTypes = {
83
83
  ).defaultValue("01:00 AM"),
84
84
  minutesInterval: PropTypes.number.description("increments/decrements of minutes in time related controllers interactions").defaultValue("1"),
85
85
  "data-testid": PropTypes.string.description("Unique id for tests.").defaultValue(""),
86
- ...getPropsPerDatatestIdPropTypes(ControlledDateTimePickerDatatestid)
86
+ ...getPropsPerDatatestIdPropTypes(ControlledDateTimePickerDatatestid),
87
+ innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description("inner ref for the month input")
87
88
  };
88
89
  export {
89
90
  defaultProps,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n getPropsPerDatatestIdPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { ControlledDateTimePickerDatatestid } from './ControlledDateTimePickerDatatestid.js';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = (): void => {};\nconst defaultReturnFalse = (): false => false;\nexport declare namespace DSControlledDateTimePickerT {\n type DataTestIdType = typeof ControlledDateTimePickerDatatestid;\n // typescript type that rapresents the union of all the values for ControlledDateTimePickerDatatestid\n export type FlatDataTestIdValues = {\n [K in keyof DataTestIdType]: DataTestIdType[K] extends Record<string, unknown>\n ? DataTestIdType[K][keyof DataTestIdType[K]] // this is only 1 level deep, but it's enough for our needs right now\n : // can be extended to more levels if needed as follows:\n // ? DataTestIdType[K][keyof DataTestIdType[K]] extends Record<string, unknown>\n // ? DataTestIdType[K][keyof DataTestIdType[K]][keyof DataTestIdType[K][keyof DataTestIdType[K]]]\n // : DataTestIdType[K][keyof DataTestIdType[K]]\n DataTestIdType[K];\n }[keyof DataTestIdType];\n\n export type AriaAndDataPropsPerDataTestId = {\n [key in FlatDataTestIdValues]?: AriaAndDataPropsOrPropsGetter;\n };\n\n export type OnInternalValuesChangeEvent =\n | React.ChangeEvent<HTMLInputElement>\n | React.KeyboardEvent<HTMLInputElement>\n | React.KeyboardEvent<HTMLButtonElement>\n | React.KeyboardEvent\n | React.MouseEvent<HTMLInputElement>\n | React.MouseEvent<HTMLButtonElement>;\n export type ControlTypes =\n | 'full-date-time'\n | 'date-time-inputs'\n | 'date-time-picker'\n | 'date-time-picker-controller-only'\n | 'full-date'\n | 'date-inputs'\n | 'date-picker'\n | 'date-picker-controller-only'\n | 'full-time'\n | 'time-inputs'\n | 'time-picker'\n | 'time-picker-controller-only';\n export interface InternalInputsChangeMetaInfo {\n isAutomaticFillTrigger?: boolean;\n isDayPresentInMonth?: boolean;\n isOutOfRangeDay?: boolean;\n isDisabledDay?: boolean;\n isDisabledTime?: boolean;\n suggestedErrorMsg?: string;\n newDateTimeString?: string;\n newDateString?: string;\n newTimeString?: string;\n }\n\n export type OnDateChange = (val: string, metaInfo: InternalInputsChangeMetaInfo) => void;\n export type OnTimeChange = (val: string, metaInfo: InternalInputsChangeMetaInfo) => void;\n export type OnDateTimeChange = (val: string, metaInfo: InternalInputsChangeMetaInfo) => void;\n export type OnInternalInputsChange = (\n val: string,\n e: OnInternalValuesChangeEvent,\n metaInfo?: InternalInputsChangeMetaInfo,\n ) => void;\n export type AppOnInputChange = (\n val: string,\n e: OnInternalValuesChangeEvent,\n metaInfo: InternalInputsChangeMetaInfo,\n ) => void;\n\n /* ------------------------ ------------------ ------------------------*/\n /* ------------------------ DATE CONFIGURATION ------------------------*/\n /* ------------------------ ------------------ ------------------------*/\n export interface DefaultDateProps {\n onMonthChange: AppOnInputChange;\n onDayChange: AppOnInputChange;\n onYearChange: AppOnInputChange;\n onPickerOpen: NoopishFunc;\n onPickerClose: NoopishFunc;\n getIsDisabledDay: BooleanGetter<string>;\n getIsOutOfRangeDay: BooleanGetter<string>;\n getIsStartRangeDay: BooleanGetter<string>;\n getIsDayInRange: BooleanGetter<string>;\n getIsEndRangeDay: BooleanGetter<string>;\n isClearable: boolean;\n disabled: boolean;\n hasError: boolean;\n autoFocus: boolean;\n preventCloseOnSelection: boolean;\n }\n export interface OptionalDatePickerProps extends AriaAndDataPropsPerDataTestId {\n emptyPickerStartingMonth?: string;\n onCalendarOpenFocusedDay?: string;\n pickerFooterMsg?: string;\n innerRef?:\n | React.MutableRefObject<HTMLInputElement | HTMLButtonElement | null>\n | ((ref: HTMLInputElement | HTMLButtonElement | null) => void);\n }\n export interface RequiredDatePickerProps {\n type: 'full-date' | 'date-inputs' | 'date-picker' | 'date-picker-controller-only';\n date: string;\n onDateChange: OnDateChange;\n }\n export type DatePickerProps = OptionalDatePickerProps & Partial<DefaultDateProps> & RequiredDatePickerProps;\n export type InternalDatePickerProps = OptionalDatePickerProps & DefaultDateProps & RequiredDatePickerProps;\n\n /* ------------------------ ------------------ ------------------------*/\n /* ------------------------ TIME CONFIGURATION ------------------------*/\n /* ------------------------ ------------------ ------------------------*/\n\n export interface DefaultTimeProps {\n onHourChange: AppOnInputChange;\n onMinuteChange: AppOnInputChange;\n onMeridiemChange: AppOnInputChange;\n onPickerOpen: NoopishFunc;\n onPickerClose: NoopishFunc;\n getIsDisabledTime: BooleanGetter<string>;\n minutesInterval: number;\n isClearable: boolean;\n disabled: boolean;\n hasError: boolean;\n autoFocus: boolean;\n preventCloseOnSelection: boolean;\n }\n export interface OptionalTimePickerProps extends AriaAndDataPropsPerDataTestId {\n pickerFooterMsg?: string;\n onTimeWheelOpenStartingTime?: string;\n innerRef?:\n | React.MutableRefObject<HTMLInputElement | HTMLButtonElement | null>\n | ((ref: HTMLInputElement | HTMLButtonElement | null) => void);\n }\n export interface RequiredTimePickerProps {\n type: 'full-time' | 'time-inputs' | 'time-picker' | 'time-picker-controller-only';\n time: string;\n onTimeChange: OnTimeChange;\n }\n export type TimePickerProps = OptionalTimePickerProps & Partial<DefaultTimeProps> & RequiredTimePickerProps;\n export type InternalTimePickerProps = OptionalTimePickerProps & DefaultTimeProps & RequiredTimePickerProps;\n\n /* -------------------- ---------------------- ------------------------*/\n /* -------------------- DATETIME CONFIGURATION ------------------------*/\n /* -------------------- ---------------------- ------------------------*/\n\n export type DefaultDateTimeProps = DefaultTimeProps &\n DefaultDateProps & {\n onDateChange: OnDateChange;\n onTimeChange: OnTimeChange;\n };\n export type OptionalDateTimeProps = AriaAndDataPropsPerDataTestId & OptionalTimePickerProps & OptionalDatePickerProps;\n export interface RequiredDateTimeProps {\n type: 'full-date-time' | 'date-time-inputs' | 'date-time-picker' | 'date-time-picker-controller-only';\n dateTime: string;\n onDateTimeChange: OnDateTimeChange;\n }\n\n export type DateTimePickerProps = Partial<DefaultDateTimeProps> & OptionalDateTimeProps & RequiredDateTimeProps;\n export type InternalDateTimePickerProps = DefaultDateTimeProps & OptionalDateTimeProps & RequiredDateTimeProps;\n\n /* ---------------------- ------------------- -------------------------*/\n /* ---------------------- FINAL CONFIGURATION -------------------------*/\n /* ---------------------- ------------------- -------------------------*/\n export type DefaultProps = DefaultDateTimeProps & { type: 'full-date-time' };\n export type Props = DateTimePickerProps | DatePickerProps | TimePickerProps;\n export type InternalProps = InternalDateTimePickerProps | InternalDatePickerProps | InternalTimePickerProps;\n}\n\nexport const defaultProps: DSControlledDateTimePickerT.DefaultProps = {\n type: 'full-date-time',\n onDateChange: noop,\n onMonthChange: noop,\n onDayChange: noop,\n onYearChange: noop,\n onTimeChange: noop,\n onHourChange: noop,\n onMinuteChange: noop,\n onMeridiemChange: noop,\n onPickerOpen: noop,\n onPickerClose: noop,\n getIsDisabledDay: defaultReturnFalse,\n getIsOutOfRangeDay: defaultReturnFalse,\n getIsStartRangeDay: defaultReturnFalse,\n getIsDayInRange: defaultReturnFalse,\n getIsEndRangeDay: defaultReturnFalse,\n getIsDisabledTime: defaultReturnFalse,\n minutesInterval: 1,\n isClearable: false,\n disabled: false,\n hasError: false,\n autoFocus: false,\n preventCloseOnSelection: false,\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n type: PropTypes.oneOf([\n 'full-date-time',\n 'date-time-inputs',\n 'date-time-picker',\n 'date-time-picker-controller-only',\n 'full-date',\n 'date-inputs',\n 'date-picker',\n 'date-picker-controller-only',\n 'full-time',\n 'time-inputs',\n 'time-picker',\n 'time-picker-controller-only',\n ])\n .description('Type of time form control to use')\n .defaultValue('full-date-time'),\n disabled: PropTypes.bool.description('wheter or not the input is disabled').defaultValue(false),\n isClearable: PropTypes.bool.description('with or without clearable button').defaultValue(false),\n dateTime: PropTypes.string.description('when using date-time types, this is the value of the controller'),\n date: PropTypes.string.description('when using date types, this is the value of the controller'),\n time: PropTypes.string.description('when using time types, this is the value of the controller'),\n onDateChange: PropTypes.func.description('(newDateString, metaInformations) => void'),\n onTimeChange: PropTypes.func.description('(newTimeString, metaInformations) => void'),\n onDateTimeChange: PropTypes.func.description('(newDateTimeString, metaInformations) => void'),\n onMonthChange: PropTypes.func.description('(newMonthString, event, metaInformations) => void'),\n onDayChange: PropTypes.func.description('(newDayString, event, metaInformations) => void'),\n onYearChange: PropTypes.func.description('(newYearString, event, metaInformations) => void'),\n onHourChange: PropTypes.func.description('(newHourString, event, metaInformations) => void'),\n onMinuteChange: PropTypes.func.description('(newMinuteString, event, metaInformations) => void'),\n onMeridiemChange: PropTypes.func.description('(newMeridiemString, event, metaInformations) => void'),\n getIsDisabledDay: PropTypes.func.description(\n '(dayAsString) => true for marking as disabled, false for marking as valid',\n ),\n getIsOutOfRangeDay: PropTypes.func.description(\n '(dayAsString) => true for marking as disabled, false for marking as valid',\n ),\n getIsDisabledTime: PropTypes.func.description(\n '(timeAsString) => true for marking as disabled, false for marking as valid',\n ),\n emptyPickerStartingMonth: PropTypes.string.description(\n 'which month to start the calendar on open, when value is empty, string following the \"MM/__/YYYY\" pattern',\n ),\n onCalendarOpenFocusedDay: PropTypes.string\n .description('which day to focus on calendar open when value is empty, string following the \"MM/DD/YYYY\" pattern')\n .defaultValue('if value is empty current month, else current month'),\n onTimeWheelOpenStartingTime: PropTypes.string\n .description(\n 'which day to start the timewheel on picker open when value is empty, string following the HH:MM AA\" pattern',\n )\n .defaultValue('01:00 AM'),\n minutesInterval: PropTypes.number\n .description('increments/decrements of minutes in time related controllers interactions')\n .defaultValue('1'),\n 'data-testid': PropTypes.string.description('Unique id for tests.').defaultValue(''),\n ...getPropsPerDatatestIdPropTypes(ControlledDateTimePickerDatatestid),\n} as WeakValidationMap<unknown>;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACGvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,0CAA0C;AAGnD,MAAM,OAAO,MAAY;AAAC;AAC1B,MAAM,qBAAqB,MAAa;AAgKjC,MAAM,eAAyD;AAAA,EACpE,MAAM;AAAA,EACN,cAAc;AAAA,EACd,eAAe;AAAA,EACf,aAAa;AAAA,EACb,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,yBAAyB;AAC3B;AAEO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,UAAU,MAAM;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,kCAAkC,EAC9C,aAAa,gBAAgB;AAAA,EAChC,UAAU,UAAU,KAAK,YAAY,qCAAqC,EAAE,aAAa,KAAK;AAAA,EAC9F,aAAa,UAAU,KAAK,YAAY,kCAAkC,EAAE,aAAa,KAAK;AAAA,EAC9F,UAAU,UAAU,OAAO,YAAY,iEAAiE;AAAA,EACxG,MAAM,UAAU,OAAO,YAAY,4DAA4D;AAAA,EAC/F,MAAM,UAAU,OAAO,YAAY,4DAA4D;AAAA,EAC/F,cAAc,UAAU,KAAK,YAAY,2CAA2C;AAAA,EACpF,cAAc,UAAU,KAAK,YAAY,2CAA2C;AAAA,EACpF,kBAAkB,UAAU,KAAK,YAAY,+CAA+C;AAAA,EAC5F,eAAe,UAAU,KAAK,YAAY,mDAAmD;AAAA,EAC7F,aAAa,UAAU,KAAK,YAAY,iDAAiD;AAAA,EACzF,cAAc,UAAU,KAAK,YAAY,kDAAkD;AAAA,EAC3F,cAAc,UAAU,KAAK,YAAY,kDAAkD;AAAA,EAC3F,gBAAgB,UAAU,KAAK,YAAY,oDAAoD;AAAA,EAC/F,kBAAkB,UAAU,KAAK,YAAY,sDAAsD;AAAA,EACnG,kBAAkB,UAAU,KAAK;AAAA,IAC/B;AAAA,EACF;AAAA,EACA,oBAAoB,UAAU,KAAK;AAAA,IACjC;AAAA,EACF;AAAA,EACA,mBAAmB,UAAU,KAAK;AAAA,IAChC;AAAA,EACF;AAAA,EACA,0BAA0B,UAAU,OAAO;AAAA,IACzC;AAAA,EACF;AAAA,EACA,0BAA0B,UAAU,OACjC,YAAY,oGAAoG,EAChH,aAAa,qDAAqD;AAAA,EACrE,6BAA6B,UAAU,OACpC;AAAA,IACC;AAAA,EACF,EACC,aAAa,UAAU;AAAA,EAC1B,iBAAiB,UAAU,OACxB,YAAY,2EAA2E,EACvF,aAAa,GAAG;AAAA,EACnB,eAAe,UAAU,OAAO,YAAY,sBAAsB,EAAE,aAAa,EAAE;AAAA,EACnF,GAAG,+BAA+B,kCAAkC;AACtE;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport type { WeakValidationMap } from 'react';\nimport type React from 'react';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n getPropsPerDatatestIdPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { ControlledDateTimePickerDatatestid } from './ControlledDateTimePickerDatatestid.js';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = (): void => {};\nconst defaultReturnFalse = (): false => false;\nexport declare namespace DSControlledDateTimePickerT {\n type DataTestIdType = typeof ControlledDateTimePickerDatatestid;\n // typescript type that rapresents the union of all the values for ControlledDateTimePickerDatatestid\n export type FlatDataTestIdValues = {\n [K in keyof DataTestIdType]: DataTestIdType[K] extends Record<string, unknown>\n ? DataTestIdType[K][keyof DataTestIdType[K]] // this is only 1 level deep, but it's enough for our needs right now\n : // can be extended to more levels if needed as follows:\n // ? DataTestIdType[K][keyof DataTestIdType[K]] extends Record<string, unknown>\n // ? DataTestIdType[K][keyof DataTestIdType[K]][keyof DataTestIdType[K][keyof DataTestIdType[K]]]\n // : DataTestIdType[K][keyof DataTestIdType[K]]\n DataTestIdType[K];\n }[keyof DataTestIdType];\n\n export type AriaAndDataPropsPerDataTestId = {\n [key in FlatDataTestIdValues]?: AriaAndDataPropsOrPropsGetter;\n };\n\n export type OnInternalValuesChangeEvent =\n | React.ChangeEvent<HTMLInputElement>\n | React.KeyboardEvent<HTMLInputElement>\n | React.KeyboardEvent<HTMLButtonElement>\n | React.KeyboardEvent\n | React.MouseEvent<HTMLInputElement>\n | React.MouseEvent<HTMLButtonElement>;\n export type ControlTypes =\n | 'full-date-time'\n | 'date-time-inputs'\n | 'date-time-picker'\n | 'date-time-picker-controller-only'\n | 'full-date'\n | 'date-inputs'\n | 'date-picker'\n | 'date-picker-controller-only'\n | 'full-time'\n | 'time-inputs'\n | 'time-picker'\n | 'time-picker-controller-only';\n export interface InternalInputsChangeMetaInfo {\n isAutomaticFillTrigger?: boolean;\n isDayPresentInMonth?: boolean;\n isOutOfRangeDay?: boolean;\n isDisabledDay?: boolean;\n isDisabledTime?: boolean;\n suggestedErrorMsg?: string;\n newDateTimeString?: string;\n newDateString?: string;\n newTimeString?: string;\n }\n\n export type OnDateChange = (val: string, metaInfo: InternalInputsChangeMetaInfo) => void;\n export type OnTimeChange = (val: string, metaInfo: InternalInputsChangeMetaInfo) => void;\n export type OnDateTimeChange = (val: string, metaInfo: InternalInputsChangeMetaInfo) => void;\n export type OnInternalInputsChange = (\n val: string,\n e: OnInternalValuesChangeEvent,\n metaInfo?: InternalInputsChangeMetaInfo,\n ) => void;\n export type AppOnInputChange = (\n val: string,\n e: OnInternalValuesChangeEvent,\n metaInfo: InternalInputsChangeMetaInfo,\n ) => void;\n\n /* ------------------------ ------------------ ------------------------*/\n /* ------------------------ DATE CONFIGURATION ------------------------*/\n /* ------------------------ ------------------ ------------------------*/\n export interface DefaultDateProps {\n onMonthChange: AppOnInputChange;\n onDayChange: AppOnInputChange;\n onYearChange: AppOnInputChange;\n onPickerOpen: NoopishFunc;\n onPickerClose: NoopishFunc;\n getIsDisabledDay: BooleanGetter<string>;\n getIsOutOfRangeDay: BooleanGetter<string>;\n getIsStartRangeDay: BooleanGetter<string>;\n getIsDayInRange: BooleanGetter<string>;\n getIsEndRangeDay: BooleanGetter<string>;\n isClearable: boolean;\n disabled: boolean;\n hasError: boolean;\n autoFocus: boolean;\n preventCloseOnSelection: boolean;\n }\n export interface OptionalDatePickerProps extends AriaAndDataPropsPerDataTestId {\n emptyPickerStartingMonth?: string;\n onCalendarOpenFocusedDay?: string;\n pickerFooterMsg?: string;\n innerRef?:\n | React.MutableRefObject<HTMLInputElement | HTMLButtonElement | null>\n | ((ref: HTMLInputElement | HTMLButtonElement | null) => void);\n tabIndex?: WCAGTabIndex;\n }\n export interface RequiredDatePickerProps {\n type: 'full-date' | 'date-inputs' | 'date-picker' | 'date-picker-controller-only';\n date: string;\n onDateChange: OnDateChange;\n }\n export type DatePickerProps = OptionalDatePickerProps & Partial<DefaultDateProps> & RequiredDatePickerProps;\n export type InternalDatePickerProps = OptionalDatePickerProps & DefaultDateProps & RequiredDatePickerProps;\n\n /* ------------------------ ------------------ ------------------------*/\n /* ------------------------ TIME CONFIGURATION ------------------------*/\n /* ------------------------ ------------------ ------------------------*/\n\n export interface DefaultTimeProps {\n onHourChange: AppOnInputChange;\n onMinuteChange: AppOnInputChange;\n onMeridiemChange: AppOnInputChange;\n onPickerOpen: NoopishFunc;\n onPickerClose: NoopishFunc;\n getIsDisabledTime: BooleanGetter<string>;\n minutesInterval: number;\n isClearable: boolean;\n disabled: boolean;\n hasError: boolean;\n autoFocus: boolean;\n preventCloseOnSelection: boolean;\n }\n export interface OptionalTimePickerProps extends AriaAndDataPropsPerDataTestId {\n pickerFooterMsg?: string;\n onTimeWheelOpenStartingTime?: string;\n innerRef?:\n | React.MutableRefObject<HTMLInputElement | HTMLButtonElement | null>\n | ((ref: HTMLInputElement | HTMLButtonElement | null) => void);\n tabIndex?: WCAGTabIndex;\n }\n export interface RequiredTimePickerProps {\n type: 'full-time' | 'time-inputs' | 'time-picker' | 'time-picker-controller-only';\n time: string;\n onTimeChange: OnTimeChange;\n }\n export type TimePickerProps = OptionalTimePickerProps & Partial<DefaultTimeProps> & RequiredTimePickerProps;\n export type InternalTimePickerProps = OptionalTimePickerProps & DefaultTimeProps & RequiredTimePickerProps;\n\n /* -------------------- ---------------------- ------------------------*/\n /* -------------------- DATETIME CONFIGURATION ------------------------*/\n /* -------------------- ---------------------- ------------------------*/\n\n export type DefaultDateTimeProps = DefaultTimeProps &\n DefaultDateProps & {\n onDateChange: OnDateChange;\n onTimeChange: OnTimeChange;\n };\n export type OptionalDateTimeProps = AriaAndDataPropsPerDataTestId & OptionalTimePickerProps & OptionalDatePickerProps;\n export interface RequiredDateTimeProps {\n type: 'full-date-time' | 'date-time-inputs' | 'date-time-picker' | 'date-time-picker-controller-only';\n dateTime: string;\n onDateTimeChange: OnDateTimeChange;\n }\n\n export type DateTimePickerProps = Partial<DefaultDateTimeProps> & OptionalDateTimeProps & RequiredDateTimeProps;\n export type InternalDateTimePickerProps = DefaultDateTimeProps & OptionalDateTimeProps & RequiredDateTimeProps;\n\n /* ---------------------- ------------------- -------------------------*/\n /* ---------------------- FINAL CONFIGURATION -------------------------*/\n /* ---------------------- ------------------- -------------------------*/\n export type DefaultProps = DefaultDateTimeProps & { type: 'full-date-time' };\n export type Props = DateTimePickerProps | DatePickerProps | TimePickerProps;\n export type InternalProps = InternalDateTimePickerProps | InternalDatePickerProps | InternalTimePickerProps;\n}\n\nexport const defaultProps: DSControlledDateTimePickerT.DefaultProps = {\n type: 'full-date-time',\n onDateChange: noop,\n onMonthChange: noop,\n onDayChange: noop,\n onYearChange: noop,\n onTimeChange: noop,\n onHourChange: noop,\n onMinuteChange: noop,\n onMeridiemChange: noop,\n onPickerOpen: noop,\n onPickerClose: noop,\n getIsDisabledDay: defaultReturnFalse,\n getIsOutOfRangeDay: defaultReturnFalse,\n getIsStartRangeDay: defaultReturnFalse,\n getIsDayInRange: defaultReturnFalse,\n getIsEndRangeDay: defaultReturnFalse,\n getIsDisabledTime: defaultReturnFalse,\n minutesInterval: 1,\n isClearable: false,\n disabled: false,\n hasError: false,\n autoFocus: false,\n preventCloseOnSelection: false,\n};\n\nexport const propTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n type: PropTypes.oneOf([\n 'full-date-time',\n 'date-time-inputs',\n 'date-time-picker',\n 'date-time-picker-controller-only',\n 'full-date',\n 'date-inputs',\n 'date-picker',\n 'date-picker-controller-only',\n 'full-time',\n 'time-inputs',\n 'time-picker',\n 'time-picker-controller-only',\n ])\n .description('Type of time form control to use')\n .defaultValue('full-date-time'),\n disabled: PropTypes.bool.description('wheter or not the input is disabled').defaultValue(false),\n isClearable: PropTypes.bool.description('with or without clearable button').defaultValue(false),\n dateTime: PropTypes.string.description('when using date-time types, this is the value of the controller'),\n date: PropTypes.string.description('when using date types, this is the value of the controller'),\n time: PropTypes.string.description('when using time types, this is the value of the controller'),\n onDateChange: PropTypes.func.description('(newDateString, metaInformations) => void'),\n onTimeChange: PropTypes.func.description('(newTimeString, metaInformations) => void'),\n onDateTimeChange: PropTypes.func.description('(newDateTimeString, metaInformations) => void'),\n onMonthChange: PropTypes.func.description('(newMonthString, event, metaInformations) => void'),\n onDayChange: PropTypes.func.description('(newDayString, event, metaInformations) => void'),\n onYearChange: PropTypes.func.description('(newYearString, event, metaInformations) => void'),\n onHourChange: PropTypes.func.description('(newHourString, event, metaInformations) => void'),\n onMinuteChange: PropTypes.func.description('(newMinuteString, event, metaInformations) => void'),\n onMeridiemChange: PropTypes.func.description('(newMeridiemString, event, metaInformations) => void'),\n getIsDisabledDay: PropTypes.func.description(\n '(dayAsString) => true for marking as disabled, false for marking as valid',\n ),\n getIsOutOfRangeDay: PropTypes.func.description(\n '(dayAsString) => true for marking as disabled, false for marking as valid',\n ),\n getIsDisabledTime: PropTypes.func.description(\n '(timeAsString) => true for marking as disabled, false for marking as valid',\n ),\n emptyPickerStartingMonth: PropTypes.string.description(\n 'which month to start the calendar on open, when value is empty, string following the \"MM/__/YYYY\" pattern',\n ),\n onCalendarOpenFocusedDay: PropTypes.string\n .description('which day to focus on calendar open when value is empty, string following the \"MM/DD/YYYY\" pattern')\n .defaultValue('if value is empty current month, else current month'),\n onTimeWheelOpenStartingTime: PropTypes.string\n .description(\n 'which day to start the timewheel on picker open when value is empty, string following the HH:MM AA\" pattern',\n )\n .defaultValue('01:00 AM'),\n minutesInterval: PropTypes.number\n .description('increments/decrements of minutes in time related controllers interactions')\n .defaultValue('1'),\n 'data-testid': PropTypes.string.description('Unique id for tests.').defaultValue(''),\n ...getPropsPerDatatestIdPropTypes(ControlledDateTimePickerDatatestid),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description('inner ref for the month input'),\n} as WeakValidationMap<unknown>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACGvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,0CAA0C;AAGnD,MAAM,OAAO,MAAY;AAAC;AAC1B,MAAM,qBAAqB,MAAa;AAkKjC,MAAM,eAAyD;AAAA,EACpE,MAAM;AAAA,EACN,cAAc;AAAA,EACd,eAAe;AAAA,EACf,aAAa;AAAA,EACb,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,yBAAyB;AAC3B;AAEO,MAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,UAAU,MAAM;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,kCAAkC,EAC9C,aAAa,gBAAgB;AAAA,EAChC,UAAU,UAAU,KAAK,YAAY,qCAAqC,EAAE,aAAa,KAAK;AAAA,EAC9F,aAAa,UAAU,KAAK,YAAY,kCAAkC,EAAE,aAAa,KAAK;AAAA,EAC9F,UAAU,UAAU,OAAO,YAAY,iEAAiE;AAAA,EACxG,MAAM,UAAU,OAAO,YAAY,4DAA4D;AAAA,EAC/F,MAAM,UAAU,OAAO,YAAY,4DAA4D;AAAA,EAC/F,cAAc,UAAU,KAAK,YAAY,2CAA2C;AAAA,EACpF,cAAc,UAAU,KAAK,YAAY,2CAA2C;AAAA,EACpF,kBAAkB,UAAU,KAAK,YAAY,+CAA+C;AAAA,EAC5F,eAAe,UAAU,KAAK,YAAY,mDAAmD;AAAA,EAC7F,aAAa,UAAU,KAAK,YAAY,iDAAiD;AAAA,EACzF,cAAc,UAAU,KAAK,YAAY,kDAAkD;AAAA,EAC3F,cAAc,UAAU,KAAK,YAAY,kDAAkD;AAAA,EAC3F,gBAAgB,UAAU,KAAK,YAAY,oDAAoD;AAAA,EAC/F,kBAAkB,UAAU,KAAK,YAAY,sDAAsD;AAAA,EACnG,kBAAkB,UAAU,KAAK;AAAA,IAC/B;AAAA,EACF;AAAA,EACA,oBAAoB,UAAU,KAAK;AAAA,IACjC;AAAA,EACF;AAAA,EACA,mBAAmB,UAAU,KAAK;AAAA,IAChC;AAAA,EACF;AAAA,EACA,0BAA0B,UAAU,OAAO;AAAA,IACzC;AAAA,EACF;AAAA,EACA,0BAA0B,UAAU,OACjC,YAAY,oGAAoG,EAChH,aAAa,qDAAqD;AAAA,EACrE,6BAA6B,UAAU,OACpC;AAAA,IACC;AAAA,EACF,EACC,aAAa,UAAU;AAAA,EAC1B,iBAAiB,UAAU,OACxB,YAAY,2EAA2E,EACvF,aAAa,GAAG;AAAA,EACnB,eAAe,UAAU,OAAO,YAAY,sBAAsB,EAAE,aAAa,EAAE;AAAA,EACnF,GAAG,+BAA+B,kCAAkC;AAAA,EACpE,UAAU,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,CAAC,EAAE,YAAY,+BAA+B;AAC/G;",
6
6
  "names": []
7
7
  }
@@ -11,8 +11,9 @@ interface DDInputsPropsT {
11
11
  placeholder: string;
12
12
  ariaCurrentValueForInputs: string;
13
13
  contextRef: React.MutableRefObject<HTMLInputElement | null>;
14
+ tabIndex?: WCAGTabIndex;
14
15
  isFocused: boolean;
15
16
  getProps: ControlledDateTimePickerContextT['getProps'];
16
17
  }
17
- export declare const DDInput: React.MemoExoticComponent<({ onChange, onBlur, onFocus, onKeyDown, value, disabled, contextRef, placeholder, ariaCurrentValueForInputs, isFocused, getProps, }: DDInputsPropsT) => JSX.Element>;
18
+ export declare const DDInput: React.MemoExoticComponent<({ onChange, onBlur, onFocus, onKeyDown, value, disabled, contextRef, tabIndex, placeholder, ariaCurrentValueForInputs, isFocused, getProps, }: DDInputsPropsT) => JSX.Element>;
18
19
  export {};
@@ -14,7 +14,8 @@ interface MMInputsPropsT {
14
14
  ariaCurrentValueForInputs: string;
15
15
  isFocused: boolean;
16
16
  innerRef?: React.MutableRefObject<HTMLInputElement | HTMLButtonElement | null> | ((ref: HTMLInputElement | HTMLButtonElement | null) => void);
17
+ tabIndex?: WCAGTabIndex;
17
18
  getProps: ControlledDateTimePickerContextT['getProps'];
18
19
  }
19
- export declare const MMInput: React.MemoExoticComponent<({ onChange, onBlur, onFocus, onKeyDown, value, disabled, placeholder, contextRef, innerRef, autoFocusMonthInput, ariaCurrentValueForInputs, isFocused, getProps, }: MMInputsPropsT) => JSX.Element>;
20
+ export declare const MMInput: React.MemoExoticComponent<({ onChange, onBlur, onFocus, onKeyDown, value, disabled, placeholder, contextRef, innerRef, tabIndex, autoFocusMonthInput, ariaCurrentValueForInputs, isFocused, getProps, }: MMInputsPropsT) => JSX.Element>;
20
21
  export {};
@@ -9,10 +9,11 @@ interface YYYYInputsPropsT {
9
9
  value: string;
10
10
  disabled: boolean;
11
11
  contextRef: React.MutableRefObject<HTMLInputElement | null>;
12
+ tabIndex?: WCAGTabIndex;
12
13
  placeholder: string;
13
14
  ariaCurrentValueForInputs: string;
14
15
  isFocused: boolean;
15
16
  getProps: ControlledDateTimePickerContextT['getProps'];
16
17
  }
17
- export declare const YYYYInput: React.MemoExoticComponent<({ onChange, onBlur, onFocus, onKeyDown, value, disabled, placeholder, contextRef, ariaCurrentValueForInputs, isFocused, getProps, }: YYYYInputsPropsT) => JSX.Element>;
18
+ export declare const YYYYInput: React.MemoExoticComponent<({ onChange, onBlur, onFocus, onKeyDown, value, disabled, placeholder, contextRef, tabIndex, ariaCurrentValueForInputs, isFocused, getProps, }: YYYYInputsPropsT) => JSX.Element>;
18
19
  export {};
@@ -14,6 +14,7 @@ interface HHInputsPropsT {
14
14
  autoFocusHourInput: boolean;
15
15
  isFocused: boolean;
16
16
  getProps: ControlledDateTimePickerContextT['getProps'];
17
+ tabIndex?: WCAGTabIndex;
17
18
  }
18
- export declare const HHInput: React.MemoExoticComponent<({ onChange, onBlur, onFocus, onKeyDown, value, disabled, placeholder, ariaCurrentValueForInputs, contextRef, autoFocusHourInput, isFocused, getProps, }: HHInputsPropsT) => JSX.Element>;
19
+ export declare const HHInput: React.MemoExoticComponent<({ onChange, onBlur, onFocus, onKeyDown, value, disabled, placeholder, ariaCurrentValueForInputs, contextRef, autoFocusHourInput, isFocused, getProps, tabIndex, }: HHInputsPropsT) => JSX.Element>;
19
20
  export {};
@@ -13,6 +13,7 @@ interface MeridiemInputsPropsT {
13
13
  ariaCurrentValueForInputs: string;
14
14
  isFocused: boolean;
15
15
  getProps: ControlledDateTimePickerContextT['getProps'];
16
+ tabIndex?: WCAGTabIndex;
16
17
  }
17
- export declare const MeridiemInput: React.MemoExoticComponent<({ onChange, onBlur, onFocus, onKeyDown, value, disabled, placeholder, ariaCurrentValueForInputs, contextRef, isFocused, getProps, }: MeridiemInputsPropsT) => JSX.Element>;
18
+ export declare const MeridiemInput: React.MemoExoticComponent<({ onChange, onBlur, onFocus, onKeyDown, value, disabled, placeholder, ariaCurrentValueForInputs, contextRef, isFocused, getProps, tabIndex, }: MeridiemInputsPropsT) => JSX.Element>;
18
19
  export {};
@@ -13,6 +13,7 @@ interface MinutesInputsPropsT {
13
13
  ariaCurrentValueForInputs: string;
14
14
  isFocused: boolean;
15
15
  getProps: ControlledDateTimePickerContextT['getProps'];
16
+ tabIndex?: WCAGTabIndex;
16
17
  }
17
- export declare const MinutesInput: React.MemoExoticComponent<({ onChange, onBlur, onFocus, onKeyDown, value, disabled, placeholder, ariaCurrentValueForInputs, contextRef, isFocused, getProps, }: MinutesInputsPropsT) => JSX.Element>;
18
+ export declare const MinutesInput: React.MemoExoticComponent<({ onChange, onBlur, onFocus, onKeyDown, value, disabled, placeholder, ariaCurrentValueForInputs, contextRef, isFocused, getProps, tabIndex, }: MinutesInputsPropsT) => JSX.Element>;
18
19
  export {};
@@ -49,6 +49,7 @@ export declare namespace DSControlledDateTimePickerT {
49
49
  onCalendarOpenFocusedDay?: string;
50
50
  pickerFooterMsg?: string;
51
51
  innerRef?: React.MutableRefObject<HTMLInputElement | HTMLButtonElement | null> | ((ref: HTMLInputElement | HTMLButtonElement | null) => void);
52
+ tabIndex?: WCAGTabIndex;
52
53
  }
53
54
  interface RequiredDatePickerProps {
54
55
  type: 'full-date' | 'date-inputs' | 'date-picker' | 'date-picker-controller-only';
@@ -75,6 +76,7 @@ export declare namespace DSControlledDateTimePickerT {
75
76
  pickerFooterMsg?: string;
76
77
  onTimeWheelOpenStartingTime?: string;
77
78
  innerRef?: React.MutableRefObject<HTMLInputElement | HTMLButtonElement | null> | ((ref: HTMLInputElement | HTMLButtonElement | null) => void);
79
+ tabIndex?: WCAGTabIndex;
78
80
  }
79
81
  interface RequiredTimePickerProps {
80
82
  type: 'full-time' | 'time-inputs' | 'time-picker' | 'time-picker-controller-only';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-form-date-time-picker",
3
- "version": "3.26.0",
3
+ "version": "3.26.1-rc.1",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Controlled Form Date Time Picker",
6
6
  "files": [
@@ -35,20 +35,20 @@
35
35
  "indent": 4
36
36
  },
37
37
  "dependencies": {
38
- "@elliemae/ds-button-v2": "3.26.0",
39
- "@elliemae/ds-grid": "3.26.0",
40
- "@elliemae/ds-icons": "3.26.0",
41
- "@elliemae/ds-popperjs": "3.26.0",
42
- "@elliemae/ds-props-helpers": "3.26.0",
43
- "@elliemae/ds-utilities": "3.26.0",
44
- "@elliemae/ds-system": "3.26.0"
38
+ "@elliemae/ds-button-v2": "3.26.1-rc.1",
39
+ "@elliemae/ds-grid": "3.26.1-rc.1",
40
+ "@elliemae/ds-icons": "3.26.1-rc.1",
41
+ "@elliemae/ds-popperjs": "3.26.1-rc.1",
42
+ "@elliemae/ds-props-helpers": "3.26.1-rc.1",
43
+ "@elliemae/ds-system": "3.26.1-rc.1",
44
+ "@elliemae/ds-utilities": "3.26.1-rc.1"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@elliemae/pui-cli": "~9.0.0-next.31",
48
48
  "@elliemae/pui-theme": "~2.7.0",
49
49
  "styled-components": "~5.3.9",
50
50
  "styled-system": "~5.1.5",
51
- "@elliemae/ds-monorepo-devops": "3.26.0"
51
+ "@elliemae/ds-monorepo-devops": "3.26.1-rc.1"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@elliemae/pui-theme": "~2.7.0",