@elliemae/ds-form-date-time-picker 3.8.1 → 3.9.0-next.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.
@@ -80,7 +80,7 @@ const HoursList = () => {
80
80
  tabIndex: -1,
81
81
  type: "button",
82
82
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallUp, {
83
- color: ["brand-primary", 700]
83
+ color: ["brand-primary", "700"]
84
84
  })
85
85
  })
86
86
  }),
@@ -136,7 +136,7 @@ const HoursList = () => {
136
136
  "data-testid": import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.TIMEWHEEL.NEXT_HOUR,
137
137
  type: "button",
138
138
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallDown, {
139
- color: ["brand-primary", 700]
139
+ color: ["brand-primary", "700"]
140
140
  })
141
141
  })
142
142
  })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/parts/Pickers/TimeWheel/HoursList.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable complexity */\nimport React, { useContext, useCallback } from 'react';\nimport { ChevronSmallUp, ChevronSmallDown } from '@elliemae/ds-icons';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX';\nimport { convertToPositiveNumberIfPossible } from '../../../utils/numberHelpers';\nimport { StyledWheelList, StyledWheelListItem, StyledTimeBtn, StyledWheelChangeTimeBtn } from './Styleds';\nimport { TimeWheelContext } from './TimeWheelContext';\n\nexport const HoursList = (): JSX.Element => {\n const {\n currHourNum,\n currMinuteNum,\n currMeridiem,\n visibleHours,\n handlePrevHour,\n handleNextHour,\n handleTimeWheelBtnChangeHours,\n handleCurrHourOnKeyDown,\n } = useContext(TimeWheelContext);\n const {\n prevHourBtnRef,\n currHourBtnRef,\n nextHourBtnRef,\n getIsDisabledTime,\n autoFocusHourTimeWheel,\n hours,\n latestInteractionRegion,\n currFocusDescriber,\n } = useContext(ControlledDateTimePickerContext);\n const handleCurrYearRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\n setTimeout(() => {\n currHourBtnRef.current = ButtonDomNode;\n if (latestInteractionRegion === 'timewheel' && currFocusDescriber === 'timewheel-curr-hour')\n ButtonDomNode?.focus?.();\n });\n },\n [currFocusDescriber, latestInteractionRegion, currHourBtnRef],\n );\n return (\n <StyledWheelList>\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n aria-label=\"subtract one hour\"\n buttonType=\"raw\"\n size=\"m\"\n onClick={handlePrevHour}\n innerRef={prevHourBtnRef}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.PREV_HOUR}\n tabIndex={-1}\n type=\"button\"\n >\n <ChevronSmallUp color={['brand-primary', 700]} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n {visibleHours.map((hourString) => {\n const key = `timewheel-hour-${hourString || ''}`;\n if (!hourString) return <StyledWheelListItem key={key} />;\n const currHourTimeString = `${hourString}:${currMinuteNum} ${currMeridiem}`;\n\n const isEmptyCurrValueCurrentListItem = !hours && convertToPositiveNumberIfPossible(hourString) === currHourNum;\n const isCurrentListItem = isEmptyCurrValueCurrentListItem || hours === hourString;\n const isDisabled = getIsDisabledTime(currHourTimeString);\n const tabIndex = isCurrentListItem ? 0 : -1;\n const btnProps = {\n onKeyDown: isCurrentListItem ? handleCurrHourOnKeyDown : undefined,\n innerRef: isCurrentListItem ? handleCurrYearRef : undefined,\n };\n const styleProps = {\n isCurrentListItem,\n isDisabled,\n };\n return (\n <StyledWheelListItem isCurrentListItem={isCurrentListItem} key={key}>\n <StyledTimeBtn\n {...styleProps}\n autoFocus={autoFocusHourTimeWheel && isCurrentListItem}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL[isCurrentListItem ? 'CURRENT_HOUR' : 'HOUR']}\n selected={hours.length === 2 && convertToPositiveNumberIfPossible(hourString) === currHourNum}\n aria-label={`${hourString} hours`}\n aria-disabled={isDisabled}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeHours(hourString, e)}\n tabIndex={tabIndex}\n role=\"spinbutton\"\n aria-valuemax={12}\n aria-valuemin={1}\n aria-valuenow={currHourNum}\n aria-valuetext={`${hourString} hours`}\n type=\"button\"\n {...btnProps}\n >\n {hourString}\n </StyledTimeBtn>\n </StyledWheelListItem>\n );\n })}\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n aria-label=\"add one hour\"\n buttonType=\"raw\"\n size=\"m\"\n onClick={handleNextHour}\n innerRef={nextHourBtnRef}\n tabIndex={-1}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.NEXT_HOUR}\n type=\"button\"\n >\n <ChevronSmallDown color={['brand-primary', 700]} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n </StyledWheelList>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,mBAA+C;AAC/C,sBAAiD;AACjD,gDAAmD;AACnD,yCAAgD;AAChD,2BAAkD;AAClD,qBAA8F;AAC9F,8BAAiC;AAE1B,MAAM,YAAY,MAAmB;AAC1C,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,EACF,QAAI,yBAAW,kEAA+B;AAC9C,QAAM,wBAAoB;AAAA,IACxB,CAAC,kBAAqC;AACpC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S,CAAC,MAA2C,8BAA8B,YAAY,CAAC;AAAA,YAChG;AAAA,YACA,MAAK;AAAA,YACL,iBAAe;AAAA,YACf,iBAAe;AAAA,YACf,iBAAe;AAAA,YACf,kBAAgB,GAAG;AAAA,YACnB,MAAK;AAAA,YACJ,GAAG;AAAA,YAEH;AAAA,WACH;AAAA,WArB8D,GAsBhE;AAAA,MAEJ,CAAC;AAAA,MACD,4CAAC;AAAA,QACC,sDAAC;AAAA,UACC,cAAW;AAAA,UACX,YAAW;AAAA,UACX,MAAK;AAAA,UACL,SAAS;AAAA,UACT,UAAU;AAAA,UACV,UAAU;AAAA,UACV,eAAa,6EAAmC,UAAU;AAAA,UAC1D,MAAK;AAAA,UAEL,sDAAC;AAAA,YAAiB,OAAO,CAAC,iBAAiB,GAAG;AAAA,WAAG;AAAA,SACnD;AAAA,OACF;AAAA;AAAA,GACF;AAEJ;",
