linear-react-components-ui 2.0.0-beta.3 → 2.0.0-beta.5

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 (91) hide show
  1. package/lib/inputs/date/helpers.js +11 -22
  2. package/lib/inputs/date/helpers.js.map +1 -1
  3. package/lib/inputs/mask/BaseMask.js +55 -65
  4. package/lib/inputs/mask/BaseMask.js.map +1 -1
  5. package/lib/inputs/multiSelect/Dropdown.js +44 -42
  6. package/lib/inputs/multiSelect/Dropdown.js.map +1 -1
  7. package/lib/inputs/number/Currency.js +35 -45
  8. package/lib/inputs/number/Currency.js.map +1 -1
  9. package/lib/inputs/number/Decimal.js +38 -48
  10. package/lib/inputs/number/Decimal.js.map +1 -1
  11. package/lib/inputs/number/index.js +38 -48
  12. package/lib/inputs/number/index.js.map +1 -1
  13. package/lib/inputs2/date/datefield/base.js +60 -70
  14. package/lib/inputs2/date/datefield/base.js.map +1 -1
  15. package/lib/inputs2/date/dateperiodfield/base.js +79 -89
  16. package/lib/inputs2/date/dateperiodfield/base.js.map +1 -1
  17. package/lib/inputs2/mask/Cnpj.js +58 -68
  18. package/lib/inputs2/mask/Cnpj.js.map +1 -1
  19. package/lib/inputs2/mask/Cpf.js +38 -48
  20. package/lib/inputs2/mask/Cpf.js.map +1 -1
  21. package/lib/inputs2/mask/index.js +50 -60
  22. package/lib/inputs2/mask/index.js.map +1 -1
  23. package/lib/inputs2/numberfield/currency.js +51 -61
  24. package/lib/inputs2/numberfield/currency.js.map +1 -1
  25. package/lib/inputs2/numberfield/decimal.js +25 -35
  26. package/lib/inputs2/numberfield/decimal.js.map +1 -1
  27. package/lib/inputs2/numberfield/index.js +46 -56
  28. package/lib/inputs2/numberfield/index.js.map +1 -1
  29. package/package.json +9 -6
  30. package/lib/node_modules/imask/esm/controls/html-contenteditable-mask-element.js +0 -35
  31. package/lib/node_modules/imask/esm/controls/html-contenteditable-mask-element.js.map +0 -1
  32. package/lib/node_modules/imask/esm/controls/html-input-mask-element.js +0 -32
  33. package/lib/node_modules/imask/esm/controls/html-input-mask-element.js.map +0 -1
  34. package/lib/node_modules/imask/esm/controls/html-mask-element.js +0 -49
  35. package/lib/node_modules/imask/esm/controls/html-mask-element.js.map +0 -1
  36. package/lib/node_modules/imask/esm/controls/input-history.js +0 -31
  37. package/lib/node_modules/imask/esm/controls/input-history.js.map +0 -1
  38. package/lib/node_modules/imask/esm/controls/input.js +0 -223
  39. package/lib/node_modules/imask/esm/controls/input.js.map +0 -1
  40. package/lib/node_modules/imask/esm/controls/mask-element.js +0 -44
  41. package/lib/node_modules/imask/esm/controls/mask-element.js.map +0 -1
  42. package/lib/node_modules/imask/esm/core/action-details.js +0 -52
  43. package/lib/node_modules/imask/esm/core/action-details.js.map +0 -1
  44. package/lib/node_modules/imask/esm/core/change-details.js +0 -37
  45. package/lib/node_modules/imask/esm/core/change-details.js.map +0 -1
  46. package/lib/node_modules/imask/esm/core/continuous-tail-details.js +0 -43
  47. package/lib/node_modules/imask/esm/core/continuous-tail-details.js.map +0 -1
  48. package/lib/node_modules/imask/esm/core/holder.js +0 -7
  49. package/lib/node_modules/imask/esm/core/holder.js.map +0 -1
  50. package/lib/node_modules/imask/esm/core/utils.js +0 -68
  51. package/lib/node_modules/imask/esm/core/utils.js.map +0 -1
  52. package/lib/node_modules/imask/esm/index.js +0 -51
  53. package/lib/node_modules/imask/esm/index.js.map +0 -1
  54. package/lib/node_modules/imask/esm/masked/base.js +0 -253
  55. package/lib/node_modules/imask/esm/masked/base.js.map +0 -1
  56. package/lib/node_modules/imask/esm/masked/date.js +0 -118
  57. package/lib/node_modules/imask/esm/masked/date.js.map +0 -1
  58. package/lib/node_modules/imask/esm/masked/dynamic.js +0 -223
  59. package/lib/node_modules/imask/esm/masked/dynamic.js.map +0 -1
  60. package/lib/node_modules/imask/esm/masked/enum.js +0 -70
  61. package/lib/node_modules/imask/esm/masked/enum.js.map +0 -1
  62. package/lib/node_modules/imask/esm/masked/factory.js +0 -47
  63. package/lib/node_modules/imask/esm/masked/factory.js.map +0 -1
  64. package/lib/node_modules/imask/esm/masked/function.js +0 -24
  65. package/lib/node_modules/imask/esm/masked/function.js.map +0 -1
  66. package/lib/node_modules/imask/esm/masked/number.js +0 -213
  67. package/lib/node_modules/imask/esm/masked/number.js.map +0 -1
  68. package/lib/node_modules/imask/esm/masked/pattern/chunk-tail-details.js +0 -104
  69. package/lib/node_modules/imask/esm/masked/pattern/chunk-tail-details.js.map +0 -1
  70. package/lib/node_modules/imask/esm/masked/pattern/cursor.js +0 -101
  71. package/lib/node_modules/imask/esm/masked/pattern/cursor.js.map +0 -1
  72. package/lib/node_modules/imask/esm/masked/pattern/fixed-definition.js +0 -103
  73. package/lib/node_modules/imask/esm/masked/pattern/fixed-definition.js.map +0 -1
  74. package/lib/node_modules/imask/esm/masked/pattern/input-definition.js +0 -134
  75. package/lib/node_modules/imask/esm/masked/pattern/input-definition.js.map +0 -1
  76. package/lib/node_modules/imask/esm/masked/pattern.js +0 -323
  77. package/lib/node_modules/imask/esm/masked/pattern.js.map +0 -1
  78. package/lib/node_modules/imask/esm/masked/pipe.js +0 -24
  79. package/lib/node_modules/imask/esm/masked/pipe.js.map +0 -1
  80. package/lib/node_modules/imask/esm/masked/range.js +0 -79
  81. package/lib/node_modules/imask/esm/masked/range.js.map +0 -1
  82. package/lib/node_modules/imask/esm/masked/regexp.js +0 -22
  83. package/lib/node_modules/imask/esm/masked/regexp.js.map +0 -1
  84. package/lib/node_modules/imask/esm/masked/repeat.js +0 -105
  85. package/lib/node_modules/imask/esm/masked/repeat.js.map +0 -1
  86. package/lib/node_modules/react-imask/esm/hook.js +0 -76
  87. package/lib/node_modules/react-imask/esm/hook.js.map +0 -1
  88. package/lib/node_modules/react-imask/esm/input.js +0 -24
  89. package/lib/node_modules/react-imask/esm/input.js.map +0 -1
  90. package/lib/node_modules/react-imask/esm/mixin.js +0 -132
  91. package/lib/node_modules/react-imask/esm/mixin.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sources":["../../../../src/lib/inputs2/date/datefield/base.tsx"],"sourcesContent":["import React from 'react';\nimport _ from 'lodash';\nimport { useIMask } from 'react-imask';\nimport { v1 as uuid } from 'uuid';\nimport { createPortal } from 'react-dom';\nimport moment, { type Moment } from 'moment';\nimport Hint from '../../../hint';\nimport { Tooltip } from '../../../tooltip';\nimport { mergeRefs } from '../../../form2/helpers';\nimport { Keys } from '../types';\nimport * as BaseDate from '../base';\nimport { NAVIGATION_KEYS, TOKEN_ISO_FORMAT, TOKEN_MASK, TOKEN_PTBR_FORMAT } from '../helpers';\nimport { Triggers } from './triggers';\nimport { CalendarBox } from './calendarbox';\nimport { DateFieldContext } from './context';\nimport type { DateFieldInputBaseProps } from './types';\n\nexport const InputBase = \n React.forwardRef<HTMLInputElement, DateFieldInputBaseProps>((props, ref) => {\n const {\n label, errors, tooltip, tooltipPosition, tooltipWidth, shouldCloseOnSelect = true, returnValueType = 'default',\n customClass = '', customClassLabel = '', customClassWrapper = '', customClassInputContainer = '', textAlign = 'left',\n labelUppercase = false, skeletonize = false, hintPosition = 'below', themePopover = 'light',\n popoverAlign = 'left', showCalendarButton = true, openCalendarOnFocus = true, undigitable = false, \n showClearDateButton = true, placeholder = TOKEN_PTBR_FORMAT, readOnly, disabled, ...rest\n } = props;\n const [calendarBoxOpen, setCalendarBoxOpen] = React.useState(false);\n const [activeDescendant, setActiveDescendant] = React.useState<string>(\n moment().format(TOKEN_ISO_FORMAT),\n );\n const [selectedDate, setSelectedDate] = React.useState<Moment | null>(null);\n const [calendarDisplayDate, setCalendarDisplayDate] = React.useState<Moment>(\n selectedDate ?? moment(),\n );\n const calendarRef = React.useRef<HTMLDivElement | null>(null);\n const inputRootRef = React.useRef<HTMLInputElement | null>(null);\n const dateInputRef = React.useRef<HTMLInputElement | null>(null);\n const dateContainerRef = React.useRef<HTMLDivElement | null>(null);\n\n const { setValue: setMaskValue, unmaskedValue, value: maskedValue } = useIMask(\n { mask: TOKEN_MASK, lazy: false, placeholderChar: '_' },\n {\n ref: dateInputRef,\n defaultValue: selectedDate?.format(TOKEN_PTBR_FORMAT),\n onComplete: (value) => {\n const date = moment(value, TOKEN_PTBR_FORMAT);\n if (date.isValid()) { handleUpdateDateState(date); }\n },\n },\n );\n\n const inputId = React.useMemo(() => props.id || props.name || uuid(), [props.id, props.name]);\n const hasLabel = !_.isEmpty(props?.label);\n const hasHintMessages = Boolean(props.hint?.length);\n const hasValidationErrors = Boolean(errors?.length);\n const hasValidDateSelected = !_.isEmpty(props?.value);\n\n const handleUpdateDateState = React.useCallback((date: Moment) => {\n const nonIsoDateFormat = date.format(TOKEN_ISO_FORMAT);\n const isoDateFormat = date.toISOString();\n setSelectedDate(date.clone());\n setCalendarDisplayDate(date.clone());\n props.onChange?.({\n target: {\n name: props.name,\n value: returnValueType === 'default' ? nonIsoDateFormat : isoDateFormat,\n },\n } as React.ChangeEvent<HTMLInputElement>);\n if (shouldCloseOnSelect) handleCloseCalendar();\n }, [selectedDate, props.name, props.onChange, shouldCloseOnSelect]);\n\n const handleOpenCalendar = React.useCallback(() => setCalendarBoxOpen(true), []);\n const handleCloseCalendar = React.useCallback(() => setCalendarBoxOpen(false), []);\n const handleNextMonth = React.useCallback(() => setCalendarDisplayDate(prevDisplayDate =>\n prevDisplayDate.clone().add(1, 'month')), []);\n const handlePreviousMonth = React.useCallback(() => setCalendarDisplayDate(prevDisplayDate =>\n prevDisplayDate.clone().subtract(1, 'month')), []);\n const handleChangeCalendarBoxState = React.useCallback(() => {\n setCalendarBoxOpen((prevState) => {\n if (dateInputRef.current !== document.activeElement) {\n dateInputRef?.current?.focus?.();\n }\n return !prevState;\n });\n }, []);\n const handleNavigateWithDays = React.useCallback((offset: number) => {\n setCalendarDisplayDate((prevDisplayDate) => {\n const daySelected = prevDisplayDate.clone().add(offset, 'day');\n setActiveDescendant(daySelected.format(TOKEN_ISO_FORMAT));\n return daySelected;\n });\n }, []);\n const handleNavigateWithWeeks = React.useCallback((when: 'start' | 'end') => {\n setCalendarDisplayDate((prevDisplayDate) => {\n let daySelected = prevDisplayDate;\n if (when === 'end') daySelected = prevDisplayDate.clone().endOf('week');\n if (when === 'start') daySelected = prevDisplayDate.clone().startOf('week');\n setActiveDescendant(daySelected.format(TOKEN_ISO_FORMAT));\n return daySelected;\n });\n }, []);\n\n const handleOnClickClearSelectedDate = React.useCallback(() => {\n props.onChange?.({\n target: { name: props.name, value: '' },\n } as React.ChangeEvent<HTMLInputElement>);\n setSelectedDate(null);\n setMaskValue('');\n handleCloseCalendar();\n }, [props.onChange]);\n\n const handleOnBlur = (event: React.FocusEvent<HTMLInputElement>) => {\n props?.onBlur?.(event);\n handleCloseCalendar();\n setActiveDescendant((selectedDate ?? moment()).format(TOKEN_ISO_FORMAT));\n setCalendarDisplayDate(selectedDate ?? moment());\n if (_.size(unmaskedValue) !== 8) {\n const date = moment(_.toString(props?.value), TOKEN_ISO_FORMAT);\n if (date.isValid()) { setMaskValue(date.format('DD/MM/YYYY')); }\n }\n };\n\n const handleOnFocus = (event: React.FocusEvent<HTMLInputElement>) => {\n props?.onFocus?.(event);\n setActiveDescendant((selectedDate ?? moment()).format(TOKEN_ISO_FORMAT));\n setCalendarDisplayDate(selectedDate ?? moment());\n if (!readOnly && openCalendarOnFocus) {\n handleOpenCalendar();\n }\n };\n\n const handleOnPaste = (event: React.ClipboardEvent<HTMLInputElement>) => {\n if (undigitable) {\n event.preventDefault();\n } else {\n props.onPaste?.(event);\n }\n };\n\n const handleOnBeforeInput = (event: React.InputEvent<HTMLInputElement>) => {\n if (undigitable) {\n event.preventDefault();\n } else {\n props.onBeforeInput?.(event);\n }\n };\n\n const handleOnKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n props?.onKeyDown?.(event);\n if (calendarBoxOpen && event.key && !event.shiftKey && \n !event.altKey && NAVIGATION_KEYS.includes(event.key)) {\n event.preventDefault();\n switch (event.key) {\n case Keys.arrowLeft: handleNavigateWithDays(-1);\n break;\n case Keys.arrowRight: handleNavigateWithDays(1);\n break;\n case Keys.arrowUp: handleNavigateWithDays(-7);\n break;\n case Keys.arrowDown: handleNavigateWithDays(7);\n break;\n case Keys.pageUp: handleNextMonth();\n break;\n case Keys.pageDown: handlePreviousMonth();\n break;\n case Keys.home: handleNavigateWithWeeks('start');\n break;\n case Keys.end: handleNavigateWithWeeks('end');\n break;\n case Keys.escape: handleCloseCalendar();\n break;\n case Keys.enter: handleUpdateDateState(\n moment(_.toString(activeDescendant), TOKEN_ISO_FORMAT),\n );\n break;\n default:\n break;\n }\n }\n };\n\n React.useEffect(() => {\n const currentValue = props?.value ?? null;\n const date = moment(_.toString(currentValue), TOKEN_ISO_FORMAT);\n setSelectedDate(date.isValid() ? date : null);\n setMaskValue(date.format(TOKEN_PTBR_FORMAT));\n }, [props?.value]);\n\n const contextValues = ({\n label, inputFieldId: inputId, activeDescendant, calendarBoxOpen, \n isReadOnly: Boolean(readOnly), isDisabled: Boolean(disabled), skeletonize, showCalendarButton,\n hasValidDateSelected, dateInputRef, dateContainerRef, handleOpenCalendar, \n handleCloseCalendar, handleNextMonth, handlePreviousMonth, \n handleSelectDate: handleUpdateDateState, selectedDate, unmaskedValue, maskedValue, \n showClearDateButton, handleChangeCalendarBoxState, handleOnClickClearSelectedDate,\n calendarDisplayDate, calendarRef,\n });\n\n return (\n <React.Fragment>\n <DateFieldContext.Provider value={contextValues}>\n <BaseDate.Root\n ref={inputRootRef}\n data-testid=\"test-date-field-root\"\n customClassWrapper={customClassWrapper}\n hasValidationErrors={hasValidationErrors}>\n {hasLabel && (\n <BaseDate.Label\n data-testid=\"test-date-field-label\"\n label={label}\n inputId={inputId}\n hint={props?.hint}\n isDisabled={disabled}\n isReadOnly={readOnly}\n skeletonize={skeletonize}\n required={props?.required}\n hintPosition={hintPosition}\n themePopover={themePopover}\n popoverAlign={popoverAlign}\n labelUppercase={labelUppercase}\n hasHintMessages={hasHintMessages}\n customClassLabel={customClassLabel} />\n )}\n <BaseDate.Container\n ref={dateContainerRef}\n skeletonize={skeletonize}\n customClassInputContainer={customClassInputContainer}>\n <BaseDate.Input\n {...rest}\n ref={mergeRefs(ref, dateInputRef)}\n id={inputId}\n name={props?.name}\n value={maskedValue}\n readOnly={readOnly}\n disabled={disabled}\n customClass={customClass}\n tabIndex={(!readOnly && !skeletonize) ? 0 : -1}\n placeholder={placeholder}\n aria-activedescendant={activeDescendant}\n aria-expanded={calendarBoxOpen}\n aria-controls={inputId}\n aria-labelledby={inputId}\n data-state-is-period-input={false}\n data-testid=\"test-date-field-input\"\n data-state-error={hasValidationErrors}\n data-state-read-only={readOnly}\n data-state-text-align={textAlign}\n data-state-undigitable={undigitable}\n data-state-skeletonize={skeletonize}\n onBlur={handleOnBlur}\n onFocus={handleOnFocus}\n onPaste={handleOnPaste}\n onKeyDown={handleOnKeyDown}\n onBeforeInput={handleOnBeforeInput} />\n <Triggers />\n </BaseDate.Container>\n {calendarBoxOpen &&\n createPortal(<CalendarBox ref={calendarRef} />, document.body)\n }\n {hintPosition === 'below' && (\n <Hint\n customClass=\"hint\"\n description={props.hint}\n disabled={disabled}\n skeletonize={skeletonize}\n visible={hasHintMessages} />\n )}\n {hasValidationErrors && (\n <span\n data-testid=\"test-date-field-list-errors\"\n className=\"error\"\n data-state-skeletonize={skeletonize}\n aria-describedby={String(props.name).concat('-errors')}>\n {errors?.map((error, index) => (\n <React.Fragment key={`${index + 1}-${error}`}>\n {error}\n {' '}\n </React.Fragment>\n ))}\n </span>\n )}\n </BaseDate.Root>\n </DateFieldContext.Provider>\n <Tooltip\n targetRef={inputRootRef}\n text={tooltip}\n width={tooltipWidth}\n position={tooltipPosition} />\n </React.Fragment>\n );\n });\n\nInputBase.displayName = 'DateFieldInputBase';\n"],"names":["InputBase","React","forwardRef","props","ref","label","errors","tooltip","tooltipPosition","tooltipWidth","shouldCloseOnSelect","returnValueType","customClass","customClassLabel","customClassWrapper","customClassInputContainer","textAlign","labelUppercase","skeletonize","hintPosition","themePopover","popoverAlign","showCalendarButton","openCalendarOnFocus","undigitable","showClearDateButton","placeholder","TOKEN_PTBR_FORMAT","readOnly","disabled","rest","calendarBoxOpen","setCalendarBoxOpen","useState","activeDescendant","setActiveDescendant","moment","format","TOKEN_ISO_FORMAT","selectedDate","setSelectedDate","calendarDisplayDate","setCalendarDisplayDate","calendarRef","useRef","inputRootRef","dateInputRef","dateContainerRef","setValue","setMaskValue","unmaskedValue","value","maskedValue","useIMask","mask","TOKEN_MASK","lazy","placeholderChar","defaultValue","onComplete","date","isValid","handleUpdateDateState","inputId","useMemo","id","name","uuid","hasLabel","_","isEmpty","hasHintMessages","Boolean","hint","length","hasValidationErrors","hasValidDateSelected","useCallback","nonIsoDateFormat","isoDateFormat","toISOString","clone","onChange","target","handleCloseCalendar","handleOpenCalendar","handleNextMonth","prevDisplayDate","add","handlePreviousMonth","subtract","handleChangeCalendarBoxState","prevState","current","document","activeElement","focus","handleNavigateWithDays","offset","daySelected","handleNavigateWithWeeks","when","endOf","startOf","handleOnClickClearSelectedDate","handleOnBlur","event","onBlur","size","toString","handleOnFocus","onFocus","handleOnPaste","preventDefault","onPaste","handleOnBeforeInput","onBeforeInput","handleOnKeyDown","onKeyDown","key","shiftKey","altKey","NAVIGATION_KEYS","includes","Keys","arrowLeft","arrowRight","arrowUp","arrowDown","pageUp","pageDown","home","end","escape","enter","useEffect","currentValue","contextValues","inputFieldId","isReadOnly","isDisabled","handleSelectDate","jsxs","jsx","DateFieldContext","BaseDate.Root","BaseDate.Label","required","BaseDate.Container","BaseDate.Input","mergeRefs","Triggers","createPortal","CalendarBox","body","Hint","String","concat","map","error","index","Tooltip","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAiBO,MAAMA,KACXC,EAAMC,WAAsD,CAACC,GAAOC,MAAQ;AAC1E,QAAM;AAAA,IACJC,OAAAA;AAAAA,IAAOC,QAAAA;AAAAA,IAAQC,SAAAA;AAAAA,IAASC,iBAAAA;AAAAA,IAAiBC,cAAAA;AAAAA,IAA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IAAA,EACC,aAAY,QACZ,aAAaxJ,EAAMsE,MACnB,UAAA5C,GACA,aAAAX,GACA,SAASqD,EAAAA,CAAgB;AAAA,MAE1BI,KACD,gBAAAoE,EAAC,QAAA,EACC,eAAY,+BACZ,WAAU,SACV,0BAAwB7H,GACxB,oBAAkB0I,OAAOzJ,EAAM+D,IAAI,EAAE2F,OAAO,SAAS,GACpDvJ,UAAAA,GAAQwJ,IAAI,CAACC,GAAOC,MACnB,gBAAAlB,EAAC7I,EAAM,UAAN,EACE8J,UAAAA;AAAAA,QAAAA;AAAAA,QACA;AAAA,MAAA,EAAA,GAFkB,GAAGC,IAAQ,CAAC,IAAID,CAAK,EAG1C,CACD,EAAA,CACH;AAAA,IAAA,EAAA,CAEF,EAAA,CACF;AAAA,IACA,gBAAAhB,EAACkB,MACC,WAAWpH,GACX,MAAMtC,GACN,OAAOE,GACP,UAAUD,EAAAA,CAAgB;AAAA,EAAA,GAC9B;AAEJ,CAAC;AAEHR,GAAUkK,cAAc;"}
1
+ {"version":3,"file":"base.js","sources":["../../../../src/lib/inputs2/date/datefield/base.tsx"],"sourcesContent":["import React from 'react';\nimport _ from 'lodash';\nimport { useIMask } from 'react-imask';\nimport { v1 as uuid } from 'uuid';\nimport { createPortal } from 'react-dom';\nimport moment, { type Moment } from 'moment';\nimport Hint from '../../../hint';\nimport { Tooltip } from '../../../tooltip';\nimport { mergeRefs } from '../../../form2/helpers';\nimport { Keys } from '../types';\nimport * as BaseDate from '../base';\nimport { NAVIGATION_KEYS, TOKEN_ISO_FORMAT, TOKEN_MASK, TOKEN_PTBR_FORMAT } from '../helpers';\nimport { Triggers } from './triggers';\nimport { CalendarBox } from './calendarbox';\nimport { DateFieldContext } from './context';\nimport type { DateFieldInputBaseProps } from './types';\n\nexport const InputBase = \n React.forwardRef<HTMLInputElement, DateFieldInputBaseProps>((props, ref) => {\n const {\n label, errors, tooltip, tooltipPosition, tooltipWidth, shouldCloseOnSelect = true, returnValueType = 'default',\n customClass = '', customClassLabel = '', customClassWrapper = '', customClassInputContainer = '', textAlign = 'left',\n labelUppercase = false, skeletonize = false, hintPosition = 'below', themePopover = 'light',\n popoverAlign = 'left', showCalendarButton = true, openCalendarOnFocus = true, undigitable = false, \n showClearDateButton = true, placeholder = TOKEN_PTBR_FORMAT, readOnly, disabled, ...rest\n } = props;\n const [calendarBoxOpen, setCalendarBoxOpen] = React.useState(false);\n const [activeDescendant, setActiveDescendant] = React.useState<string>(\n moment().format(TOKEN_ISO_FORMAT),\n );\n const [selectedDate, setSelectedDate] = React.useState<Moment | null>(null);\n const [calendarDisplayDate, setCalendarDisplayDate] = React.useState<Moment>(\n selectedDate ?? moment(),\n );\n const calendarRef = React.useRef<HTMLDivElement | null>(null);\n const inputRootRef = React.useRef<HTMLInputElement | null>(null);\n const dateInputRef = React.useRef<HTMLInputElement | null>(null);\n const dateContainerRef = React.useRef<HTMLDivElement | null>(null);\n\n const { setValue: setMaskValue, unmaskedValue, value: maskedValue } = useIMask(\n { mask: TOKEN_MASK, lazy: false, placeholderChar: '_' },\n {\n ref: dateInputRef,\n defaultValue: selectedDate?.format(TOKEN_PTBR_FORMAT),\n onComplete: (value) => {\n const date = moment(value, TOKEN_PTBR_FORMAT);\n if (date.isValid()) { handleUpdateDateState(date); }\n },\n },\n );\n\n const inputId = React.useMemo(() => props.id || props.name || uuid(), [props.id, props.name]);\n const hasLabel = !_.isEmpty(props?.label);\n const hasHintMessages = Boolean(props.hint?.length);\n const hasValidationErrors = Boolean(errors?.length);\n const hasValidDateSelected = !_.isEmpty(props?.value);\n\n const handleUpdateDateState = React.useCallback((date: Moment) => {\n const nonIsoDateFormat = date.format(TOKEN_ISO_FORMAT);\n const isoDateFormat = date.toISOString();\n setSelectedDate(date.clone());\n setCalendarDisplayDate(date.clone());\n props.onChange?.({\n target: {\n name: props.name,\n value: returnValueType === 'default' ? nonIsoDateFormat : isoDateFormat,\n },\n } as React.ChangeEvent<HTMLInputElement>);\n if (shouldCloseOnSelect) handleCloseCalendar();\n }, [selectedDate, props.name, props.onChange, shouldCloseOnSelect]);\n\n const handleOpenCalendar = React.useCallback(() => setCalendarBoxOpen(true), []);\n const handleCloseCalendar = React.useCallback(() => setCalendarBoxOpen(false), []);\n const handleNextMonth = React.useCallback(() => setCalendarDisplayDate(prevDisplayDate =>\n prevDisplayDate.clone().add(1, 'month')), []);\n const handlePreviousMonth = React.useCallback(() => setCalendarDisplayDate(prevDisplayDate =>\n prevDisplayDate.clone().subtract(1, 'month')), []);\n const handleChangeCalendarBoxState = React.useCallback(() => {\n setCalendarBoxOpen((prevState) => {\n if (dateInputRef.current !== document.activeElement) {\n dateInputRef?.current?.focus?.();\n }\n return !prevState;\n });\n }, []);\n const handleNavigateWithDays = React.useCallback((offset: number) => {\n setCalendarDisplayDate((prevDisplayDate) => {\n const daySelected = prevDisplayDate.clone().add(offset, 'day');\n setActiveDescendant(daySelected.format(TOKEN_ISO_FORMAT));\n return daySelected;\n });\n }, []);\n const handleNavigateWithWeeks = React.useCallback((when: 'start' | 'end') => {\n setCalendarDisplayDate((prevDisplayDate) => {\n let daySelected = prevDisplayDate;\n if (when === 'end') daySelected = prevDisplayDate.clone().endOf('week');\n if (when === 'start') daySelected = prevDisplayDate.clone().startOf('week');\n setActiveDescendant(daySelected.format(TOKEN_ISO_FORMAT));\n return daySelected;\n });\n }, []);\n\n const handleOnClickClearSelectedDate = React.useCallback(() => {\n props.onChange?.({\n target: { name: props.name, value: '' },\n } as React.ChangeEvent<HTMLInputElement>);\n setSelectedDate(null);\n setMaskValue('');\n handleCloseCalendar();\n }, [props.onChange]);\n\n const handleOnBlur = (event: React.FocusEvent<HTMLInputElement>) => {\n props?.onBlur?.(event);\n handleCloseCalendar();\n setActiveDescendant((selectedDate ?? moment()).format(TOKEN_ISO_FORMAT));\n setCalendarDisplayDate(selectedDate ?? moment());\n if (_.size(unmaskedValue) !== 8) {\n const date = moment(_.toString(props?.value), TOKEN_ISO_FORMAT);\n if (date.isValid()) { setMaskValue(date.format('DD/MM/YYYY')); }\n }\n };\n\n const handleOnFocus = (event: React.FocusEvent<HTMLInputElement>) => {\n props?.onFocus?.(event);\n setActiveDescendant((selectedDate ?? moment()).format(TOKEN_ISO_FORMAT));\n setCalendarDisplayDate(selectedDate ?? moment());\n if (!readOnly && openCalendarOnFocus) {\n handleOpenCalendar();\n }\n };\n\n const handleOnPaste = (event: React.ClipboardEvent<HTMLInputElement>) => {\n if (undigitable) {\n event.preventDefault();\n } else {\n props.onPaste?.(event);\n }\n };\n\n const handleOnBeforeInput = (event: React.InputEvent<HTMLInputElement>) => {\n if (undigitable) {\n event.preventDefault();\n } else {\n props.onBeforeInput?.(event);\n }\n };\n\n const handleOnKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n props?.onKeyDown?.(event);\n if (calendarBoxOpen && event.key && !event.shiftKey && \n !event.altKey && NAVIGATION_KEYS.includes(event.key)) {\n event.preventDefault();\n switch (event.key) {\n case Keys.arrowLeft: handleNavigateWithDays(-1);\n break;\n case Keys.arrowRight: handleNavigateWithDays(1);\n break;\n case Keys.arrowUp: handleNavigateWithDays(-7);\n break;\n case Keys.arrowDown: handleNavigateWithDays(7);\n break;\n case Keys.pageUp: handleNextMonth();\n break;\n case Keys.pageDown: handlePreviousMonth();\n break;\n case Keys.home: handleNavigateWithWeeks('start');\n break;\n case Keys.end: handleNavigateWithWeeks('end');\n break;\n case Keys.escape: handleCloseCalendar();\n break;\n case Keys.enter: handleUpdateDateState(\n moment(_.toString(activeDescendant), TOKEN_ISO_FORMAT),\n );\n break;\n default:\n break;\n }\n }\n };\n\n React.useEffect(() => {\n const currentValue = props?.value ?? null;\n const date = moment(_.toString(currentValue), TOKEN_ISO_FORMAT);\n setSelectedDate(date.isValid() ? date : null);\n setMaskValue(date.format(TOKEN_PTBR_FORMAT));\n }, [props?.value]);\n\n const contextValues = ({\n label, inputFieldId: inputId, activeDescendant, calendarBoxOpen, \n isReadOnly: Boolean(readOnly), isDisabled: Boolean(disabled), skeletonize, showCalendarButton,\n hasValidDateSelected, dateInputRef, dateContainerRef, handleOpenCalendar, \n handleCloseCalendar, handleNextMonth, handlePreviousMonth, \n handleSelectDate: handleUpdateDateState, selectedDate, unmaskedValue, maskedValue, \n showClearDateButton, handleChangeCalendarBoxState, handleOnClickClearSelectedDate,\n calendarDisplayDate, calendarRef,\n });\n\n return (\n <React.Fragment>\n <DateFieldContext.Provider value={contextValues}>\n <BaseDate.Root\n ref={inputRootRef}\n data-testid=\"test-date-field-root\"\n customClassWrapper={customClassWrapper}\n hasValidationErrors={hasValidationErrors}>\n {hasLabel && (\n <BaseDate.Label\n data-testid=\"test-date-field-label\"\n label={label}\n inputId={inputId}\n hint={props?.hint}\n isDisabled={disabled}\n isReadOnly={readOnly}\n skeletonize={skeletonize}\n required={props?.required}\n hintPosition={hintPosition}\n themePopover={themePopover}\n popoverAlign={popoverAlign}\n labelUppercase={labelUppercase}\n hasHintMessages={hasHintMessages}\n customClassLabel={customClassLabel} />\n )}\n <BaseDate.Container\n ref={dateContainerRef}\n skeletonize={skeletonize}\n customClassInputContainer={customClassInputContainer}>\n <BaseDate.Input\n {...rest}\n ref={mergeRefs(ref, dateInputRef)}\n id={inputId}\n name={props?.name}\n value={maskedValue}\n readOnly={readOnly}\n disabled={disabled}\n customClass={customClass}\n tabIndex={(!readOnly && !skeletonize) ? 0 : -1}\n placeholder={placeholder}\n aria-activedescendant={activeDescendant}\n aria-expanded={calendarBoxOpen}\n aria-controls={inputId}\n aria-labelledby={inputId}\n data-state-is-period-input={false}\n data-testid=\"test-date-field-input\"\n data-state-error={hasValidationErrors}\n data-state-read-only={readOnly}\n data-state-text-align={textAlign}\n data-state-undigitable={undigitable}\n data-state-skeletonize={skeletonize}\n onBlur={handleOnBlur}\n onFocus={handleOnFocus}\n onPaste={handleOnPaste}\n onKeyDown={handleOnKeyDown}\n onBeforeInput={handleOnBeforeInput} />\n <Triggers />\n </BaseDate.Container>\n {calendarBoxOpen &&\n createPortal(<CalendarBox ref={calendarRef} />, document.body)\n }\n {hintPosition === 'below' && (\n <Hint\n customClass=\"hint\"\n description={props.hint}\n disabled={disabled}\n skeletonize={skeletonize}\n visible={hasHintMessages} />\n )}\n {hasValidationErrors && (\n <span\n data-testid=\"test-date-field-list-errors\"\n className=\"error\"\n data-state-skeletonize={skeletonize}\n aria-describedby={String(props.name).concat('-errors')}>\n {errors?.map((error, index) => (\n <React.Fragment key={`${index + 1}-${error}`}>\n {error}\n {' '}\n </React.Fragment>\n ))}\n </span>\n )}\n </BaseDate.Root>\n </DateFieldContext.Provider>\n <Tooltip\n targetRef={inputRootRef}\n text={tooltip}\n width={tooltipWidth}\n position={tooltipPosition} />\n </React.Fragment>\n );\n });\n\nInputBase.displayName = 'DateFieldInputBase';\n"],"names":["InputBase","React","forwardRef","props","ref","label","errors","tooltip","tooltipPosition","tooltipWidth","shouldCloseOnSelect","returnValueType","customClass","customClassLabel","customClassWrapper","customClassInputContainer","textAlign","labelUppercase","skeletonize","hintPosition","themePopover","popoverAlign","showCalendarButton","openCalendarOnFocus","undigitable","showClearDateButton","placeholder","TOKEN_PTBR_FORMAT","readOnly","disabled","rest","calendarBoxOpen","setCalendarBoxOpen","useState","activeDescendant","setActiveDescendant","moment","format","TOKEN_ISO_FORMAT","selectedDate","setSelectedDate","calendarDisplayDate","setCalendarDisplayDate","calendarRef","useRef","inputRootRef","dateInputRef","dateContainerRef","setValue","setMaskValue","unmaskedValue","value","maskedValue","useIMask","mask","TOKEN_MASK","lazy","placeholderChar","defaultValue","onComplete","date","isValid","handleUpdateDateState","inputId","useMemo","id","name","uuid","hasLabel","_","isEmpty","hasHintMessages","Boolean","hint","length","hasValidationErrors","hasValidDateSelected","useCallback","nonIsoDateFormat","isoDateFormat","toISOString","clone","onChange","target","handleCloseCalendar","handleOpenCalendar","handleNextMonth","prevDisplayDate","add","handlePreviousMonth","subtract","handleChangeCalendarBoxState","prevState","current","document","activeElement","focus","handleNavigateWithDays","offset","daySelected","handleNavigateWithWeeks","when","endOf","startOf","handleOnClickClearSelectedDate","handleOnBlur","event","onBlur","size","toString","handleOnFocus","onFocus","handleOnPaste","preventDefault","onPaste","handleOnBeforeInput","onBeforeInput","handleOnKeyDown","onKeyDown","key","shiftKey","altKey","NAVIGATION_KEYS","includes","Keys","arrowLeft","arrowRight","arrowUp","arrowDown","pageUp","pageDown","home","end","escape","enter","useEffect","currentValue","contextValues","inputFieldId","isReadOnly","isDisabled","handleSelectDate","jsxs","jsx","DateFieldContext","BaseDate.Root","BaseDate.Label","required","BaseDate.Container","BaseDate.Input","mergeRefs","Triggers","createPortal","CalendarBox","body","Hint","String","concat","map","error","index","Tooltip","displayName"],"mappings":";;;;;;;;;;;;;;;;AAiBO,MAAMA,KACXC,EAAMC,WAAsD,CAACC,GAAOC,MAAQ;AAC1E,QAAM;AAAA,IACJC,OAAAA;AAAAA,IAAOC,QAAAA;AAAAA,IAAQC,SAAAA;AAAAA,IAASC,iBAAAA;AAAAA,IAAiBC,cAAAA;AAAAA,IAAcC,qBAAAA,IAAsB;AAAA,IAAMC,iBAAAA,IAAkB;AAAA,IACrGC,aAAAA,IAAc;AAAA,IAAIC,kBAAAA,IAAmB;AAAA,IAAIC,oBAAAA,IAAqB;AAAA,IAAIC,2BAAAA,IAA4B;AAAA,IAAIC,WAAAA,IAAY;AAAA,IAC9GC,gBAAAA,KAAiB;AAAA,IAAOC,aAAAA,IAAc;AAAA,IAAOC,cAAAA,IAAe;AAAA,IAASC,cAAAA,KAAe;AAAA,IACpFC,cAAAA,KAAe;AAAA,IAAQC,oBAAAA,KAAqB;AAAA,IAAMC,qBAAAA,KAAsB;AAAA,IAAMC,aAAAA,IAAc;AAAA,IAC5FC,qBAAAA,KAAsB;AAAA,IAAMC,aAAAA,KAAcC;AAAAA,IAAmBC,UAAAA;AAAAA,IAAUC,UAAAA;AAAAA,IAAU,GAAGC;AAAAA,EAAAA,IAClF3B,GACE,CAAC4B,GAAiBC,CAAkB,IAAI/B,EAAMgC,SAAS,EAAK,GAC5D,CAACC,GA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@ -2,17 +2,7 @@ import { jsx as C, jsxs as Je } from "react/jsx-runtime";
2
2
  import { c as ua } from "../../../_virtual/compiler-runtime.js";
3
3
  import S from "react";
4
4
  import w from "../../../_virtual/lodash.js";
5
- import "../../../node_modules/imask/esm/index.js";
6
- import "../../../node_modules/imask/esm/controls/input.js";
7
- import "../../../node_modules/imask/esm/masked/factory.js";
8
- import "../../../node_modules/imask/esm/controls/mask-element.js";
9
- import "../../../node_modules/imask/esm/controls/html-input-mask-element.js";
10
- import "../../../node_modules/imask/esm/controls/html-mask-element.js";
11
- import "../../../node_modules/imask/esm/controls/html-contenteditable-mask-element.js";
12
- import "../../../node_modules/imask/esm/controls/input-history.js";
13
- import "../../../node_modules/react-imask/esm/input.js";
14
- import Zt from "../../../node_modules/react-imask/esm/hook.js";
15
- import "../../../node_modules/react-imask/esm/mixin.js";
5
+ import { useIMask as Zt } from "react-imask";
16
6
  import { createPortal as ma } from "react-dom";
17
7
  import o from "../../../node_modules/moment/dist/moment.js";
18
8
  import ha from "../../../hint/index.js";
@@ -22,18 +12,18 @@ import { mergeRefs as ea } from "../../../form2/helpers.js";
22
12
  import { Keys as V } from "../types.js";
23
13
  import * as ga from "../base/index.js";
24
14
  import { Label as ka, Root as Sa, Container as Oa, Input as _a } from "../base/index.js";
25
- import { TOKEN_ISO_FORMAT as d, TOKEN_PTBR_FORMAT as D, TOKEN_MASK as ta, NAVIGATION_KEYS as Ca } from "../helpers.js";
15
+ import { TOKEN_ISO_FORMAT as d, TOKEN_PTBR_FORMAT as B, TOKEN_MASK as ta, NAVIGATION_KEYS as Ca } from "../helpers.js";
26
16
  import { Triggers as va } from "./triggers.js";
27
17
  import { CalendarBox as Ia } from "./calendarbox.js";
28
18
  import { DatePeriodFieldContext as wa } from "./context.js";
29
19
  const Va = S.forwardRef((t, M) => {
30
20
  const e = ua.c(193), {
31
- label: B,
21
+ label: P,
32
22
  errors: Z,
33
- initialName: Dt,
34
- finalName: Bt,
35
- customClass: Pt,
36
- customClassLabel: xt,
23
+ initialName: Bt,
24
+ finalName: Pt,
25
+ customClass: xt,
26
+ customClassLabel: pt,
37
27
  customClassWrapper: Mt,
38
28
  customClassInputContainer: Ft,
39
29
  labelUppercase: Nt,
@@ -56,7 +46,7 @@ const Va = S.forwardRef((t, M) => {
56
46
  disabled: y,
57
47
  readOnly: c,
58
48
  ...Yt
59
- } = t, f = Dt === void 0 ? "inicial" : Dt, u = Bt === void 0 ? "final" : Bt, ee = Pt === void 0 ? "" : Pt, et = xt === void 0 ? "" : xt, aa = Mt === void 0 ? "" : Mt, na = Ft === void 0 ? "" : Ft, tt = Nt === void 0 ? !1 : Nt, g = Kt === void 0 ? !1 : Kt, r = Tt === void 0 ? !1 : Tt, N = At === void 0 ? "below" : At, at = Wt === void 0 ? "light" : Wt, nt = zt === void 0 ? "left" : zt, it = Et === void 0 ? !0 : Et, te = Lt === void 0 ? "left" : Lt, K = Ut === void 0 ? !0 : Ut, ae = qt === void 0 ? !0 : qt, lt = jt === void 0 ? !0 : jt, ot = $t === void 0 ? !0 : $t, ne = Ht === void 0 ? D : Ht, P = Gt === void 0 ? "default" : Gt;
49
+ } = t, f = Bt === void 0 ? "inicial" : Bt, u = Pt === void 0 ? "final" : Pt, ee = xt === void 0 ? "" : xt, et = pt === void 0 ? "" : pt, aa = Mt === void 0 ? "" : Mt, na = Ft === void 0 ? "" : Ft, tt = Nt === void 0 ? !1 : Nt, g = Kt === void 0 ? !1 : Kt, r = Tt === void 0 ? !1 : Tt, N = At === void 0 ? "below" : At, at = Wt === void 0 ? "light" : Wt, nt = zt === void 0 ? "left" : zt, it = Et === void 0 ? !0 : Et, te = Lt === void 0 ? "left" : Lt, K = Ut === void 0 ? !0 : Ut, ae = qt === void 0 ? !0 : qt, lt = jt === void 0 ? !0 : jt, ot = $t === void 0 ? !0 : $t, ne = Ht === void 0 ? B : Ht, x = Gt === void 0 ? "default" : Gt;
60
50
  let ie;
61
51
  e[0] === Symbol.for("react.memo_cache_sentinel") ? (ie = {
62
52
  inicial: null,
@@ -82,17 +72,17 @@ const Va = S.forwardRef((t, M) => {
82
72
  placeholderChar: "_"
83
73
  }, e[9] = re) : re = e[9];
84
74
  let de;
85
- e[10] !== l.inicial ? (de = l.inicial?.format(D), e[10] = l.inicial, e[11] = de) : de = e[11];
75
+ e[10] !== l.inicial ? (de = l.inicial?.format(B), e[10] = l.inicial, e[11] = de) : de = e[11];
86
76
  const {
87
77
  value: oa,
88
- setValue: p,
78
+ setValue: R,
89
79
  unmaskedValue: rt
90
80
  } = Zt(re, {
91
81
  ref: ct,
92
82
  defaultValue: de,
93
83
  onComplete: (a) => {
94
- const i = o(a, D);
95
- i.isValid() && x({
84
+ const i = o(a, B);
85
+ i.isValid() && p({
96
86
  date: i,
97
87
  inputType: "initial",
98
88
  typing: !0
@@ -106,17 +96,17 @@ const Va = S.forwardRef((t, M) => {
106
96
  placeholderChar: "_"
107
97
  }, e[12] = fe) : fe = e[12];
108
98
  let ue;
109
- e[13] !== l.final ? (ue = l.final?.format(D), e[13] = l.final, e[14] = ue) : ue = e[14];
99
+ e[13] !== l.final ? (ue = l.final?.format(B), e[13] = l.final, e[14] = ue) : ue = e[14];
110
100
  const {
111
101
  value: dt,
112
- setValue: R,
102
+ setValue: D,
113
103
  unmaskedValue: ft
114
104
  } = Zt(fe, {
115
105
  ref: Y,
116
106
  defaultValue: ue,
117
107
  onComplete: (a) => {
118
- const i = o(a, D);
119
- i.isValid() && x({
108
+ const i = o(a, B);
109
+ i.isValid() && p({
120
110
  date: i,
121
111
  inputType: "final",
122
112
  typing: !0
@@ -139,10 +129,10 @@ const Va = S.forwardRef((t, M) => {
139
129
  e[20] === Symbol.for("react.memo_cache_sentinel") ? (ge = (a) => I(a), e[20] = ge) : ge = e[20];
140
130
  const ht = ge;
141
131
  let ke;
142
- e[21] === Symbol.for("react.memo_cache_sentinel") ? (ke = () => I(pa), e[21] = ke) : ke = e[21];
132
+ e[21] === Symbol.for("react.memo_cache_sentinel") ? (ke = () => I(Ra), e[21] = ke) : ke = e[21];
143
133
  const W = ke;
144
134
  let Se;
145
- e[22] === Symbol.for("react.memo_cache_sentinel") ? (Se = () => I(Ra), e[22] = Se) : Se = e[22];
135
+ e[22] === Symbol.for("react.memo_cache_sentinel") ? (Se = () => I(Da), e[22] = Se) : Se = e[22];
146
136
  const z = Se;
147
137
  let Oe;
148
138
  e[23] !== h ? (Oe = (a) => {
@@ -167,7 +157,7 @@ const Va = S.forwardRef((t, M) => {
167
157
  }, e[27] = u, e[28] = f, e[29] = t.value, e[30] = ve) : ve = e[30];
168
158
  const sa = ve;
169
159
  let Ie;
170
- e[31] !== u || e[32] !== m || e[33] !== f || e[34] !== t || e[35] !== R || e[36] !== p ? (Ie = () => {
160
+ e[31] !== u || e[32] !== m || e[33] !== f || e[34] !== t || e[35] !== D || e[36] !== R ? (Ie = () => {
171
161
  t.onChange?.({
172
162
  target: {
173
163
  name: t.name,
@@ -176,24 +166,24 @@ const Va = S.forwardRef((t, M) => {
176
166
  [u]: ""
177
167
  }
178
168
  }
179
- }), T(Da), p(""), R(""), m(!1);
180
- }, e[31] = u, e[32] = m, e[33] = f, e[34] = t, e[35] = R, e[36] = p, e[37] = Ie) : Ie = e[37];
181
- const bt = Ie, x = (a) => {
169
+ }), T(Ba), R(""), D(""), m(!1);
170
+ }, e[31] = u, e[32] = m, e[33] = f, e[34] = t, e[35] = D, e[36] = R, e[37] = Ie) : Ie = e[37];
171
+ const bt = Ie, p = (a) => {
182
172
  const {
183
173
  date: i,
184
174
  inputType: n,
185
175
  typing: b
186
- } = a, F = i.clone(), J = Ba;
176
+ } = a, F = i.clone(), J = Pa;
187
177
  e: switch (n) {
188
178
  case "initial": {
189
179
  T((Vt) => {
190
180
  const {
191
- inicial: pt,
192
- final: Rt
181
+ inicial: Rt,
182
+ final: Dt
193
183
  } = J(F, Vt.final);
194
184
  return {
195
- inicial: pt,
196
- final: Rt
185
+ inicial: Rt,
186
+ final: Dt
197
187
  };
198
188
  });
199
189
  const {
@@ -204,8 +194,8 @@ const Va = S.forwardRef((t, M) => {
204
194
  target: {
205
195
  name: t.name,
206
196
  value: {
207
- [f]: P === "default" ? Q?.format(d) : Q?.toISOString(),
208
- [u]: P === "default" ? X?.format(d) : X?.toISOString()
197
+ [f]: x === "default" ? Q?.format(d) : Q?.toISOString(),
198
+ [u]: x === "default" ? X?.format(d) : X?.toISOString()
209
199
  }
210
200
  }
211
201
  }), requestAnimationFrame(() => {
@@ -216,12 +206,12 @@ const Va = S.forwardRef((t, M) => {
216
206
  case "final": {
217
207
  T((Vt) => {
218
208
  const {
219
- inicial: pt,
220
- final: Rt
209
+ inicial: Rt,
210
+ final: Dt
221
211
  } = J(Vt.inicial, F);
222
212
  return {
223
- inicial: pt,
224
- final: Rt
213
+ inicial: Rt,
214
+ final: Dt
225
215
  };
226
216
  });
227
217
  const {
@@ -232,8 +222,8 @@ const Va = S.forwardRef((t, M) => {
232
222
  target: {
233
223
  name: t.name,
234
224
  value: {
235
- [f]: P === "default" ? Q?.format(d) : Q?.toISOString(),
236
- [u]: P === "default" ? X?.format(d) : X?.toISOString()
225
+ [f]: x === "default" ? Q?.format(d) : Q?.toISOString(),
226
+ [u]: x === "default" ? X?.format(d) : X?.toISOString()
237
227
  }
238
228
  }
239
229
  }), ae && m(!1);
@@ -243,11 +233,11 @@ const Va = S.forwardRef((t, M) => {
243
233
  I(F.clone());
244
234
  };
245
235
  let we;
246
- e[38] !== u || e[39] !== m || e[40] !== f || e[41] !== t || e[42] !== P || e[43] !== ae ? (we = (a) => {
236
+ e[38] !== u || e[39] !== m || e[40] !== f || e[41] !== t || e[42] !== x || e[43] !== ae ? (we = (a) => {
247
237
  const i = (n, b) => {
248
238
  const F = {
249
- [f]: P === "default" ? n.format(d) : n.toISOString(),
250
- [u]: P === "default" ? b.format(d) : b.toISOString()
239
+ [f]: x === "default" ? n.format(d) : n.toISOString(),
240
+ [u]: x === "default" ? b.format(d) : b.toISOString()
251
241
  };
252
242
  T(() => ({
253
243
  inicial: n.clone(),
@@ -292,47 +282,47 @@ const Va = S.forwardRef((t, M) => {
292
282
  }
293
283
  }
294
284
  Y?.current?.focus?.(), ae && m(!1);
295
- }, e[38] = u, e[39] = m, e[40] = f, e[41] = t, e[42] = P, e[43] = ae, e[44] = we) : we = e[44];
285
+ }, e[38] = u, e[39] = m, e[40] = f, e[41] = t, e[42] = x, e[43] = ae, e[44] = we) : we = e[44];
296
286
  const yt = we;
297
287
  let Ve;
298
- e[45] !== s || e[46] !== O || e[47] !== ft || e[48] !== h || e[49] !== m || e[50] !== k || e[51] !== rt || e[52] !== t || e[53] !== l.final || e[54] !== l.inicial || e[55] !== R || e[56] !== p ? (Ve = (a, i) => {
288
+ e[45] !== s || e[46] !== O || e[47] !== ft || e[48] !== h || e[49] !== m || e[50] !== k || e[51] !== rt || e[52] !== t || e[53] !== l.final || e[54] !== l.inicial || e[55] !== D || e[56] !== R ? (Ve = (a, i) => {
299
289
  if (t?.onBlur?.(a), i === "initial" && (a.relatedTarget?.id !== O && m(!1), s && (h((l.inicial ?? o()).format(d)), I(l.inicial ?? o())), w.size(rt) !== 8)) {
300
290
  const n = o(l.inicial, d);
301
- n.isValid() && p(n.format(D));
291
+ n.isValid() && R(n.format(B));
302
292
  }
303
293
  if (i === "final" && (a.relatedTarget?.id !== k && m(!1), s && (h((l.final ?? o()).format(d)), I(l.final ?? o())), w.size(ft) !== 8)) {
304
294
  const n = o(l.final, d);
305
- n.isValid() && R(n.format(D));
295
+ n.isValid() && D(n.format(B));
306
296
  }
307
- }, e[45] = s, e[46] = O, e[47] = ft, e[48] = h, e[49] = m, e[50] = k, e[51] = rt, e[52] = t, e[53] = l.final, e[54] = l.inicial, e[55] = R, e[56] = p, e[57] = Ve) : Ve = e[57];
297
+ }, e[45] = s, e[46] = O, e[47] = ft, e[48] = h, e[49] = m, e[50] = k, e[51] = rt, e[52] = t, e[53] = l.final, e[54] = l.inicial, e[55] = D, e[56] = R, e[57] = Ve) : Ve = e[57];
308
298
  const L = Ve;
309
- let pe;
310
- e[58] !== s || e[59] !== h || e[60] !== K || e[61] !== t || e[62] !== c || e[63] !== l.final || e[64] !== l.inicial ? (pe = (a, i) => {
311
- t?.onFocus?.(a), !c && !s && K && Jt(!0), i === "initial" && (h((l.inicial ?? o()).format(d)), I(l.inicial ?? o())), i === "final" && (h((l.final ?? o()).format(d)), I(l.final ?? o()));
312
- }, e[58] = s, e[59] = h, e[60] = K, e[61] = t, e[62] = c, e[63] = l.final, e[64] = l.inicial, e[65] = pe) : pe = e[65];
313
- const U = pe;
314
299
  let Re;
315
- e[66] !== v || e[67] !== s || e[68] !== x || e[69] !== t ? (Re = (a, i) => {
300
+ e[58] !== s || e[59] !== h || e[60] !== K || e[61] !== t || e[62] !== c || e[63] !== l.final || e[64] !== l.inicial ? (Re = (a, i) => {
301
+ t?.onFocus?.(a), !c && !s && K && Jt(!0), i === "initial" && (h((l.inicial ?? o()).format(d)), I(l.inicial ?? o())), i === "final" && (h((l.final ?? o()).format(d)), I(l.final ?? o()));
302
+ }, e[58] = s, e[59] = h, e[60] = K, e[61] = t, e[62] = c, e[63] = l.final, e[64] = l.inicial, e[65] = Re) : Re = e[65];
303
+ const U = Re;
304
+ let De;
305
+ e[66] !== v || e[67] !== s || e[68] !== p || e[69] !== t ? (De = (a, i) => {
316
306
  if (t?.onKeyDown?.(a), s && a.key && !a.shiftKey && !a.altKey && a.key === V.enter) {
317
307
  a.preventDefault();
318
308
  const n = o(w.toString(v), d);
319
- x({
309
+ p({
320
310
  date: n,
321
311
  inputType: i
322
312
  });
323
313
  }
324
- }, e[66] = v, e[67] = s, e[68] = x, e[69] = t, e[70] = Re) : Re = e[70];
325
- const q = Re;
326
- let De;
327
- e[71] !== t || e[72] !== g ? (De = (a) => {
314
+ }, e[66] = v, e[67] = s, e[68] = p, e[69] = t, e[70] = De) : De = e[70];
315
+ const q = De;
316
+ let Be;
317
+ e[71] !== t || e[72] !== g ? (Be = (a) => {
328
318
  g ? a.preventDefault() : t.onPaste?.(a);
329
- }, e[71] = t, e[72] = g, e[73] = De) : De = e[73];
330
- const Be = De;
331
- let Pe;
332
- e[74] !== t || e[75] !== g ? (Pe = (a) => {
319
+ }, e[71] = t, e[72] = g, e[73] = Be) : Be = e[73];
320
+ const Pe = Be;
321
+ let xe;
322
+ e[74] !== t || e[75] !== g ? (xe = (a) => {
333
323
  g ? a.preventDefault() : t.onBeforeInput?.(a);
334
- }, e[74] = t, e[75] = g, e[76] = Pe) : Pe = e[76];
335
- const xe = Pe;
324
+ }, e[74] = t, e[75] = g, e[76] = xe) : xe = e[76];
325
+ const pe = xe;
336
326
  let Me;
337
327
  e[77] !== s || e[78] !== m || e[79] !== z || e[80] !== W || e[81] !== E || e[82] !== Ce ? (Me = (a) => {
338
328
  if (s && a.key && !a.shiftKey && !a.altKey && Ca.includes(a.key)) {
@@ -379,21 +369,21 @@ const Va = S.forwardRef((t, M) => {
379
369
  }, e[77] = s, e[78] = m, e[79] = z, e[80] = W, e[81] = E, e[82] = Ce, e[83] = Me) : Me = e[83];
380
370
  const ca = Me;
381
371
  let Fe;
382
- e[84] !== u || e[85] !== f || e[86] !== t.value || e[87] !== R || e[88] !== p ? (Fe = () => {
372
+ e[84] !== u || e[85] !== f || e[86] !== t.value || e[87] !== D || e[88] !== R ? (Fe = () => {
383
373
  if (t?.value) {
384
374
  const a = t.value, i = o(w.toString(a[f]), d), n = o(w.toString(a[u]), d);
385
375
  T(() => ({
386
376
  inicial: i.isValid() ? i : null,
387
377
  final: n.isValid() ? n : null
388
- })), p(i.format(D)), R(n.format(D));
378
+ })), R(i.format(B)), D(n.format(B));
389
379
  }
390
- }, e[84] = u, e[85] = f, e[86] = t.value, e[87] = R, e[88] = p, e[89] = Fe) : Fe = e[89];
380
+ }, e[84] = u, e[85] = f, e[86] = t.value, e[87] = D, e[88] = R, e[89] = Fe) : Fe = e[89];
391
381
  const gt = t?.value;
392
382
  let Ne;
393
383
  e[90] !== gt ? (Ne = [gt], e[90] = gt, e[91] = Ne) : Ne = e[91], S.useEffect(Fe, Ne);
394
384
  const kt = !!c, St = !!c, Ot = sa();
395
385
  let Ke;
396
- e[92] !== v || e[93] !== s || e[94] !== st || e[95] !== O || e[96] !== h || e[97] !== m || e[98] !== ht || e[99] !== z || e[100] !== W || e[101] !== mt || e[102] !== x || e[103] !== yt || e[104] !== bt || e[105] !== _ || e[106] !== k || e[107] !== K || e[108] !== l || e[109] !== it || e[110] !== ot || e[111] !== lt || e[112] !== r || e[113] !== kt || e[114] !== St || e[115] !== Ot || e[116] !== g ? (Ke = {
386
+ e[92] !== v || e[93] !== s || e[94] !== st || e[95] !== O || e[96] !== h || e[97] !== m || e[98] !== ht || e[99] !== z || e[100] !== W || e[101] !== mt || e[102] !== p || e[103] !== yt || e[104] !== bt || e[105] !== _ || e[106] !== k || e[107] !== K || e[108] !== l || e[109] !== it || e[110] !== ot || e[111] !== lt || e[112] !== r || e[113] !== kt || e[114] !== St || e[115] !== Ot || e[116] !== g ? (Ke = {
397
387
  isReadOnly: kt,
398
388
  isDisabled: St,
399
389
  undigitable: g,
@@ -418,14 +408,14 @@ const Va = S.forwardRef((t, M) => {
418
408
  handleChangeCalendarBoxState: m,
419
409
  handleChangeActiveDescendant: h,
420
410
  handleChangeCalendarDisplayDate: ht,
421
- handleChangeUpdateDateState: x,
411
+ handleChangeUpdateDateState: p,
422
412
  handleOnClickClearSelectedPeriod: bt,
423
413
  handleChangeUpdateDateStateWithPredefinedPeriod: yt,
424
414
  hasValidPeriodSelected: Ot
425
- }, e[92] = v, e[93] = s, e[94] = st, e[95] = O, e[96] = h, e[97] = m, e[98] = ht, e[99] = z, e[100] = W, e[101] = mt, e[102] = x, e[103] = yt, e[104] = bt, e[105] = _, e[106] = k, e[107] = K, e[108] = l, e[109] = it, e[110] = ot, e[111] = lt, e[112] = r, e[113] = kt, e[114] = St, e[115] = Ot, e[116] = g, e[117] = Ke) : Ke = e[117];
415
+ }, e[92] = v, e[93] = s, e[94] = st, e[95] = O, e[96] = h, e[97] = m, e[98] = ht, e[99] = z, e[100] = W, e[101] = mt, e[102] = p, e[103] = yt, e[104] = bt, e[105] = _, e[106] = k, e[107] = K, e[108] = l, e[109] = it, e[110] = ot, e[111] = lt, e[112] = r, e[113] = kt, e[114] = St, e[115] = Ot, e[116] = g, e[117] = Ke) : Ke = e[117];
426
416
  const ra = Ke;
427
417
  let Te;
428
- e[118] !== et || e[119] !== y || e[120] !== A || e[121] !== ut || e[122] !== N || e[123] !== k || e[124] !== B || e[125] !== tt || e[126] !== nt || e[127] !== t.hint || e[128] !== t.required || e[129] !== c || e[130] !== r || e[131] !== at ? (Te = ut && /* @__PURE__ */ C(ka, { "data-testid": "test-date-period-field-label", label: B, inputId: k, hint: t?.hint, isDisabled: y, isReadOnly: c, skeletonize: r, required: t?.required, hintPosition: N, themePopover: at, popoverAlign: nt, labelUppercase: tt, hasHintMessages: A, customClassLabel: et }), e[118] = et, e[119] = y, e[120] = A, e[121] = ut, e[122] = N, e[123] = k, e[124] = B, e[125] = tt, e[126] = nt, e[127] = t.hint, e[128] = t.required, e[129] = c, e[130] = r, e[131] = at, e[132] = Te) : Te = e[132];
418
+ e[118] !== et || e[119] !== y || e[120] !== A || e[121] !== ut || e[122] !== N || e[123] !== k || e[124] !== P || e[125] !== tt || e[126] !== nt || e[127] !== t.hint || e[128] !== t.required || e[129] !== c || e[130] !== r || e[131] !== at ? (Te = ut && /* @__PURE__ */ C(ka, { "data-testid": "test-date-period-field-label", label: P, inputId: k, hint: t?.hint, isDisabled: y, isReadOnly: c, skeletonize: r, required: t?.required, hintPosition: N, themePopover: at, popoverAlign: nt, labelUppercase: tt, hasHintMessages: A, customClassLabel: et }), e[118] = et, e[119] = y, e[120] = A, e[121] = ut, e[122] = N, e[123] = k, e[124] = P, e[125] = tt, e[126] = nt, e[127] = t.hint, e[128] = t.required, e[129] = c, e[130] = r, e[131] = at, e[132] = Te) : Te = e[132];
429
419
  const da = w.omit(Yt, ["initialRef", "finalRef"]), _t = t?.initialRef;
430
420
  let Ae;
431
421
  e[133] !== _t ? (Ae = ea(ct, _t), e[133] = _t, e[134] = Ae) : Ae = e[134];
@@ -438,7 +428,7 @@ const Va = S.forwardRef((t, M) => {
438
428
  let Le;
439
429
  e[141] === Symbol.for("react.memo_cache_sentinel") ? (Le = /* @__PURE__ */ C(ba, { name: "arrow_right", size: 10 }), e[141] = Le) : Le = e[141];
440
430
  let Ue;
441
- e[142] !== y || e[143] !== c ? (Ue = /* @__PURE__ */ C("span", { className: "separator", "data-state-disabled": y, "data-state-read-only": c, onMouseDown: Pa, children: Le }), e[142] = y, e[143] = c, e[144] = Ue) : Ue = e[144];
431
+ e[142] !== y || e[143] !== c ? (Ue = /* @__PURE__ */ C("span", { className: "separator", "data-state-disabled": y, "data-state-read-only": c, onMouseDown: xa, children: Le }), e[142] = y, e[143] = c, e[144] = Ue) : Ue = e[144];
442
432
  const Ct = ga, vt = w.omit(Yt, ["initialRef", "finalRef"]), It = t?.finalRef;
443
433
  let j;
444
434
  e[145] !== It ? (j = ea(Y, It), e[145] = It, e[146] = j) : j = e[146];
@@ -450,7 +440,7 @@ const Va = S.forwardRef((t, M) => {
450
440
  let G;
451
441
  e[151] !== q ? (G = (a) => q(a, "final"), e[151] = q, e[152] = G) : G = e[152];
452
442
  let qe;
453
- e[153] !== v || e[154] !== s || e[155] !== ee || e[156] !== y || e[157] !== O || e[158] !== dt || e[159] !== xe || e[160] !== Be || e[161] !== _ || e[162] !== ne || e[163] !== c || e[164] !== r || e[165] !== Ct.Input || e[166] !== vt || e[167] !== j || e[168] !== wt || e[169] !== $ || e[170] !== H || e[171] !== G || e[172] !== te || e[173] !== g ? (qe = /* @__PURE__ */ C(Ct.Input, { ...vt, ref: j, id: O, name: O, value: dt, readOnly: c, disabled: y, customClass: ee, tabIndex: wt, placeholder: ne, "aria-autocomplete": "list", "aria-activedescendant": v, "aria-expanded": s, "aria-controls": O, "aria-labelledby": O, "data-testid": "test-date-period-field-final-input", "data-state-is-period-input": !0, "data-state-error": _, "data-state-read-only": c, "data-state-text-align": te, "data-state-undigitable": g, "data-state-skeletonize": r, onPaste: Be, onBeforeInput: xe, onBlur: $, onFocus: H, onKeyDown: G }), e[153] = v, e[154] = s, e[155] = ee, e[156] = y, e[157] = O, e[158] = dt, e[159] = xe, e[160] = Be, e[161] = _, e[162] = ne, e[163] = c, e[164] = r, e[165] = Ct.Input, e[166] = vt, e[167] = j, e[168] = wt, e[169] = $, e[170] = H, e[171] = G, e[172] = te, e[173] = g, e[174] = qe) : qe = e[174];
443
+ e[153] !== v || e[154] !== s || e[155] !== ee || e[156] !== y || e[157] !== O || e[158] !== dt || e[159] !== pe || e[160] !== Pe || e[161] !== _ || e[162] !== ne || e[163] !== c || e[164] !== r || e[165] !== Ct.Input || e[166] !== vt || e[167] !== j || e[168] !== wt || e[169] !== $ || e[170] !== H || e[171] !== G || e[172] !== te || e[173] !== g ? (qe = /* @__PURE__ */ C(Ct.Input, { ...vt, ref: j, id: O, name: O, value: dt, readOnly: c, disabled: y, customClass: ee, tabIndex: wt, placeholder: ne, "aria-autocomplete": "list", "aria-activedescendant": v, "aria-expanded": s, "aria-controls": O, "aria-labelledby": O, "data-testid": "test-date-period-field-final-input", "data-state-is-period-input": !0, "data-state-error": _, "data-state-read-only": c, "data-state-text-align": te, "data-state-undigitable": g, "data-state-skeletonize": r, onPaste: Pe, onBeforeInput: pe, onBlur: $, onFocus: H, onKeyDown: G }), e[153] = v, e[154] = s, e[155] = ee, e[156] = y, e[157] = O, e[158] = dt, e[159] = pe, e[160] = Pe, e[161] = _, e[162] = ne, e[163] = c, e[164] = r, e[165] = Ct.Input, e[166] = vt, e[167] = j, e[168] = wt, e[169] = $, e[170] = H, e[171] = G, e[172] = te, e[173] = g, e[174] = qe) : qe = e[174];
454
444
  let je;
455
445
  e[175] === Symbol.for("react.memo_cache_sentinel") ? (je = /* @__PURE__ */ C(va, {}), e[175] = je) : je = e[175];
456
446
  let $e;
@@ -458,13 +448,13 @@ const Va = S.forwardRef((t, M) => {
458
448
  let He;
459
449
  e[178] !== y || e[179] !== A || e[180] !== N || e[181] !== t.hint || e[182] !== r ? (He = N === "below" && /* @__PURE__ */ C(ha, { customClass: "hint", description: t.hint, disabled: y, skeletonize: r, visible: A }), e[178] = y, e[179] = A, e[180] = N, e[181] = t.hint, e[182] = r, e[183] = He) : He = e[183];
460
450
  let Ge;
461
- e[184] !== Z || e[185] !== _ || e[186] !== B || e[187] !== r ? (Ge = _ && /* @__PURE__ */ C("span", { "data-testid": "test-date-period-field-list-errors", className: "error", "data-state-skeletonize": r, "aria-describedby": String(B).concat("-errors"), children: Z?.map(xa) }), e[184] = Z, e[185] = _, e[186] = B, e[187] = r, e[188] = Ge) : Ge = e[188];
451
+ e[184] !== Z || e[185] !== _ || e[186] !== P || e[187] !== r ? (Ge = _ && /* @__PURE__ */ C("span", { "data-testid": "test-date-period-field-list-errors", className: "error", "data-state-skeletonize": r, "aria-describedby": String(P).concat("-errors"), children: Z?.map(pa) }), e[184] = Z, e[185] = _, e[186] = P, e[187] = r, e[188] = Ge) : Ge = e[188];
462
452
  let Ye;
463
453
  return e[189] !== Qe || e[190] !== Xe || e[191] !== Ze ? (Ye = /* @__PURE__ */ C(ya, { targetRef: Qt, text: Qe, width: Ze, position: Xe }), e[189] = Qe, e[190] = Xe, e[191] = Ze, e[192] = Ye) : Ye = e[192], /* @__PURE__ */ Je(S.Fragment, { children: [
464
454
  /* @__PURE__ */ C(wa.Provider, { value: ra, children: /* @__PURE__ */ Je(Sa, { ref: Qt, "data-testid": "test-date-period-field-root", "data-state-error": _, customClassWrapper: aa, children: [
465
455
  Te,
466
456
  /* @__PURE__ */ Je(Oa, { ref: Xt, "data-testid": "test-date-period-field-container", onKeyDown: ca, skeletonize: r, customClassInputContainer: na, children: [
467
- /* @__PURE__ */ C(_a, { ...da, ref: Ae, id: k, name: k, value: oa, disabled: y, readOnly: c, customClass: ee, tabIndex: !c && !r ? 0 : -1, placeholder: ne, "aria-autocomplete": "list", "aria-activedescendant": v, "aria-expanded": s, "aria-controls": k, "aria-labelledby": k, "data-testid": "test-date-period-field-initial-input", "data-state-is-period-input": !0, "data-state-error": _, "data-state-read-only": c, "data-state-text-align": te, "data-state-undigitable": g, "data-state-skeletonize": r, onPaste: Be, onBeforeInput: xe, onBlur: We, onFocus: ze, onKeyDown: Ee }),
457
+ /* @__PURE__ */ C(_a, { ...da, ref: Ae, id: k, name: k, value: oa, disabled: y, readOnly: c, customClass: ee, tabIndex: !c && !r ? 0 : -1, placeholder: ne, "aria-autocomplete": "list", "aria-activedescendant": v, "aria-expanded": s, "aria-controls": k, "aria-labelledby": k, "data-testid": "test-date-period-field-initial-input", "data-state-is-period-input": !0, "data-state-error": _, "data-state-read-only": c, "data-state-text-align": te, "data-state-undigitable": g, "data-state-skeletonize": r, onPaste: Pe, onBeforeInput: pe, onBlur: We, onFocus: ze, onKeyDown: Ee }),
468
458
  Ue,
469
459
  qe,
470
460
  je
@@ -477,29 +467,29 @@ const Va = S.forwardRef((t, M) => {
477
467
  ] });
478
468
  });
479
469
  Va.displayName = "DatePeriodFieldInputBase";
480
- function pa(t) {
470
+ function Ra(t) {
481
471
  return t.clone().subtract(1, "month");
482
472
  }
483
- function Ra(t) {
473
+ function Da(t) {
484
474
  return t.clone().add(1, "month");
485
475
  }
486
- function Da() {
476
+ function Ba() {
487
477
  return {
488
478
  inicial: null,
489
479
  final: null
490
480
  };
491
481
  }
492
- function Ba(t, M) {
493
- const e = t?.isAfter(M) ? M : t, B = t?.isAfter(M) ? t : M;
482
+ function Pa(t, M) {
483
+ const e = t?.isAfter(M) ? M : t, P = t?.isAfter(M) ? t : M;
494
484
  return {
495
485
  inicial: e,
496
- final: B
486
+ final: P
497
487
  };
498
488
  }
499
- function Pa(t) {
489
+ function xa(t) {
500
490
  t.preventDefault();
501
491
  }
502
- function xa(t, M) {
492
+ function pa(t, M) {
503
493
  return /* @__PURE__ */ Je(S.Fragment, { children: [
504
494
  t,
505
495
  " "