4
+ "sourcesContent": ["/* eslint-disable complexity */\nimport React, { useContext, useCallback } from 'react';\nimport { ChevronSmallUp, ChevronSmallDown } from '@elliemae/ds-icons';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX';\nimport { convertToPositiveNumberIfPossible } from '../../../utils/numberHelpers';\nimport { StyledWheelList, StyledWheelListItem, StyledTimeBtn, StyledWheelChangeTimeBtn } from './Styleds';\nimport { TimeWheelContext } from './TimeWheelContext';\n\nexport const HoursList = (): JSX.Element => {\n const {\n currHourNum,\n currMinuteNum,\n currMeridiem,\n visibleHours,\n handlePrevHour,\n handleNextHour,\n handleTimeWheelBtnChangeHours,\n handleCurrHourOnKeyDown,\n } = useContext(TimeWheelContext);\n const {\n prevHourBtnRef,\n currHourBtnRef,\n nextHourBtnRef,\n getIsDisabledTime,\n autoFocusHourTimeWheel,\n hours,\n latestInteractionRegion,\n currFocusDescriber,\n } = useContext(ControlledDateTimePickerContext);\n const handleCurrYearRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\n setTimeout(() => {\n currHourBtnRef.current = ButtonDomNode;\n if (latestInteractionRegion === 'timewheel' && currFocusDescriber === 'timewheel-curr-hour')\n ButtonDomNode?.focus?.();\n });\n },\n [currFocusDescriber, latestInteractionRegion, currHourBtnRef],\n );\n return (\n <StyledWheelList>\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n aria-label=\"subtract one hour\"\n buttonType=\"raw\"\n size=\"m\"\n onClick={handlePrevHour}\n innerRef={prevHourBtnRef}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.PREV_HOUR}\n tabIndex={-1}\n type=\"button\"\n >\n <ChevronSmallUp color={['brand-primary', '700']} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n {visibleHours.map((hourString) => {\n const key = `timewheel-hour-${hourString || ''}`;\n if (!hourString) return <StyledWheelListItem key={key} />;\n const currHourTimeString = `${hourString}:${currMinuteNum} ${currMeridiem}`;\n\n const isEmptyCurrValueCurrentListItem = !hours && convertToPositiveNumberIfPossible(hourString) === currHourNum;\n const isCurrentListItem = isEmptyCurrValueCurrentListItem || hours === hourString;\n const isDisabled = getIsDisabledTime(currHourTimeString);\n const tabIndex = isCurrentListItem ? 0 : -1;\n const btnProps = {\n onKeyDown: isCurrentListItem ? handleCurrHourOnKeyDown : undefined,\n innerRef: isCurrentListItem ? handleCurrYearRef : undefined,\n };\n const styleProps = {\n isCurrentListItem,\n isDisabled,\n };\n return (\n <StyledWheelListItem isCurrentListItem={isCurrentListItem} key={key}>\n <StyledTimeBtn\n {...styleProps}\n autoFocus={autoFocusHourTimeWheel && isCurrentListItem}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL[isCurrentListItem ? 'CURRENT_HOUR' : 'HOUR']}\n selected={hours.length === 2 && convertToPositiveNumberIfPossible(hourString) === currHourNum}\n aria-label={`${hourString} hours`}\n aria-disabled={isDisabled}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeHours(hourString, e)}\n tabIndex={tabIndex}\n role=\"spinbutton\"\n aria-valuemax={12}\n aria-valuemin={1}\n aria-valuenow={currHourNum}\n aria-valuetext={`${hourString} hours`}\n type=\"button\"\n {...btnProps}\n >\n {hourString}\n </StyledTimeBtn>\n </StyledWheelListItem>\n );\n })}\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n aria-label=\"add one hour\"\n buttonType=\"raw\"\n size=\"m\"\n onClick={handleNextHour}\n innerRef={nextHourBtnRef}\n tabIndex={-1}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.NEXT_HOUR}\n type=\"button\"\n >\n <ChevronSmallDown color={['brand-primary', '700']} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n </StyledWheelList>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,mBAA+C;AAC/C,sBAAiD;AACjD,gDAAmD;AACnD,yCAAgD;AAChD,2BAAkD;AAClD,qBAA8F;AAC9F,8BAAiC;AAE1B,MAAM,YAAY,MAAmB;AAC1C,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,EACF,QAAI,yBAAW,kEAA+B;AAC9C,QAAM,wBAAoB;AAAA,IACxB,CAAC,kBAAqC;AACpC,iBAAW,MAAM;AACf,uBAAe,UAAU;AACzB,YAAI,4BAA4B,eAAe,uBAAuB;AACpE,yBAAe,QAAQ;AAAA,MAC3B,CAAC;AAAA,IACH;AAAA,IACA,CAAC,oBAAoB,yBAAyB,cAAc;A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AK;AAAA,YACJ,GAAG;AAAA,YAEH;AAAA,WACH;AAAA,WArB8D,GAsBhE;AAAA,MAEJ,CAAC;AAAA,MACD,4CAAC;AAAA,QACC,sDAAC;AAAA,UACC,cAAW;AAAA,UACX,YAAW;AAAA,UACX,MAAK;AAAA,UACL,SAAS;AAAA,UACT,UAAU;AAAA,UACV,UAAU;AAAA,UACV,eAAa,6EAAmC,UAAU;AAAA,UAC1D,MAAK;AAAA,UAEL,sDAAC;AAAA,YAAiB,OAAO,CAAC,iBAAiB,KAAK;AAAA,WAAG;AAAA,SACrD;AAAA,OACF;AAAA;AAAA,GACF;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -84,7 +84,7 @@ const MeridiemList = () => {
84
84
  tabIndex: -1,
85
85
  type: "button",
86
86
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallUp, {
87
- color: ["brand-primary", 700]
87
+ color: ["brand-primary", "700"]
88
88
  })
89
89
  })
90
90
  }),
@@ -149,7 +149,7 @@ const MeridiemList = () => {
149
149
  tabIndex: -1,
150
150
  type: "button",
151
151
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallDown, {
152
- color: ["brand-primary", 700]
152
+ color: ["brand-primary", "700"]
153
153
  })
154
154
  })
155
155
  })
@@ -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 complexity */\nimport React, { useContext, useCallback } from 'react';\nimport { ChevronSmallUp, ChevronSmallDown } from '@elliemae/ds-icons';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX';\nimport { StyledWheelList, StyledWheelListItem, StyledTimeBtn, StyledWheelChangeTimeBtn } from './Styleds';\nimport { TimeWheelContext } from './TimeWheelContext';\n\nexport const MeridiemList = (): JSX.Element => {\n const { currMeridiem, handleTimeWheelBtnChangeMeridiem, handleCurrMeridiemOnKeyDown } = useContext(TimeWheelContext);\n const {\n prevMeridiemBtnRef,\n currMeridiemBtnRef,\n nextMeridiemBtnRef,\n getIsDisabledTime,\n hours,\n minutes,\n latestInteractionRegion,\n currFocusDescriber,\n } = useContext(ControlledDateTimePickerContext);\n const isAmCurrent = !currMeridiem || currMeridiem === 'AM';\n const isPmCurrent = currMeridiem === 'PM';\n const hourMinuteString = `${hours || '01'}:${minutes || '00'}`;\n const amTimeString = `${hourMinuteString} AM`;\n const pmTimeString = `${hourMinuteString} PM`;\n const isDisabledAm = getIsDisabledTime(amTimeString);\n const isDisabledPm = getIsDisabledTime(pmTimeString);\n const styledPropsPrevMeridiem = { isDisabled: isDisabledAm };\n const styledPropsCurrentAmMeridiem = { isCurrentListItem: isAmCurrent, isDisabled: isDisabledAm };\n const styledPropsCurrentPmMeridiem = { isCurrentListItem: isPmCurrent, isDisabled: isDisabledPm };\n const styledPropsNextMeridiem = { isDisabled: isDisabledPm };\n const handleCurrMeridiemRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\n setTimeout(() => {\n currMeridiemBtnRef.current = ButtonDomNode;\n if (latestInteractionRegion === 'timewheel' && currFocusDescriber === 'timewheel-curr-meridiem')\n ButtonDomNode?.focus?.();\n });\n },\n [currFocusDescriber, latestInteractionRegion, currMeridiemBtnRef],\n );\n return (\n <StyledWheelList>\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n {...styledPropsPrevMeridiem}\n aria-label=\"set am meridiem\"\n aria-disabled={isDisabledAm}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.PREV_MERIDIEM}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMeridiem('AM', e)}\n innerRef={prevMeridiemBtnRef}\n tabIndex={-1}\n type=\"button\"\n >\n <ChevronSmallUp color={['brand-primary', 700]} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n {currMeridiem === 'AM' || currMeridiem === '' ? <StyledWheelListItem /> : null}\n <StyledWheelListItem isCurrentListItem={isAmCurrent}>\n <StyledTimeBtn\n {...styledPropsCurrentAmMeridiem}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL[isAmCurrent ? 'CURRENT_MERIDIEM' : 'MERIDIEM']}\n selected={currMeridiem === 'AM'}\n aria-label={`AM ${isAmCurrent ? 'selected' : ''}`}\n aria-disabled={isDisabledAm}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMeridiem('AM', e)}\n onKeyDown={isAmCurrent ? handleCurrMeridiemOnKeyDown : undefined}\n innerRef={isAmCurrent ? handleCurrMeridiemRef : undefined}\n tabIndex={isAmCurrent ? 0 : -1}\n role=\"spinbutton\"\n aria-valuemax={1}\n aria-valuemin={0}\n aria-valuenow={isPmCurrent ? 1 : 0}\n aria-valuetext={isAmCurrent ? 'ante meridiem' : 'post meridiem'}\n type=\"button\"\n >\n AM\n </StyledTimeBtn>\n </StyledWheelListItem>\n <StyledWheelListItem isCurrentListItem={isPmCurrent}>\n <StyledTimeBtn\n {...styledPropsCurrentPmMeridiem}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL[isPmCurrent ? 'CURRENT_MERIDIEM' : 'MERIDIEM']}\n selected={currMeridiem === 'PM'}\n aria-label={`PM ${isPmCurrent ? 'selected' : ''}`}\n aria-disabled={isDisabledPm}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMeridiem('PM', e)}\n onKeyDown={isPmCurrent ? handleCurrMeridiemOnKeyDown : undefined}\n innerRef={isPmCurrent ? handleCurrMeridiemRef : undefined}\n tabIndex={isPmCurrent ? 0 : -1}\n role=\"spinbutton\"\n aria-valuemax={1}\n aria-valuemin={0}\n aria-valuenow={isPmCurrent ? 1 : 0}\n aria-valuetext={isAmCurrent ? 'ante meridiem' : 'post meridiem'}\n type=\"button\"\n >\n PM\n </StyledTimeBtn>\n </StyledWheelListItem>\n {currMeridiem === 'PM' ? <StyledWheelListItem /> : null}\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n {...styledPropsNextMeridiem}\n aria-label=\"set pm meridiem\"\n aria-disabled={isDisabledPm}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.NEXT_MERIDIEM}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMeridiem('PM', e)}\n innerRef={nextMeridiemBtnRef}\n tabIndex={-1}\n type=\"button\"\n >\n <ChevronSmallDown color={['brand-primary', 700]} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\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;ADAvB;AACA,mBAA+C;AAC/C,sBAAiD;AACjD,gDAAmD;AACnD,yCAAgD;AAChD,qBAA8F;AAC9F,8BAAiC;AAE1B,MAAM,eAAe,MAAmB;AAC7C,QAAM,EAAE,cAAc,kCAAkC,4BAA4B,QAAI,yBAAW,wCAAgB;AACnH,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,kEAA+B;AAC9C,QAAM,cAAc,CAAC,gBAAgB,iBAAiB;AACtD,QAAM,cAAc,iBAAiB;AACrC,QAAM,mBAAmB,GAAG,SAAS,QAAQ,WAAW;AACxD,QAAM,eAAe,GAAG;AACxB,QAAM,eAAe,GAAG;AACxB,QAAM,eAAe,kBAAkB,YAAY;AACnD,QAAM,eAAe,kB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\nimport React, { useContext, useCallback } from 'react';\nimport { ChevronSmallUp, ChevronSmallDown } from '@elliemae/ds-icons';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX';\nimport { StyledWheelList, StyledWheelListItem, StyledTimeBtn, StyledWheelChangeTimeBtn } from './Styleds';\nimport { TimeWheelContext } from './TimeWheelContext';\n\nexport const MeridiemList = (): JSX.Element => {\n const { currMeridiem, handleTimeWheelBtnChangeMeridiem, handleCurrMeridiemOnKeyDown } = useContext(TimeWheelContext);\n const {\n prevMeridiemBtnRef,\n currMeridiemBtnRef,\n nextMeridiemBtnRef,\n getIsDisabledTime,\n hours,\n minutes,\n latestInteractionRegion,\n currFocusDescriber,\n } = useContext(ControlledDateTimePickerContext);\n const isAmCurrent = !currMeridiem || currMeridiem === 'AM';\n const isPmCurrent = currMeridiem === 'PM';\n const hourMinuteString = `${hours || '01'}:${minutes || '00'}`;\n const amTimeString = `${hourMinuteString} AM`;\n const pmTimeString = `${hourMinuteString} PM`;\n const isDisabledAm = getIsDisabledTime(amTimeString);\n const isDisabledPm = getIsDisabledTime(pmTimeString);\n const styledPropsPrevMeridiem = { isDisabled: isDisabledAm };\n const styledPropsCurrentAmMeridiem = { isCurrentListItem: isAmCurrent, isDisabled: isDisabledAm };\n const styledPropsCurrentPmMeridiem = { isCurrentListItem: isPmCurrent, isDisabled: isDisabledPm };\n const styledPropsNextMeridiem = { isDisabled: isDisabledPm };\n const handleCurrMeridiemRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\n setTimeout(() => {\n currMeridiemBtnRef.current = ButtonDomNode;\n if (latestInteractionRegion === 'timewheel' && currFocusDescriber === 'timewheel-curr-meridiem')\n ButtonDomNode?.focus?.();\n });\n },\n [currFocusDescriber, latestInteractionRegion, currMeridiemBtnRef],\n );\n return (\n <StyledWheelList>\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n {...styledPropsPrevMeridiem}\n aria-label=\"set am meridiem\"\n aria-disabled={isDisabledAm}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.PREV_MERIDIEM}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMeridiem('AM', e)}\n innerRef={prevMeridiemBtnRef}\n tabIndex={-1}\n type=\"button\"\n >\n <ChevronSmallUp color={['brand-primary', '700']} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n {currMeridiem === 'AM' || currMeridiem === '' ? <StyledWheelListItem /> : null}\n <StyledWheelListItem isCurrentListItem={isAmCurrent}>\n <StyledTimeBtn\n {...styledPropsCurrentAmMeridiem}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL[isAmCurrent ? 'CURRENT_MERIDIEM' : 'MERIDIEM']}\n selected={currMeridiem === 'AM'}\n aria-label={`AM ${isAmCurrent ? 'selected' : ''}`}\n aria-disabled={isDisabledAm}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMeridiem('AM', e)}\n onKeyDown={isAmCurrent ? handleCurrMeridiemOnKeyDown : undefined}\n innerRef={isAmCurrent ? handleCurrMeridiemRef : undefined}\n tabIndex={isAmCurrent ? 0 : -1}\n role=\"spinbutton\"\n aria-valuemax={1}\n aria-valuemin={0}\n aria-valuenow={isPmCurrent ? 1 : 0}\n aria-valuetext={isAmCurrent ? 'ante meridiem' : 'post meridiem'}\n type=\"button\"\n >\n AM\n </StyledTimeBtn>\n </StyledWheelListItem>\n <StyledWheelListItem isCurrentListItem={isPmCurrent}>\n <StyledTimeBtn\n {...styledPropsCurrentPmMeridiem}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL[isPmCurrent ? 'CURRENT_MERIDIEM' : 'MERIDIEM']}\n selected={currMeridiem === 'PM'}\n aria-label={`PM ${isPmCurrent ? 'selected' : ''}`}\n aria-disabled={isDisabledPm}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMeridiem('PM', e)}\n onKeyDown={isPmCurrent ? handleCurrMeridiemOnKeyDown : undefined}\n innerRef={isPmCurrent ? handleCurrMeridiemRef : undefined}\n tabIndex={isPmCurrent ? 0 : -1}\n role=\"spinbutton\"\n aria-valuemax={1}\n aria-valuemin={0}\n aria-valuenow={isPmCurrent ? 1 : 0}\n aria-valuetext={isAmCurrent ? 'ante meridiem' : 'post meridiem'}\n type=\"button\"\n >\n PM\n </StyledTimeBtn>\n </StyledWheelListItem>\n {currMeridiem === 'PM' ? <StyledWheelListItem /> : null}\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n {...styledPropsNextMeridiem}\n aria-label=\"set pm meridiem\"\n aria-disabled={isDisabledPm}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.NEXT_MERIDIEM}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMeridiem('PM', e)}\n innerRef={nextMeridiemBtnRef}\n tabIndex={-1}\n type=\"button\"\n >\n <ChevronSmallDown color={['brand-primary', '700']} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\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;ADAvB;AACA,mBAA+C;AAC/C,sBAAiD;AACjD,gDAAmD;AACnD,yCAAgD;AAChD,qBAA8F;AAC9F,8BAAiC;AAE1B,MAAM,eAAe,MAAmB;AAC7C,QAAM,EAAE,cAAc,kCAAkC,4BAA4B,QAAI,yBAAW,wCAAgB;AACnH,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;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CAAC,MAA2C,iCAAiC,MAAM,CAAC;AAAA,UAC7F,UAAU;AAAA,UACV,UAAU;AAAA,UACV,MAAK;AAAA,UAEL,sDAAC;AAAA,YAAiB,OAAO,CAAC,iBAAiB,KAAK;AAAA,WAAG;AAAA,SACrD;AAAA,OACF;AAAA;AAAA,GACF;AAEJ;AAEA,IAAO,uBAAQ;",
6
6
  "names": []
7
7
  }
@@ -80,7 +80,7 @@ const MinutesList = () => {
80
80
  "data-testid": import_ControlledDateTimePickerDatatestid.ControlledDateTimePickerDatatestid.TIMEWHEEL.PREV_MINUTE,
81
81
  type: "button",
82
82
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallUp, {
83
- color: ["brand-primary", 700]
83
+ color: ["brand-primary", "700"]
84
84
  })
85
85
  })
86
86
  }),
@@ -133,7 +133,7 @@ const MinutesList = () => {
133
133
  tabIndex: -1,
134
134
  type: "button",
135
135
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallDown, {
136
- color: ["brand-primary", 700]
136
+ color: ["brand-primary", "700"]
137
137
  })
138
138
  })
139
139
  })
@@ -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 React, { useContext, useCallback } from 'react';\nimport { ChevronSmallUp, ChevronSmallDown } from '@elliemae/ds-icons';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX';\nimport { convertToPositiveNumberIfPossible } from '../../../utils/numberHelpers';\nimport { StyledWheelList, StyledWheelListItem, StyledTimeBtn, StyledWheelChangeTimeBtn } from './Styleds';\nimport { TimeWheelContext } from './TimeWheelContext';\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 } = useContext(ControlledDateTimePickerContext);\n const handleCurrMeridiemRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\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 return (\n <StyledWheelList>\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 type=\"button\"\n >\n <ChevronSmallUp color={['brand-primary', 700]} />\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 isCurrentListItem = isEmptyCurrValueCurrentListItem || minutes === minutesString;\n const isDisabled = getIsDisabledTime(currMinutesTimeString);\n\n const tabIndex = isCurrentListItem ? 0 : -1;\n const btnProps = {\n onKeyDown: isCurrentListItem ? handleCurrMinutesOnKeyDown : undefined,\n innerRef: isCurrentListItem ? handleCurrMeridiemRef : undefined,\n };\n const styledProps = { isCurrentListItem, isDisabled };\n return (\n <StyledWheelListItem\n key={key}\n isCurrentListItem={isCurrentListItem}\n selected={convertToPositiveNumberIfPossible(minutesString) === currMinuteNum}\n >\n <StyledTimeBtn\n {...styledProps}\n data-testid={\n ControlledDateTimePickerDatatestid.TIMEWHEEL[isCurrentListItem ? 'CURRENT_MINUTE' : 'MINUTE']\n }\n selected={minutes.length === 2 && convertToPositiveNumberIfPossible(minutesString) === currMinuteNum}\n aria-label={`${minutesString} minutes`}\n aria-disabled={isDisabled}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMinutes(minutesString, e)}\n tabIndex={tabIndex}\n role=\"spinbutton\"\n aria-valuemax={59}\n aria-valuemin={0}\n aria-valuenow={currMinuteNum}\n aria-valuetext={`${minutesString} minutes`}\n type=\"button\"\n {...btnProps}\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 type=\"button\"\n >\n <ChevronSmallDown color={['brand-primary', 700]} />\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;ADAvB;AACA,mBAA+C;AAC/C,sBAAiD;AACjD,gDAAmD;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;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C;AAAA,YACE,GAAG;AAAA,YACJ,eACE,6EAAmC,UAAU,oBAAoB,mBAAmB;AAAA,YAEtF,UAAU,QAAQ,WAAW,SAAK,wDAAkC,aAAa,MAAM;AAAA,YACvF,cAAY,GAAG;AAAA,YACf,iBAAe;AAAA,YACf,YAAW;AAAA,YACX,MAAK;AAAA,YACL,SAAS,CAAC,MAA2C,gCAAgC,eAAe,CAAC;AAAA,YACrG;AAAA,YACA,MAAK;AAAA,YACL,iBAAe;AAAA,YACf,iBAAe;AAAA,YACf,iBAAe;AAAA,YACf,kBAAgB,GAAG;AAAA,YACnB,MAAK;AAAA,YACJ,GAAG;AAAA,YAEH;AAAA,WACH;AAAA,WAzBK,GA0BP;AAAA,MAEJ,CAAC;AAAA,MACD,4CAAC;AAAA,QACC,sDAAC;AAAA,UACC,cAAW;AAAA,UACX,YAAW;AAAA,UACX,MAAK;AAAA,UACL,SAAS;AAAA,UACT,UAAU;AAAA,UACV,eAAa,6EAAmC,UAAU;AAAA,UAC1D,UAAU;AAAA,UACV,MAAK;AAAA,UAEL,sDAAC;AAAA,YAAiB,OAAO,CAAC,iBAAiB,GAAG;AAAA,WAAG;AAAA,SACnD;AAAA,OACF;AAAA;AAAA,GACF;AAEJ;AAEA,IAAO,sBAAQ;",
4
+ "sourcesContent": ["/* eslint-disable complexity */\nimport React, { useContext, useCallback } from 'react';\nimport { ChevronSmallUp, ChevronSmallDown } from '@elliemae/ds-icons';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX';\nimport { convertToPositiveNumberIfPossible } from '../../../utils/numberHelpers';\nimport { StyledWheelList, StyledWheelListItem, StyledTimeBtn, StyledWheelChangeTimeBtn } from './Styleds';\nimport { TimeWheelContext } from './TimeWheelContext';\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 } = useContext(ControlledDateTimePickerContext);\n const handleCurrMeridiemRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\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 return (\n <StyledWheelList>\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 type=\"button\"\n >\n <ChevronSmallUp color={['brand-primary', '700']} />\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 isCurrentListItem = isEmptyCurrValueCurrentListItem || minutes === minutesString;\n const isDisabled = getIsDisabledTime(currMinutesTimeString);\n\n const tabIndex = isCurrentListItem ? 0 : -1;\n const btnProps = {\n onKeyDown: isCurrentListItem ? handleCurrMinutesOnKeyDown : undefined,\n innerRef: isCurrentListItem ? handleCurrMeridiemRef : undefined,\n };\n const styledProps = { isCurrentListItem, isDisabled };\n return (\n <StyledWheelListItem\n key={key}\n isCurrentListItem={isCurrentListItem}\n selected={convertToPositiveNumberIfPossible(minutesString) === currMinuteNum}\n >\n <StyledTimeBtn\n {...styledProps}\n data-testid={\n ControlledDateTimePickerDatatestid.TIMEWHEEL[isCurrentListItem ? 'CURRENT_MINUTE' : 'MINUTE']\n }\n selected={minutes.length === 2 && convertToPositiveNumberIfPossible(minutesString) === currMinuteNum}\n aria-label={`${minutesString} minutes`}\n aria-disabled={isDisabled}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMinutes(minutesString, e)}\n tabIndex={tabIndex}\n role=\"spinbutton\"\n aria-valuemax={59}\n aria-valuemin={0}\n aria-valuenow={currMinuteNum}\n aria-valuetext={`${minutesString} minutes`}\n type=\"button\"\n {...btnProps}\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 type=\"button\"\n >\n <ChevronSmallDown color={['brand-primary', '700']} />\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;ADAvB;AACA,mBAA+C;AAC/C,sBAAiD;AACjD,gDAAmD;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;AA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U,oBAAoB,mBAAmB;AAAA,YAEtF,UAAU,QAAQ,WAAW,SAAK,wDAAkC,aAAa,MAAM;AAAA,YACvF,cAAY,GAAG;AAAA,YACf,iBAAe;AAAA,YACf,YAAW;AAAA,YACX,MAAK;AAAA,YACL,SAAS,CAAC,MAA2C,gCAAgC,eAAe,CAAC;AAAA,YACrG;AAAA,YACA,MAAK;AAAA,YACL,iBAAe;AAAA,YACf,iBAAe;AAAA,YACf,iBAAe;AAAA,YACf,kBAAgB,GAAG;AAAA,YACnB,MAAK;AAAA,YACJ,GAAG;AAAA,YAEH;AAAA,WACH;AAAA,WAzBK,GA0BP;AAAA,MAEJ,CAAC;AAAA,MACD,4CAAC;AAAA,QACC,sDAAC;AAAA,UACC,cAAW;AAAA,UACX,YAAW;AAAA,UACX,MAAK;AAAA,UACL,SAAS;AAAA,UACT,UAAU;AAAA,UACV,eAAa,6EAAmC,UAAU;AAAA,UAC1D,UAAU;AAAA,UACV,MAAK;AAAA,UAEL,sDAAC;AAAA,YAAiB,OAAO,CAAC,iBAAiB,KAAK;AAAA,WAAG;AAAA,SACrD;AAAA,OACF;AAAA;AAAA,GACF;AAEJ;AAEA,IAAO,sBAAQ;",
6
6
  "names": []
7
7
  }
@@ -51,7 +51,7 @@ const HoursList = () => {
51
51
  tabIndex: -1,
52
52
  type: "button",
53
53
  children: /* @__PURE__ */ jsx(ChevronSmallUp, {
54
- color: ["brand-primary", 700]
54
+ color: ["brand-primary", "700"]
55
55
  })
56
56
  })
57
57
  }),
@@ -107,7 +107,7 @@ const HoursList = () => {
107
107
  "data-testid": ControlledDateTimePickerDatatestid.TIMEWHEEL.NEXT_HOUR,
108
108
  type: "button",
109
109
  children: /* @__PURE__ */ jsx(ChevronSmallDown, {
110
- color: ["brand-primary", 700]
110
+ color: ["brand-primary", "700"]
111
111
  })
112
112
  })
113
113
  })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Pickers/TimeWheel/HoursList.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useContext, useCallback } from 'react';\nimport { ChevronSmallUp, ChevronSmallDown } from '@elliemae/ds-icons';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX';\nimport { convertToPositiveNumberIfPossible } from '../../../utils/numberHelpers';\nimport { StyledWheelList, StyledWheelListItem, StyledTimeBtn, StyledWheelChangeTimeBtn } from './Styleds';\nimport { TimeWheelContext } from './TimeWheelContext';\n\nexport const HoursList = (): JSX.Element => {\n const {\n currHourNum,\n currMinuteNum,\n currMeridiem,\n visibleHours,\n handlePrevHour,\n handleNextHour,\n handleTimeWheelBtnChangeHours,\n handleCurrHourOnKeyDown,\n } = useContext(TimeWheelContext);\n const {\n prevHourBtnRef,\n currHourBtnRef,\n nextHourBtnRef,\n getIsDisabledTime,\n autoFocusHourTimeWheel,\n hours,\n latestInteractionRegion,\n currFocusDescriber,\n } = useContext(ControlledDateTimePickerContext);\n const handleCurrYearRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\n setTimeout(() => {\n currHourBtnRef.current = ButtonDomNode;\n if (latestInteractionRegion === 'timewheel' && currFocusDescriber === 'timewheel-curr-hour')\n ButtonDomNode?.focus?.();\n });\n },\n [currFocusDescriber, latestInteractionRegion, currHourBtnRef],\n );\n return (\n <StyledWheelList>\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n aria-label=\"subtract one hour\"\n buttonType=\"raw\"\n size=\"m\"\n onClick={handlePrevHour}\n innerRef={prevHourBtnRef}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.PREV_HOUR}\n tabIndex={-1}\n type=\"button\"\n >\n <ChevronSmallUp color={['brand-primary', 700]} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n {visibleHours.map((hourString) => {\n const key = `timewheel-hour-${hourString || ''}`;\n if (!hourString) return <StyledWheelListItem key={key} />;\n const currHourTimeString = `${hourString}:${currMinuteNum} ${currMeridiem}`;\n\n const isEmptyCurrValueCurrentListItem = !hours && convertToPositiveNumberIfPossible(hourString) === currHourNum;\n const isCurrentListItem = isEmptyCurrValueCurrentListItem || hours === hourString;\n const isDisabled = getIsDisabledTime(currHourTimeString);\n const tabIndex = isCurrentListItem ? 0 : -1;\n const btnProps = {\n onKeyDown: isCurrentListItem ? handleCurrHourOnKeyDown : undefined,\n innerRef: isCurrentListItem ? handleCurrYearRef : undefined,\n };\n const styleProps = {\n isCurrentListItem,\n isDisabled,\n };\n return (\n <StyledWheelListItem isCurrentListItem={isCurrentListItem} key={key}>\n <StyledTimeBtn\n {...styleProps}\n autoFocus={autoFocusHourTimeWheel && isCurrentListItem}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL[isCurrentListItem ? 'CURRENT_HOUR' : 'HOUR']}\n selected={hours.length === 2 && convertToPositiveNumberIfPossible(hourString) === currHourNum}\n aria-label={`${hourString} hours`}\n aria-disabled={isDisabled}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeHours(hourString, e)}\n tabIndex={tabIndex}\n role=\"spinbutton\"\n aria-valuemax={12}\n aria-valuemin={1}\n aria-valuenow={currHourNum}\n aria-valuetext={`${hourString} hours`}\n type=\"button\"\n {...btnProps}\n >\n {hourString}\n </StyledTimeBtn>\n </StyledWheelListItem>\n );\n })}\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n aria-label=\"add one hour\"\n buttonType=\"raw\"\n size=\"m\"\n onClick={handleNextHour}\n innerRef={nextHourBtnRef}\n tabIndex={-1}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.NEXT_HOUR}\n type=\"button\"\n >\n <ChevronSmallDown color={['brand-primary', 700]} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n </Styled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kCAAkC,CAAC,SAAS,kCAAkC,UAAU,MAAM;AACpG,cAAM,oBAAoB,mCAAmC,UAAU;AACvE,cAAM,aAAa,kBAAkB,kBAAkB;AACvD,cAAM,WAAW,oBAAoB,IAAI;AACzC,cAAM,WAAW;AAAA,UACf,WAAW,oBAAoB,0BAA0B;AAAA,UACzD,UAAU,oBAAoB,oBAAoB;AAAA,QACpD;AACA,cAAM,aAAa;AAAA,UACjB;AAAA,UACA;AAAA,QACF;AACA,eACE,oBAAC;AAAA,UAAoB;AAAA,UACnB,8BAAC;AAAA,YACE,GAAG;AAAA,YACJ,WAAW,0BAA0B;AAAA,YACrC,eAAa,mCAAmC,UAAU,oBAAoB,iBAAiB;AAAA,YAC/F,UAAU,MAAM,WAAW,KAAK,kCAAkC,UAAU,MAAM;AAAA,YAClF,cAAY,GAAG;AAAA,YACf,iBAAe;AAAA,YACf,YAAW;AAAA,YACX,MAAK;AAAA,YACL,SAAS,CAAC,MAA2C,8BAA8B,YAAY,CAAC;AAAA,YAChG;AAAA,YACA,MAAK;AAAA,YACL,iBAAe;AAAA,YACf,iBAAe;AAAA,YACf,iBAAe;AAAA,YACf,kBAAgB,GAAG;AAAA,YACnB,MAAK;AAAA,YACJ,GAAG;AAAA,YAEH;AAAA,WACH;AAAA,WArB8D,GAsBhE;AAAA,MAEJ,CAAC;AAAA,MACD,oBAAC;AAAA,QACC,8BAAC;AAAA,UACC,cAAW;AAAA,UACX,YAAW;AAAA,UACX,MAAK;AAAA,UACL,SAAS;AAAA,UACT,UAAU;AAAA,UACV,UAAU;AAAA,UACV,eAAa,mCAAmC,UAAU;AAAA,UAC1D,MAAK;AAAA,UAEL,8BAAC;AAAA,YAAiB,OAAO,CAAC,iBAAiB,GAAG;AAAA,WAAG;AAAA,SACnD;AAAA,OACF;AAAA;AAAA,GACF;AAEJ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useContext, useCallback } from 'react';\nimport { ChevronSmallUp, ChevronSmallDown } from '@elliemae/ds-icons';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX';\nimport { convertToPositiveNumberIfPossible } from '../../../utils/numberHelpers';\nimport { StyledWheelList, StyledWheelListItem, StyledTimeBtn, StyledWheelChangeTimeBtn } from './Styleds';\nimport { TimeWheelContext } from './TimeWheelContext';\n\nexport const HoursList = (): JSX.Element => {\n const {\n currHourNum,\n currMinuteNum,\n currMeridiem,\n visibleHours,\n handlePrevHour,\n handleNextHour,\n handleTimeWheelBtnChangeHours,\n handleCurrHourOnKeyDown,\n } = useContext(TimeWheelContext);\n const {\n prevHourBtnRef,\n currHourBtnRef,\n nextHourBtnRef,\n getIsDisabledTime,\n autoFocusHourTimeWheel,\n hours,\n latestInteractionRegion,\n currFocusDescriber,\n } = useContext(ControlledDateTimePickerContext);\n const handleCurrYearRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\n setTimeout(() => {\n currHourBtnRef.current = ButtonDomNode;\n if (latestInteractionRegion === 'timewheel' && currFocusDescriber === 'timewheel-curr-hour')\n ButtonDomNode?.focus?.();\n });\n },\n [currFocusDescriber, latestInteractionRegion, currHourBtnRef],\n );\n return (\n <StyledWheelList>\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n aria-label=\"subtract one hour\"\n buttonType=\"raw\"\n size=\"m\"\n onClick={handlePrevHour}\n innerRef={prevHourBtnRef}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.PREV_HOUR}\n tabIndex={-1}\n type=\"button\"\n >\n <ChevronSmallUp color={['brand-primary', '700']} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n {visibleHours.map((hourString) => {\n const key = `timewheel-hour-${hourString || ''}`;\n if (!hourString) return <StyledWheelListItem key={key} />;\n const currHourTimeString = `${hourString}:${currMinuteNum} ${currMeridiem}`;\n\n const isEmptyCurrValueCurrentListItem = !hours && convertToPositiveNumberIfPossible(hourString) === currHourNum;\n const isCurrentListItem = isEmptyCurrValueCurrentListItem || hours === hourString;\n const isDisabled = getIsDisabledTime(currHourTimeString);\n const tabIndex = isCurrentListItem ? 0 : -1;\n const btnProps = {\n onKeyDown: isCurrentListItem ? handleCurrHourOnKeyDown : undefined,\n innerRef: isCurrentListItem ? handleCurrYearRef : undefined,\n };\n const styleProps = {\n isCurrentListItem,\n isDisabled,\n };\n return (\n <StyledWheelListItem isCurrentListItem={isCurrentListItem} key={key}>\n <StyledTimeBtn\n {...styleProps}\n autoFocus={autoFocusHourTimeWheel && isCurrentListItem}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL[isCurrentListItem ? 'CURRENT_HOUR' : 'HOUR']}\n selected={hours.length === 2 && convertToPositiveNumberIfPossible(hourString) === currHourNum}\n aria-label={`${hourString} hours`}\n aria-disabled={isDisabled}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeHours(hourString, e)}\n tabIndex={tabIndex}\n role=\"spinbutton\"\n aria-valuemax={12}\n aria-valuemin={1}\n aria-valuenow={currHourNum}\n aria-valuetext={`${hourString} hours`}\n type=\"button\"\n {...btnProps}\n >\n {hourString}\n </StyledTimeBtn>\n </StyledWheelListItem>\n );\n })}\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n aria-label=\"add one hour\"\n buttonType=\"raw\"\n size=\"m\"\n onClick={handleNextHour}\n innerRef={nextHourBtnRef}\n tabIndex={-1}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.NEXT_HOUR}\n type=\"button\"\n >\n <ChevronSmallDown color={['brand-primary', '700']} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n </StyledWheelList>\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAgB,YAAY,mBAAmB;AAC/C,SAAS,gBAAgB,wBAAwB;AACjD,SAAS,0CAA0C;AAC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B,IAAI;AACzC,cAAM,WAAW;AAAA,UACf,WAAW,oBAAoB,0BAA0B;AAAA,UACzD,UAAU,oBAAoB,oBAAoB;AAAA,QACpD;AACA,cAAM,aAAa;AAAA,UACjB;AAAA,UACA;AAAA,QACF;AACA,eACE,oBAAC;AAAA,UAAoB;AAAA,UACnB,8BAAC;AAAA,YACE,GAAG;AAAA,YACJ,WAAW,0BAA0B;AAAA,YACrC,eAAa,mCAAmC,UAAU,oBAAoB,iBAAiB;AAAA,YAC/F,UAAU,MAAM,WAAW,KAAK,kCAAkC,UAAU,MAAM;AAAA,YAClF,cAAY,GAAG;AAAA,YACf,iBAAe;AAAA,YACf,YAAW;AAAA,YACX,MAAK;AAAA,YACL,SAAS,CAAC,MAA2C,8BAA8B,YAAY,CAAC;AAAA,YAChG;AAAA,YACA,MAAK;AAAA,YACL,iBAAe;AAAA,YACf,iBAAe;AAAA,YACf,iBAAe;AAAA,YACf,kBAAgB,GAAG;AAAA,YACnB,MAAK;AAAA,YACJ,GAAG;AAAA,YAEH;AAAA,WACH;AAAA,WArB8D,GAsBhE;AAAA,MAEJ,CAAC;AAAA,MACD,oBAAC;AAAA,QACC,8BAAC;AAAA,UACC,cAAW;AAAA,UACX,YAAW;AAAA,UACX,MAAK;AAAA,UACL,SAAS;AAAA,UACT,UAAU;AAAA,UACV,UAAU;AAAA,UACV,eAAa,mCAAmC,UAAU;AAAA,UAC1D,MAAK;AAAA,UAEL,8BAAC;AAAA,YAAiB,OAAO,CAAC,iBAAiB,KAAK;AAAA,WAAG;AAAA,SACrD;AAAA,OACF;AAAA;AAAA,GACF;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -54,7 +54,7 @@ const MeridiemList = () => {
54
54
  tabIndex: -1,
55
55
  type: "button",
56
56
  children: /* @__PURE__ */ jsx(ChevronSmallUp, {
57
- color: ["brand-primary", 700]
57
+ color: ["brand-primary", "700"]
58
58
  })
59
59
  })
60
60
  }),
@@ -119,7 +119,7 @@ const MeridiemList = () => {
119
119
  tabIndex: -1,
120
120
  type: "button",
121
121
  children: /* @__PURE__ */ jsx(ChevronSmallDown, {
122
- color: ["brand-primary", 700]
122
+ color: ["brand-primary", "700"]
123
123
  })
124
124
  })
125
125
  })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Pickers/TimeWheel/MeridiemList.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useContext, useCallback } from 'react';\nimport { ChevronSmallUp, ChevronSmallDown } from '@elliemae/ds-icons';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX';\nimport { StyledWheelList, StyledWheelListItem, StyledTimeBtn, StyledWheelChangeTimeBtn } from './Styleds';\nimport { TimeWheelContext } from './TimeWheelContext';\n\nexport const MeridiemList = (): JSX.Element => {\n const { currMeridiem, handleTimeWheelBtnChangeMeridiem, handleCurrMeridiemOnKeyDown } = useContext(TimeWheelContext);\n const {\n prevMeridiemBtnRef,\n currMeridiemBtnRef,\n nextMeridiemBtnRef,\n getIsDisabledTime,\n hours,\n minutes,\n latestInteractionRegion,\n currFocusDescriber,\n } = useContext(ControlledDateTimePickerContext);\n const isAmCurrent = !currMeridiem || currMeridiem === 'AM';\n const isPmCurrent = currMeridiem === 'PM';\n const hourMinuteString = `${hours || '01'}:${minutes || '00'}`;\n const amTimeString = `${hourMinuteString} AM`;\n const pmTimeString = `${hourMinuteString} PM`;\n const isDisabledAm = getIsDisabledTime(amTimeString);\n const isDisabledPm = getIsDisabledTime(pmTimeString);\n const styledPropsPrevMeridiem = { isDisabled: isDisabledAm };\n const styledPropsCurrentAmMeridiem = { isCurrentListItem: isAmCurrent, isDisabled: isDisabledAm };\n const styledPropsCurrentPmMeridiem = { isCurrentListItem: isPmCurrent, isDisabled: isDisabledPm };\n const styledPropsNextMeridiem = { isDisabled: isDisabledPm };\n const handleCurrMeridiemRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\n setTimeout(() => {\n currMeridiemBtnRef.current = ButtonDomNode;\n if (latestInteractionRegion === 'timewheel' && currFocusDescriber === 'timewheel-curr-meridiem')\n ButtonDomNode?.focus?.();\n });\n },\n [currFocusDescriber, latestInteractionRegion, currMeridiemBtnRef],\n );\n return (\n <StyledWheelList>\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n {...styledPropsPrevMeridiem}\n aria-label=\"set am meridiem\"\n aria-disabled={isDisabledAm}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.PREV_MERIDIEM}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMeridiem('AM', e)}\n innerRef={prevMeridiemBtnRef}\n tabIndex={-1}\n type=\"button\"\n >\n <ChevronSmallUp color={['brand-primary', 700]} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n {currMeridiem === 'AM' || currMeridiem === '' ? <StyledWheelListItem /> : null}\n <StyledWheelListItem isCurrentListItem={isAmCurrent}>\n <StyledTimeBtn\n {...styledPropsCurrentAmMeridiem}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL[isAmCurrent ? 'CURRENT_MERIDIEM' : 'MERIDIEM']}\n selected={currMeridiem === 'AM'}\n aria-label={`AM ${isAmCurrent ? 'selected' : ''}`}\n aria-disabled={isDisabledAm}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMeridiem('AM', e)}\n onKeyDown={isAmCurrent ? handleCurrMeridiemOnKeyDown : undefined}\n innerRef={isAmCurrent ? handleCurrMeridiemRef : undefined}\n tabIndex={isAmCurrent ? 0 : -1}\n role=\"spinbutton\"\n aria-valuemax={1}\n aria-valuemin={0}\n aria-valuenow={isPmCurrent ? 1 : 0}\n aria-valuetext={isAmCurrent ? 'ante meridiem' : 'post meridiem'}\n type=\"button\"\n >\n AM\n </StyledTimeBtn>\n </StyledWheelListItem>\n <StyledWheelListItem isCurrentListItem={isPmCurrent}>\n <StyledTimeBtn\n {...styledPropsCurrentPmMeridiem}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL[isPmCurrent ? 'CURRENT_MERIDIEM' : 'MERIDIEM']}\n selected={currMeridiem === 'PM'}\n aria-label={`PM ${isPmCurrent ? 'selected' : ''}`}\n aria-disabled={isDisabledPm}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMeridiem('PM', e)}\n onKeyDown={isPmCurrent ? handleCurrMeridiemOnKeyDown : undefined}\n innerRef={isPmCurrent ? handleCurrMeridiemRef : undefined}\n tabIndex={isPmCurrent ? 0 : -1}\n role=\"spinbutton\"\n aria-valuemax={1}\n aria-valuemin={0}\n aria-valuenow={isPmCurrent ? 1 : 0}\n aria-valuetext={isAmCurrent ? 'ante meridiem' : 'post meridiem'}\n type=\"button\"\n >\n PM\n </StyledTimeBtn>\n </StyledWheelListItem>\n {currMeridiem === 'PM' ? <StyledWheelListItem /> : null}\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n {...styledPropsNextMeridiem}\n aria-label=\"set pm meridiem\"\n aria-disabled={isDisabledPm}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.NEXT_MERIDIEM}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMeridiem('PM', e)}\n innerRef={nextMeridiemBtnRef}\n tabIndex={-1}\n type=\"button\"\n >\n <ChevronSmallDown color={['brand-primary', 700]} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n </StyledWheelList>\n );\n};\n\nexport default MeridiemList;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAgB,YAAY,mBAAmB;AAC/C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AAAA,UACjC,kBAAgB,cAAc,kBAAkB;AAAA,UAChD,MAAK;AAAA,UACN;AAAA,SAED;AAAA,OACF;AAAA,MACC,iBAAiB,OAAO,oBAAC,uBAAoB,IAAK;AAAA,MACnD,oBAAC;AAAA,QACC,8BAAC;AAAA,UACE,GAAG;AAAA,UACJ,cAAW;AAAA,UACX,iBAAe;AAAA,UACf,eAAa,mCAAmC,UAAU;AAAA,UAC1D,YAAW;AAAA,UACX,MAAK;AAAA,UACL,SAAS,CAAC,MAA2C,iCAAiC,MAAM,CAAC;AAAA,UAC7F,UAAU;AAAA,UACV,UAAU;AAAA,UACV,MAAK;AAAA,UAEL,8BAAC;AAAA,YAAiB,OAAO,CAAC,iBAAiB,GAAG;AAAA,WAAG;AAAA,SACnD;AAAA,OACF;AAAA;AAAA,GACF;AAEJ;AAEA,IAAO,uBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useContext, useCallback } from 'react';\nimport { ChevronSmallUp, ChevronSmallDown } from '@elliemae/ds-icons';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX';\nimport { StyledWheelList, StyledWheelListItem, StyledTimeBtn, StyledWheelChangeTimeBtn } from './Styleds';\nimport { TimeWheelContext } from './TimeWheelContext';\n\nexport const MeridiemList = (): JSX.Element => {\n const { currMeridiem, handleTimeWheelBtnChangeMeridiem, handleCurrMeridiemOnKeyDown } = useContext(TimeWheelContext);\n const {\n prevMeridiemBtnRef,\n currMeridiemBtnRef,\n nextMeridiemBtnRef,\n getIsDisabledTime,\n hours,\n minutes,\n latestInteractionRegion,\n currFocusDescriber,\n } = useContext(ControlledDateTimePickerContext);\n const isAmCurrent = !currMeridiem || currMeridiem === 'AM';\n const isPmCurrent = currMeridiem === 'PM';\n const hourMinuteString = `${hours || '01'}:${minutes || '00'}`;\n const amTimeString = `${hourMinuteString} AM`;\n const pmTimeString = `${hourMinuteString} PM`;\n const isDisabledAm = getIsDisabledTime(amTimeString);\n const isDisabledPm = getIsDisabledTime(pmTimeString);\n const styledPropsPrevMeridiem = { isDisabled: isDisabledAm };\n const styledPropsCurrentAmMeridiem = { isCurrentListItem: isAmCurrent, isDisabled: isDisabledAm };\n const styledPropsCurrentPmMeridiem = { isCurrentListItem: isPmCurrent, isDisabled: isDisabledPm };\n const styledPropsNextMeridiem = { isDisabled: isDisabledPm };\n const handleCurrMeridiemRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\n setTimeout(() => {\n currMeridiemBtnRef.current = ButtonDomNode;\n if (latestInteractionRegion === 'timewheel' && currFocusDescriber === 'timewheel-curr-meridiem')\n ButtonDomNode?.focus?.();\n });\n },\n [currFocusDescriber, latestInteractionRegion, currMeridiemBtnRef],\n );\n return (\n <StyledWheelList>\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n {...styledPropsPrevMeridiem}\n aria-label=\"set am meridiem\"\n aria-disabled={isDisabledAm}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.PREV_MERIDIEM}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMeridiem('AM', e)}\n innerRef={prevMeridiemBtnRef}\n tabIndex={-1}\n type=\"button\"\n >\n <ChevronSmallUp color={['brand-primary', '700']} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n {currMeridiem === 'AM' || currMeridiem === '' ? <StyledWheelListItem /> : null}\n <StyledWheelListItem isCurrentListItem={isAmCurrent}>\n <StyledTimeBtn\n {...styledPropsCurrentAmMeridiem}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL[isAmCurrent ? 'CURRENT_MERIDIEM' : 'MERIDIEM']}\n selected={currMeridiem === 'AM'}\n aria-label={`AM ${isAmCurrent ? 'selected' : ''}`}\n aria-disabled={isDisabledAm}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMeridiem('AM', e)}\n onKeyDown={isAmCurrent ? handleCurrMeridiemOnKeyDown : undefined}\n innerRef={isAmCurrent ? handleCurrMeridiemRef : undefined}\n tabIndex={isAmCurrent ? 0 : -1}\n role=\"spinbutton\"\n aria-valuemax={1}\n aria-valuemin={0}\n aria-valuenow={isPmCurrent ? 1 : 0}\n aria-valuetext={isAmCurrent ? 'ante meridiem' : 'post meridiem'}\n type=\"button\"\n >\n AM\n </StyledTimeBtn>\n </StyledWheelListItem>\n <StyledWheelListItem isCurrentListItem={isPmCurrent}>\n <StyledTimeBtn\n {...styledPropsCurrentPmMeridiem}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL[isPmCurrent ? 'CURRENT_MERIDIEM' : 'MERIDIEM']}\n selected={currMeridiem === 'PM'}\n aria-label={`PM ${isPmCurrent ? 'selected' : ''}`}\n aria-disabled={isDisabledPm}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMeridiem('PM', e)}\n onKeyDown={isPmCurrent ? handleCurrMeridiemOnKeyDown : undefined}\n innerRef={isPmCurrent ? handleCurrMeridiemRef : undefined}\n tabIndex={isPmCurrent ? 0 : -1}\n role=\"spinbutton\"\n aria-valuemax={1}\n aria-valuemin={0}\n aria-valuenow={isPmCurrent ? 1 : 0}\n aria-valuetext={isAmCurrent ? 'ante meridiem' : 'post meridiem'}\n type=\"button\"\n >\n PM\n </StyledTimeBtn>\n </StyledWheelListItem>\n {currMeridiem === 'PM' ? <StyledWheelListItem /> : null}\n <StyledWheelListItem>\n <StyledWheelChangeTimeBtn\n {...styledPropsNextMeridiem}\n aria-label=\"set pm meridiem\"\n aria-disabled={isDisabledPm}\n data-testid={ControlledDateTimePickerDatatestid.TIMEWHEEL.NEXT_MERIDIEM}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMeridiem('PM', e)}\n innerRef={nextMeridiemBtnRef}\n tabIndex={-1}\n type=\"button\"\n >\n <ChevronSmallDown color={['brand-primary', '700']} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n </StyledWheelList>\n );\n};\n\nexport default MeridiemList;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAgB,YAAY,mBAAmB;AAC/C,SAAS,gBAAgB,wBAAwB;AACjD,SAAS,0CAA0C;AACnD,SAAS,uCAAuC;AAChD,SAAS,iBAAiB,qBAAqB,eAAe,gCAAgC;AAC9F,SAAS,wBAAwB;AAE1B,MAAM,eAAe,MAAmB;AAC7C,QAAM,EAAE,cAAc,kCAAkC,4BAA4B,IAAI,WAAW,gBAAgB;AACnH,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,WAAW,+BAA+B;AAC9C,QAAM,cAAc,CAAC,gBAAgB,iBAAiB;AACtD,QAAM,cAAc,iBAAiB;AACrC,QAAM,mBAAmB,GAAG,SAAS,QAAQ,WAAW;AACxD,QAAM,eAAe,GAAG;AACxB,QAAM,eAAe,GAAG;AACxB,QAAM,eAAe,kBAAkB,YAAY;AACnD,QAAM,eAAe,kBAAkB,YAAY;AACnD,QAAM,0BAA0B,EAAE,YAAY,aAAa;AAC3D,QAAM,+BAA+B,EAAE,mBAAmB,aAAa,YAAY,aAAa;AAChG,QAAM,+BAA+B,EAAE,mBAAmB,aAAa,YAAY,aAAa;AAChG,QAAM,0BAA0B,EAAE,YAAY,aAAa;AAC3D,QAAM,wBAAwB;AAAA,IAC5B,CAAC,kBAAqC;AACpC,iBAAW,MAAM;AACf,2BAAmB,UAAU;AAC7B,YAAI,4BAA4B,eAAe,uBAAuB;AACpE,yBAAe,QAAQ;AAAA,MAC3B,CAAC;AAAA,IACH;AAAA,IACA,CAAC,oBAAoB,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AAe;AAAA,UACf,YAAW;AAAA,UACX,MAAK;AAAA,UACL,SAAS,CAAC,MAA2C,iCAAiC,MAAM,CAAC;AAAA,UAC7F,WAAW,cAAc,8BAA8B;AAAA,UACvD,UAAU,cAAc,wBAAwB;AAAA,UAChD,UAAU,cAAc,IAAI;AAAA,UAC5B,MAAK;AAAA,UACL,iBAAe;AAAA,UACf,iBAAe;AAAA,UACf,iBAAe,cAAc,IAAI;AAAA,UACjC,kBAAgB,cAAc,kBAAkB;AAAA,UAChD,MAAK;AAAA,UACN;AAAA,SAED;AAAA,OACF;AAAA,MACC,iBAAiB,OAAO,oBAAC,uBAAoB,IAAK;AAAA,MACnD,oBAAC;AAAA,QACC,8BAAC;AAAA,UACE,GAAG;AAAA,UACJ,cAAW;AAAA,UACX,iBAAe;AAAA,UACf,eAAa,mCAAmC,UAAU;AAAA,UAC1D,YAAW;AAAA,UACX,MAAK;AAAA,UACL,SAAS,CAAC,MAA2C,iCAAiC,MAAM,CAAC;AAAA,UAC7F,UAAU;AAAA,UACV,UAAU;AAAA,UACV,MAAK;AAAA,UAEL,8BAAC;AAAA,YAAiB,OAAO,CAAC,iBAAiB,KAAK;AAAA,WAAG;AAAA,SACrD;AAAA,OACF;AAAA;AAAA,GACF;AAEJ;AAEA,IAAO,uBAAQ;",
6
6
  "names": []
7
7
  }
@@ -50,7 +50,7 @@ const MinutesList = () => {
50
50
  "data-testid": ControlledDateTimePickerDatatestid.TIMEWHEEL.PREV_MINUTE,
51
51
  type: "button",
52
52
  children: /* @__PURE__ */ jsx(ChevronSmallUp, {
53
- color: ["brand-primary", 700]
53
+ color: ["brand-primary", "700"]
54
54
  })
55
55
  })
56
56
  }),
@@ -103,7 +103,7 @@ const MinutesList = () => {
103
103
  tabIndex: -1,
104
104
  type: "button",
105
105
  children: /* @__PURE__ */ jsx(ChevronSmallDown, {
106
- color: ["brand-primary", 700]
106
+ color: ["brand-primary", "700"]
107
107
  })
108
108
  })
109
109
  })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/Pickers/TimeWheel/MinutesList.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useContext, useCallback } from 'react';\nimport { ChevronSmallUp, ChevronSmallDown } from '@elliemae/ds-icons';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX';\nimport { convertToPositiveNumberIfPossible } from '../../../utils/numberHelpers';\nimport { StyledWheelList, StyledWheelListItem, StyledTimeBtn, StyledWheelChangeTimeBtn } from './Styleds';\nimport { TimeWheelContext } from './TimeWheelContext';\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 } = useContext(ControlledDateTimePickerContext);\n const handleCurrMeridiemRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\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 return (\n <StyledWheelList>\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 type=\"button\"\n >\n <ChevronSmallUp color={['brand-primary', 700]} />\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 isCurrentListItem = isEmptyCurrValueCurrentListItem || minutes === minutesString;\n const isDisabled = getIsDisabledTime(currMinutesTimeString);\n\n const tabIndex = isCurrentListItem ? 0 : -1;\n const btnProps = {\n onKeyDown: isCurrentListItem ? handleCurrMinutesOnKeyDown : undefined,\n innerRef: isCurrentListItem ? handleCurrMeridiemRef : undefined,\n };\n const styledProps = { isCurrentListItem, isDisabled };\n return (\n <StyledWheelListItem\n key={key}\n isCurrentListItem={isCurrentListItem}\n selected={convertToPositiveNumberIfPossible(minutesString) === currMinuteNum}\n >\n <StyledTimeBtn\n {...styledProps}\n data-testid={\n ControlledDateTimePickerDatatestid.TIMEWHEEL[isCurrentListItem ? 'CURRENT_MINUTE' : 'MINUTE']\n }\n selected={minutes.length === 2 && convertToPositiveNumberIfPossible(minutesString) === currMinuteNum}\n aria-label={`${minutesString} minutes`}\n aria-disabled={isDisabled}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMinutes(minutesString, e)}\n tabIndex={tabIndex}\n role=\"spinbutton\"\n aria-valuemax={59}\n aria-valuemin={0}\n aria-valuenow={currMinuteNum}\n aria-valuetext={`${minutesString} minutes`}\n type=\"button\"\n {...btnProps}\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 type=\"button\"\n >\n <ChevronSmallDown color={['brand-primary', 700]} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n </StyledWheelList>\n );\n};\n\nexport default MinutesList;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAgB,YAAY,mBAAmB;AAC/C,SAAS,gBAAgB,wBAAwB;AACjD,SAAS,0CAA0C;AACnD,SAAS,uCAAuC;AAChD,SAAS,yCAAyC;AAClD,SAAS,iBAAiB,qBAAqB,eAAe,gCAAgC;AAC9F,SAAS,wBAAwB;AAE1B,MAAM,cAAc,MAAmB;AAC5C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,WAAW,gBAAgB;AAC/B,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,WAAW,+BAA+B;AAC9C,QAAM,wBAAwB;AAAA,IAC5B,CAAC,kBAAqC;AACpC,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;AACA,SACE,qBAAC;AAAA,IACC;AAAA,0BAAC;AAAA,QACC,8BAAC;AAAA,UACC,cAAW;AAAA,UACX,YAAW;AAAA,UACX,MAAK;AAAA,UACL,SAAS;AAAA,UACT,UAAU;AAAA,UACV,UAAU;AAAA,UACV,eAAa,mCAAmC,UAAU;AAAA,UAC1D,MAAK;AAAA,UAEL,8BAAC;AAAA,YAAe,OAAO,CAAC,iBAAiB,GAAG;AAAA,WAAG;AAAA,SACjD;AAAA,OACF;AAAA,MACC,eAAe,IAAI,CA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WAAG;AAAA,SACnD;AAAA,OACF;AAAA;AAAA,GACF;AAEJ;AAEA,IAAO,sBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useContext, useCallback } from 'react';\nimport { ChevronSmallUp, ChevronSmallDown } from '@elliemae/ds-icons';\nimport { ControlledDateTimePickerDatatestid } from '../../../ControlledDateTimePickerDatatestid';\nimport { ControlledDateTimePickerContext } from '../../../ControlledDateTimePickerCTX';\nimport { convertToPositiveNumberIfPossible } from '../../../utils/numberHelpers';\nimport { StyledWheelList, StyledWheelListItem, StyledTimeBtn, StyledWheelChangeTimeBtn } from './Styleds';\nimport { TimeWheelContext } from './TimeWheelContext';\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 } = useContext(ControlledDateTimePickerContext);\n const handleCurrMeridiemRef = useCallback(\n (ButtonDomNode: HTMLButtonElement) => {\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 return (\n <StyledWheelList>\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 type=\"button\"\n >\n <ChevronSmallUp color={['brand-primary', '700']} />\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 isCurrentListItem = isEmptyCurrValueCurrentListItem || minutes === minutesString;\n const isDisabled = getIsDisabledTime(currMinutesTimeString);\n\n const tabIndex = isCurrentListItem ? 0 : -1;\n const btnProps = {\n onKeyDown: isCurrentListItem ? handleCurrMinutesOnKeyDown : undefined,\n innerRef: isCurrentListItem ? handleCurrMeridiemRef : undefined,\n };\n const styledProps = { isCurrentListItem, isDisabled };\n return (\n <StyledWheelListItem\n key={key}\n isCurrentListItem={isCurrentListItem}\n selected={convertToPositiveNumberIfPossible(minutesString) === currMinuteNum}\n >\n <StyledTimeBtn\n {...styledProps}\n data-testid={\n ControlledDateTimePickerDatatestid.TIMEWHEEL[isCurrentListItem ? 'CURRENT_MINUTE' : 'MINUTE']\n }\n selected={minutes.length === 2 && convertToPositiveNumberIfPossible(minutesString) === currMinuteNum}\n aria-label={`${minutesString} minutes`}\n aria-disabled={isDisabled}\n buttonType=\"raw\"\n size=\"m\"\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => handleTimeWheelBtnChangeMinutes(minutesString, e)}\n tabIndex={tabIndex}\n role=\"spinbutton\"\n aria-valuemax={59}\n aria-valuemin={0}\n aria-valuenow={currMinuteNum}\n aria-valuetext={`${minutesString} minutes`}\n type=\"button\"\n {...btnProps}\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 type=\"button\"\n >\n <ChevronSmallDown color={['brand-primary', '700']} />\n </StyledWheelChangeTimeBtn>\n </StyledWheelListItem>\n </StyledWheelList>\n );\n};\n\nexport default MinutesList;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAgB,YAAY,mBAAmB;AAC/C,SAAS,gBAAgB,wBAAwB;AACjD,SAAS,0CAA0C;AACnD,SAAS,uCAAuC;AAChD,SAAS,yCAAyC;AAClD,SAAS,iBAAiB,qBAAqB,eAAe,gCAAgC;AAC9F,SAAS,wBAAwB;AAE1B,MAAM,cAAc,MAAmB;AAC5C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,WAAW,gBAAgB;AAC/B,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,WAAW,+BAA+B;AAC9C,QAAM,wBAAwB;AAAA,IAC5B,CAAC,kBAAqC;AACpC,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;AACA,SACE,qBAAC;AAAA,IACC;AAAA,0BAAC;AAAA,QACC,8BAAC;AAAA,UACC,cAAW;AAAA,UACX,YAAW;AAAA,UACX,MAAK;AAAA,UACL,SAAS;AAAA,UACT,UAAU;AAAA,UACV,UAAU;AAAA,UACV,eAAa,mCAAmC,UAAU;AAAA,UAC1D,MAAK;AAAA,UAEL,8BAAC;AAAA,YAAe,OAAO,CAAC,iBAAiB,KAAK;AAAA,WAAG;AAAA,SACnD;AAAA,OACF;AAAA,MACC,eAAe,IAAI,CAAC,kBAAkB;AACrC,cAAM,MAAM,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AAA;AAAA,GACF;AAEJ;AAEA,IAAO,sBAAQ;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-form-date-time-picker",
3
- "version": "3.8.1",
3
+ "version": "3.9.0-next.1",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Controlled Form Date Time Picker",
6
6
  "files": [
@@ -35,13 +35,13 @@
35
35
  "indent": 4
36
36
  },
37
37
  "dependencies": {
38
- "@elliemae/ds-button": "3.8.1",
39
- "@elliemae/ds-grid": "3.8.1",
40
- "@elliemae/ds-icon": "3.8.1",
41
- "@elliemae/ds-icons": "3.8.1",
42
- "@elliemae/ds-popperjs": "3.8.1",
43
- "@elliemae/ds-system": "3.8.1",
44
- "@elliemae/ds-utilities": "3.8.1"
38
+ "@elliemae/ds-button": "3.9.0-next.1",
39
+ "@elliemae/ds-grid": "3.9.0-next.1",
40
+ "@elliemae/ds-icon": "3.9.0-next.1",
41
+ "@elliemae/ds-icons": "3.9.0-next.1",
42
+ "@elliemae/ds-popperjs": "3.9.0-next.1",
43
+ "@elliemae/ds-system": "3.9.0-next.1",
44
+ "@elliemae/ds-utilities": "3.9.0-next.1"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@elliemae/pui-theme": "~2.6.0",