@oracle/oraclejet-preact 19.0.3 → 19.0.4
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.
- package/amd/{DatePicker-266c4b4e.js → DatePicker-568944a7.js} +2 -2
- package/amd/{DatePicker-266c4b4e.js.map → DatePicker-568944a7.js.map} +1 -1
- package/amd/{InputDatePicker-a1eea599.js → InputDatePicker-c5ceeb44.js} +2 -2
- package/amd/{InputDatePicker-a1eea599.js.map → InputDatePicker-c5ceeb44.js.map} +1 -1
- package/amd/MaxLengthCounter-cadff1c7.js +2 -0
- package/amd/MaxLengthCounter-cadff1c7.js.map +1 -0
- package/amd/{MonthView-48d59de4.js → MonthView-d2f8f3f1.js} +2 -2
- package/amd/{MonthView-48d59de4.js.map → MonthView-d2f8f3f1.js.map} +1 -1
- package/amd/PRIVATE_MonthView.js +1 -1
- package/amd/PRIVATE_MonthYearGridView.js +1 -1
- package/amd/PRIVATE_StyledDatePickerButton.js +1 -1
- package/amd/StyledDatePickerButton-5332fad7.js +2 -0
- package/amd/StyledDatePickerButton-5332fad7.js.map +1 -0
- package/amd/StyledDatePickerButtonStyles.styles.css +17 -0
- package/amd/TextArea-dfd1f679.js +2 -0
- package/amd/TextArea-dfd1f679.js.map +1 -0
- package/amd/TextAreaAutosize-cbdc9644.js +2 -0
- package/amd/{TextAreaAutosize-3cf8e06c.js.map → TextAreaAutosize-cbdc9644.js.map} +1 -1
- package/amd/Theme-redwood/theme.css +159 -159
- package/amd/Theme-stable/theme.css +183 -183
- package/amd/UNSAFE_DatePicker.js +1 -1
- package/amd/UNSAFE_InputDatePicker.js +1 -1
- package/amd/UNSAFE_TextArea.js +1 -1
- package/amd/UNSAFE_TextAreaAutosize.js +1 -1
- package/amd/{YearsGridView-eae67964.js → YearsGridView-f5c6d70d.js} +2 -2
- package/amd/{YearsGridView-eae67964.js.map → YearsGridView-f5c6d70d.js.map} +1 -1
- package/cjs/{BaseButton-acda944a.js → BaseButton-d48ce138.js} +2 -2
- package/cjs/{BaseButton-acda944a.js.map → BaseButton-d48ce138.js.map} +1 -1
- package/cjs/BaseCardView-43379b36.js +6 -6
- package/cjs/BaseRichSelection-9b1ada4d.js +9 -9
- package/cjs/BaseSwatchView-3d9dbf9a.js +2 -2
- package/cjs/{Button-170bea0b.js → Button-fd334204.js} +2 -2
- package/cjs/{Button-170bea0b.js.map → Button-fd334204.js.map} +1 -1
- package/cjs/ButtonSet-a1f0f8b9.js +2 -2
- package/cjs/ButtonSetButton-97ceb927.js +1 -1
- package/cjs/ButtonSetIconButton-5bad7aa5.js +4 -4
- package/cjs/{Center-8b52b781.js → Center-1098ae1b.js} +2 -2
- package/cjs/{Center-8b52b781.js.map → Center-1098ae1b.js.map} +1 -1
- package/cjs/{Chart-55c4cd8f.js → Chart-c07adbbd.js} +12 -12
- package/cjs/{Chart-55c4cd8f.js.map → Chart-c07adbbd.js.map} +1 -1
- package/cjs/CheckboxControl-45f11f7e.js +6 -6
- package/cjs/CheckboxRadioField-c707f81f.js +6 -6
- package/cjs/CheckboxRadioLabelValueLayout-e9110e5f.js +1 -1
- package/cjs/Chip-6d729286.js +1 -1
- package/cjs/ClearIcon-d2d959a1.js +1 -1
- package/cjs/CollapseIcon-7612943e.js +1 -1
- package/cjs/ColorPalette-ea5e1bed.js +2 -2
- package/cjs/{ColorPicker-30ee6033.js → ColorPicker-e3c74415.js} +3 -3
- package/cjs/{ColorPicker-30ee6033.js.map → ColorPicker-e3c74415.js.map} +1 -1
- package/cjs/ColorSwatch-590183e3.js +4 -4
- package/cjs/{CompactLabelAssistance-eb32e7f5.js → CompactLabelAssistance-d5bbeb5e.js} +6 -6
- package/cjs/{CompactLabelAssistance-eb32e7f5.js.map → CompactLabelAssistance-d5bbeb5e.js.map} +1 -1
- package/cjs/CompactUserAssistance-58a6899d.js +5 -5
- package/cjs/ComponentMessageContainer-1b9e8036.js +4 -4
- package/cjs/{DatePicker-0e143849.js → DatePicker-b46146c5.js} +8 -8
- package/cjs/{DatePicker-0e143849.js.map → DatePicker-b46146c5.js.map} +1 -1
- package/cjs/DatePickerHeader-305234ff.js +3 -3
- package/cjs/{Dialog-152ab89d.js → Dialog-be4d8900.js} +8 -8
- package/cjs/{Dialog-152ab89d.js.map → Dialog-be4d8900.js.map} +1 -1
- package/cjs/DirectionalCollapseArrowIcon-c6d6750f.js +1 -1
- package/cjs/DirectionalExpandArrowIcon-33ebe393.js +1 -1
- package/cjs/{Dropdown-08111f9d.js → Dropdown-b2579045.js} +6 -6
- package/cjs/{Dropdown-08111f9d.js.map → Dropdown-b2579045.js.map} +1 -1
- package/cjs/{EmbeddedIconButton-88b1a5cd.js → EmbeddedIconButton-79de5690.js} +2 -2
- package/cjs/{EmbeddedIconButton-88b1a5cd.js.map → EmbeddedIconButton-79de5690.js.map} +1 -1
- package/cjs/{EnvironmentProvider-5a401f32.js → EnvironmentProvider-8696a5b8.js} +3 -3
- package/cjs/{EnvironmentProvider-5a401f32.js.map → EnvironmentProvider-8696a5b8.js.map} +1 -1
- package/cjs/{Expander-96ce2888.js → Expander-01af6642.js} +2 -2
- package/cjs/{Expander-96ce2888.js.map → Expander-01af6642.js.map} +1 -1
- package/cjs/{Flex-a6d1c038.js → Flex-6ca216a7.js} +2 -2
- package/cjs/{Flex-a6d1c038.js.map → Flex-6ca216a7.js.map} +1 -1
- package/cjs/{Floating-a360e16a.js → Floating-5a704a27.js} +4 -4
- package/cjs/{Floating-a360e16a.js.map → Floating-5a704a27.js.map} +1 -1
- package/cjs/{Grid-44ca9332.js → Grid-57fb11dc.js} +2 -2
- package/cjs/{Grid-44ca9332.js.map → Grid-57fb11dc.js.map} +1 -1
- package/cjs/{Gridlines-7e6b9ff9.js → Gridlines-3bdce0b7.js} +2 -2
- package/cjs/{Gridlines-7e6b9ff9.js.map → Gridlines-3bdce0b7.js.map} +1 -1
- package/cjs/GroupLoadingIndicator-19c221cd.js +1 -1
- package/cjs/{HighlightText-188f85a6.js → HighlightText-e622ae4f.js} +2 -2
- package/cjs/{HighlightText-188f85a6.js.map → HighlightText-e622ae4f.js.map} +1 -1
- package/cjs/Icon-bc05e7bd.js +3 -3
- package/cjs/IconButton-7ebfcb64.js +4 -4
- package/cjs/IconSwitchButton-84e07848.js +4 -4
- package/cjs/IconToggleButton-5cb32026.js +4 -4
- package/cjs/{IconUserAssistance-65d6d06c.js → IconUserAssistance-b0f33cac.js} +3 -3
- package/cjs/{IconUserAssistance-65d6d06c.js.map → IconUserAssistance-b0f33cac.js.map} +1 -1
- package/cjs/InlineHelp-8097a102.js +1 -1
- package/cjs/InlineUserAssistance-74680664.js +5 -5
- package/cjs/InputDateMask-8a4b2660.js +7 -7
- package/cjs/Label-670472a7.js +8 -8
- package/cjs/LabelValueLayout-efc94d8e.js +1 -1
- package/cjs/{Layer-c8668ea4.js → Layer-28b1afce.js} +3 -3
- package/cjs/{Layer-c8668ea4.js.map → Layer-28b1afce.js.map} +1 -1
- package/cjs/{LayerHost-f1a1533f.js → LayerHost-aee0e070.js} +2 -2
- package/cjs/{LayerHost-f1a1533f.js.map → LayerHost-aee0e070.js.map} +1 -1
- package/cjs/{LayerManager-2a80307c.js → LayerManager-fc4df14f.js} +2 -2
- package/cjs/{LayerManager-2a80307c.js.map → LayerManager-fc4df14f.js.map} +1 -1
- package/cjs/Link-33dcecc2.js +1 -1
- package/cjs/List-d4904e56.js +5 -5
- package/cjs/{LiveRegion-a2c839ea.js → LiveRegion-e410e187.js} +2 -2
- package/cjs/{LiveRegion-a2c839ea.js.map → LiveRegion-e410e187.js.map} +1 -1
- package/cjs/MaxLengthCounter-39055ba1.js +27 -0
- package/cjs/MaxLengthCounter-39055ba1.js.map +1 -0
- package/cjs/{MaxLengthLiveRegion-cf615038.js → MaxLengthLiveRegion-bfb22b29.js} +3 -3
- package/cjs/{MaxLengthLiveRegion-cf615038.js.map → MaxLengthLiveRegion-bfb22b29.js.map} +1 -1
- package/cjs/Message-4dfcf417.js +2 -2
- package/cjs/{MessageLayer-29034032.js → MessageLayer-0b0feb51.js} +6 -6
- package/cjs/{MessageLayer-29034032.js.map → MessageLayer-0b0feb51.js.map} +1 -1
- package/cjs/MessagesManager-5f1e36da.js +3 -3
- package/cjs/{Modal-b00b9f5e.js → Modal-0cea796e.js} +4 -4
- package/cjs/{Modal-b00b9f5e.js.map → Modal-0cea796e.js.map} +1 -1
- package/cjs/{MonthView-cd65e44a.js → MonthView-044bcacb.js} +5 -5
- package/cjs/{MonthView-cd65e44a.js.map → MonthView-044bcacb.js.map} +1 -1
- package/cjs/{NavigationListItem-24abe2ab.js → NavigationListItem-d63c4cf7.js} +6 -19
- package/cjs/{NavigationListItem-24abe2ab.js.map → NavigationListItem-d63c4cf7.js.map} +1 -1
- package/cjs/{NavigationListLinkItem-35f33123.js → NavigationListLinkItem-0931af4d.js} +5 -5
- package/cjs/{NavigationListLinkItem-35f33123.js.map → NavigationListLinkItem-0931af4d.js.map} +1 -1
- package/cjs/NumberInputText-565c84b9.js +6 -6
- package/cjs/{OverflowTabBarItem-c8809159.js → OverflowTabBarItem-2bfac671.js} +10 -10
- package/cjs/{OverflowTabBarItem-c8809159.js.map → OverflowTabBarItem-2bfac671.js.map} +1 -1
- package/cjs/PRIVATE_BaseCardView.js +22 -22
- package/cjs/PRIVATE_BaseSwatchView.js +5 -5
- package/cjs/PRIVATE_Chart.js +40 -40
- package/cjs/PRIVATE_CheckboxControl.js +26 -26
- package/cjs/PRIVATE_CheckboxRadioField.js +28 -28
- package/cjs/PRIVATE_ClearIcon.js +19 -19
- package/cjs/PRIVATE_ContainerDiagram.js +30 -30
- package/cjs/PRIVATE_DatePickerHeader.js +20 -20
- package/cjs/PRIVATE_DatePickerLayout.js +4 -4
- package/cjs/PRIVATE_EmbeddedIconButton.js +6 -6
- package/cjs/PRIVATE_Expander.js +67 -67
- package/cjs/PRIVATE_FormControls.js +21 -21
- package/cjs/PRIVATE_IconSwitchButton.js +17 -17
- package/cjs/PRIVATE_Icons/CheckboxCrossed.js +16 -16
- package/cjs/PRIVATE_Icons/CheckboxMixed.js +16 -16
- package/cjs/PRIVATE_Icons/CheckboxOff.js +16 -16
- package/cjs/PRIVATE_Icons/CheckboxOn.js +16 -16
- package/cjs/PRIVATE_Icons/DragV.js +16 -16
- package/cjs/PRIVATE_Icons/None.js +16 -16
- package/cjs/PRIVATE_List.js +20 -20
- package/cjs/PRIVATE_Message.js +20 -20
- package/cjs/PRIVATE_MessageLayer.js +12 -12
- package/cjs/PRIVATE_MonthView.js +8 -9
- package/cjs/PRIVATE_MonthView.js.map +1 -1
- package/cjs/PRIVATE_MonthYearGridView.js +8 -9
- package/cjs/PRIVATE_MonthYearGridView.js.map +1 -1
- package/cjs/PRIVATE_PlotArea.js +4 -4
- package/cjs/PRIVATE_RevealToggleIcon.js +18 -18
- package/cjs/PRIVATE_RichSelectionCommon.js +29 -29
- package/cjs/PRIVATE_SelectCommon.js +32 -32
- package/cjs/PRIVATE_StyledCard.js +4 -4
- package/cjs/PRIVATE_StyledCheckbox.js +16 -16
- package/cjs/PRIVATE_StyledDatePickerButton.js +1 -2
- package/cjs/PRIVATE_StyledDatePickerButton.js.map +1 -1
- package/cjs/PRIVATE_SwatchFlexView.js +5 -5
- package/cjs/PRIVATE_Table.js +42 -42
- package/cjs/PRIVATE_ThemedIcons/CalendarIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/ChartMarqueeSelectIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/ChartPanIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/ChartZoomIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/CheckIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/CheckboxCrossedIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/CheckboxMixedIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/CheckboxOffIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/CheckboxOnIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/CloseIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/CollapseIcon.js +17 -17
- package/cjs/PRIVATE_ThemedIcons/CollapseUpIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/DecrementIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/DeleteIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/DirectionalCollapseArrowIcon.js +17 -17
- package/cjs/PRIVATE_ThemedIcons/DirectionalExpandArrowIcon.js +17 -17
- package/cjs/PRIVATE_ThemedIcons/DragHandleIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/DropdownArrowIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/ExpandIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/HelpIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/IncrementIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/MenuButtonDropdownIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/MessageConfirmationIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/MessageErrorIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/MessageInfoIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/MessageWarningIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/MinusIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/NavDownIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/None.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/OverviewHorizontalDragHandleIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/PlusIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/RadioOffIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/RadioOnIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/SortAscendingIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/SortDescendingIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/ViewHideIcon.js +16 -16
- package/cjs/PRIVATE_ThemedIcons/ViewIcon.js +16 -16
- package/cjs/PRIVATE_TimeComponent.js +19 -19
- package/cjs/PRIVATE_VisOverview.js +16 -16
- package/cjs/PRIVATE_VisTabularDatatip.js +4 -4
- package/cjs/{Popup-91e33a1d.js → Popup-080e8f67.js} +11 -11
- package/cjs/{Popup-91e33a1d.js.map → Popup-080e8f67.js.map} +1 -1
- package/cjs/ProgressButtonLabelLayout-689a7a8d.js +3 -3
- package/cjs/{ProgressCircle-fb0abf95.js → ProgressCircle-dcd9f3e3.js} +2 -2
- package/cjs/{ProgressCircle-fb0abf95.js.map → ProgressCircle-dcd9f3e3.js.map} +1 -1
- package/cjs/ReadonlyTextFieldInput-00b3e796.js +1 -1
- package/cjs/RevealToggleIcon-98b44cc6.js +1 -1
- package/cjs/{SectionedContent-ac2d4bd2.js → SectionedContent-bece051b.js} +5 -5
- package/cjs/{SectionedContent-ac2d4bd2.js.map → SectionedContent-bece051b.js.map} +1 -1
- package/cjs/SelectMenuGroupContext-ae5e1373.js +7 -7
- package/cjs/SelectMobileFieldInput-33427c18.js +8 -8
- package/cjs/Selector-9b72f861.js +1 -1
- package/cjs/{SelectorAll-c497a428.js → SelectorAll-c7d87dc7.js} +7 -7
- package/cjs/{SelectorAll-c497a428.js.map → SelectorAll-c7d87dc7.js.map} +1 -1
- package/cjs/{Sheet-65ae604e.js → Sheet-44b25f1d.js} +4 -4
- package/cjs/{Sheet-65ae604e.js.map → Sheet-44b25f1d.js.map} +1 -1
- package/cjs/{SortControl-7be650eb.js → SortControl-5ca85c6b.js} +4 -4
- package/cjs/{SortControl-7be650eb.js.map → SortControl-5ca85c6b.js.map} +1 -1
- package/cjs/{StyledCard-acec9285.js → StyledCard-1767aa5b.js} +2 -2
- package/cjs/{StyledCard-acec9285.js.map → StyledCard-1767aa5b.js.map} +1 -1
- package/cjs/{StyledDatePickerButton-128e2a5d.js → StyledDatePickerButton-03b7e281.js} +2 -8
- package/cjs/StyledDatePickerButton-03b7e281.js.map +1 -0
- package/cjs/StyledDatePickerButtonStyles.styles.css +17 -0
- package/cjs/{StyledLabelValueLayout-dd89f379.js → StyledLabelValueLayout-d7705c97.js} +2 -2
- package/cjs/{StyledLabelValueLayout-dd89f379.js.map → StyledLabelValueLayout-d7705c97.js.map} +1 -1
- package/cjs/StyledTextField-d8c8a3bf.js +5 -5
- package/cjs/Submenu-416179ad.js +1 -1
- package/cjs/{TabBar-afd26c75.js → TabBar-1885c9c5.js} +9 -7
- package/cjs/{TabBar-afd26c75.js.map → TabBar-1885c9c5.js.map} +1 -1
- package/cjs/TabBarContextMenu-42fdbda0.js +2 -2
- package/cjs/TabBarLayout-b74e2f96.js +1 -1
- package/cjs/{TabBarLinkItem-4e4f8da0.js → TabBarLinkItem-662d0705.js} +2 -2
- package/cjs/{TabBarLinkItem-4e4f8da0.js.map → TabBarLinkItem-662d0705.js.map} +1 -1
- package/cjs/{Table-0bca32d4.js → Table-49575528.js} +13 -13
- package/cjs/{Table-0bca32d4.js.map → Table-49575528.js.map} +1 -1
- package/cjs/TextField-71dba81e.js +3 -3
- package/cjs/Theme-redwood/theme.css +241 -241
- package/cjs/Theme-stable/theme.css +221 -221
- package/cjs/TimeComponentCanvas2D-471abe04.js +6 -6
- package/cjs/ToggleButton-14cd62ef.js +1 -1
- package/cjs/TruncatingText-82495650.js +1 -1
- package/cjs/UNSAFE_ActionCard.js +3 -3
- package/cjs/UNSAFE_BarChart.js +41 -41
- package/cjs/UNSAFE_BareButton.js +2 -2
- package/cjs/UNSAFE_BaseButton.js +5 -5
- package/cjs/UNSAFE_Button.js +6 -6
- package/cjs/UNSAFE_ButtonSet.js +4 -4
- package/cjs/UNSAFE_ButtonSetButton.js +5 -5
- package/cjs/UNSAFE_ButtonSetIconButton.js +17 -17
- package/cjs/UNSAFE_ButtonSetItem.js +18 -18
- package/cjs/UNSAFE_ButtonSetMultiple.js +4 -4
- package/cjs/UNSAFE_ButtonSetSingle.js +4 -4
- package/cjs/UNSAFE_Card.js +4 -4
- package/cjs/UNSAFE_CardFlexView.js +22 -22
- package/cjs/UNSAFE_CardGridView.js +22 -22
- package/cjs/UNSAFE_Center.js +5 -5
- package/cjs/UNSAFE_Checkbox.js +26 -26
- package/cjs/UNSAFE_CheckboxItem.js +28 -28
- package/cjs/UNSAFE_CheckboxRadioField.js +4 -4
- package/cjs/UNSAFE_CheckboxSet.js +27 -27
- package/cjs/UNSAFE_Chip.js +2 -2
- package/cjs/UNSAFE_Collapsible.js +18 -18
- package/cjs/UNSAFE_ColorPalette.js +19 -19
- package/cjs/UNSAFE_ColorPicker.js +21 -21
- package/cjs/UNSAFE_ColorSwatch.js +17 -17
- package/cjs/UNSAFE_ComboChart.js +41 -41
- package/cjs/UNSAFE_ComponentMessage.js +20 -20
- package/cjs/UNSAFE_ConveyorBelt.js +18 -18
- package/cjs/UNSAFE_DatePicker.js +28 -28
- package/cjs/UNSAFE_Diagram.js +30 -30
- package/cjs/UNSAFE_Dialog.js +23 -23
- package/cjs/UNSAFE_DragHandle.js +17 -17
- package/cjs/UNSAFE_DrawerLayout.js +12 -12
- package/cjs/UNSAFE_DrawerPopup.js +12 -12
- package/cjs/UNSAFE_Dropdown.js +15 -15
- package/cjs/UNSAFE_Environment.js +4 -4
- package/cjs/UNSAFE_ExpandableList.js +25 -25
- package/cjs/UNSAFE_FilePicker.js +4 -4
- package/cjs/UNSAFE_FlatTreeView.js +52 -52
- package/cjs/UNSAFE_Flex.js +4 -4
- package/cjs/UNSAFE_Floating.js +11 -11
- package/cjs/UNSAFE_FormLayout.js +2 -2
- package/cjs/UNSAFE_Gantt.js +23 -23
- package/cjs/UNSAFE_Grid.js +4 -4
- package/cjs/UNSAFE_HighlightText.js +4 -4
- package/cjs/UNSAFE_Icon.js +16 -16
- package/cjs/UNSAFE_IconButton.js +17 -17
- package/cjs/UNSAFE_IconMenuButton.js +27 -27
- package/cjs/UNSAFE_IconProgressButton.js +20 -20
- package/cjs/UNSAFE_IconToggleButton.js +17 -17
- package/cjs/UNSAFE_Indexer.js +6 -6
- package/cjs/UNSAFE_InlineSelectSingle.js +33 -33
- package/cjs/UNSAFE_InputColor.js +34 -34
- package/cjs/UNSAFE_InputDateMask.js +27 -27
- package/cjs/UNSAFE_InputDatePicker.js +127 -127
- package/cjs/UNSAFE_InputPassword.js +27 -27
- package/cjs/UNSAFE_InputSensitiveText.js +28 -28
- package/cjs/UNSAFE_InputText.js +29 -29
- package/cjs/UNSAFE_InputTimeMask.js +27 -27
- package/cjs/UNSAFE_Label.js +26 -26
- package/cjs/UNSAFE_LabelValueLayout.js +4 -4
- package/cjs/UNSAFE_LabelledLink.js +28 -28
- package/cjs/UNSAFE_Layer.js +8 -8
- package/cjs/UNSAFE_Legend.js +29 -29
- package/cjs/UNSAFE_LineAreaChart.js +41 -41
- package/cjs/UNSAFE_Link.js +2 -2
- package/cjs/UNSAFE_ListItemLayout.js +4 -4
- package/cjs/UNSAFE_ListView.js +30 -30
- package/cjs/UNSAFE_LiveRegion.js +4 -4
- package/cjs/UNSAFE_Menu.js +28 -28
- package/cjs/UNSAFE_MenuButton.js +27 -27
- package/cjs/UNSAFE_MessageBanner.js +20 -20
- package/cjs/UNSAFE_MessageToast.js +22 -22
- package/cjs/UNSAFE_MeterBar.js +16 -16
- package/cjs/UNSAFE_MeterCircle.js +17 -17
- package/cjs/UNSAFE_Modal.js +9 -9
- package/cjs/UNSAFE_NavigationList.js +37 -37
- package/cjs/UNSAFE_NavigationListCommon.js +21 -21
- package/cjs/UNSAFE_NumberInputText.js +29 -29
- package/cjs/UNSAFE_OverflowTabBar.js +62 -62
- package/cjs/UNSAFE_PictoChart.js +27 -27
- package/cjs/UNSAFE_PieChart.js +28 -28
- package/cjs/UNSAFE_Popup.js +19 -19
- package/cjs/UNSAFE_ProgressBar.js +4 -4
- package/cjs/UNSAFE_ProgressButton.js +20 -20
- package/cjs/UNSAFE_ProgressButtonLabelLayout.js +10 -10
- package/cjs/UNSAFE_ProgressCircle.js +4 -4
- package/cjs/UNSAFE_RadioItem.js +26 -26
- package/cjs/UNSAFE_RadioSet.js +27 -27
- package/cjs/UNSAFE_RatingGauge.js +18 -18
- package/cjs/UNSAFE_ReorderableTabBar.js +56 -35
- package/cjs/UNSAFE_ReorderableTabBar.js.map +1 -1
- package/cjs/UNSAFE_RichCheckboxSet.js +29 -29
- package/cjs/UNSAFE_RichRadioSet.js +29 -29
- package/cjs/UNSAFE_RichSelectionItem.js +31 -31
- package/cjs/UNSAFE_ScatterChart.js +41 -41
- package/cjs/UNSAFE_SectionalLegend.js +29 -29
- package/cjs/UNSAFE_SelectMultiple.js +36 -36
- package/cjs/UNSAFE_SelectSingle.js +35 -35
- package/cjs/UNSAFE_SelectionCard.js +4 -4
- package/cjs/UNSAFE_Selector.js +16 -16
- package/cjs/UNSAFE_SelectorAll.js +20 -20
- package/cjs/UNSAFE_Sheet.js +13 -13
- package/cjs/UNSAFE_SortControl.js +63 -63
- package/cjs/UNSAFE_SplitMenuButton.js +27 -27
- package/cjs/UNSAFE_TabBar.js +63 -63
- package/cjs/UNSAFE_TabBarCommon.js +78 -78
- package/cjs/UNSAFE_TabBarMixed.js +62 -62
- package/cjs/UNSAFE_TableView.js +42 -42
- package/cjs/UNSAFE_TagCloud.js +28 -28
- package/cjs/UNSAFE_TextArea.js +228 -118
- package/cjs/UNSAFE_TextArea.js.map +1 -1
- package/cjs/UNSAFE_TextAreaAutosize.js +30 -30
- package/cjs/UNSAFE_TextAreaAutosize.js.map +1 -1
- package/cjs/UNSAFE_TextField.js +20 -20
- package/cjs/UNSAFE_ToggleButton.js +5 -5
- package/cjs/UNSAFE_Toolbar.js +4 -4
- package/cjs/UNSAFE_Train.js +17 -17
- package/cjs/UNSAFE_TruncatingBadge.js +17 -17
- package/cjs/UNSAFE_TruncatingText.js +17 -17
- package/cjs/UNSAFE_UserAssistance.js +27 -27
- package/cjs/UNSAFE_View.js +7 -7
- package/cjs/UNSAFE_VirtualizedListView.js +20 -20
- package/cjs/UNSAFE_VisProgressiveLoader.js +5 -5
- package/cjs/UNSAFE_VisStatusMessage.js +5 -5
- package/cjs/UNSAFE_WindowOverlay.js +4 -4
- package/cjs/{View-251db2a6.js → View-7d9034a7.js} +5 -5
- package/cjs/{View-251db2a6.js.map → View-7d9034a7.js.map} +1 -1
- package/cjs/{VisTabularDatatip-f9ba79d0.js → VisTabularDatatip-9e44a7dd.js} +2 -2
- package/cjs/{VisTabularDatatip-f9ba79d0.js.map → VisTabularDatatip-9e44a7dd.js.map} +1 -1
- package/cjs/{WindowOverlay-5a341d43.js → WindowOverlay-a10f995e.js} +2 -2
- package/cjs/{WindowOverlay-5a341d43.js.map → WindowOverlay-a10f995e.js.map} +1 -1
- package/cjs/{YearsGridView-804c9377.js → YearsGridView-6c18a6df.js} +5 -5
- package/cjs/{YearsGridView-804c9377.js.map → YearsGridView-6c18a6df.js.map} +1 -1
- package/cjs/hoc/PRIVATE_withDirectionIcon.js +4 -4
- package/cjs/hoc/PRIVATE_withThemeIcon.js +3 -3
- package/cjs/hoc/UNSAFE_withThemeProps.js +3 -3
- package/cjs/hooks/PRIVATE_useChartContextMenu.js +25 -25
- package/cjs/hooks/PRIVATE_useChartDatatip.js +14 -14
- package/cjs/hooks/PRIVATE_useChartEvents.js +19 -19
- package/cjs/hooks/PRIVATE_useChartMarquee.js +19 -19
- package/cjs/hooks/PRIVATE_useCssVars.js +7 -7
- package/cjs/hooks/PRIVATE_useCurrentKey.js +4 -4
- package/cjs/hooks/PRIVATE_useDatatip.js +12 -12
- package/cjs/hooks/PRIVATE_useFloating.js +4 -4
- package/cjs/hooks/PRIVATE_useListCommon.js +5 -5
- package/cjs/hooks/PRIVATE_useOutsideMousedown.js +9 -9
- package/cjs/hooks/PRIVATE_useReorderable.js +5 -5
- package/cjs/hooks/PRIVATE_useRovingTabIndexContainer.js +4 -4
- package/cjs/hooks/PRIVATE_useSelection.js +4 -4
- package/cjs/hooks/PRIVATE_useTabBar.js +26 -26
- package/cjs/hooks/PRIVATE_useTooltipOnTruncation.js +17 -17
- package/cjs/hooks/PRIVATE_useVisContextMenu.js +25 -25
- package/cjs/hooks/PRIVATE_useVisDragModeControls.js +19 -19
- package/cjs/hooks/PRIVATE_useVisEvents.js +4 -4
- package/cjs/hooks/PRIVATE_useVisMeterEvents.js +14 -14
- package/cjs/hooks/PRIVATE_useVisSelection.js +15 -15
- package/cjs/hooks/UNSAFE_useBareButton.js +2 -2
- package/cjs/hooks/UNSAFE_useColorScheme.js +3 -3
- package/cjs/hooks/UNSAFE_useCurrentBgColor.js +2 -2
- package/cjs/hooks/UNSAFE_useDensity.js +3 -3
- package/cjs/hooks/UNSAFE_useHiddenTestMethod.js +3 -3
- package/cjs/hooks/UNSAFE_useOutsideClick.js +8 -8
- package/cjs/hooks/UNSAFE_usePrefixSuffix.js +4 -4
- package/cjs/hooks/UNSAFE_useScale.js +3 -3
- package/cjs/hooks/UNSAFE_useTestId.js +3 -3
- package/cjs/hooks/UNSAFE_useTheme.js +3 -3
- package/cjs/hooks/UNSAFE_useThemeInterpolations.js +6 -6
- package/cjs/hooks/UNSAFE_useTooltip.js +17 -17
- package/cjs/hooks/UNSAFE_useTranslationBundle.js +3 -3
- package/cjs/hooks/UNSAFE_useUser.js +3 -3
- package/cjs/{popupUtils-96acfe58.js → popupUtils-488fe8f7.js} +2 -2
- package/cjs/{popupUtils-96acfe58.js.map → popupUtils-488fe8f7.js.map} +1 -1
- package/cjs/{tooltipUtils-842e04c7.js → tooltipUtils-ae48fed6.js} +5 -5
- package/cjs/{tooltipUtils-842e04c7.js.map → tooltipUtils-ae48fed6.js.map} +1 -1
- package/cjs/useBareButton-3c8d1a5d.js +1 -1
- package/cjs/useCellNavigation-d5b07844.js +1 -1
- package/cjs/useChartContextMenu-a8c6d928.js +2 -2
- package/cjs/{useChartDatatip-488151ad.js → useChartDatatip-76d4aeaa.js} +4 -4
- package/cjs/{useChartDatatip-488151ad.js.map → useChartDatatip-76d4aeaa.js.map} +1 -1
- package/cjs/{useColorScheme-a379cdb9.js → useColorScheme-23e4aab4.js} +2 -2
- package/cjs/{useColorScheme-a379cdb9.js.map → useColorScheme-23e4aab4.js.map} +1 -1
- package/cjs/useContextMenu-e90f401c.js +2 -2
- package/cjs/{useCssVars-7a254269.js → useCssVars-cc025013.js} +5 -5
- package/cjs/{useCssVars-7a254269.js.map → useCssVars-cc025013.js.map} +1 -1
- package/cjs/{useCurrentKey-25fa7256.js → useCurrentKey-76fed320.js} +2 -2
- package/cjs/{useCurrentKey-25fa7256.js.map → useCurrentKey-76fed320.js.map} +1 -1
- package/cjs/{useDatatip-44a30e0a.js → useDatatip-4f6d3759.js} +4 -4
- package/cjs/{useDatatip-44a30e0a.js.map → useDatatip-4f6d3759.js.map} +1 -1
- package/cjs/{useDensity-a1ed72b0.js → useDensity-022a8f80.js} +2 -2
- package/cjs/{useDensity-a1ed72b0.js.map → useDensity-022a8f80.js.map} +1 -1
- package/cjs/useDisplayValue-981e83e0.js +5 -5
- package/cjs/{useExpandCollapse-6267248f.js → useExpandCollapse-336b4f0c.js} +2 -2
- package/cjs/{useExpandCollapse-6267248f.js.map → useExpandCollapse-336b4f0c.js.map} +1 -1
- package/cjs/{useFloating-768519ce.js → useFloating-13101293.js} +2 -2
- package/cjs/{useFloating-768519ce.js.map → useFloating-13101293.js.map} +1 -1
- package/cjs/{useHiddenTestMethod-07be6a8e.js → useHiddenTestMethod-51be5bf2.js} +2 -2
- package/cjs/{useHiddenTestMethod-07be6a8e.js.map → useHiddenTestMethod-51be5bf2.js.map} +1 -1
- package/cjs/{useKeyboardEvents-aeae6a28.js → useKeyboardEvents-caa4eb2d.js} +2 -2
- package/cjs/{useKeyboardEvents-aeae6a28.js.map → useKeyboardEvents-caa4eb2d.js.map} +1 -1
- package/cjs/useLegendContextMenu-2a905d60.js +4 -4
- package/cjs/{useMeterDatatip-05aea311.js → useMeterDatatip-45a314e6.js} +3 -3
- package/cjs/{useMeterDatatip-05aea311.js.map → useMeterDatatip-45a314e6.js.map} +1 -1
- package/cjs/useNavigation-49344b44.js +1 -1
- package/cjs/{useOutsideClick-0ad85b65.js → useOutsideClick-c3802f86.js} +2 -2
- package/cjs/{useOutsideClick-0ad85b65.js.map → useOutsideClick-c3802f86.js.map} +1 -1
- package/cjs/{useOutsideMousedown-fee3f752.js → useOutsideMousedown-8f913d1a.js} +2 -2
- package/cjs/{useOutsideMousedown-fee3f752.js.map → useOutsideMousedown-8f913d1a.js.map} +1 -1
- package/cjs/{usePopupAnimation-d24b74af.js → usePopupAnimation-18040396.js} +2 -2
- package/cjs/{usePopupAnimation-d24b74af.js.map → usePopupAnimation-18040396.js.map} +1 -1
- package/cjs/{usePrefixSuffix-aca06b3b.js → usePrefixSuffix-37dfbfbd.js} +2 -2
- package/cjs/{usePrefixSuffix-aca06b3b.js.map → usePrefixSuffix-37dfbfbd.js.map} +1 -1
- package/cjs/{useReorderableItem-cee284be.js → useReorderableItem-db13db70.js} +3 -3
- package/cjs/{useReorderableItem-cee284be.js.map → useReorderableItem-db13db70.js.map} +1 -1
- package/cjs/{useRovingTabIndexContainer-7474adbd.js → useRovingTabIndexContainer-a3594203.js} +2 -2
- package/cjs/{useRovingTabIndexContainer-7474adbd.js.map → useRovingTabIndexContainer-a3594203.js.map} +1 -1
- package/cjs/{useScale-349360cd.js → useScale-adc62f41.js} +2 -2
- package/cjs/{useScale-349360cd.js.map → useScale-adc62f41.js.map} +1 -1
- package/cjs/useSelectCommon-c3f3b7bc.js +5 -5
- package/cjs/{useSelectDrill-97935ff4.js → useSelectDrill-d6321bb7.js} +3 -3
- package/cjs/{useSelectDrill-97935ff4.js.map → useSelectDrill-d6321bb7.js.map} +1 -1
- package/cjs/{useSelection-1ffadc6e.js → useSelection-45d53f55.js} +6 -6
- package/cjs/{useSelection-1ffadc6e.js.map → useSelection-45d53f55.js.map} +1 -1
- package/cjs/{useSelection-ec8ed204.js → useSelection-e11d979f.js} +2 -2
- package/cjs/{useSelection-ec8ed204.js.map → useSelection-e11d979f.js.map} +1 -1
- package/cjs/useTabBar-6df595c7.js +3 -3
- package/cjs/{useTestId-15ee37d6.js → useTestId-9093a54b.js} +2 -2
- package/cjs/{useTestId-15ee37d6.js.map → useTestId-9093a54b.js.map} +1 -1
- package/cjs/{useTheme-9ced18e9.js → useTheme-09dfbb78.js} +2 -2
- package/cjs/{useTheme-9ced18e9.js.map → useTheme-09dfbb78.js.map} +1 -1
- package/cjs/{useThemeInterpolations-b29f0f7d.js → useThemeInterpolations-4faece98.js} +5 -5
- package/cjs/{useThemeInterpolations-b29f0f7d.js.map → useThemeInterpolations-4faece98.js.map} +1 -1
- package/cjs/{useTooltip-43bfe8a3.js → useTooltip-8728f2ff.js} +2 -2
- package/cjs/{useTooltip-43bfe8a3.js.map → useTooltip-8728f2ff.js.map} +1 -1
- package/cjs/{useTooltipControlled-4a59aaf5.js → useTooltipControlled-3c2afa53.js} +5 -5
- package/cjs/{useTooltipControlled-4a59aaf5.js.map → useTooltipControlled-3c2afa53.js.map} +1 -1
- package/cjs/{useTooltipOnTruncation-77728bdf.js → useTooltipOnTruncation-781972d7.js} +4 -4
- package/cjs/{useTooltipOnTruncation-77728bdf.js.map → useTooltipOnTruncation-781972d7.js.map} +1 -1
- package/cjs/{useTranslationBundle-24c593f4.js → useTranslationBundle-18b7bf8b.js} +2 -2
- package/cjs/{useTranslationBundle-24c593f4.js.map → useTranslationBundle-18b7bf8b.js.map} +1 -1
- package/cjs/{useUser-081e5bd5.js → useUser-f900ddf1.js} +2 -2
- package/cjs/{useUser-081e5bd5.js.map → useUser-f900ddf1.js.map} +1 -1
- package/cjs/useVisDragModeControls-6acfca25.js +1 -1
- package/cjs/{useVisEvents-c0863287.js → useVisEvents-9b21e260.js} +2 -2
- package/cjs/{useVisEvents-c0863287.js.map → useVisEvents-9b21e260.js.map} +1 -1
- package/cjs/utils/PRIVATE_tooltipUtils.js +14 -14
- package/cjs/utils/PRIVATE_visTestUtils.js +4 -4
- package/cjs/utils/UNSAFE_popupUtils.js +8 -8
- package/cjs/{withDirectionIcon-574c8e58.js → withDirectionIcon-edb93142.js} +2 -2
- package/cjs/{withDirectionIcon-574c8e58.js.map → withDirectionIcon-edb93142.js.map} +1 -1
- package/cjs/withThemeProps-59cfaa3e.js +2 -2
- package/es/CheckboxSetContext-1be56556.js +9 -0
- package/es/CheckboxSetContext-1be56556.js.map +1 -0
- package/es/{DatePicker-86c5eebd.js → DatePicker-eff769da.js} +3 -3
- package/es/{DatePicker-86c5eebd.js.map → DatePicker-eff769da.js.map} +1 -1
- package/es/DiagramStyles.styles.css +16 -10
- package/es/DiagramStyles.styles2.css +10 -16
- package/es/FormLayoutVariants.styles.css +14 -14
- package/es/FormLayoutVariants.styles2.css +14 -14
- package/es/MaxLengthCounter-d622f964.js +25 -0
- package/es/MaxLengthCounter-d622f964.js.map +1 -0
- package/es/{MonthView-04900992.js → MonthView-5dca34d1.js} +2 -2
- package/es/{MonthView-04900992.js.map → MonthView-5dca34d1.js.map} +1 -1
- package/es/PRIVATE_ContainerDiagram/themes/DiagramStyles.css.js +1 -1
- package/es/PRIVATE_ContainerDiagram.js +1 -1
- package/es/PRIVATE_MonthView.js +2 -3
- package/es/PRIVATE_MonthView.js.map +1 -1
- package/es/PRIVATE_MonthYearGridView.js +2 -3
- package/es/PRIVATE_MonthYearGridView.js.map +1 -1
- package/es/PRIVATE_StyledDatePickerButton.js +1 -2
- package/es/PRIVATE_StyledDatePickerButton.js.map +1 -1
- package/es/ProgressBarVariants.styles.css +1 -1
- package/es/ProgressBarVariants.styles2.css +1 -1
- package/es/SegmentStyles.styles.css +11 -8
- package/es/SegmentStyles.styles2.css +8 -11
- package/es/SplitMenuButtonTheme.styles.css +4 -4
- package/es/SplitMenuButtonTheme.styles2.css +4 -4
- package/es/{StyledDatePickerButton-444aa824.js → StyledDatePickerButton-ca54e491.js} +2 -8
- package/es/StyledDatePickerButton-ca54e491.js.map +1 -0
- package/es/StyledDatePickerButtonStyles.styles.css +17 -0
- package/es/Theme-redwood/theme.css +557 -557
- package/es/Theme-stable/theme.css +444 -444
- package/es/UNSAFE_CheckboxItem.js +47 -101
- package/es/UNSAFE_CheckboxItem.js.map +1 -1
- package/es/UNSAFE_CheckboxSet.js +44 -10
- package/es/UNSAFE_CheckboxSet.js.map +1 -1
- package/es/UNSAFE_DatePicker.js +4 -4
- package/es/UNSAFE_Diagram/themes/DiagramStyles.css.js +1 -1
- package/es/UNSAFE_Diagram.js +1 -1
- package/es/UNSAFE_FormLayout/themes/redwood/FormLayoutTheme.js +1 -1
- package/es/UNSAFE_FormLayout/themes/redwood/FormLayoutVariants.css.js +1 -1
- package/es/UNSAFE_FormLayout/themes/stable/FormLayoutTheme.js +1 -1
- package/es/UNSAFE_FormLayout/themes/stable/FormLayoutVariants.css.js +1 -1
- package/es/UNSAFE_FormLayout.js +1 -1
- package/es/UNSAFE_InputDateMask/themes/SegmentStyles.css.js +1 -1
- package/es/UNSAFE_InputDateMask.js +1 -1
- package/es/UNSAFE_InputDatePicker.js +96 -96
- package/es/UNSAFE_InputTimeMask/themes/SegmentStyles.css.js +1 -1
- package/es/UNSAFE_InputTimeMask.js +1 -1
- package/es/UNSAFE_ProgressBar/themes/redwood/ProgressBarTheme.js +1 -1
- package/es/UNSAFE_ProgressBar/themes/redwood/ProgressBarVariants.css.js +1 -1
- package/es/UNSAFE_ProgressBar/themes/stable/ProgressBarTheme.js +1 -1
- package/es/UNSAFE_ProgressBar/themes/stable/ProgressBarVariants.css.js +1 -1
- package/es/UNSAFE_ProgressBar.js +1 -1
- package/es/UNSAFE_RichCheckboxSet.js +25 -29
- package/es/UNSAFE_RichCheckboxSet.js.map +1 -1
- package/es/UNSAFE_RichSelectionItem.js +29 -172
- package/es/UNSAFE_RichSelectionItem.js.map +1 -1
- package/es/UNSAFE_SplitMenuButton/themes/redwood/SplitMenuButtonTheme.css.js +1 -1
- package/es/UNSAFE_SplitMenuButton/themes/stable/SplitMenuButtonTheme.css.js +1 -1
- package/es/UNSAFE_SplitMenuButton.js +1 -1
- package/es/UNSAFE_TextArea.js +219 -104
- package/es/UNSAFE_TextArea.js.map +1 -1
- package/es/UNSAFE_TextAreaAutosize.js +1 -1
- package/es/{YearsGridView-3858303c.js → YearsGridView-8e838e3d.js} +2 -2
- package/es/{YearsGridView-3858303c.js.map → YearsGridView-8e838e3d.js.map} +1 -1
- package/package.json +2 -2
- package/amd/StyledDatePickerButton-e886e52a.js +0 -2
- package/amd/StyledDatePickerButton-e886e52a.js.map +0 -1
- package/amd/TextArea-ddd1d6b9.js +0 -2
- package/amd/TextArea-ddd1d6b9.js.map +0 -1
- package/amd/TextAreaAutosize-3cf8e06c.js +0 -2
- package/cjs/StyledDatePickerButton-128e2a5d.js.map +0 -1
- package/cjs/TextArea-8608dba1.js +0 -187
- package/cjs/TextArea-8608dba1.js.map +0 -1
- package/es/CheckboxSet-751d4298.js +0 -49
- package/es/CheckboxSet-751d4298.js.map +0 -1
- package/es/StyledDatePickerButton-444aa824.js.map +0 -1
- package/es/TextArea-273e8ce4.js +0 -184
- package/es/TextArea-273e8ce4.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputDatePicker-a1eea599.js","sources":["../../src/UNSAFE_InputDatePicker/InputDatePickerDropdown.tsx","../../src/UNSAFE_InputDatePicker/useInputDatePickerState.ts","../../src/UNSAFE_InputDatePicker/useInputDatePicker.ts","../../src/UNSAFE_InputDatePicker/InputDatePicker.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { ComponentProps } from 'preact';\nimport { useCallback, useState } from 'preact/hooks';\nimport { BundleType } from '../resources/nls/bundle';\nimport { DatePicker } from '#UNSAFE_DatePicker';\nimport { type CloseDetail as DropdownCloseDetail } from '#UNSAFE_Dropdown';\nimport { getClientHints } from '#utils/PRIVATE_clientHints';\nimport { FormFieldContext } from '../hooks/UNSAFE_useFormFieldContext';\nimport { InlineUserAssistance } from '../UNSAFE_UserAssistance';\nimport { InputDatePicker } from './InputDatePicker';\nimport { dropdownStyles, userAssistanceStyles } from './themes/InputDatePickerDropdownStyles.css';\nimport { PositionData } from '../UNSAFE_Floating';\nimport { StickyPositioningDropdown } from '#PRIVATE_FormControls';\nimport { SectionedContent } from '#PRIVATE_FormControls';\nimport { type CloseDetail as SheetCloseDetail, Sheet } from '#UNSAFE_Sheet';\nimport type { TestIdProps } from '#hooks/UNSAFE_useTestId';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { SizeOptions } from '#UNSAFE_Floating/Floating';\n\ntype StickyPositioningDropdownProps = ComponentProps<typeof StickyPositioningDropdown>;\ntype InputDatePickerProps = ComponentProps<typeof InputDatePicker>;\ntype PickedPropsFromInputDatePicker = Pick<\n InputDatePickerProps,\n | 'assistiveText'\n | 'dayFormatter'\n | 'daysOutsideMonth'\n | 'helpSourceLink'\n | 'helpSourceText'\n | 'isDisabled'\n | 'isReadonly'\n | 'label'\n | 'messages'\n | 'min'\n | 'max'\n | 'monthAndYearPicker'\n | 'todayButton'\n | 'todayTimeZone'\n | 'userAssistanceDensity'\n | 'value'\n | 'weekDisplay'\n>;\ntype DatePickerProps = ComponentProps<typeof DatePicker>;\ntype PickedPropsFromDatePicker = Pick<DatePickerProps, 'value' | 'onCommit'>;\ntype PickedPropsFromDropdown = Omit<StickyPositioningDropdownProps, 'onClose'>;\ntype CloseDetail = SheetCloseDetail | DropdownCloseDetail;\n\ntype Props = PickedPropsFromDatePicker &\n PickedPropsFromInputDatePicker &\n PickedPropsFromDropdown &\n TestIdProps & {\n /**\n * Called when the dropdown or sheet is supposed to be closed.\n */\n onClose?: (detail: CloseDetail) => void;\n };\n\n/**\n * Component that renders DatePicker either inside a dropdown or sheet; at small screen\n * widths, it renders inside a sheet. Additionally, when a dropdown is being shown beneath\n * the component, we also show any user assistance text or messages below the picker\n * because otherwise that information would be obscured from view. When a sheet is being\n * shown, it will always display UA and messages at the bottom of the sheet.\n */\nconst InputDatePickerDropdown = ({\n anchorRef,\n assistiveText,\n dayFormatter,\n daysOutsideMonth,\n helpSourceLink,\n helpSourceText,\n isDisabled,\n isOpen,\n isReadonly,\n label,\n onClose,\n onCommit,\n max,\n messages,\n min,\n monthAndYearPicker,\n testId,\n todayButton,\n todayTimeZone,\n userAssistanceDensity,\n value,\n weekDisplay\n}: Props) => {\n // If the dropdown opens above the component, we don't want to show UA or messages.\n const [isDropdownAbove, setDropdownAbove] = useState(false);\n const [prevIsOpen, setPrevIsOpen] = useState(isOpen);\n const handleDropdownPosition = useCallback<\n NonNullable<StickyPositioningDropdownProps['onPosition']>\n >((data: PositionData) => {\n setDropdownAbove(data.placement.startsWith('top'));\n }, []);\n // Reset the flag when the dropdown is closed.\n if (prevIsOpen !== isOpen) {\n setPrevIsOpen(isOpen);\n if (!isOpen) {\n setDropdownAbove(false);\n }\n }\n\n const sizeOptions: SizeOptions = {\n isMaxWidthAdjusted: false,\n isMaxHeightAdjusted: true\n };\n\n // On mobile phones, the dropdown becomes a sheet.\n const shouldShowSheet = isPhone();\n\n const { datePicker_label } = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const datePickerAriaLabel = datePicker_label();\n\n const datePickerMainContent = (\n <DatePicker\n dayFormatter={dayFormatter}\n daysOutsideMonth={daysOutsideMonth}\n height={!shouldShowSheet ? 'auto' : undefined}\n onCommit={onCommit}\n max={max}\n min={min}\n // for sheet, we want the width to grow to the width of the sheet, otherwise it will use the theme default.\n maxWidth={shouldShowSheet ? '100%' : undefined}\n width=\"100%\"\n monthAndYearPicker={monthAndYearPicker}\n testId={testId}\n todayTimeZone={todayTimeZone}\n todayButton={todayButton}\n value={value}\n weekDisplay={weekDisplay}\n />\n );\n\n const inlineUserAssistanceFooter =\n isOpen &&\n (!isDropdownAbove || shouldShowSheet) &&\n !isDisabled &&\n !isReadonly &&\n (assistiveText || helpSourceLink || (messages && messages.length > 0)) &&\n (userAssistanceDensity === 'efficient' || userAssistanceDensity === 'reflow') ? (\n <FormFieldContext.Provider value={{ isFocused: true }}>\n <div class={userAssistanceStyles}>\n <InlineUserAssistance\n assistiveText={assistiveText}\n fieldLabel={label}\n helpSourceLink={helpSourceLink}\n helpSourceText={helpSourceText}\n messages={messages}\n userAssistanceDensity={userAssistanceDensity}\n />\n </div>\n </FormFieldContext.Provider>\n ) : undefined;\n\n const contentTestId = testId ? testId + (shouldShowSheet ? '_sheet' : '_dropdown') : undefined;\n\n // The same content is displayed either in a dropdown or sheet: date picker and inline UA.\n // Add styling to the dropdown to enforce a fixed width.\n const dropdownContent = (\n <div class={dropdownStyles}>\n <SectionedContent\n aria-label={datePickerAriaLabel}\n footer={inlineUserAssistanceFooter}\n hasFocusTrap={true}\n main={datePickerMainContent}\n role=\"dialog\"\n testId={contentTestId}\n />\n </div>\n );\n\n const dropdown = shouldShowSheet ? (\n <Sheet initialFocus=\"firstFocusable\" isOpen={isOpen} onClose={onClose}>\n <SectionedContent\n aria-label={datePickerAriaLabel}\n footer={inlineUserAssistanceFooter}\n hasFocusTrap={true}\n main={datePickerMainContent}\n role=\"dialog\"\n testId={contentTestId}\n />\n </Sheet>\n ) : (\n <StickyPositioningDropdown\n anchorRef={anchorRef}\n initialFocus=\"firstFocusable\"\n isOpen={isOpen}\n onClose={onClose}\n onPosition={handleDropdownPosition}\n sizeOptions={sizeOptions}>\n {dropdownContent}\n </StickyPositioningDropdown>\n );\n\n return dropdown;\n};\n\nconst isPhone = () => {\n return getClientHints().deviceType === 'phone';\n};\n\nexport { InputDatePickerDropdown, type CloseDetail };\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { useReducer } from 'preact/hooks';\nimport type { CalendarDate, CalendarDateRequired } from '#utils/UNSAFE_calendarDateUtils';\nimport { isCompleteCalendarDate } from '#utils/UNSAFE_calendarDateUtils';\n\ntype InputDatePickerState = {\n /**\n * If dateValue is a complete date, then completeDateValue is the same as dateValue\n * otherwise is is undefined. We need to maintain separate states because\n * InputDateMask uses CalendarDate, but DatePicker uses CalendarDateRequired.\n * If the user types a partial date then opens the picker, we treat that as\n * no selection. The picker opens to the current month showing today.\n */\n completeDateValue?: CalendarDateRequired;\n\n /**\n * Represents the current date value of the component. The user either selected\n * the date in the picker, or typed it into the date field.\n */\n dateValue?: CalendarDate;\n};\n\ntype DateChangedAction = { type: 'dateChanged'; data?: CalendarDate };\ntype DateResetAction = { type: 'reset'; data?: CalendarDate };\ntype DateSelectedAction = { type: 'dateSelected'; data?: CalendarDateRequired };\ntype InputDatePickerReducerAction = DateChangedAction | DateResetAction | DateSelectedAction;\n\n// If dateVal is a complete date, return it as a CalendarDateRequired\n// otherwise return undefined.\nconst convertToCalendarDateRequired = (dateVal?: CalendarDate) => {\n return !dateVal || !isCompleteCalendarDate(dateVal)\n ? undefined\n : (dateVal as CalendarDateRequired);\n};\n\n// Use a reducer function to manage InputDatePickerState.\nconst inputDatePickerReducer = (\n state: InputDatePickerState,\n action: InputDatePickerReducerAction\n): InputDatePickerState => {\n switch (action.type) {\n case 'dateChanged': {\n return {\n ...state,\n dateValue: action.data,\n completeDateValue: convertToCalendarDateRequired(action.data)\n };\n }\n case 'dateSelected': {\n return { ...state, dateValue: action.data, completeDateValue: action.data };\n }\n case 'reset': {\n return {\n completeDateValue: convertToCalendarDateRequired(action.data),\n dateValue: action.data\n };\n }\n default:\n return state;\n }\n};\n\ntype Props = {\n /**\n * The value of the InputDatePicker, or undefined.\n */\n value?: CalendarDate;\n};\n\n/**\n * useInputDatePickerState calls useReducer to determine the initial state. Any changes to that state\n * are managed by dispatching actions to the reducer function.\n */\nconst useInputDatePickerState = ({ value }: Props) => {\n const [state, dispatch] = useReducer(inputDatePickerReducer, {\n completeDateValue: convertToCalendarDateRequired(value),\n dateValue: value\n });\n\n return { state, dispatch };\n};\n\nexport { useInputDatePickerState };\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport type { ComponentProps, RefObject } from 'preact';\nimport type { ElementRef } from 'preact/compat';\nimport { useCallback, useEffect, useRef, useState } from 'preact/hooks';\nimport type { CalendarDate, CalendarDateRequired } from '#utils/UNSAFE_calendarDateUtils';\nimport { calendarDatesAreDifferent } from '#utils/PRIVATE_dayUtils';\nimport { DatePicker } from '#UNSAFE_DatePicker';\nimport { CloseDetail, InputDatePickerDropdown } from './InputDatePickerDropdown';\nimport { IconButton } from '#UNSAFE_IconButton';\nimport { InputDateMask } from '#UNSAFE_InputDateMask';\nimport { InputDatePicker } from './InputDatePicker';\nimport { useHiddenTestMethod } from '#hooks/UNSAFE_useHiddenTestMethod';\nimport { useInputDatePickerState } from './useInputDatePickerState';\nimport type { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\n\ntype InputDatePickerProps = ComponentProps<typeof InputDatePicker>;\ntype InputDateMaskProps = ComponentProps<typeof InputDateMask>;\ntype DatePickerProps = ComponentProps<typeof DatePicker>;\ntype IconButtonProps = ComponentProps<typeof IconButton>;\ntype DropdownProps = ComponentProps<typeof InputDatePickerDropdown>;\n\ntype IconButtonHandle = ElementRef<typeof IconButton>;\n\ntype Props = {\n isDisabled: InputDatePickerProps['isDisabled'];\n isReadonly: InputDatePickerProps['isReadonly'];\n onCommit: InputDatePickerProps['onCommit'];\n onInput: InputDatePickerProps['onInput'];\n rootRef: RefObject<HTMLElement>;\n value: InputDatePickerProps['value'];\n};\n\n/**\n * Hook that provides handlers and other functionality for InputDatePicker.\n */\nconst useInputDatePicker = ({\n isDisabled,\n isReadonly,\n onCommit,\n onInput,\n rootRef,\n value: currentValue\n}: Props) => {\n // Whether the dropdown is open.\n const [isOpen, setIsOpen] = useState(false);\n\n // Ref to the calendar icon button.\n const iconRef = useRef<IconButtonHandle>(null);\n\n // Ref to the InputDateMask component.\n const maskRef: RefObject<HTMLElement> = useRef<HTMLElement>(null);\n\n // Keep track of whether the dropdown was just dismissed from an outside mousedown event.\n const outsideMousedownRef = useRef<boolean>(false);\n const outsideMousedownTimerRef = useRef<ReturnType<typeof setTimeout> | undefined>();\n\n // Keep track of the last date values passed to onInput and onCommit.\n const lastCommittedDateRef = useRef<CalendarDate | undefined>(currentValue);\n const lastDateRef = useRef<CalendarDate | undefined>(currentValue);\n\n // Keep track of the last controlled value passed from the parent, so we can detect a programmatic change.\n const lastValueFromParentRef = useRef<CalendarDate | undefined>(currentValue);\n\n // Keep track of whether a date was selected in the date picker.\n const dateSelectedRef = useRef<boolean>(false);\n\n const { state, dispatch } = useInputDatePickerState({ value: currentValue });\n\n // If a new value is being pushed from the parent, and that value differs from\n // the current value of the reducer, then this is a programmatic update\n // and we need to call 'reset' to update the reducer state. Otherwise, the only\n // time the reducer state is updated from the value is on mount.\n if (calendarDatesAreDifferent(lastValueFromParentRef.current, currentValue)) {\n lastValueFromParentRef.current = currentValue;\n if (calendarDatesAreDifferent(currentValue, state.dateValue)) {\n dispatch({ type: 'reset', data: currentValue });\n lastDateRef.current = currentValue;\n lastCommittedDateRef.current = currentValue;\n }\n }\n\n // Reducer updates are async, so wait until the state updates and then call our callbacks.\n useEffect(() => {\n if (calendarDatesAreDifferent(state.dateValue, lastDateRef.current)) {\n onInput({ previousValue: lastDateRef.current, value: state.dateValue });\n lastDateRef.current = state.dateValue;\n }\n if (\n dateSelectedRef.current &&\n calendarDatesAreDifferent(state.dateValue, lastCommittedDateRef.current)\n ) {\n onCommit?.({ previousValue: lastCommittedDateRef.current, value: state.dateValue });\n lastCommittedDateRef.current = state.dateValue;\n dateSelectedRef.current = false;\n }\n }, [onCommit, onInput, state.dateValue]);\n\n // Handle onInput from InputDateMask as segment values are being added or changed in the input field.\n // We wait for the state to update before calling onInput.\n const maskInputHandler = useCallback<InputDateMaskProps['onInput']>(\n (detail: ValueUpdateDetail<CalendarDate>) => {\n dispatch({ type: 'dateChanged', data: detail.value });\n },\n [dispatch]\n );\n\n // Handle onCommit from InputDateMask, which is called when the user presses Enter or the field is blurred.\n const maskCommitHandler = useCallback<NonNullable<InputDateMaskProps['onCommit']>>(\n (detail: ValueUpdateDetail<CalendarDate>) => {\n // If the value we get from InputDateMask's onCommit differs from the last committed value, then call onCommit.\n if (calendarDatesAreDifferent(lastCommittedDateRef.current, detail.value)) {\n onCommit?.({ value: detail.value, previousValue: lastCommittedDateRef.current });\n lastCommittedDateRef.current = detail.value;\n }\n },\n [onCommit]\n );\n\n // Respond to onAction event from the calendar icon button. Toggles the date picker dropdown.\n const calendarIconActionHandler = useCallback<NonNullable<IconButtonProps['onAction']>>(() => {\n // Only toggle the value of isOpen if we didn't just dismiss the dropdown.\n if (!outsideMousedownRef.current) {\n setIsOpen((prevIsOpen) => !prevIsOpen);\n }\n outsideMousedownRef.current = false;\n }, []);\n\n const dropdownCloseHandler = useCallback<NonNullable<DropdownProps['onClose']>>(\n (detail: CloseDetail) => {\n // Keep track of when the dropdown is closed via outside mousedown, including when the calendar icon\n // is clicked. We need this in order to toggle visibility of the picker and dropdown.\n if (detail.reason === 'outsideMousedown') {\n outsideMousedownRef.current = true;\n clearTimeout(outsideMousedownTimerRef.current);\n\n // Clear the flag after a short delay to ensure the dropdown can be opened again.\n outsideMousedownTimerRef.current = setTimeout(() => {\n outsideMousedownRef.current = false;\n }, 200);\n } else if (detail.reason === 'dismissed' || detail.reason === 'keyboardDismissed') {\n // Focus the calendar icon when the dropdown is closed.\n iconRef.current?.focus();\n }\n setIsOpen(false);\n },\n []\n );\n\n // Handle date selection in the picker.\n // - Updates the value in state.\n // - Closes the dropdown.\n // - Sets focus to the date field.\n const datePickerCommitHandler = useCallback<DatePickerProps['onCommit']>(\n (detail: ValueUpdateDetail<CalendarDateRequired>) => {\n // Set focus to the calendar icon when a date is selected.\n iconRef.current?.focus();\n\n // Set a ref indicating a date was selected.\n dateSelectedRef.current = true;\n dispatch({ type: 'dateSelected', data: detail.value });\n setIsOpen(false);\n },\n [dispatch]\n );\n\n // Create a changeValue method that can be called by a test adapter to simulate a user\n // changing the value and committing it.\n const changeValue = useCallback(\n (newValue?: CalendarDate) => {\n // We always want this method available on the DOM element so that a test can call it,\n // but we only want it to change the value when the component is enabled because that's\n // the only time the user could change the value through the UI.\n if (!isReadonly && !isDisabled) {\n onInput({ value: newValue, previousValue: currentValue });\n onCommit?.({ value: newValue, previousValue: currentValue });\n return Promise.resolve();\n }\n return Promise.reject('Component is readonly or disabled');\n },\n [currentValue, isDisabled, isReadonly, onCommit, onInput]\n );\n // Expose _changeValue as a hidden method on the root DOM.\n useHiddenTestMethod({\n elementRef: rootRef,\n method: changeValue,\n name: '_changeValue'\n });\n\n return {\n calendarIconActionHandler,\n datePickerCommitHandler,\n dropdownCloseHandler,\n completeDateValue: state.completeDateValue,\n dateValue: state.dateValue,\n iconRef,\n isOpen,\n maskCommitHandler,\n maskInputHandler,\n maskRef\n };\n};\n\nexport { useInputDatePicker };\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport { ComponentProps, Ref } from 'preact';\nimport { forwardRef } from 'preact/compat';\nimport { useImperativeHandle, useRef } from 'preact/hooks';\nimport { BundleType } from '../resources/nls/bundle';\nimport { CalendarIcon } from '#PRIVATE_ThemedIcons/CalendarIcon';\nimport {\n CalendarDate,\n CalendarDatePlaceholders,\n InputDateMask,\n InputDateMaskContext\n} from '#UNSAFE_InputDateMask';\nimport { DatePicker } from '#UNSAFE_DatePicker';\nimport { HiddenAccessible } from '#UNSAFE_HiddenAccessible';\nimport { IconButton } from '#UNSAFE_IconButton';\nimport { InputDatePickerDropdown } from './InputDatePickerDropdown';\nimport { FocusableHandle } from '#hooks/UNSAFE_useFocusableTextField';\nimport { merge } from '@oracle/oraclejet-internal-utilities/stringUtils';\nimport { useFormContext } from '#hooks/UNSAFE_useFormContext';\nimport { useId } from '#hooks/UNSAFE_useId';\nimport { useInputDatePicker } from './useInputDatePicker';\nimport { useTestId } from '#hooks/UNSAFE_useTestId';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\n\ntype InputDateMaskProps = ComponentProps<typeof InputDateMask>;\ntype PickedPropsFromInputDateMask = Pick<\n InputDateMaskProps,\n | 'aria-describedby'\n | 'assistiveText'\n | 'columnSpan'\n | 'helpSourceLink'\n | 'helpSourceText'\n | 'isDisabled'\n | 'isReadonly'\n | 'isRequired'\n | 'isRequiredShown'\n | 'label'\n | 'labelEdge'\n | 'labelStartWidth'\n | 'messages'\n | 'textAlign'\n | 'testId'\n | 'userAssistanceDensity'\n | 'variant'\n>;\n\ntype DatePickerProps = ComponentProps<typeof DatePicker>;\ntype PickedPropsFromDatePicker = Pick<\n DatePickerProps,\n | 'dayFormatter'\n | 'daysOutsideMonth'\n | 'max'\n | 'min'\n | 'monthAndYearPicker'\n | 'todayTimeZone'\n | 'todayButton'\n | 'weekDisplay'\n>;\n\ntype Props = PickedPropsFromInputDateMask &\n PickedPropsFromDatePicker & {\n /**\n * If specified, overrides the locale specific order of the individual date segments\n * in the date field as well as the locale specific separator. The value of each placeholder\n * is only used when the type is 'literal', otherwise it is replaced with a translated\n * placeholder for month, day, or year. The placeholders must include month, day, and year.\n */\n masks?: CalendarDatePlaceholders;\n\n /**\n * The current display value of the component.\n * This is a CalendarDate, not CalendarDateRequired, because this is a controlled component and\n * the user may type the month, day, and year separately. If a selection is made in the date\n * picker, then the value is a complete date.\n */\n value?: CalendarDate;\n\n /**\n * Callback invoked when the user commits the entered value by blurring or hitting the enter key.\n * It is also called when a selection is made in the date picker.\n */\n onCommit?: (detail: ValueUpdateDetail<CalendarDate>) => void;\n\n /**\n * Callback invoked each time the user changes the value of a segment. For example, if the user\n * types '12' into the month segment, this callback will be called twice to change the month\n * first to '1' and then '12'.\n */\n onInput: (detail: ValueUpdateDetail<CalendarDate>) => void;\n };\n\n/**\n * InputDatePicker allows users to enter or select a single date using a calendar interface.\n */\nexport const InputDatePicker = forwardRef(\n (\n {\n 'aria-describedby': propDescribedBy,\n assistiveText,\n dayFormatter,\n daysOutsideMonth,\n helpSourceLink,\n helpSourceText,\n isDisabled,\n isReadonly,\n label,\n max,\n messages,\n min,\n monthAndYearPicker,\n todayTimeZone,\n todayButton,\n value,\n onCommit,\n onInput,\n testId,\n userAssistanceDensity: propUserAssistanceDensity,\n weekDisplay,\n ...dateMaskProps\n }: Props,\n ref?: Ref<FocusableHandle>\n ) => {\n const testIdProps = useTestId(testId);\n const rootRef = useRef<HTMLDivElement>(null);\n\n const {\n calendarIconActionHandler,\n datePickerCommitHandler,\n completeDateValue,\n dateValue,\n dropdownCloseHandler,\n iconRef,\n isOpen,\n maskCommitHandler,\n maskInputHandler,\n maskRef\n } = useInputDatePicker({\n isDisabled,\n isReadonly,\n onCommit,\n onInput,\n rootRef,\n value\n });\n\n const mainFieldRef = useRef<HTMLDivElement>(null);\n const { inputDatePicker_selectDate, inputDatePicker_instruction } =\n useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const calendarIconAriaLabel = inputDatePicker_selectDate();\n\n // We need this to determine if UA/messaging should be shown in the dropdown.\n const { userAssistanceDensity: formUserAssistanceDensity } = useFormContext();\n const userAssistanceDensity = propUserAssistanceDensity ?? formUserAssistanceDensity;\n\n useImperativeHandle(ref!, () => ({\n focus: () => {\n maskRef.current?.focus();\n },\n blur: () => {\n maskRef.current?.blur();\n }\n }));\n\n const maskFieldInstructionId = useId();\n const maskFieldInstructionText = inputDatePicker_instruction();\n const maskFieldInstruction =\n !isDisabled && !isReadonly ? (\n <HiddenAccessible id={maskFieldInstructionId} isHidden={true}>\n {maskFieldInstructionText}\n </HiddenAccessible>\n ) : undefined;\n const ariaDescribedBy =\n !isDisabled && !isReadonly\n ? merge([propDescribedBy, maskFieldInstructionId])\n : propDescribedBy;\n\n const endContent = (\n <IconButton\n aria-haspopup=\"dialog\"\n aria-label={calendarIconAriaLabel}\n isDisabled={isDisabled}\n ref={iconRef}\n size=\"sm\"\n testId={testId ? testId + '_calendarIcon' : undefined}\n variant=\"ghost\"\n onAction={calendarIconActionHandler}>\n <CalendarIcon />\n </IconButton>\n );\n\n const shouldShowDropdown = isOpen as boolean;\n\n return (\n <div {...testIdProps} ref={rootRef}>\n <InputDateMaskContext.Provider\n value={{ isDropdownOpen: isOpen, isInputDatePickerParent: true }}>\n <InputDateMask\n aria-describedby={ariaDescribedBy}\n assistiveText={assistiveText}\n endContent={endContent}\n helpSourceLink={helpSourceLink}\n helpSourceText={helpSourceText}\n isDisabled={isDisabled}\n isReadonly={isReadonly}\n label={label}\n onCommit={maskCommitHandler}\n onInput={maskInputHandler}\n mainFieldRef={mainFieldRef}\n messages={messages}\n testId={testId ? testId + '_mask' : undefined}\n ref={maskRef}\n userAssistanceDensity={propUserAssistanceDensity}\n value={dateValue}\n {...dateMaskProps}\n />\n </InputDateMaskContext.Provider>\n\n {maskFieldInstruction}\n\n {shouldShowDropdown && (\n <InputDatePickerDropdown\n anchorRef={mainFieldRef}\n assistiveText={assistiveText}\n dayFormatter={dayFormatter}\n daysOutsideMonth={daysOutsideMonth}\n helpSourceLink={helpSourceLink}\n helpSourceText={helpSourceText}\n isDisabled={isDisabled}\n isReadonly={isReadonly}\n isOpen={isOpen}\n label={label}\n onClose={dropdownCloseHandler}\n onCommit={datePickerCommitHandler}\n max={max}\n messages={messages}\n min={min}\n monthAndYearPicker={monthAndYearPicker}\n testId={testId ? testId + '_datePicker' : undefined}\n todayTimeZone={todayTimeZone}\n todayButton={todayButton}\n userAssistanceDensity={userAssistanceDensity}\n value={completeDateValue}\n weekDisplay={weekDisplay}\n />\n )}\n </div>\n );\n }\n);\n"],"names":["InputDatePickerDropdown","anchorRef","assistiveText","dayFormatter","daysOutsideMonth","helpSourceLink","helpSourceText","isDisabled","isOpen","isReadonly","label","onClose","onCommit","max","messages","min","monthAndYearPicker","testId","todayButton","todayTimeZone","userAssistanceDensity","value","weekDisplay","isDropdownAbove","setDropdownAbove","useState","prevIsOpen","setPrevIsOpen","handleDropdownPosition","useCallback","data","placement","startsWith","shouldShowSheet","isPhone","datePicker_label","useTranslationBundle","datePickerAriaLabel","datePickerMainContent","_jsx","DatePicker","height","undefined","maxWidth","width","inlineUserAssistanceFooter","length","FormFieldContext","Provider","isFocused","children","jsx","class","userAssistanceStyles","InlineUserAssistance","fieldLabel","contentTestId","dropdownContent","dropdownStyles","SectionedContent","footer","hasFocusTrap","main","role","Sheet","initialFocus","StickyPositioningDropdown","onPosition","sizeOptions","isMaxWidthAdjusted","isMaxHeightAdjusted","getClientHints","deviceType","convertToCalendarDateRequired","dateVal","isCompleteCalendarDate","inputDatePickerReducer","state","action","type","dateValue","completeDateValue","useInputDatePicker","onInput","rootRef","currentValue","setIsOpen","iconRef","useRef","maskRef","outsideMousedownRef","outsideMousedownTimerRef","lastCommittedDateRef","lastDateRef","lastValueFromParentRef","dateSelectedRef","dispatch","useReducer","useInputDatePickerState","calendarDatesAreDifferent","current","useEffect","previousValue","maskInputHandler","detail","maskCommitHandler","calendarIconActionHandler","dropdownCloseHandler","reason","clearTimeout","setTimeout","focus","datePickerCommitHandler","changeValue","newValue","Promise","reject","resolve","useHiddenTestMethod","elementRef","method","name","InputDatePicker","forwardRef","propDescribedBy","propUserAssistanceDensity","dateMaskProps","ref","testIdProps","useTestId","mainFieldRef","inputDatePicker_selectDate","inputDatePicker_instruction","calendarIconAriaLabel","formUserAssistanceDensity","useFormContext","useImperativeHandle","blur","maskFieldInstructionId","useId","maskFieldInstructionText","maskFieldInstruction","HiddenAccessible","id","isHidden","ariaDescribedBy","merge","endContent","IconButton","size","variant","onAction","CalendarIcon","shouldShowDropdown","_jsxs","InputDateMaskContext","isDropdownOpen","isInputDatePickerParent","InputDateMask"],"mappings":"upEAsEA,MAAMA,GAA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EACfC,aAAcA,EACdC,iBAAkBA,EAClBC,eAAgBA,EAChBC,eAAgBA,EAChBC,WAAYA,EACZE,WAAYA,EACZD,OAAQA,EACRE,MAAOA,EACPC,QAASgG,EACT/F,SAAUoG,EACVnG,IAAKA,EACLC,SAAUA,EACVC,IAAKA,EACLC,mBAAoBA,EACpBC,OAAQA,EAASA,EAAS,mBAAgByB,EAC1CvB,cAAeA,EACfD,YAAaA,EACbE,sBAAuBA,EACvBC,MAAO4D,EACP3D,YAAaA,MAInB"}
|
|
1
|
+
{"version":3,"file":"InputDatePicker-c5ceeb44.js","sources":["../../src/UNSAFE_InputDatePicker/InputDatePickerDropdown.tsx","../../src/UNSAFE_InputDatePicker/useInputDatePickerState.ts","../../src/UNSAFE_InputDatePicker/useInputDatePicker.ts","../../src/UNSAFE_InputDatePicker/InputDatePicker.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { ComponentProps } from 'preact';\nimport { useCallback, useState } from 'preact/hooks';\nimport { BundleType } from '../resources/nls/bundle';\nimport { DatePicker } from '#UNSAFE_DatePicker';\nimport { type CloseDetail as DropdownCloseDetail } from '#UNSAFE_Dropdown';\nimport { getClientHints } from '#utils/PRIVATE_clientHints';\nimport { FormFieldContext } from '../hooks/UNSAFE_useFormFieldContext';\nimport { InlineUserAssistance } from '../UNSAFE_UserAssistance';\nimport { InputDatePicker } from './InputDatePicker';\nimport { dropdownStyles, userAssistanceStyles } from './themes/InputDatePickerDropdownStyles.css';\nimport { PositionData } from '../UNSAFE_Floating';\nimport { StickyPositioningDropdown } from '#PRIVATE_FormControls';\nimport { SectionedContent } from '#PRIVATE_FormControls';\nimport { type CloseDetail as SheetCloseDetail, Sheet } from '#UNSAFE_Sheet';\nimport type { TestIdProps } from '#hooks/UNSAFE_useTestId';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { SizeOptions } from '#UNSAFE_Floating/Floating';\n\ntype StickyPositioningDropdownProps = ComponentProps<typeof StickyPositioningDropdown>;\ntype InputDatePickerProps = ComponentProps<typeof InputDatePicker>;\ntype PickedPropsFromInputDatePicker = Pick<\n InputDatePickerProps,\n | 'assistiveText'\n | 'dayFormatter'\n | 'daysOutsideMonth'\n | 'helpSourceLink'\n | 'helpSourceText'\n | 'isDisabled'\n | 'isReadonly'\n | 'label'\n | 'messages'\n | 'min'\n | 'max'\n | 'monthAndYearPicker'\n | 'todayButton'\n | 'todayTimeZone'\n | 'userAssistanceDensity'\n | 'value'\n | 'weekDisplay'\n>;\ntype DatePickerProps = ComponentProps<typeof DatePicker>;\ntype PickedPropsFromDatePicker = Pick<DatePickerProps, 'value' | 'onCommit'>;\ntype PickedPropsFromDropdown = Omit<StickyPositioningDropdownProps, 'onClose'>;\ntype CloseDetail = SheetCloseDetail | DropdownCloseDetail;\n\ntype Props = PickedPropsFromDatePicker &\n PickedPropsFromInputDatePicker &\n PickedPropsFromDropdown &\n TestIdProps & {\n /**\n * Called when the dropdown or sheet is supposed to be closed.\n */\n onClose?: (detail: CloseDetail) => void;\n };\n\n/**\n * Component that renders DatePicker either inside a dropdown or sheet; at small screen\n * widths, it renders inside a sheet. Additionally, when a dropdown is being shown beneath\n * the component, we also show any user assistance text or messages below the picker\n * because otherwise that information would be obscured from view. When a sheet is being\n * shown, it will always display UA and messages at the bottom of the sheet.\n */\nconst InputDatePickerDropdown = ({\n anchorRef,\n assistiveText,\n dayFormatter,\n daysOutsideMonth,\n helpSourceLink,\n helpSourceText,\n isDisabled,\n isOpen,\n isReadonly,\n label,\n onClose,\n onCommit,\n max,\n messages,\n min,\n monthAndYearPicker,\n testId,\n todayButton,\n todayTimeZone,\n userAssistanceDensity,\n value,\n weekDisplay\n}: Props) => {\n // If the dropdown opens above the component, we don't want to show UA or messages.\n const [isDropdownAbove, setDropdownAbove] = useState(false);\n const [prevIsOpen, setPrevIsOpen] = useState(isOpen);\n const handleDropdownPosition = useCallback<\n NonNullable<StickyPositioningDropdownProps['onPosition']>\n >((data: PositionData) => {\n setDropdownAbove(data.placement.startsWith('top'));\n }, []);\n // Reset the flag when the dropdown is closed.\n if (prevIsOpen !== isOpen) {\n setPrevIsOpen(isOpen);\n if (!isOpen) {\n setDropdownAbove(false);\n }\n }\n\n const sizeOptions: SizeOptions = {\n isMaxWidthAdjusted: false,\n isMaxHeightAdjusted: true\n };\n\n // On mobile phones, the dropdown becomes a sheet.\n const shouldShowSheet = isPhone();\n\n const { datePicker_label } = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const datePickerAriaLabel = datePicker_label();\n\n const datePickerMainContent = (\n <DatePicker\n dayFormatter={dayFormatter}\n daysOutsideMonth={daysOutsideMonth}\n height={!shouldShowSheet ? 'auto' : undefined}\n onCommit={onCommit}\n max={max}\n min={min}\n // for sheet, we want the width to grow to the width of the sheet, otherwise it will use the theme default.\n maxWidth={shouldShowSheet ? '100%' : undefined}\n width=\"100%\"\n monthAndYearPicker={monthAndYearPicker}\n testId={testId}\n todayTimeZone={todayTimeZone}\n todayButton={todayButton}\n value={value}\n weekDisplay={weekDisplay}\n />\n );\n\n const inlineUserAssistanceFooter =\n isOpen &&\n (!isDropdownAbove || shouldShowSheet) &&\n !isDisabled &&\n !isReadonly &&\n (assistiveText || helpSourceLink || (messages && messages.length > 0)) &&\n (userAssistanceDensity === 'efficient' || userAssistanceDensity === 'reflow') ? (\n <FormFieldContext.Provider value={{ isFocused: true }}>\n <div class={userAssistanceStyles}>\n <InlineUserAssistance\n assistiveText={assistiveText}\n fieldLabel={label}\n helpSourceLink={helpSourceLink}\n helpSourceText={helpSourceText}\n messages={messages}\n userAssistanceDensity={userAssistanceDensity}\n />\n </div>\n </FormFieldContext.Provider>\n ) : undefined;\n\n const contentTestId = testId ? testId + (shouldShowSheet ? '_sheet' : '_dropdown') : undefined;\n\n // The same content is displayed either in a dropdown or sheet: date picker and inline UA.\n // Add styling to the dropdown to enforce a fixed width.\n const dropdownContent = (\n <div class={dropdownStyles}>\n <SectionedContent\n aria-label={datePickerAriaLabel}\n footer={inlineUserAssistanceFooter}\n hasFocusTrap={true}\n main={datePickerMainContent}\n role=\"dialog\"\n testId={contentTestId}\n />\n </div>\n );\n\n const dropdown = shouldShowSheet ? (\n <Sheet initialFocus=\"firstFocusable\" isOpen={isOpen} onClose={onClose}>\n <SectionedContent\n aria-label={datePickerAriaLabel}\n footer={inlineUserAssistanceFooter}\n hasFocusTrap={true}\n main={datePickerMainContent}\n role=\"dialog\"\n testId={contentTestId}\n />\n </Sheet>\n ) : (\n <StickyPositioningDropdown\n anchorRef={anchorRef}\n initialFocus=\"firstFocusable\"\n isOpen={isOpen}\n onClose={onClose}\n onPosition={handleDropdownPosition}\n sizeOptions={sizeOptions}>\n {dropdownContent}\n </StickyPositioningDropdown>\n );\n\n return dropdown;\n};\n\nconst isPhone = () => {\n return getClientHints().deviceType === 'phone';\n};\n\nexport { InputDatePickerDropdown, type CloseDetail };\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { useReducer } from 'preact/hooks';\nimport type { CalendarDate, CalendarDateRequired } from '#utils/UNSAFE_calendarDateUtils';\nimport { isCompleteCalendarDate } from '#utils/UNSAFE_calendarDateUtils';\n\ntype InputDatePickerState = {\n /**\n * If dateValue is a complete date, then completeDateValue is the same as dateValue\n * otherwise is is undefined. We need to maintain separate states because\n * InputDateMask uses CalendarDate, but DatePicker uses CalendarDateRequired.\n * If the user types a partial date then opens the picker, we treat that as\n * no selection. The picker opens to the current month showing today.\n */\n completeDateValue?: CalendarDateRequired;\n\n /**\n * Represents the current date value of the component. The user either selected\n * the date in the picker, or typed it into the date field.\n */\n dateValue?: CalendarDate;\n};\n\ntype DateChangedAction = { type: 'dateChanged'; data?: CalendarDate };\ntype DateResetAction = { type: 'reset'; data?: CalendarDate };\ntype DateSelectedAction = { type: 'dateSelected'; data?: CalendarDateRequired };\ntype InputDatePickerReducerAction = DateChangedAction | DateResetAction | DateSelectedAction;\n\n// If dateVal is a complete date, return it as a CalendarDateRequired\n// otherwise return undefined.\nconst convertToCalendarDateRequired = (dateVal?: CalendarDate) => {\n return !dateVal || !isCompleteCalendarDate(dateVal)\n ? undefined\n : (dateVal as CalendarDateRequired);\n};\n\n// Use a reducer function to manage InputDatePickerState.\nconst inputDatePickerReducer = (\n state: InputDatePickerState,\n action: InputDatePickerReducerAction\n): InputDatePickerState => {\n switch (action.type) {\n case 'dateChanged': {\n return {\n ...state,\n dateValue: action.data,\n completeDateValue: convertToCalendarDateRequired(action.data)\n };\n }\n case 'dateSelected': {\n return { ...state, dateValue: action.data, completeDateValue: action.data };\n }\n case 'reset': {\n return {\n completeDateValue: convertToCalendarDateRequired(action.data),\n dateValue: action.data\n };\n }\n default:\n return state;\n }\n};\n\ntype Props = {\n /**\n * The value of the InputDatePicker, or undefined.\n */\n value?: CalendarDate;\n};\n\n/**\n * useInputDatePickerState calls useReducer to determine the initial state. Any changes to that state\n * are managed by dispatching actions to the reducer function.\n */\nconst useInputDatePickerState = ({ value }: Props) => {\n const [state, dispatch] = useReducer(inputDatePickerReducer, {\n completeDateValue: convertToCalendarDateRequired(value),\n dateValue: value\n });\n\n return { state, dispatch };\n};\n\nexport { useInputDatePickerState };\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport type { ComponentProps, RefObject } from 'preact';\nimport type { ElementRef } from 'preact/compat';\nimport { useCallback, useEffect, useRef, useState } from 'preact/hooks';\nimport type { CalendarDate, CalendarDateRequired } from '#utils/UNSAFE_calendarDateUtils';\nimport { calendarDatesAreDifferent } from '#utils/PRIVATE_dayUtils';\nimport { DatePicker } from '#UNSAFE_DatePicker';\nimport { CloseDetail, InputDatePickerDropdown } from './InputDatePickerDropdown';\nimport { IconButton } from '#UNSAFE_IconButton';\nimport { InputDateMask } from '#UNSAFE_InputDateMask';\nimport { InputDatePicker } from './InputDatePicker';\nimport { useHiddenTestMethod } from '#hooks/UNSAFE_useHiddenTestMethod';\nimport { useInputDatePickerState } from './useInputDatePickerState';\nimport type { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\n\ntype InputDatePickerProps = ComponentProps<typeof InputDatePicker>;\ntype InputDateMaskProps = ComponentProps<typeof InputDateMask>;\ntype DatePickerProps = ComponentProps<typeof DatePicker>;\ntype IconButtonProps = ComponentProps<typeof IconButton>;\ntype DropdownProps = ComponentProps<typeof InputDatePickerDropdown>;\n\ntype IconButtonHandle = ElementRef<typeof IconButton>;\n\ntype Props = {\n isDisabled: InputDatePickerProps['isDisabled'];\n isReadonly: InputDatePickerProps['isReadonly'];\n onCommit: InputDatePickerProps['onCommit'];\n onInput: InputDatePickerProps['onInput'];\n rootRef: RefObject<HTMLElement>;\n value: InputDatePickerProps['value'];\n};\n\n/**\n * Hook that provides handlers and other functionality for InputDatePicker.\n */\nconst useInputDatePicker = ({\n isDisabled,\n isReadonly,\n onCommit,\n onInput,\n rootRef,\n value: currentValue\n}: Props) => {\n // Whether the dropdown is open.\n const [isOpen, setIsOpen] = useState(false);\n\n // Ref to the calendar icon button.\n const iconRef = useRef<IconButtonHandle>(null);\n\n // Ref to the InputDateMask component.\n const maskRef: RefObject<HTMLElement> = useRef<HTMLElement>(null);\n\n // Keep track of whether the dropdown was just dismissed from an outside mousedown event.\n const outsideMousedownRef = useRef<boolean>(false);\n const outsideMousedownTimerRef = useRef<ReturnType<typeof setTimeout> | undefined>();\n\n // Keep track of the last date values passed to onInput and onCommit.\n const lastCommittedDateRef = useRef<CalendarDate | undefined>(currentValue);\n const lastDateRef = useRef<CalendarDate | undefined>(currentValue);\n\n // Keep track of the last controlled value passed from the parent, so we can detect a programmatic change.\n const lastValueFromParentRef = useRef<CalendarDate | undefined>(currentValue);\n\n // Keep track of whether a date was selected in the date picker.\n const dateSelectedRef = useRef<boolean>(false);\n\n const { state, dispatch } = useInputDatePickerState({ value: currentValue });\n\n // If a new value is being pushed from the parent, and that value differs from\n // the current value of the reducer, then this is a programmatic update\n // and we need to call 'reset' to update the reducer state. Otherwise, the only\n // time the reducer state is updated from the value is on mount.\n if (calendarDatesAreDifferent(lastValueFromParentRef.current, currentValue)) {\n lastValueFromParentRef.current = currentValue;\n if (calendarDatesAreDifferent(currentValue, state.dateValue)) {\n dispatch({ type: 'reset', data: currentValue });\n lastDateRef.current = currentValue;\n lastCommittedDateRef.current = currentValue;\n }\n }\n\n // Reducer updates are async, so wait until the state updates and then call our callbacks.\n useEffect(() => {\n if (calendarDatesAreDifferent(state.dateValue, lastDateRef.current)) {\n onInput({ previousValue: lastDateRef.current, value: state.dateValue });\n lastDateRef.current = state.dateValue;\n }\n if (\n dateSelectedRef.current &&\n calendarDatesAreDifferent(state.dateValue, lastCommittedDateRef.current)\n ) {\n onCommit?.({ previousValue: lastCommittedDateRef.current, value: state.dateValue });\n lastCommittedDateRef.current = state.dateValue;\n dateSelectedRef.current = false;\n }\n }, [onCommit, onInput, state.dateValue]);\n\n // Handle onInput from InputDateMask as segment values are being added or changed in the input field.\n // We wait for the state to update before calling onInput.\n const maskInputHandler = useCallback<InputDateMaskProps['onInput']>(\n (detail: ValueUpdateDetail<CalendarDate>) => {\n dispatch({ type: 'dateChanged', data: detail.value });\n },\n [dispatch]\n );\n\n // Handle onCommit from InputDateMask, which is called when the user presses Enter or the field is blurred.\n const maskCommitHandler = useCallback<NonNullable<InputDateMaskProps['onCommit']>>(\n (detail: ValueUpdateDetail<CalendarDate>) => {\n // If the value we get from InputDateMask's onCommit differs from the last committed value, then call onCommit.\n if (calendarDatesAreDifferent(lastCommittedDateRef.current, detail.value)) {\n onCommit?.({ value: detail.value, previousValue: lastCommittedDateRef.current });\n lastCommittedDateRef.current = detail.value;\n }\n },\n [onCommit]\n );\n\n // Respond to onAction event from the calendar icon button. Toggles the date picker dropdown.\n const calendarIconActionHandler = useCallback<NonNullable<IconButtonProps['onAction']>>(() => {\n // Only toggle the value of isOpen if we didn't just dismiss the dropdown.\n if (!outsideMousedownRef.current) {\n setIsOpen((prevIsOpen) => !prevIsOpen);\n }\n outsideMousedownRef.current = false;\n }, []);\n\n const dropdownCloseHandler = useCallback<NonNullable<DropdownProps['onClose']>>(\n (detail: CloseDetail) => {\n // Keep track of when the dropdown is closed via outside mousedown, including when the calendar icon\n // is clicked. We need this in order to toggle visibility of the picker and dropdown.\n if (detail.reason === 'outsideMousedown') {\n outsideMousedownRef.current = true;\n clearTimeout(outsideMousedownTimerRef.current);\n\n // Clear the flag after a short delay to ensure the dropdown can be opened again.\n outsideMousedownTimerRef.current = setTimeout(() => {\n outsideMousedownRef.current = false;\n }, 200);\n } else if (detail.reason === 'dismissed' || detail.reason === 'keyboardDismissed') {\n // Focus the calendar icon when the dropdown is closed.\n iconRef.current?.focus();\n }\n setIsOpen(false);\n },\n []\n );\n\n // Handle date selection in the picker.\n // - Updates the value in state.\n // - Closes the dropdown.\n // - Sets focus to the date field.\n const datePickerCommitHandler = useCallback<DatePickerProps['onCommit']>(\n (detail: ValueUpdateDetail<CalendarDateRequired>) => {\n // Set focus to the calendar icon when a date is selected.\n iconRef.current?.focus();\n\n // Set a ref indicating a date was selected.\n dateSelectedRef.current = true;\n dispatch({ type: 'dateSelected', data: detail.value });\n setIsOpen(false);\n },\n [dispatch]\n );\n\n // Create a changeValue method that can be called by a test adapter to simulate a user\n // changing the value and committing it.\n const changeValue = useCallback(\n (newValue?: CalendarDate) => {\n // We always want this method available on the DOM element so that a test can call it,\n // but we only want it to change the value when the component is enabled because that's\n // the only time the user could change the value through the UI.\n if (!isReadonly && !isDisabled) {\n onInput({ value: newValue, previousValue: currentValue });\n onCommit?.({ value: newValue, previousValue: currentValue });\n return Promise.resolve();\n }\n return Promise.reject('Component is readonly or disabled');\n },\n [currentValue, isDisabled, isReadonly, onCommit, onInput]\n );\n // Expose _changeValue as a hidden method on the root DOM.\n useHiddenTestMethod({\n elementRef: rootRef,\n method: changeValue,\n name: '_changeValue'\n });\n\n return {\n calendarIconActionHandler,\n datePickerCommitHandler,\n dropdownCloseHandler,\n completeDateValue: state.completeDateValue,\n dateValue: state.dateValue,\n iconRef,\n isOpen,\n maskCommitHandler,\n maskInputHandler,\n maskRef\n };\n};\n\nexport { useInputDatePicker };\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport { ComponentProps, Ref } from 'preact';\nimport { forwardRef } from 'preact/compat';\nimport { useImperativeHandle, useRef } from 'preact/hooks';\nimport { BundleType } from '../resources/nls/bundle';\nimport { CalendarIcon } from '#PRIVATE_ThemedIcons/CalendarIcon';\nimport {\n CalendarDate,\n CalendarDatePlaceholders,\n InputDateMask,\n InputDateMaskContext\n} from '#UNSAFE_InputDateMask';\nimport { DatePicker } from '#UNSAFE_DatePicker';\nimport { HiddenAccessible } from '#UNSAFE_HiddenAccessible';\nimport { IconButton } from '#UNSAFE_IconButton';\nimport { InputDatePickerDropdown } from './InputDatePickerDropdown';\nimport { FocusableHandle } from '#hooks/UNSAFE_useFocusableTextField';\nimport { merge } from '@oracle/oraclejet-internal-utilities/stringUtils';\nimport { useFormContext } from '#hooks/UNSAFE_useFormContext';\nimport { useId } from '#hooks/UNSAFE_useId';\nimport { useInputDatePicker } from './useInputDatePicker';\nimport { useTestId } from '#hooks/UNSAFE_useTestId';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\n\ntype InputDateMaskProps = ComponentProps<typeof InputDateMask>;\ntype PickedPropsFromInputDateMask = Pick<\n InputDateMaskProps,\n | 'aria-describedby'\n | 'assistiveText'\n | 'columnSpan'\n | 'helpSourceLink'\n | 'helpSourceText'\n | 'isDisabled'\n | 'isReadonly'\n | 'isRequired'\n | 'isRequiredShown'\n | 'label'\n | 'labelEdge'\n | 'labelStartWidth'\n | 'messages'\n | 'textAlign'\n | 'testId'\n | 'userAssistanceDensity'\n | 'variant'\n>;\n\ntype DatePickerProps = ComponentProps<typeof DatePicker>;\ntype PickedPropsFromDatePicker = Pick<\n DatePickerProps,\n | 'dayFormatter'\n | 'daysOutsideMonth'\n | 'max'\n | 'min'\n | 'monthAndYearPicker'\n | 'todayTimeZone'\n | 'todayButton'\n | 'weekDisplay'\n>;\n\ntype Props = PickedPropsFromInputDateMask &\n PickedPropsFromDatePicker & {\n /**\n * If specified, overrides the locale specific order of the individual date segments\n * in the date field as well as the locale specific separator. The value of each placeholder\n * is only used when the type is 'literal', otherwise it is replaced with a translated\n * placeholder for month, day, or year. The placeholders must include month, day, and year.\n */\n masks?: CalendarDatePlaceholders;\n\n /**\n * The current display value of the component.\n * This is a CalendarDate, not CalendarDateRequired, because this is a controlled component and\n * the user may type the month, day, and year separately. If a selection is made in the date\n * picker, then the value is a complete date.\n */\n value?: CalendarDate;\n\n /**\n * Callback invoked when the user commits the entered value by blurring or hitting the enter key.\n * It is also called when a selection is made in the date picker.\n */\n onCommit?: (detail: ValueUpdateDetail<CalendarDate>) => void;\n\n /**\n * Callback invoked each time the user changes the value of a segment. For example, if the user\n * types '12' into the month segment, this callback will be called twice to change the month\n * first to '1' and then '12'.\n */\n onInput: (detail: ValueUpdateDetail<CalendarDate>) => void;\n };\n\n/**\n * InputDatePicker allows users to enter or select a single date using a calendar interface.\n */\nexport const InputDatePicker = forwardRef(\n (\n {\n 'aria-describedby': propDescribedBy,\n assistiveText,\n dayFormatter,\n daysOutsideMonth,\n helpSourceLink,\n helpSourceText,\n isDisabled,\n isReadonly,\n label,\n max,\n messages,\n min,\n monthAndYearPicker,\n todayTimeZone,\n todayButton,\n value,\n onCommit,\n onInput,\n testId,\n userAssistanceDensity: propUserAssistanceDensity,\n weekDisplay,\n ...dateMaskProps\n }: Props,\n ref?: Ref<FocusableHandle>\n ) => {\n const testIdProps = useTestId(testId);\n const rootRef = useRef<HTMLDivElement>(null);\n\n const {\n calendarIconActionHandler,\n datePickerCommitHandler,\n completeDateValue,\n dateValue,\n dropdownCloseHandler,\n iconRef,\n isOpen,\n maskCommitHandler,\n maskInputHandler,\n maskRef\n } = useInputDatePicker({\n isDisabled,\n isReadonly,\n onCommit,\n onInput,\n rootRef,\n value\n });\n\n const mainFieldRef = useRef<HTMLDivElement>(null);\n const { inputDatePicker_selectDate, inputDatePicker_instruction } =\n useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const calendarIconAriaLabel = inputDatePicker_selectDate();\n\n // We need this to determine if UA/messaging should be shown in the dropdown.\n const { userAssistanceDensity: formUserAssistanceDensity } = useFormContext();\n const userAssistanceDensity = propUserAssistanceDensity ?? formUserAssistanceDensity;\n\n useImperativeHandle(ref!, () => ({\n focus: () => {\n maskRef.current?.focus();\n },\n blur: () => {\n maskRef.current?.blur();\n }\n }));\n\n const maskFieldInstructionId = useId();\n const maskFieldInstructionText = inputDatePicker_instruction();\n const maskFieldInstruction =\n !isDisabled && !isReadonly ? (\n <HiddenAccessible id={maskFieldInstructionId} isHidden={true}>\n {maskFieldInstructionText}\n </HiddenAccessible>\n ) : undefined;\n const ariaDescribedBy =\n !isDisabled && !isReadonly\n ? merge([propDescribedBy, maskFieldInstructionId])\n : propDescribedBy;\n\n const endContent = (\n <IconButton\n aria-haspopup=\"dialog\"\n aria-label={calendarIconAriaLabel}\n isDisabled={isDisabled}\n ref={iconRef}\n size=\"sm\"\n testId={testId ? testId + '_calendarIcon' : undefined}\n variant=\"ghost\"\n onAction={calendarIconActionHandler}>\n <CalendarIcon />\n </IconButton>\n );\n\n const shouldShowDropdown = isOpen as boolean;\n\n return (\n <div {...testIdProps} ref={rootRef}>\n <InputDateMaskContext.Provider\n value={{ isDropdownOpen: isOpen, isInputDatePickerParent: true }}>\n <InputDateMask\n aria-describedby={ariaDescribedBy}\n assistiveText={assistiveText}\n endContent={endContent}\n helpSourceLink={helpSourceLink}\n helpSourceText={helpSourceText}\n isDisabled={isDisabled}\n isReadonly={isReadonly}\n label={label}\n onCommit={maskCommitHandler}\n onInput={maskInputHandler}\n mainFieldRef={mainFieldRef}\n messages={messages}\n testId={testId ? testId + '_mask' : undefined}\n ref={maskRef}\n userAssistanceDensity={propUserAssistanceDensity}\n value={dateValue}\n {...dateMaskProps}\n />\n </InputDateMaskContext.Provider>\n\n {maskFieldInstruction}\n\n {shouldShowDropdown && (\n <InputDatePickerDropdown\n anchorRef={mainFieldRef}\n assistiveText={assistiveText}\n dayFormatter={dayFormatter}\n daysOutsideMonth={daysOutsideMonth}\n helpSourceLink={helpSourceLink}\n helpSourceText={helpSourceText}\n isDisabled={isDisabled}\n isReadonly={isReadonly}\n isOpen={isOpen}\n label={label}\n onClose={dropdownCloseHandler}\n onCommit={datePickerCommitHandler}\n max={max}\n messages={messages}\n min={min}\n monthAndYearPicker={monthAndYearPicker}\n testId={testId ? testId + '_datePicker' : undefined}\n todayTimeZone={todayTimeZone}\n todayButton={todayButton}\n userAssistanceDensity={userAssistanceDensity}\n value={completeDateValue}\n weekDisplay={weekDisplay}\n />\n )}\n </div>\n );\n }\n);\n"],"names":["InputDatePickerDropdown","anchorRef","assistiveText","dayFormatter","daysOutsideMonth","helpSourceLink","helpSourceText","isDisabled","isOpen","isReadonly","label","onClose","onCommit","max","messages","min","monthAndYearPicker","testId","todayButton","todayTimeZone","userAssistanceDensity","value","weekDisplay","isDropdownAbove","setDropdownAbove","useState","prevIsOpen","setPrevIsOpen","handleDropdownPosition","useCallback","data","placement","startsWith","shouldShowSheet","isPhone","datePicker_label","useTranslationBundle","datePickerAriaLabel","datePickerMainContent","_jsx","DatePicker","height","undefined","maxWidth","width","inlineUserAssistanceFooter","length","FormFieldContext","Provider","isFocused","children","jsx","class","userAssistanceStyles","InlineUserAssistance","fieldLabel","contentTestId","dropdownContent","dropdownStyles","SectionedContent","footer","hasFocusTrap","main","role","Sheet","initialFocus","StickyPositioningDropdown","onPosition","sizeOptions","isMaxWidthAdjusted","isMaxHeightAdjusted","getClientHints","deviceType","convertToCalendarDateRequired","dateVal","isCompleteCalendarDate","inputDatePickerReducer","state","action","type","dateValue","completeDateValue","useInputDatePicker","onInput","rootRef","currentValue","setIsOpen","iconRef","useRef","maskRef","outsideMousedownRef","outsideMousedownTimerRef","lastCommittedDateRef","lastDateRef","lastValueFromParentRef","dateSelectedRef","dispatch","useReducer","useInputDatePickerState","calendarDatesAreDifferent","current","useEffect","previousValue","maskInputHandler","detail","maskCommitHandler","calendarIconActionHandler","dropdownCloseHandler","reason","clearTimeout","setTimeout","focus","datePickerCommitHandler","changeValue","newValue","Promise","reject","resolve","useHiddenTestMethod","elementRef","method","name","InputDatePicker","forwardRef","propDescribedBy","propUserAssistanceDensity","dateMaskProps","ref","testIdProps","useTestId","mainFieldRef","inputDatePicker_selectDate","inputDatePicker_instruction","calendarIconAriaLabel","formUserAssistanceDensity","useFormContext","useImperativeHandle","blur","maskFieldInstructionId","useId","maskFieldInstructionText","maskFieldInstruction","HiddenAccessible","id","isHidden","ariaDescribedBy","merge","endContent","IconButton","size","variant","onAction","CalendarIcon","shouldShowDropdown","_jsxs","InputDateMaskContext","isDropdownOpen","isInputDatePickerParent","InputDateMask"],"mappings":"upEAsEA,MAAMA,GAA0B,EAC9BC,YACAC,gBACAC,eACAC,mBACAC,iBACAC,iBACAC,aACAC,SACAC,aACAC,QACAC,UACAC,WACAC,MACAC,WACAC,MACAC,qBACAC,SACAC,cACAC,gBACAC,wBACAC,QACAC,kBAGA,MAAOC,EAAiBC,GAAoBC,EAAQA,UAAC,IAC9CC,EAAYC,GAAiBF,EAAQA,SAACjB,GACvCoB,EAAyBC,eAE5BC,IACDN,EAAiBM,EAAKC,UAAUC,WAAW,OA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O4D,EACP3D,YAAaA,MAInB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
define(['exports', 'preact/jsx-runtime', 'preact/hooks', './classNames-08d99695', './usePress-949a0d03', './FormFieldContext-a024b891', './useFormFieldContext-9260f081', 'css!./MaxLengthCounterStyles.styles.css'], (function(s,e,n,t,a,r,l,o){"use strict";var c="MaxLengthCounterStyles_spanStyles__7dy9j72";const u=()=>{};s.MaxLengthCounter=function({maxLength:s,valueLength:r=0,onClick:o}){const{isFocused:d}=l.useFormFieldContext(),i=n.useCallback((s=>s.preventDefault()),[]),x=t.classNames([!d&&"MaxLengthCounterStyles_hide__7dy9j71"]),{pressProps:h}=a.usePress(o??u);return e.jsx("div",{class:"MaxLengthCounterStyles_maxLengthCounterBase__7dy9j70",onMouseDown:i,...h,children:e.jsxs("span",{class:x,children:[e.jsx("span",{class:c,children:r}),e.jsx("span",{class:c,children:"/"}),e.jsx("span",{class:c,children:s})]})})}}));
|
|
2
|
+
//# sourceMappingURL=MaxLengthCounter-cadff1c7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaxLengthCounter-cadff1c7.js","sources":["../../src/UNSAFE_TextArea/MaxLengthCounter.tsx"],"sourcesContent":["import { useCallback } from 'preact/hooks';\n\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { usePress } from '../hooks/UNSAFE_usePress';\nimport { useFormFieldContext } from '../hooks/UNSAFE_useFormFieldContext';\nimport { hide, maxLengthCounterBase, spanStyles } from './MaxLengthCounterStyles.css';\n\ntype Props = {\n maxLength: number;\n valueLength?: number;\n onClick?: () => void; // the calling component should focus on the appropriate element when clicked.\n};\n\nconst noop = () => {};\n\nexport function MaxLengthCounter({ maxLength, valueLength = 0, onClick }: Props) {\n const { isFocused } = useFormFieldContext();\n // We don't want mousedown on this component to do anything, so prevent the default behavior.\n const killEvent = useCallback((event: Event) => event.preventDefault(), []);\n const textClasses = classNames([!isFocused && hide]);\n const { pressProps } = usePress(onClick ?? noop);\n return (\n <div class={maxLengthCounterBase} onMouseDown={killEvent} {...pressProps}>\n <span class={textClasses}>\n <span class={spanStyles}>{valueLength}</span>\n <span class={spanStyles}>/</span>\n <span class={spanStyles}>{maxLength}</span>\n </span>\n </div>\n );\n}\n"],"names":["noop","maxLength","valueLength","onClick","isFocused","useFormFieldContext","killEvent","useCallback","event","preventDefault","textClasses","classNames","pressProps","usePress","_jsx","jsx","class","onMouseDown","_jsxs","jsxs","children","spanStyles"],"mappings":"qSAaA,MAAMA,EAAO,0BAEP,UAA2BC,UAAEA,EAASC,YAAEA,EAAc,EAACC,QAAEA,IAC7D,MAAMC,UAAEA,GAAcC,EAAAA,sBAEhBC,EAAYC,EAAAA,aAAaC,GAAiBA,EAAMC,kBAAkB,IAClEC,EAAcC,EAAAA,WAAW,EAAEP,6CAC3BQ,WAAEA,GAAeC,EAAQA,SAACV,GAAWH,GAC3C,OACEc,EAAKC,IAAA,MAAA,CAAAC,6DAA6BC,YAAaX,KAAeM,WAC5DM,EAAMC,KAAA,OAAA,CAAAH,MAAON,EAAWU,SAAA,CACtBN,cAAME,MAAOK,EAAUD,SAAGlB,IAC1BY,EAAAA,YAAME,MAAOK,EAAoBD,SAAA,MACjCN,cAAME,MAAOK,EAAaD,SAAAnB,QAIlC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(['exports', 'preact/jsx-runtime', './dayUtils-49272c61', './getFormatParse-7ea0c25b', './logger-0f873e29', './calendarDateUtils-dd5b75ee', 'preact/hooks', './StyledDatePickerButton-
|
|
2
|
-
//# sourceMappingURL=MonthView-
|
|
1
|
+
define(['exports', 'preact/jsx-runtime', './dayUtils-49272c61', './getFormatParse-7ea0c25b', './logger-0f873e29', './calendarDateUtils-dd5b75ee', 'preact/hooks', './StyledDatePickerButton-5332fad7', 'preact/compat', './useTranslationBundle-27bf6340', './useCellNavigation-43a992b6', './PRIVATE_MonthView/themes/DayCellStyles.css', './useUser-988f7da2', './Grid-2ddec30a', './PRIVATE_MonthView/themes/redwood/MonthViewTheme', './useComponentTheme-5aa41a8f', './PRIVATE_MonthView/themes/MonthViewContract.css', './PRIVATE_MonthView/themes/WeekNumberCellStyle.css'], (function(e,t,a,s,o,r,n,i,l,d,c,u,h,m,y,p,g,D){"use strict";const b=()=>({state:"enabled"}),f=e=>{const{buttonProps:a}=(({date:e,dayFormatter:t=b,dateFormatter:a,isAdjacentMonth:s,isDisabled:o,isFocusable:n,isFocused:i,isHidden:u,isReadonly:h,isSelected:m,isToday:y,onAction:p,onNavigation:g})=>{const{state:D}=t(e),f="disabled"===D,w="restricted"===D,T=c.useFocusableCell({isFocusable:n,isFocused:i}),k=l.useCallback((e=>{o||h||f||w||p(e)}),[o,f,h,w,p]),S=c.useCellNavigation({navigationMap:{ArrowLeft:{ltr:"previousDay",rtl:"nextDay"},ArrowRight:{ltr:"nextDay",rtl:"previousDay"},ArrowDown:"nextWeek",ArrowUp:"previousWeek",PageDown:"nextMonth",PageUp:"previousMonth",Home:"firstDayOfMonth",End:"lastDayOfMonth",ShiftPageDown:"nextYear",ShiftPageUp:"previousYear",CtrlAltT:"today"},payload:{date:e},onAction:k,onNavigation:g}),x=d.useTranslationBundle("@oracle/oraclejet-preact"),C=x.datePicker_today(),M=x.datePicker_selected(),v=x.datePicker_restricted(),j=a(r.getIsoDateStr(e.year,e.month,e.day));let P=y?`${C}, ${j}`:j;P=w?`${P}, ${v}`:P,P=m?`${P}, ${M}`:P;const V=r.toJSDate(e.year,e.month,e.day).getDate().toString();return{buttonProps:{"aria-label":P,...(u||o||f||w)&&{"aria-disabled":!0},isActivable:!(o||h||f||w),isAdjacentMonth:s,isDimmed:o||f,isHidden:u,isHoverable:!(o||h||f||w),isReadonly:h,isSelected:m,isRestricted:w,isToday:y,label:V,...T,...S}}})(e);return t.jsx("div",{role:"gridcell",class:u.dayCellStyles,children:t.jsx(i.StyledDatePickerButton,{...a})})},w=({startDateOfWeek:e})=>{const a=(e=>{const t=r.toJSDate(e.year,e.month,e.day),a=t.getUTCDay();0!==a&&1!==a&&6!==a&&o.warn("calculateWeekNumber's date property's getUTCDay() is assumed to be 0 (Sunday), 1 (Monday) or 6 (Saturday)\n since that is the first day of the week for the locale's JET supports."),1!==a&&t.setUTCDate(t.getUTCDate()+(0===a?1:2)),t.setUTCDate(t.getUTCDate()+3);const s=r.toJSDate(t.getUTCFullYear(),1,1);return Math.floor(Math.round((t.getTime()-s.getTime())/864e5)/7)+1})(e),s=d.useTranslationBundle("@oracle/oraclejet-preact");return t.jsx("div",{"aria-label":s.datePicker_weekNum({NUM:String(a)}),class:D.weekNumberCellStyles,role:"rowheader",children:t.jsx("span",{class:D.weekNumberStyles,children:a})})};function T(e,t){return e.year===t.year&&e.month===t.month&&e.day===t.day}e.MonthView=({dayFormatter:e,daysOutsideMonth:o="hidden",isReadonly:i=!1,max:l,min:d,onAction:c,onNavigation:u,selectedDate:D,focusableDate:b,isFocused:k=!1,testId:S,todaysDate:x,weekDisplay:C="none"})=>{const{locale:M}=h.useUser(),v=a.getWeeksInMonth(b.year,b.month,M),{baseTheme:j,styles:P}=p.useComponentTheme(y.MonthViewRedwoodTheme,{}),V="number"===C,A=`repeat(${V?8:7}, 1fr)`,F=n.useMemo((()=>{r.checkNoCalendarExtension(M);const e={locale:M,dateStyle:"full"},{format:t}=s.getFormatParse(e);return t}),[M]),U=r.formatFullCalendarDate(M,b,"month");return t.jsx("div",{class:j,children:t.jsxs(m.Grid,{gap:g.monthViewScaleVars.rowGap,"aria-label":U,role:"grid",testId:S,children:[(()=>{const e=a.getDaysOfWeekNames(M,"short");return t.jsx("div",{class:P.sticky,children:t.jsxs(m.Grid,{role:"row","aria-hidden":"true",gridTemplateColumns:A,gap:g.monthViewScaleVars.columnGap,children:[V&&t.jsx("div",{role:"presentation"}),e.map((e=>t.jsx("div",{role:"columnheader",class:P.dayOfTheWeek,children:t.jsx("span",{children:e})})))]})})})(),(()=>{const s=[];for(let n=0;n<v;n++){const h=a.getStartOfWeek(b.year,b.month,1,M),y=a.getDatesInWeek(n,h.year,h.month,h.day),p=y.map((a=>{const s=r.isDateOutOfRange(a,d,l),n=!!D&&T(a,D),h=T(a,x),m=T(a,b),y=(p=b,a.month!==p.month);var p;const g=y&&"hidden"===o;return t.jsx(f,{date:a,dateFormatter:F,dayFormatter:e,isAdjacentMonth:y,isDisabled:s,isFocusable:m,isFocused:m&&k,isHidden:g,isReadonly:i,isSelected:n,isToday:h,onAction:c,onNavigation:u},`${a.year}-${a.month}-${a.day}`)}));s.push(t.jsxs(m.Grid,{role:"row",gridTemplateColumns:A,gap:g.monthViewScaleVars.columnGap,children:[V&&t.jsx(w,{startDateOfWeek:y[0]}),p]},n))}return s})()]})})}}));
|
|
2
|
+
//# sourceMappingURL=MonthView-d2f8f3f1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MonthView-48d59de4.js","sources":["../../src/PRIVATE_MonthView/useDayCell.ts","../../src/PRIVATE_MonthView/DayCell.tsx","../../src/PRIVATE_MonthView/WeekNumberCell.tsx","../../src/PRIVATE_MonthView/MonthView.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport type { CalendarDateRequired } from '#utils/UNSAFE_calendarDateUtils';\nimport { DateISOStr } from '#UNSAFE_IntlDateTime';\nimport { FormatterFunc } from '#UNSAFE_IntlFormatParse';\nimport { getIsoDateStr, toJSDate } from '#utils/UNSAFE_calendarDateUtils';\nimport { ComponentProps, useCallback } from 'preact/compat';\n\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport { useFocusableCell } from '#UNSAFE_DatePicker/useFocusableCell';\nimport { useCellNavigation } from '#UNSAFE_DatePicker/useCellNavigation';\nimport { StyledDatePickerButton } from '#PRIVATE_StyledDatePickerButton';\n\ntype NavigationDirections =\n | 'previousDay'\n | 'nextDay'\n | 'previousWeek'\n | 'nextWeek'\n | 'previousMonth'\n | 'nextMonth'\n | 'previousYear'\n | 'nextYear'\n | 'firstDayOfMonth'\n | 'lastDayOfMonth'\n | 'today';\n\nexport type DayFormatOptions = {\n state: 'enabled' | 'disabled' | 'restricted';\n};\n\n// These are the properties the useDayCell hook takes.\nexport type UseDayCellProps = {\n /**\n * Date of the day cell. This will be formatted as a full date and put in the aria-label.\n */\n date: CalendarDateRequired;\n /**\n * A function used to format the day cell date as a full date.\n */\n dateFormatter: FormatterFunc<DateISOStr>;\n /**\n * A function that receives a date and returns an object specifying how to format the provided date.\n * This function is called for each date that is rendered and this can be used to control how individual\n * dates are rendered - disabled, restricted, or enabled.\n * @param date The date to format\n * @returns The format options\n */\n dayFormatter?: (date: CalendarDateRequired) => DayFormatOptions;\n /**\n * Whether the day cell is in an adjacent month, not the current month.\n */\n isAdjacentMonth: boolean;\n /**\n * Whether the day cell is disabled, like if it is out of the min/max range.\n */\n isDisabled?: boolean;\n /**\n * Whether the day cell is focusable, meaning it will have tabIndex 0.\n */\n isFocusable: boolean;\n /**\n * Whether the day cell has focus.\n */\n isFocused: boolean;\n /**\n * Whether the day cell is hidden. For example, days outside of the current month are hidden by default.\n */\n isHidden: boolean;\n /**\n * Whether the day cell is readonly. It is not activeable.\n */\n isReadonly: boolean;\n /**\n * Whether the day cell looks selected.\n */\n isSelected: boolean;\n /**\n * Whether the day cell's date is today.\n */\n isToday: boolean;\n /**\n * A callback that will be invoked when the user selects the date by clicking on a day cell or selecting the enter or space key on a day cell.\n * @param payload The payload containing the date represented by this cell.\n */\n onAction: (payload: { date: CalendarDateRequired }) => void;\n\n /**\n * A callback that will be invoked when the user navigates.\n */\n onNavigation: (detail: { direction: NavigationDirections; date: CalendarDateRequired }) => void;\n};\n\n/**\n * The useDayCell hook returns properties for an individual DayCell. The properties returned should be spread on the StyledDatePickerButton.\n * These include the event handlers for keydown and click.\n */\nexport const useDayCell = ({\n date,\n dayFormatter = defaultDayFormatter,\n dateFormatter,\n isAdjacentMonth,\n isDisabled,\n isFocusable,\n isFocused,\n isHidden,\n isReadonly,\n isSelected,\n isToday,\n onAction,\n onNavigation\n}: UseDayCellProps) => {\n // apply day formatting\n const { state } = dayFormatter(date);\n const isDisabledFormat = state === 'disabled';\n const isRestrictedFormat = state === 'restricted';\n\n // Focus the day cell with isFocused true when the state updates.\n const buttonProps = useFocusableCell({ isFocusable, isFocused });\n // Override onAction to not call it if disabled, readonly or restricted\n const handleAction: UseDayCellProps['onAction'] = useCallback(\n (payload) => {\n if (isDisabled || isReadonly || isDisabledFormat || isRestrictedFormat) return;\n onAction(payload);\n },\n [isDisabled, isDisabledFormat, isReadonly, isRestrictedFormat, onAction]\n );\n const buttonEventHandlers = useCellNavigation({\n navigationMap: {\n ArrowLeft: { ltr: 'previousDay', rtl: 'nextDay' },\n ArrowRight: { ltr: 'nextDay', rtl: 'previousDay' },\n ArrowDown: 'nextWeek',\n ArrowUp: 'previousWeek',\n PageDown: 'nextMonth',\n PageUp: 'previousMonth',\n Home: 'firstDayOfMonth',\n End: 'lastDayOfMonth',\n ShiftPageDown: 'nextYear',\n ShiftPageUp: 'previousYear',\n CtrlAltT: 'today'\n },\n payload: { date },\n onAction: handleAction,\n onNavigation\n });\n\n // For accessibility, we want a full date.\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const today = translations.datePicker_today();\n const selected = translations.datePicker_selected();\n const restricted = translations.datePicker_restricted();\n\n const dateIsoStr = getIsoDateStr(date.year, date.month, date.day);\n const formattedDate = dateFormatter(dateIsoStr);\n let ariaLabel = isToday ? `${today}, ${formattedDate}` : formattedDate;\n ariaLabel = isRestrictedFormat ? `${ariaLabel}, ${restricted}` : ariaLabel;\n ariaLabel = isSelected ? `${ariaLabel}, ${selected}` : ariaLabel;\n const dayOfMonth = toJSDate(date.year, date.month, date.day).getDate().toString();\n\n return {\n buttonProps: {\n 'aria-label': ariaLabel,\n ...((isHidden || isDisabled || isDisabledFormat || isRestrictedFormat) && {\n 'aria-disabled': true\n }),\n isActivable: !(isDisabled || isReadonly || isDisabledFormat || isRestrictedFormat),\n isAdjacentMonth,\n isDimmed: isDisabled || isDisabledFormat,\n isHidden,\n isHoverable: !(isDisabled || isReadonly || isDisabledFormat || isRestrictedFormat),\n isReadonly,\n isSelected,\n isRestricted: isRestrictedFormat,\n isToday,\n label: dayOfMonth,\n ...buttonProps,\n ...buttonEventHandlers\n } as ComponentProps<typeof StyledDatePickerButton>\n };\n};\n\n/**\n * A default day formatter that always formats as enabled state.\n */\nconst defaultDayFormatter = () => ({ state: 'enabled' }) as DayFormatOptions;\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport { StyledDatePickerButton } from '#PRIVATE_StyledDatePickerButton';\nimport { UseDayCellProps, useDayCell } from './useDayCell';\nimport { dayCellStyles } from './themes/DayCellStyles.css';\n\ntype PickedUseDayCellProps = Pick<\n UseDayCellProps,\n | 'date'\n | 'dateFormatter'\n | 'dayFormatter'\n | 'isAdjacentMonth'\n | 'isDisabled'\n | 'isFocusable'\n | 'isFocused'\n | 'isHidden'\n | 'isReadonly'\n | 'isSelected'\n | 'isToday'\n | 'onAction'\n | 'onNavigation'\n>;\n\ntype DayCellProps = PickedUseDayCellProps;\n\n/**\n * The DayCell is the cell within the DatePicker's month view that contains the day in the month view.\n * This component will format the date for the aria-label.\n * The DayCell components uses the useDayCell hook to handle the user interactions with the day cell.\n */\nexport const DayCell = (props: DayCellProps) => {\n const { buttonProps } = useDayCell(props);\n // buttonProps, e.g., tabIndex, aria-label, onclick, onkeydown and visual states\n return (\n <div role=\"gridcell\" class={dayCellStyles}>\n <StyledDatePickerButton {...buttonProps} />\n </div>\n );\n};\n","import { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport { CalendarDateRequired, toJSDate } from '#utils/UNSAFE_calendarDateUtils';\nimport { weekNumberCellStyles, weekNumberStyles } from './themes/WeekNumberCellStyle.css';\nimport * as Logger from '../utils/UNSAFE_logger';\n\ntype Props = {\n /**\n * startDateOfWeek is the first date of the week row\n */\n startDateOfWeek: CalendarDateRequired;\n};\n\n/**\n * The ISO 8601 definition for week 01 is the week with the first Thursday of the Gregorian year (i.e. of January) in it.\n * https://en.wikipedia.org/wiki/ISO_week_date\n * @param date The first date of the week row to be used to calculate the week number.\n * The date must be a Saturday, Sunday, or Monday. We assume this because the week for\n * all the locales we support start on one of these days.\n * @returns the number of week in the year\n */\nconst calculateWeekNumber = (date: CalendarDateRequired) => {\n const checkDate = toJSDate(date.year, date.month, date.day);\n const dayNumber = checkDate.getUTCDay(); // 0 for Sunday, 1 for Monday, 2 for Tuesday, etc.\n\n if (dayNumber !== 0 && dayNumber !== 1 && dayNumber !== 6) {\n // This message is for internal JET developers. We should never see this message. In all locales the day of the\n // week starts on Sunday, Monday or Saturday.\n Logger.warn(`calculateWeekNumber's date property's getUTCDay() is assumed to be 0 (Sunday), 1 (Monday) or 6 (Saturday)\n since that is the first day of the week for the locale's JET supports.`);\n }\n\n // For ISO week, we set the start of the week to Monday\n if (dayNumber !== 1) {\n // If it is already Monday, do nothing.\n // If it is Sunday (0), add 1 to move it up to Monday.\n // If it is Saturday (6), move it up two days to Monday.\n checkDate.setUTCDate(checkDate.getUTCDate() + (dayNumber === 0 ? 1 : 2));\n }\n\n // Find Thursday (day value of 4) of this week. Since we know checkDate at this point is a Monday,\n // we move it up 3 days.\n checkDate.setUTCDate(checkDate.getUTCDate() + 3);\n\n // Create the start of the year date\n const janFirst = toJSDate(checkDate.getUTCFullYear(), 1, 1);\n\n return Math.floor(Math.round((checkDate.getTime() - janFirst.getTime()) / 86400000) / 7) + 1;\n};\n\n/**\n * The WeekNumberCell is the cell at the start of a week's row within the DatePicker's\n * month view that contains the week's number within the year. This displays when\n * the DatePicker's 'weekDisplay' prop is set to 'number'.\n * This component will format the week number for the aria-label.\n */\nconst WeekNumberCell = ({ startDateOfWeek }: Props) => {\n const weekNumber = calculateWeekNumber(startDateOfWeek);\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n return (\n <div\n aria-label={translations.datePicker_weekNum({ NUM: String(weekNumber) })}\n class={weekNumberCellStyles}\n role=\"rowheader\">\n <span class={weekNumberStyles}>{weekNumber}</span>\n </div>\n );\n};\n\nexport { WeekNumberCell };\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport {\n getWeeksInMonth,\n getDatesInWeek,\n getStartOfWeek,\n getDaysOfWeekNames,\n WeekInMonthIndex\n} from '#utils/PRIVATE_dayUtils';\nimport { ComponentProps } from 'preact/compat';\nimport { useMemo } from 'preact/hooks';\nimport {\n CalendarDateRequired,\n checkNoCalendarExtension,\n formatFullCalendarDate,\n isDateOutOfRange\n} from '#utils/UNSAFE_calendarDateUtils';\nimport { getFormatParse, NativeDateTimeOptions } from '#UNSAFE_IntlDateTime';\nimport { DayCell } from './DayCell';\nimport { useUser } from '#hooks/UNSAFE_useUser';\nimport { TestIdProps } from '#hooks/UNSAFE_useTestId';\nimport { Grid } from '#UNSAFE_Grid';\nimport {\n MonthViewStyles,\n MonthViewVariantOptions\n} from '#PRIVATE_MonthView/themes/MonthViewStyles.css';\nimport { MonthViewRedwoodTheme } from '#PRIVATE_MonthView/themes/redwood/MonthViewTheme';\nimport { useComponentTheme } from '../hooks/UNSAFE_useComponentTheme';\nimport { monthViewScaleVars } from '#PRIVATE_MonthView/themes/MonthViewContract.css';\nimport { WeekNumberCell } from './WeekNumberCell';\n\ntype PickedDayCellProps = Pick<\n ComponentProps<typeof DayCell>,\n 'dayFormatter' | 'onAction' | 'onNavigation'\n>;\n\ntype MonthViewProps = TestIdProps &\n PickedDayCellProps & {\n /**\n * The daysOutsideMonth property affects the day cells that are outside of the current month.\n * If set to 'hidden', then the days outside of the current month will be hidden.\n * If set to 'selectable', then the days outside of the current month will be visible and selectable.\n * This defaults to 'hidden'.\n */\n daysOutsideMonth?: 'hidden' | 'selectable';\n /**\n * The MonthView renders with the month of the focusableDate.\n * The focusableDate is the only day in the MonthView that has tabIndex: 0 on it.\n * The focusableDate doesn't have focus until the user tabs in to the Month View.\n * The focusableDate is never undefined.\n */\n focusableDate: CalendarDateRequired;\n /**\n * If set to true, the focusableDate will be focused and you will see the focus ring. It will be\n * false when no date has focus.\n * @default false\n */\n isFocused?: boolean;\n /**\n * Specifies whether the component is readonly.\n */\n isReadonly?: boolean;\n /**\n * The maximum selectable date. The max must be greater than the min if they are both specified.\n */\n max?: CalendarDateRequired;\n /**\n * The minimum selectable date. The min must be less than the max if they are both specified.\n */\n min?: CalendarDateRequired;\n /**\n * The selected date of the MonthView, or undefined is there is no selected date. This\n * is used to highlight the selected day cell if it is within the min/max range.\n */\n selectedDate?: CalendarDateRequired;\n /**\n * Today's date. This is used to highlight the Today day cell.\n */\n todaysDate: CalendarDateRequired;\n /**\n * Whether week of the year will be shown in the DatePicker. The default calculation follows the\n * ISO 8601 definition: the first week of the year contains the first Thursday of the year.\n * This means that some days from one year may be placed into weeks 'belonging' to another year.\n */\n weekDisplay?: 'none' | 'number';\n };\n\n/**\n * A MonthView is a month interface that allows users to select a single date. The MonthView is the week day header\n * abbreviations and the days of the month. A MonthView is used inside of a DatePicker\n * along with the DatePickerHeader and the MonthGridView and YearGridView.\n */\nexport const MonthView = ({\n dayFormatter,\n daysOutsideMonth = 'hidden',\n isReadonly = false,\n max,\n min,\n onAction,\n onNavigation,\n selectedDate,\n focusableDate,\n isFocused = false,\n testId,\n todaysDate,\n weekDisplay = 'none'\n}: MonthViewProps) => {\n const { locale } = useUser();\n const weeksInMonth = getWeeksInMonth(focusableDate.year, focusableDate.month, locale);\n const { baseTheme, styles } = useComponentTheme<MonthViewVariantOptions, MonthViewStyles>(\n MonthViewRedwoodTheme,\n {}\n );\n const isWeekNumberDisplayed = weekDisplay === 'number';\n const gridTemplateColumns = `repeat(${isWeekNumberDisplayed ? 8 : 7}, 1fr)`;\n\n const dateFormatter = useMemo(() => {\n checkNoCalendarExtension(locale);\n const dateFormatOptions: NativeDateTimeOptions = {\n locale,\n dateStyle: 'full'\n };\n const { format } = getFormatParse(dateFormatOptions);\n return format;\n }, [locale]);\n\n const renderMonthViewHeaderRow = () => {\n const weekDays = getDaysOfWeekNames(locale, 'short');\n\n return (\n <div class={styles.sticky}>\n <Grid\n role=\"row\"\n aria-hidden=\"true\"\n gridTemplateColumns={gridTemplateColumns}\n gap={monthViewScaleVars.columnGap}>\n {isWeekNumberDisplayed && <div role=\"presentation\" />}\n {weekDays.map((day) => (\n <div role=\"columnheader\" class={styles.dayOfTheWeek}>\n <span>{day}</span>\n </div>\n ))}\n </Grid>\n </div>\n );\n };\n\n const renderMonthView = () => {\n const calendarGrid: JSX.Element[] = [];\n\n for (let weekIndex = 0; weekIndex < weeksInMonth; weekIndex++) {\n const startDateOfWeek = getStartOfWeek(focusableDate.year, focusableDate.month, 1, locale);\n\n const weekDates = getDatesInWeek(\n weekIndex as WeekInMonthIndex,\n startDateOfWeek.year,\n startDateOfWeek.month,\n startDateOfWeek.day\n );\n\n const weekCells = weekDates.map((dayCellDate) => {\n // This figures out the visual state of the DayCell.\n const isDisabled = isDateOutOfRange(dayCellDate, min, max);\n\n // Even if the selected date is out of range, the UX design shows it as selected.\n const isSelected = selectedDate ? isSameDate(dayCellDate, selectedDate) : false;\n const isToday = isSameDate(dayCellDate, todaysDate);\n const isFocusable = isSameDate(dayCellDate, focusableDate);\n const isAdjacentMonth = isOutOfMonth(dayCellDate, focusableDate);\n const isHidden = isAdjacentMonth && daysOutsideMonth === 'hidden';\n\n return (\n <DayCell\n key={`${dayCellDate.year}-${dayCellDate.month}-${dayCellDate.day}`}\n date={dayCellDate}\n dateFormatter={dateFormatter}\n dayFormatter={dayFormatter}\n isAdjacentMonth={isAdjacentMonth}\n isDisabled={isDisabled}\n isFocusable={isFocusable}\n isFocused={isFocusable && isFocused}\n isHidden={isHidden}\n isReadonly={isReadonly}\n isSelected={isSelected}\n isToday={isToday}\n onAction={onAction}\n onNavigation={onNavigation}\n />\n );\n });\n\n calendarGrid.push(\n <Grid\n key={weekIndex}\n role=\"row\"\n gridTemplateColumns={gridTemplateColumns}\n gap={monthViewScaleVars.columnGap}>\n {isWeekNumberDisplayed && <WeekNumberCell startDateOfWeek={weekDates[0]} />}\n {weekCells}\n </Grid>\n );\n }\n\n return calendarGrid;\n };\n\n const monthViewAriaLabel = formatFullCalendarDate(locale, focusableDate, 'month');\n return (\n <div class={baseTheme}>\n <Grid\n gap={monthViewScaleVars.rowGap}\n aria-label={monthViewAriaLabel}\n role=\"grid\"\n testId={testId}>\n {renderMonthViewHeaderRow()}\n {renderMonthView()}\n </Grid>\n </div>\n );\n};\n\nfunction isSameDate(date1: CalendarDateRequired, date2: CalendarDateRequired) {\n return date1.year === date2.year && date1.month === date2.month && date1.day === date2.day;\n}\n\nfunction isOutOfMonth(date1: CalendarDateRequired, currentMonthDate: CalendarDateRequired) {\n return date1.month !== currentMonthDate.month;\n}\n"],"names":["defaultDayFormatter","state","DayCell","props","buttonProps","date","dayFormatter","dateFormatter","isAdjacentMonth","isDisabled","isFocusable","isFocused","isHidden","isReadonly","isSelected","isToday","onAction","onNavigation","isDisabledFormat","isRestrictedFormat","useFocusableCell","handleAction","useCallback","payload","buttonEventHandlers","useCellNavigation","navigationMap","ArrowLeft","ltr","rtl","ArrowRight","ArrowDown","ArrowUp","PageDown","PageUp","Home","End","ShiftPageDown","ShiftPageUp","CtrlAltT","translations","useTranslationBundle","today","datePicker_today","selected","datePicker_selected","restricted","datePicker_restricted","formattedDate","getIsoDateStr","year","month","day","ariaLabel","dayOfMonth","toJSDate","getDate","toString","isActivable","isDimmed","isHoverable","isRestricted","label","useDayCell","_jsx","jsx","role","class","dayCellStyles","children","StyledDatePickerButton","WeekNumberCell","startDateOfWeek","weekNumber","checkDate","dayNumber","getUTCDay","Logger.warn","setUTCDate","getUTCDate","janFirst","getUTCFullYear","Math","floor","round","getTime","calculateWeekNumber","datePicker_weekNum","NUM","String","weekNumberCellStyles","weekNumberStyles","isSameDate","date1","date2","daysOutsideMonth","max","min","selectedDate","focusableDate","testId","todaysDate","weekDisplay","locale","useUser","weeksInMonth","getWeeksInMonth","baseTheme","styles","useComponentTheme","MonthViewRedwoodTheme","isWeekNumberDisplayed","gridTemplateColumns","useMemo","checkNoCalendarExtension","dateFormatOptions","dateStyle","format","getFormatParse","monthViewAriaLabel","formatFullCalendarDate","_jsxs","jsxs","Grid","gap","monthViewScaleVars","rowGap","weekDays","getDaysOfWeekNames","sticky","columnGap","map","dayOfTheWeek","renderMonthViewHeaderRow","calendarGrid","weekIndex","getStartOfWeek","weekDates","getDatesInWeek","weekCells","dayCellDate","isDateOutOfRange","currentMonthDate","push","renderMonthView"],"mappings":"8lBAuGO,MAuFDA,EAAsB,KAAO,CAAEC,MAAO,YC3J/BC,EAAWC,IACtB,MAAMC,YAAEA,GDmEgB,GACxBC,OACAC,eAAeN,EACfO,gBACAC,kBACAC,aACAC,cACAC,YACAC,WACAC,aACAC,aACAC,UACAC,WACAC,mBAGA,MAAMhB,MAAEA,GAAUK,EAAaD,GACzBa,EAA6B,aAAVjB,EACnBkB,EAA+B,eAAVlB,EAGrBG,EAAcgB,EAAgBA,iBAAC,CAAEV,cAAaC,cAE9CU,EAA4CC,eAC/CC,IACKd,GAAcI,GAAcK,GAAoBC,GACpDH,EAASO,EAAQ,GAEnB,CAACd,EAAYS,EAAkBL,EAAYM,EAAoBH,IAE3DQ,EAAsBC,EAAAA,kBAAkB,CAC5CC,cAAe,CACbC,UAAW,CAAEC,IAAK,cAAeC,IAAK,WACtCC,WAAY,CAAEF,IAAK,UAAWC,IAAK,e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,WAAYA,EACZC,WAAYA,EACZC,QAASA,EACTC,SAAUA,EACVC,aAAcA,GAbT,GAAG2H,EAAY1F,QAAQ0F,EAAYzF,SAASyF,EAAYxF,MAe/D,IAGJkF,EAAaS,KACXtB,OAACE,EAAAA,MAECzD,KAAK,MACL8C,oBAAqBA,EACrBY,IAAKC,EAAAA,mBAAmBK,UACvB7D,SAAA,CAAA0C,GAAyB/C,EAACC,IAAAM,EAAe,CAAAC,gBAAiBiE,EAAU,KACpEE,IALIJ,GAQV,CAED,OAAOD,CAAY,EAYdU,OAGL"}
|
|
1
|
+
{"version":3,"file":"MonthView-d2f8f3f1.js","sources":["../../src/PRIVATE_MonthView/useDayCell.ts","../../src/PRIVATE_MonthView/DayCell.tsx","../../src/PRIVATE_MonthView/WeekNumberCell.tsx","../../src/PRIVATE_MonthView/MonthView.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport type { CalendarDateRequired } from '#utils/UNSAFE_calendarDateUtils';\nimport { DateISOStr } from '#UNSAFE_IntlDateTime';\nimport { FormatterFunc } from '#UNSAFE_IntlFormatParse';\nimport { getIsoDateStr, toJSDate } from '#utils/UNSAFE_calendarDateUtils';\nimport { ComponentProps, useCallback } from 'preact/compat';\n\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport { useFocusableCell } from '#UNSAFE_DatePicker/useFocusableCell';\nimport { useCellNavigation } from '#UNSAFE_DatePicker/useCellNavigation';\nimport { StyledDatePickerButton } from '#PRIVATE_StyledDatePickerButton';\n\ntype NavigationDirections =\n | 'previousDay'\n | 'nextDay'\n | 'previousWeek'\n | 'nextWeek'\n | 'previousMonth'\n | 'nextMonth'\n | 'previousYear'\n | 'nextYear'\n | 'firstDayOfMonth'\n | 'lastDayOfMonth'\n | 'today';\n\nexport type DayFormatOptions = {\n state: 'enabled' | 'disabled' | 'restricted';\n};\n\n// These are the properties the useDayCell hook takes.\nexport type UseDayCellProps = {\n /**\n * Date of the day cell. This will be formatted as a full date and put in the aria-label.\n */\n date: CalendarDateRequired;\n /**\n * A function used to format the day cell date as a full date.\n */\n dateFormatter: FormatterFunc<DateISOStr>;\n /**\n * A function that receives a date and returns an object specifying how to format the provided date.\n * This function is called for each date that is rendered and this can be used to control how individual\n * dates are rendered - disabled, restricted, or enabled.\n * @param date The date to format\n * @returns The format options\n */\n dayFormatter?: (date: CalendarDateRequired) => DayFormatOptions;\n /**\n * Whether the day cell is in an adjacent month, not the current month.\n */\n isAdjacentMonth: boolean;\n /**\n * Whether the day cell is disabled, like if it is out of the min/max range.\n */\n isDisabled?: boolean;\n /**\n * Whether the day cell is focusable, meaning it will have tabIndex 0.\n */\n isFocusable: boolean;\n /**\n * Whether the day cell has focus.\n */\n isFocused: boolean;\n /**\n * Whether the day cell is hidden. For example, days outside of the current month are hidden by default.\n */\n isHidden: boolean;\n /**\n * Whether the day cell is readonly. It is not activeable.\n */\n isReadonly: boolean;\n /**\n * Whether the day cell looks selected.\n */\n isSelected: boolean;\n /**\n * Whether the day cell's date is today.\n */\n isToday: boolean;\n /**\n * A callback that will be invoked when the user selects the date by clicking on a day cell or selecting the enter or space key on a day cell.\n * @param payload The payload containing the date represented by this cell.\n */\n onAction: (payload: { date: CalendarDateRequired }) => void;\n\n /**\n * A callback that will be invoked when the user navigates.\n */\n onNavigation: (detail: { direction: NavigationDirections; date: CalendarDateRequired }) => void;\n};\n\n/**\n * The useDayCell hook returns properties for an individual DayCell. The properties returned should be spread on the StyledDatePickerButton.\n * These include the event handlers for keydown and click.\n */\nexport const useDayCell = ({\n date,\n dayFormatter = defaultDayFormatter,\n dateFormatter,\n isAdjacentMonth,\n isDisabled,\n isFocusable,\n isFocused,\n isHidden,\n isReadonly,\n isSelected,\n isToday,\n onAction,\n onNavigation\n}: UseDayCellProps) => {\n // apply day formatting\n const { state } = dayFormatter(date);\n const isDisabledFormat = state === 'disabled';\n const isRestrictedFormat = state === 'restricted';\n\n // Focus the day cell with isFocused true when the state updates.\n const buttonProps = useFocusableCell({ isFocusable, isFocused });\n // Override onAction to not call it if disabled, readonly or restricted\n const handleAction: UseDayCellProps['onAction'] = useCallback(\n (payload) => {\n if (isDisabled || isReadonly || isDisabledFormat || isRestrictedFormat) return;\n onAction(payload);\n },\n [isDisabled, isDisabledFormat, isReadonly, isRestrictedFormat, onAction]\n );\n const buttonEventHandlers = useCellNavigation({\n navigationMap: {\n ArrowLeft: { ltr: 'previousDay', rtl: 'nextDay' },\n ArrowRight: { ltr: 'nextDay', rtl: 'previousDay' },\n ArrowDown: 'nextWeek',\n ArrowUp: 'previousWeek',\n PageDown: 'nextMonth',\n PageUp: 'previousMonth',\n Home: 'firstDayOfMonth',\n End: 'lastDayOfMonth',\n ShiftPageDown: 'nextYear',\n ShiftPageUp: 'previousYear',\n CtrlAltT: 'today'\n },\n payload: { date },\n onAction: handleAction,\n onNavigation\n });\n\n // For accessibility, we want a full date.\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const today = translations.datePicker_today();\n const selected = translations.datePicker_selected();\n const restricted = translations.datePicker_restricted();\n\n const dateIsoStr = getIsoDateStr(date.year, date.month, date.day);\n const formattedDate = dateFormatter(dateIsoStr);\n let ariaLabel = isToday ? `${today}, ${formattedDate}` : formattedDate;\n ariaLabel = isRestrictedFormat ? `${ariaLabel}, ${restricted}` : ariaLabel;\n ariaLabel = isSelected ? `${ariaLabel}, ${selected}` : ariaLabel;\n const dayOfMonth = toJSDate(date.year, date.month, date.day).getDate().toString();\n\n return {\n buttonProps: {\n 'aria-label': ariaLabel,\n ...((isHidden || isDisabled || isDisabledFormat || isRestrictedFormat) && {\n 'aria-disabled': true\n }),\n isActivable: !(isDisabled || isReadonly || isDisabledFormat || isRestrictedFormat),\n isAdjacentMonth,\n isDimmed: isDisabled || isDisabledFormat,\n isHidden,\n isHoverable: !(isDisabled || isReadonly || isDisabledFormat || isRestrictedFormat),\n isReadonly,\n isSelected,\n isRestricted: isRestrictedFormat,\n isToday,\n label: dayOfMonth,\n ...buttonProps,\n ...buttonEventHandlers\n } as ComponentProps<typeof StyledDatePickerButton>\n };\n};\n\n/**\n * A default day formatter that always formats as enabled state.\n */\nconst defaultDayFormatter = () => ({ state: 'enabled' }) as DayFormatOptions;\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport { StyledDatePickerButton } from '#PRIVATE_StyledDatePickerButton';\nimport { UseDayCellProps, useDayCell } from './useDayCell';\nimport { dayCellStyles } from './themes/DayCellStyles.css';\n\ntype PickedUseDayCellProps = Pick<\n UseDayCellProps,\n | 'date'\n | 'dateFormatter'\n | 'dayFormatter'\n | 'isAdjacentMonth'\n | 'isDisabled'\n | 'isFocusable'\n | 'isFocused'\n | 'isHidden'\n | 'isReadonly'\n | 'isSelected'\n | 'isToday'\n | 'onAction'\n | 'onNavigation'\n>;\n\ntype DayCellProps = PickedUseDayCellProps;\n\n/**\n * The DayCell is the cell within the DatePicker's month view that contains the day in the month view.\n * This component will format the date for the aria-label.\n * The DayCell components uses the useDayCell hook to handle the user interactions with the day cell.\n */\nexport const DayCell = (props: DayCellProps) => {\n const { buttonProps } = useDayCell(props);\n // buttonProps, e.g., tabIndex, aria-label, onclick, onkeydown and visual states\n return (\n <div role=\"gridcell\" class={dayCellStyles}>\n <StyledDatePickerButton {...buttonProps} />\n </div>\n );\n};\n","import { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport { CalendarDateRequired, toJSDate } from '#utils/UNSAFE_calendarDateUtils';\nimport { weekNumberCellStyles, weekNumberStyles } from './themes/WeekNumberCellStyle.css';\nimport * as Logger from '../utils/UNSAFE_logger';\n\ntype Props = {\n /**\n * startDateOfWeek is the first date of the week row\n */\n startDateOfWeek: CalendarDateRequired;\n};\n\n/**\n * The ISO 8601 definition for week 01 is the week with the first Thursday of the Gregorian year (i.e. of January) in it.\n * https://en.wikipedia.org/wiki/ISO_week_date\n * @param date The first date of the week row to be used to calculate the week number.\n * The date must be a Saturday, Sunday, or Monday. We assume this because the week for\n * all the locales we support start on one of these days.\n * @returns the number of week in the year\n */\nconst calculateWeekNumber = (date: CalendarDateRequired) => {\n const checkDate = toJSDate(date.year, date.month, date.day);\n const dayNumber = checkDate.getUTCDay(); // 0 for Sunday, 1 for Monday, 2 for Tuesday, etc.\n\n if (dayNumber !== 0 && dayNumber !== 1 && dayNumber !== 6) {\n // This message is for internal JET developers. We should never see this message. In all locales the day of the\n // week starts on Sunday, Monday or Saturday.\n Logger.warn(`calculateWeekNumber's date property's getUTCDay() is assumed to be 0 (Sunday), 1 (Monday) or 6 (Saturday)\n since that is the first day of the week for the locale's JET supports.`);\n }\n\n // For ISO week, we set the start of the week to Monday\n if (dayNumber !== 1) {\n // If it is already Monday, do nothing.\n // If it is Sunday (0), add 1 to move it up to Monday.\n // If it is Saturday (6), move it up two days to Monday.\n checkDate.setUTCDate(checkDate.getUTCDate() + (dayNumber === 0 ? 1 : 2));\n }\n\n // Find Thursday (day value of 4) of this week. Since we know checkDate at this point is a Monday,\n // we move it up 3 days.\n checkDate.setUTCDate(checkDate.getUTCDate() + 3);\n\n // Create the start of the year date\n const janFirst = toJSDate(checkDate.getUTCFullYear(), 1, 1);\n\n return Math.floor(Math.round((checkDate.getTime() - janFirst.getTime()) / 86400000) / 7) + 1;\n};\n\n/**\n * The WeekNumberCell is the cell at the start of a week's row within the DatePicker's\n * month view that contains the week's number within the year. This displays when\n * the DatePicker's 'weekDisplay' prop is set to 'number'.\n * This component will format the week number for the aria-label.\n */\nconst WeekNumberCell = ({ startDateOfWeek }: Props) => {\n const weekNumber = calculateWeekNumber(startDateOfWeek);\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n return (\n <div\n aria-label={translations.datePicker_weekNum({ NUM: String(weekNumber) })}\n class={weekNumberCellStyles}\n role=\"rowheader\">\n <span class={weekNumberStyles}>{weekNumber}</span>\n </div>\n );\n};\n\nexport { WeekNumberCell };\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport {\n getWeeksInMonth,\n getDatesInWeek,\n getStartOfWeek,\n getDaysOfWeekNames,\n WeekInMonthIndex\n} from '#utils/PRIVATE_dayUtils';\nimport { ComponentProps } from 'preact/compat';\nimport { useMemo } from 'preact/hooks';\nimport {\n CalendarDateRequired,\n checkNoCalendarExtension,\n formatFullCalendarDate,\n isDateOutOfRange\n} from '#utils/UNSAFE_calendarDateUtils';\nimport { getFormatParse, NativeDateTimeOptions } from '#UNSAFE_IntlDateTime';\nimport { DayCell } from './DayCell';\nimport { useUser } from '#hooks/UNSAFE_useUser';\nimport { TestIdProps } from '#hooks/UNSAFE_useTestId';\nimport { Grid } from '#UNSAFE_Grid';\nimport {\n MonthViewStyles,\n MonthViewVariantOptions\n} from '#PRIVATE_MonthView/themes/MonthViewStyles.css';\nimport { MonthViewRedwoodTheme } from '#PRIVATE_MonthView/themes/redwood/MonthViewTheme';\nimport { useComponentTheme } from '../hooks/UNSAFE_useComponentTheme';\nimport { monthViewScaleVars } from '#PRIVATE_MonthView/themes/MonthViewContract.css';\nimport { WeekNumberCell } from './WeekNumberCell';\n\ntype PickedDayCellProps = Pick<\n ComponentProps<typeof DayCell>,\n 'dayFormatter' | 'onAction' | 'onNavigation'\n>;\n\ntype MonthViewProps = TestIdProps &\n PickedDayCellProps & {\n /**\n * The daysOutsideMonth property affects the day cells that are outside of the current month.\n * If set to 'hidden', then the days outside of the current month will be hidden.\n * If set to 'selectable', then the days outside of the current month will be visible and selectable.\n * This defaults to 'hidden'.\n */\n daysOutsideMonth?: 'hidden' | 'selectable';\n /**\n * The MonthView renders with the month of the focusableDate.\n * The focusableDate is the only day in the MonthView that has tabIndex: 0 on it.\n * The focusableDate doesn't have focus until the user tabs in to the Month View.\n * The focusableDate is never undefined.\n */\n focusableDate: CalendarDateRequired;\n /**\n * If set to true, the focusableDate will be focused and you will see the focus ring. It will be\n * false when no date has focus.\n * @default false\n */\n isFocused?: boolean;\n /**\n * Specifies whether the component is readonly.\n */\n isReadonly?: boolean;\n /**\n * The maximum selectable date. The max must be greater than the min if they are both specified.\n */\n max?: CalendarDateRequired;\n /**\n * The minimum selectable date. The min must be less than the max if they are both specified.\n */\n min?: CalendarDateRequired;\n /**\n * The selected date of the MonthView, or undefined is there is no selected date. This\n * is used to highlight the selected day cell if it is within the min/max range.\n */\n selectedDate?: CalendarDateRequired;\n /**\n * Today's date. This is used to highlight the Today day cell.\n */\n todaysDate: CalendarDateRequired;\n /**\n * Whether week of the year will be shown in the DatePicker. The default calculation follows the\n * ISO 8601 definition: the first week of the year contains the first Thursday of the year.\n * This means that some days from one year may be placed into weeks 'belonging' to another year.\n */\n weekDisplay?: 'none' | 'number';\n };\n\n/**\n * A MonthView is a month interface that allows users to select a single date. The MonthView is the week day header\n * abbreviations and the days of the month. A MonthView is used inside of a DatePicker\n * along with the DatePickerHeader and the MonthGridView and YearGridView.\n */\nexport const MonthView = ({\n dayFormatter,\n daysOutsideMonth = 'hidden',\n isReadonly = false,\n max,\n min,\n onAction,\n onNavigation,\n selectedDate,\n focusableDate,\n isFocused = false,\n testId,\n todaysDate,\n weekDisplay = 'none'\n}: MonthViewProps) => {\n const { locale } = useUser();\n const weeksInMonth = getWeeksInMonth(focusableDate.year, focusableDate.month, locale);\n const { baseTheme, styles } = useComponentTheme<MonthViewVariantOptions, MonthViewStyles>(\n MonthViewRedwoodTheme,\n {}\n );\n const isWeekNumberDisplayed = weekDisplay === 'number';\n const gridTemplateColumns = `repeat(${isWeekNumberDisplayed ? 8 : 7}, 1fr)`;\n\n const dateFormatter = useMemo(() => {\n checkNoCalendarExtension(locale);\n const dateFormatOptions: NativeDateTimeOptions = {\n locale,\n dateStyle: 'full'\n };\n const { format } = getFormatParse(dateFormatOptions);\n return format;\n }, [locale]);\n\n const renderMonthViewHeaderRow = () => {\n const weekDays = getDaysOfWeekNames(locale, 'short');\n\n return (\n <div class={styles.sticky}>\n <Grid\n role=\"row\"\n aria-hidden=\"true\"\n gridTemplateColumns={gridTemplateColumns}\n gap={monthViewScaleVars.columnGap}>\n {isWeekNumberDisplayed && <div role=\"presentation\" />}\n {weekDays.map((day) => (\n <div role=\"columnheader\" class={styles.dayOfTheWeek}>\n <span>{day}</span>\n </div>\n ))}\n </Grid>\n </div>\n );\n };\n\n const renderMonthView = () => {\n const calendarGrid: JSX.Element[] = [];\n\n for (let weekIndex = 0; weekIndex < weeksInMonth; weekIndex++) {\n const startDateOfWeek = getStartOfWeek(focusableDate.year, focusableDate.month, 1, locale);\n\n const weekDates = getDatesInWeek(\n weekIndex as WeekInMonthIndex,\n startDateOfWeek.year,\n startDateOfWeek.month,\n startDateOfWeek.day\n );\n\n const weekCells = weekDates.map((dayCellDate) => {\n // This figures out the visual state of the DayCell.\n const isDisabled = isDateOutOfRange(dayCellDate, min, max);\n\n // Even if the selected date is out of range, the UX design shows it as selected.\n const isSelected = selectedDate ? isSameDate(dayCellDate, selectedDate) : false;\n const isToday = isSameDate(dayCellDate, todaysDate);\n const isFocusable = isSameDate(dayCellDate, focusableDate);\n const isAdjacentMonth = isOutOfMonth(dayCellDate, focusableDate);\n const isHidden = isAdjacentMonth && daysOutsideMonth === 'hidden';\n\n return (\n <DayCell\n key={`${dayCellDate.year}-${dayCellDate.month}-${dayCellDate.day}`}\n date={dayCellDate}\n dateFormatter={dateFormatter}\n dayFormatter={dayFormatter}\n isAdjacentMonth={isAdjacentMonth}\n isDisabled={isDisabled}\n isFocusable={isFocusable}\n isFocused={isFocusable && isFocused}\n isHidden={isHidden}\n isReadonly={isReadonly}\n isSelected={isSelected}\n isToday={isToday}\n onAction={onAction}\n onNavigation={onNavigation}\n />\n );\n });\n\n calendarGrid.push(\n <Grid\n key={weekIndex}\n role=\"row\"\n gridTemplateColumns={gridTemplateColumns}\n gap={monthViewScaleVars.columnGap}>\n {isWeekNumberDisplayed && <WeekNumberCell startDateOfWeek={weekDates[0]} />}\n {weekCells}\n </Grid>\n );\n }\n\n return calendarGrid;\n };\n\n const monthViewAriaLabel = formatFullCalendarDate(locale, focusableDate, 'month');\n return (\n <div class={baseTheme}>\n <Grid\n gap={monthViewScaleVars.rowGap}\n aria-label={monthViewAriaLabel}\n role=\"grid\"\n testId={testId}>\n {renderMonthViewHeaderRow()}\n {renderMonthView()}\n </Grid>\n </div>\n );\n};\n\nfunction isSameDate(date1: CalendarDateRequired, date2: CalendarDateRequired) {\n return date1.year === date2.year && date1.month === date2.month && date1.day === date2.day;\n}\n\nfunction isOutOfMonth(date1: CalendarDateRequired, currentMonthDate: CalendarDateRequired) {\n return date1.month !== currentMonthDate.month;\n}\n"],"names":["defaultDayFormatter","state","DayCell","props","buttonProps","date","dayFormatter","dateFormatter","isAdjacentMonth","isDisabled","isFocusable","isFocused","isHidden","isReadonly","isSelected","isToday","onAction","onNavigation","isDisabledFormat","isRestrictedFormat","useFocusableCell","handleAction","useCallback","payload","buttonEventHandlers","useCellNavigation","navigationMap","ArrowLeft","ltr","rtl","ArrowRight","ArrowDown","ArrowUp","PageDown","PageUp","Home","End","ShiftPageDown","ShiftPageUp","CtrlAltT","translations","useTranslationBundle","today","datePicker_today","selected","datePicker_selected","restricted","datePicker_restricted","formattedDate","getIsoDateStr","year","month","day","ariaLabel","dayOfMonth","toJSDate","getDate","toString","isActivable","isDimmed","isHoverable","isRestricted","label","useDayCell","_jsx","jsx","role","class","dayCellStyles","children","StyledDatePickerButton","WeekNumberCell","startDateOfWeek","weekNumber","checkDate","dayNumber","getUTCDay","Logger.warn","setUTCDate","getUTCDate","janFirst","getUTCFullYear","Math","floor","round","getTime","calculateWeekNumber","datePicker_weekNum","NUM","String","weekNumberCellStyles","weekNumberStyles","isSameDate","date1","date2","daysOutsideMonth","max","min","selectedDate","focusableDate","testId","todaysDate","weekDisplay","locale","useUser","weeksInMonth","getWeeksInMonth","baseTheme","styles","useComponentTheme","MonthViewRedwoodTheme","isWeekNumberDisplayed","gridTemplateColumns","useMemo","checkNoCalendarExtension","dateFormatOptions","dateStyle","format","getFormatParse","monthViewAriaLabel","formatFullCalendarDate","_jsxs","jsxs","Grid","gap","monthViewScaleVars","rowGap","weekDays","getDaysOfWeekNames","sticky","columnGap","map","dayOfTheWeek","renderMonthViewHeaderRow","calendarGrid","weekIndex","getStartOfWeek","weekDates","getDatesInWeek","weekCells","dayCellDate","isDateOutOfRange","currentMonthDate","push","renderMonthView"],"mappings":"8lBAuGO,MAuFDA,EAAsB,KAAO,CAAEC,MAAO,YC3J/BC,EAAWC,IACtB,MAAMC,YAAEA,GDmEgB,GACxBC,OACAC,eAAeN,EACfO,gBACAC,kBACAC,aACAC,cACAC,YACAC,WACAC,aACAC,aACAC,UACAC,WACAC,mBAGA,MAAMhB,MAAEA,GAAUK,EAAaD,GACzBa,EAA6B,aAAVjB,EACnBkB,EAA+B,eAAVlB,EAGrBG,EAAcgB,EAAgBA,iBAAC,CAAEV,cAAaC,cAE9CU,EAA4CC,eAC/CC,IACKd,GAAcI,GAAcK,GAAoBC,GACpDH,EAASO,EAAQ,GAEnB,CAACd,EAAYS,EAAkBL,EAAYM,EAAoBH,IAE3DQ,EAAsBC,EAAAA,kBAAkB,CAC5CC,cAAe,CACbC,UAAW,CAAEC,IAAK,cAAeC,IAAK,WACtCC,WAAY,CAAEF,IAAK,UAAWC,IAAK,eACnCE,UAAW,WACXC,QAAS,eACTC,SAAU,YACVC,OAAQ,gBACRC,KAAM,kBACNC,IAAK,iBACLC,cAAe,WACfC,YAAa,eACbC,SAAU,SAEZhB,QAAS,CAAElB,QACXW,SA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tB,OAACE,EAAAA,MAECzD,KAAK,MACL8C,oBAAqBA,EACrBY,IAAKC,EAAAA,mBAAmBK,UACvB7D,SAAA,CAAA0C,GAAyB/C,EAACC,IAAAM,EAAe,CAAAC,gBAAiBiE,EAAU,KACpEE,IALIJ,GAQV,CAED,OAAOD,CAAY,EAYdU,OAGL"}
|
package/amd/PRIVATE_MonthView.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(['exports', './MonthView-
|
|
1
|
+
define(['exports', './MonthView-d2f8f3f1', 'preact/jsx-runtime', './dayUtils-49272c61', './getFormatParse-7ea0c25b', './types-2446783b', './logger-0f873e29', './supplementalData-6a14b24e', './calendarDateUtils-dd5b75ee', 'preact/hooks', './StyledDatePickerButton-5332fad7', './PRIVATE_StyledDatePickerButton/themes/StyledDatePickerButtonStyles.css', 'css!./BaseButtonStyles.styles.css', 'css!./StyledDatePickerButtonStyles.styles.css', './vanilla-extract-recipes-createRuntimeFn.esm-d881c69a', './classNames-08d99695', 'preact/compat', './useTranslationBundle-27bf6340', './LayerHost-7d4aa6d3', './index-f7ad24df', 'preact', './UNSAFE_Layer/themes/LayerHostStyles.css', 'css!./LayerHostStyles.styles.css', './useCellNavigation-43a992b6', './TabbableModeContext-a9c97640', './useTabbableMode-df433329', './useId-c9578d26', './useUser-988f7da2', './PRIVATE_MonthView/themes/DayCellStyles.css', 'css!./DayCellStyles.styles.css', './Grid-2ddec30a', './grid-767b4587', './boxalignment-6cee1ef3', './size-0127b66b', './utils-ad4761c9', './themeContract.css-2e4b066d', './colorUtils-b9dc1bd1', './_curry1-df649359', './arrayUtils-6ee96a35', 'css!./boxalignment.styles.css', './vanilla-extract-sprinkles-createRuntimeSprinkles.esm-84d30764', './mergeInterpolations-9ede4cf7', './mergeDeepWithKey-aaab9019', './_curry3-83878f86', './_curry2-86c52b86', './_isObject-42bafc94', 'css!./GridStyles.styles.css', './useTestId-a2e433c2', './PRIVATE_MonthView/themes/redwood/MonthViewTheme', './PRIVATE_MonthView/themes/MonthViewStyles.css', 'css!./MonthViewStyles.styles.css', './useComponentTheme-5aa41a8f', './PRIVATE_MonthView/themes/MonthViewContract.css', './PRIVATE_MonthView/themes/WeekNumberCellStyle.css', 'css!./WeekNumberCellStyle.styles.css'], (function(e,t,s,a,l,c,r,n,i,o,d,y,b,u,m,h,f,S,V,p,M,w,_,P,T,g,k,C,D,I,x,R,A,B,E,U,N,v,L,j,F,H,W,G,O,z,K,q,J,Q,X,Y,Z,$,ee){"use strict";e.MonthView=t.MonthView,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=PRIVATE_MonthView.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(['exports', './YearsGridView-
|
|
1
|
+
define(['exports', './YearsGridView-f5c6d70d', 'preact/jsx-runtime', './Grid-2ddec30a', './grid-767b4587', './boxalignment-6cee1ef3', './size-0127b66b', './utils-ad4761c9', './themeContract.css-2e4b066d', './colorUtils-b9dc1bd1', './_curry1-df649359', './arrayUtils-6ee96a35', 'css!./boxalignment.styles.css', './vanilla-extract-sprinkles-createRuntimeSprinkles.esm-84d30764', './mergeInterpolations-9ede4cf7', './classNames-08d99695', './mergeDeepWithKey-aaab9019', './_curry3-83878f86', './_curry2-86c52b86', './_isObject-42bafc94', 'css!./GridStyles.styles.css', './useTestId-a2e433c2', './LayerHost-7d4aa6d3', './index-f7ad24df', 'preact', 'preact/compat', './UNSAFE_Layer/themes/LayerHostStyles.css', 'css!./LayerHostStyles.styles.css', 'preact/hooks', './StyledDatePickerButton-5332fad7', './PRIVATE_StyledDatePickerButton/themes/StyledDatePickerButtonStyles.css', 'css!./BaseButtonStyles.styles.css', 'css!./StyledDatePickerButtonStyles.styles.css', './vanilla-extract-recipes-createRuntimeFn.esm-d881c69a', './useTranslationBundle-27bf6340', './useUser-988f7da2', './getFormatParse-7ea0c25b', './types-2446783b', './logger-0f873e29', './maskUtils-8e7a7701', './calendarDateUtils-dd5b75ee', './useCellNavigation-43a992b6', './TabbableModeContext-a9c97640', './useTabbableMode-df433329', './useId-c9578d26'], (function(e,t,s,a,r,c,d,i,l,n,o,y,b,u,f,m,p,S,g,k,x,_,h,B,G,P,D,U,V,w,M,T,v,I,L,j,C,F,H,N,R,Y,A,E,O){"use strict";e.MonthsGridView=t.MonthsGridView,e.YearsGridView=t.YearsGridView,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=PRIVATE_MonthYearGridView.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(['exports', './StyledDatePickerButton-
|
|
1
|
+
define(['exports', './StyledDatePickerButton-5332fad7', 'preact/jsx-runtime', './PRIVATE_StyledDatePickerButton/themes/StyledDatePickerButtonStyles.css', 'css!./BaseButtonStyles.styles.css', 'css!./StyledDatePickerButtonStyles.styles.css', './vanilla-extract-recipes-createRuntimeFn.esm-d881c69a', './classNames-08d99695', 'preact/compat'], (function(e,t,s,c,a,l,r,n,i){"use strict";e.StyledDatePickerButton=t.StyledDatePickerButton,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=PRIVATE_StyledDatePickerButton.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
define(['exports', 'preact/jsx-runtime', './PRIVATE_StyledDatePickerButton/themes/StyledDatePickerButtonStyles.css', './classNames-08d99695', 'preact/compat'], (function(e,t,i,s,d){"use strict";const n=d.forwardRef((({isActivable:e=!1,isReadonly:d=!1,isAdjacentMonth:n=!1,isDimmed:a=!1,isHidden:o=!1,isHoverable:c=!1,isRestricted:r=!1,isSelected:l=!1,isToday:m=!1,tabIndex:v,label:b,variant:u,...y},h=null)=>{const S=i.multiVariantStyles({active:e?"isActivable":"notActiveable",dimmed:a?"isDimmed":"notDimmed",hidden:o?"isHidden":"notHidden",hover:c?"isHoverable":"notHoverable",adjacentMonth:n?"isAdjacentMonth":"notAdjacentMonth",restricted:r?"isRestricted":"notRestricted",selected:l?"isSelected":"notSelected",today:m?"isToday":"notToday",variant:u}),A=s.classNames([S]);return t.jsx("span",{role:d?void 0:"button",class:A,ref:h,tabIndex:v,...y,children:b})}));e.StyledDatePickerButton=n}));
|
|
2
|
+
//# sourceMappingURL=StyledDatePickerButton-5332fad7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StyledDatePickerButton-5332fad7.js","sources":["../../src/PRIVATE_StyledDatePickerButton/StyledDatePickerButton.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { multiVariantStyles } from './themes/StyledDatePickerButtonStyles.css';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { forwardRef } from 'preact/compat';\nimport type { Ref, JSX } from 'preact';\nimport type { UnpackSignals } from '@oracle/oraclejet-internal-utilities/attributeUtils';\n\ntype IntrinsicProps = Pick<UnpackSignals<JSX.HTMLAttributes<HTMLElement>>, 'onClick' | 'onKeyDown'>;\n\ntype AriaProps = {\n 'aria-label'?: UnpackSignals<JSX.AriaAttributes>['aria-label'];\n 'aria-disabled'?: UnpackSignals<JSX.AriaAttributes>['aria-disabled'];\n};\n\ntype Props = IntrinsicProps &\n AriaProps & {\n /**\n * Specifies that the button appears activated when the user activates the StyledDatePickerButton.\n * When true, adds the :active selector to the button so that it can show active styling.\n * Combine this property with the other properties to get the styling you want.\n */\n isActivable?: boolean;\n /**\n * Specifies the styling of the button to look dimmed.\n * Combine this property with the other properties to get the styling you want.\n */\n isDimmed?: boolean;\n /**\n * Specifies the styling of the button to look hidden, that is, visibility: hidden.\n */\n isHidden?: boolean;\n /**\n * Specifies that the button appears hovered when the user hovers over the StyledDatePickerButton.\n * When true, adds the :hover selector to the button so that it can show hover styling.\n * Combine this property with the other properties to get the styling you want.\n */\n isHoverable?: boolean;\n /**\n * Specifies the styling of the button to look like a day that is adjacent to the current month.\n * Combine this property with the other properties to get the styling you want.\n */\n isAdjacentMonth?: boolean;\n /**\n * Specifies the role of the day cell to be 'button' when isReadonly is false, or no role when isReadonly is true.\n * This helps the screenreader.\n */\n isReadonly?: boolean;\n /**\n * Specifies the styling of the button to look like it is restricted.\n * Combine this property with the other properties to get the styling you want.\n */\n isRestricted?: boolean;\n /**\n * Specifies the styling of the button to look like it is selected.\n * Combine this property with the other properties to get the styling you want.\n */\n isSelected?: boolean;\n /**\n * Specifies the styling of the button to look like it is today.\n * Combine this property with the other properties to get the styling you want.\n */\n isToday?: boolean;\n /**\n * Specifies the label of the day button. This will be the day of the month.\n */\n label: string;\n /**\n * Specifies the tabIndex.\n */\n tabIndex?: 0 | -1;\n /**\n * Specifies the visual variant for the StyledDatePickerButton.\n */\n variant?: 'day' | 'month' | 'year';\n };\n\n/**\n * StyledDatePickerButton is a controlled component that displays a stylized span for a button that goes into a DatePicker.\n */\nconst StyledDatePickerButton = forwardRef(\n (\n {\n isActivable = false,\n isReadonly = false,\n isAdjacentMonth = false,\n isDimmed = false,\n isHidden = false,\n isHoverable = false,\n isRestricted = false,\n isSelected = false,\n isToday = false,\n tabIndex,\n label,\n variant,\n ...props\n }: Props,\n ref: Ref<HTMLSpanElement> = null\n ) => {\n // The multiVariantStyles function is defined in StyledDatePickerButtonStyles.css.ts,\n // using the recipe utility provided by @vanilla-extract/recipes.\n // This function is used to merge the base styles, variants, and compound variants\n // into a single set of styles for components based on the component's properties.\n const variantClasses = multiVariantStyles({\n active: isActivable ? 'isActivable' : 'notActiveable',\n dimmed: isDimmed ? 'isDimmed' : 'notDimmed',\n hidden: isHidden ? 'isHidden' : 'notHidden',\n hover: isHoverable ? 'isHoverable' : 'notHoverable',\n adjacentMonth: isAdjacentMonth ? 'isAdjacentMonth' : 'notAdjacentMonth',\n restricted: isRestricted ? 'isRestricted' : 'notRestricted',\n selected: isSelected ? 'isSelected' : 'notSelected',\n today: isToday ? 'isToday' : 'notToday',\n variant\n });\n\n const classes = classNames([variantClasses]);\n return (\n <span\n role={!isReadonly ? 'button' : undefined}\n class={classes}\n ref={ref}\n tabIndex={tabIndex}\n {...props}>\n {label}\n </span>\n );\n }\n);\n\nexport { StyledDatePickerButton };\n"],"names":["StyledDatePickerButton","forwardRef","isActivable","isReadonly","isAdjacentMonth","isDimmed","isHidden","isHoverable","isRestricted","isSelected","isToday","tabIndex","label","variant","props","ref","variantClasses","multiVariantStyles","active","dimmed","hidden","hover","adjacentMonth","restricted","selected","today","classes","classNames","_jsx","role","undefined","class","children"],"mappings":"6LAsFM,MAAAA,EAAyBC,EAAAA,YAC7B,EAEIC,eAAc,EACdC,cAAa,EACbC,mBAAkB,EAClBC,YAAW,EACXC,YAAW,EACXC,eAAc,EACdC,gBAAe,EACfC,cAAa,EACbC,WAAU,EACVC,WACAC,QACAC,aACGC,GAELC,EAA4B,QAM5B,MAAMC,EAAiBC,EAAAA,mBAAmB,CACxCC,OAAQhB,EAAc,cAAgB,gBACtCiB,OAAQd,EAAW,WAAa,YAChCe,OAAQd,EAAW,WAAa,YAChCe,MAAOd,EAAc,cAAgB,eACrCe,cAAelB,EAAkB,kBAAoB,mBACrDmB,WAAYf,EAAe,eAAiB,gBAC5CgB,SAAUf,EAAa,aAAe,cACtCgB,MAAOf,EAAU,UAAY,WAC7BG,YAGIa,EAAUC,EAAAA,WAAW,CAACX,IAC5B,OACEY,EAAAA,IAAA,OAAA,CACEC,KAAO1B,OAAwB2B,EAAX,SACpBC,MAAOL,EACPX,IAAKA,EACLJ,SAAUA,KACNG,EAAKkB,SACRpB,GAEH"}
|
|
@@ -8,6 +8,23 @@
|
|
|
8
8
|
width: var(--oj-c-EXPERIMENTAL-DO-NOT-USE-base-button-sizes-sm-height);
|
|
9
9
|
font-weight: var(--oj-c-EXPERIMENTAL-DO-NOT-USE-body-md-font-weight-regular);
|
|
10
10
|
font-size: var(--oj-c-EXPERIMENTAL-DO-NOT-USE-body-md-font-size);
|
|
11
|
+
cursor: var(--oj-c-EXPERIMENTAL-DO-NOT-USE-cursor-clickable);
|
|
12
|
+
border-style: solid;
|
|
13
|
+
border-width: 1px;
|
|
14
|
+
overflow-x: hidden;
|
|
15
|
+
overflow-y: hidden;
|
|
16
|
+
text-overflow: ellipsis;
|
|
17
|
+
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
border-radius: var(--oj-c-EXPERIMENTAL-DO-NOT-USE-base-button-border-radius);
|
|
20
|
+
height: var(--oj-c-EXPERIMENTAL-DO-NOT-USE-base-button-sizes-sm-height);
|
|
21
|
+
min-width: var(--oj-c-EXPERIMENTAL-DO-NOT-USE-base-button-sizes-sm-height);
|
|
22
|
+
}
|
|
23
|
+
.StyledDatePickerButtonStyles_baseStyle__38ano0:focus-visible {
|
|
24
|
+
outline-style: dotted;
|
|
25
|
+
outline-offset: 1px;
|
|
26
|
+
outline-width: 1px;
|
|
27
|
+
outline-color: var(--oj-c-EXPERIMENTAL-DO-NOT-USE-border-keyboard-focus);
|
|
11
28
|
}
|
|
12
29
|
.StyledDatePickerButtonStyles_multiVariantStyles_hidden_isHidden__38ano7 {
|
|
13
30
|
visibility: hidden;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
define(['exports', 'preact/jsx-runtime', 'preact/compat', './FormContext-6b0879a0', './useFormContext-b8cbbb21', './FormFieldContext-a024b891', 'preact/hooks', './useFocusableTextField-8b755b15', './Label-3c17bcc9', './keyboardUtils-fb6219eb', './TextFieldInput-eb40adaa', 'css!./ObfuscatedTextFieldInputStyles.styles.css', './ReadonlyTextFieldInput-e5723c48', './StyledTextField-5e554e5b', './TextField-51b63f5f', './MaxLengthLiveRegion-1f30f975', './UNSAFE_TextField/themes/TextFieldStyles.css', 'css!./SkeletonStyles.styles.css', 'css!./TextFieldLoadingStyles.styles.css', 'css!./TextFieldStyles.styles.css', 'module', './UNSAFE_TextField/themes/redwood/TextFieldVariants.css', './useTextField-3ab0a23b', './logger-0f873e29', './TabbableModeContext-a9c97640', './useId-c9578d26', './useTranslationBundle-27bf6340', 'css!./UserAssistanceStyles.styles.css', 'module', './UNSAFE_UserAssistance/themes/redwood/UserAssistanceVariants.css', './InlineUserAssistance-e406e352', './CompactUserAssistance-5ef03b0a', './mergeProps-bcfa6a92', './LayerHost-7d4aa6d3', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-3c8a0253', 'preact', 'css!./IconStyle.styles.css', './Popup-062b66ff', 'css!./LabelStyles.styles.css', 'module', './UNSAFE_Label/themes/redwood/LabelVariants.css', './InputGroupContext-372087af', './HiddenAccessible-037ef42d', 'module', './UNSAFE_Popup/themes/redwood/PopupVariants.css', './useLengthFilter-c05fd679', './MaxLengthCounter-cadff1c7', './useCurrentValueReducer-faded381', './useSelectableTextField-900d2860', './formControlUtils-de035f75'], (function(e,s,t,a,n,i,l,o,r,d,c,u,x,m,b,p,h,F,f,y,T,g,A,L,S,v,C,R,U,I,E,w,j,_,P,V,k,N,B,D,M,H,q,z,W,$,G,O,X,J,K,Q,Y){"use strict";const Z=t.forwardRef((({"aria-describedby":e,assistiveText:a,autoComplete:l="off",autoFocus:d=!1,columnSpan:u,helpSourceLink:h,helpSourceText:F,isDisabled:f,isReadonly:y,isRequired:T=!1,isRequiredShown:g,label:L,labelEdge:S,labelStartWidth:R,maxLength:U,maxLengthCounter:I="remaining",maxLengthUnit:_,messages:P,placeholder:V,resize:k,role:N,rows:B,textAlign:D,userAssistanceDensity:M,value:H,variant:q="default",onInput:z,onCommit:W,testId:G},O)=>{const Z=C.useTranslationBundle("@oracle/oraclejet-preact"),ee=U?Z.formControl_limitReached({CHARACTER_LIMIT:U}):"",{currentCommitValue:se,dispatch:te}=K.useCurrentValueReducer({value:H}),ae=t.useCallback((e=>{te({type:"input",payload:e.value}),z?.(e)}),[z,te]),ne=t.useCallback((e=>{te({type:"commit",payload:e.value}),W?.(e)}),[W,te]),{isDisabled:ie,isReadonly:le,labelEdge:oe,labelStartWidth:re,textAlign:de,userAssistanceDensity:ce}=n.useFormContext(),ue=f??ie,xe=y??le,me=S??oe,be=R??re,pe=D??de??Y.defaultTextAlignForVariant(q),he=M??ce,Fe=t.useRef(v.useId()),fe=e?`${e} ${Fe.current}`:Fe.current,ye=t.useRef(null),Te=t.useRef(null),{focusProps:ge,isFocused:Ae,methods:Le}=o.useFocusableTextField({isDisabled:ue,isReadonly:xe,enabledElementRef:ye,readonlyElementRef:Te}),{methods:Se}=Q.useSelectableTextField(ye);t.useImperativeHandle(O,(()=>j.mergeProps(Le,Se)),[Le,Se]);const{isMaxLengthExceeded:ve,isMaxLengthReached:Ce,valueLength:Re,onFilteredInput:Ue}=X.useLengthFilter({maxLength:U,maxLengthUnit:_,value:H,onInput:ae,onCommit:ne}),Ie=[...P??[],...Ce?[{detail:ee,severity:"info"}]:[]],{formFieldContext:Ee,inputProps:we,labelProps:je,textFieldProps:_e,userAssistanceProps:Pe}=A.useTextField({ariaDescribedBy:xe||ue?e:fe,contentVariant:"textarea",helpSourceLink:h,helpSourceText:F,isDisabled:ue,isFocused:Ae,isReadonly:xe,isRequiredShown:g,labelEdge:me,messages:Ie,styleVariant:q,userAssistanceDensity:he,value:H}),Ve=t.useCallback((()=>{const e=ye.current,s=e?e.value.length:null;ye.current?.setSelectionRange(s,s),ye.current?.focus()}),[ye]),ke="none"!==me?s.jsx(r.Label,{...je,children:L}):void 0,Ne={label:"none"!==me?ke:void 0,labelEdge:"none"!==me?me:void 0,labelStartWidth:"none"!==me?be:void 0,labelText:"inside"!==me||ue?void 0:L},Be="none"===me?L:void 0,De="efficient"===he||"reflow"===he?ue?"efficient"!==he?void 0:s.jsx(E.InlineUserAssistance,{userAssistanceDensity:he,...Pe}):xe?s.jsx(E.InlineUserAssistance,{fieldLabel:L,messages:P,userAssistanceDensity:he,...Pe}):s.jsx(E.InlineUserAssistance,{assistiveText:a,fieldLabel:L,helpSourceLink:h,helpSourceText:F,messages:Ie,isRequiredShown:g,userAssistanceDensity:he,...Pe}):void 0,Me=t.useRef(null),He="compact"===he?s.jsx(w.CompactUserAssistance,{anchorRef:Me,messages:Ie,assistiveText:a,...Pe}):void 0;if(xe){const e=s.jsx(x.ReadonlyTextFieldInput,{"aria-describedby":we["aria-describedby"],"aria-label":Be,"aria-labelledby":je.id,as:"textarea",elementRef:Te,formVariant:q,rows:B,autoFocus:d,textAlign:pe,value:H,variant:"textarea",hasEmptyLabel:""===L&&"none"===me,hasInsideLabel:void 0!==L&&"inside"===me,onBlur:we.onBlur,onFocus:we.onFocus});return s.jsx(i.FormFieldContext.Provider,{value:Ee,children:s.jsx(m.ReadonlyTextField,{role:"presentation",columnSpan:u,compactUserAssistance:He,inlineUserAssistance:De,ref:Me,testId:G,variant:"textarea",mainContent:e,resize:k,...Ne})})}const qe=void 0!==U,ze=s.jsxs(s.Fragment,{children:[s.jsx(c.TextFieldInput,{as:"textarea","aria-label":Be,autoComplete:l,autoFocus:d,currentCommitValue:se,hasEmptyLabel:""===L&&"none"===me,hasInsideLabel:void 0!==ke&&"inside"===me,isRequired:T,inputRef:ye,onCommit:ne,onInput:Ue,placeholder:V,role:N,rows:B,textAlign:pe,value:H,...we}),"remaining"===I&&qe&&s.jsx(J.MaxLengthCounter,{maxLength:U,valueLength:Re,onClick:Ve}),qe&&s.jsx($.HiddenAccessible,{id:Fe.current,isHidden:!0,children:Z.formControl_maxLength({MAX_LENGTH:`${U}`})}),qe&&Ae&&s.jsx(p.MaxLengthLiveRegion,{isMaxLengthExceeded:ve,maxLength:U,valueLength:Re,testId:G?G+"_maxLength":void 0})]});return s.jsx(i.FormFieldContext.Provider,{value:Ee,children:s.jsx(b.TextField,{mainContent:ze,columnSpan:u,compactUserAssistance:He,inlineUserAssistance:De,onBlur:ge?.onFocusOut,onFocus:ge?.onFocusIn,mainFieldRef:Me,resize:k,testId:G,..._e,...Ne})})}));e.TextArea=Z}));
|
|
2
|
+
//# sourceMappingURL=TextArea-dfd1f679.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea-dfd1f679.js","sources":["../../src/UNSAFE_TextArea/TextArea.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { ComponentProps, Ref } from 'preact';\nimport { forwardRef, useCallback, useImperativeHandle, useRef } from 'preact/compat';\n\nimport { useFormContext } from '#hooks/UNSAFE_useFormContext';\nimport { FormFieldContext } from '#hooks/UNSAFE_useFormFieldContext';\nimport { FocusableHandle, useFocusableTextField } from '#hooks/UNSAFE_useFocusableTextField';\nimport { Label } from '#UNSAFE_Label';\nimport {\n ReadonlyTextField,\n ReadonlyTextFieldInput,\n TextField,\n TextFieldInput\n} from '#UNSAFE_TextField';\nimport { useTextField } from '#hooks/UNSAFE_useTextField';\nimport {\n CompactUserAssistance,\n InlineUserAssistance,\n UserAssistanceDensityType\n} from '#UNSAFE_UserAssistance';\nimport { CountUnit, useLengthFilter } from '#hooks/UNSAFE_useLengthFilter';\nimport { MaxLengthLiveRegion } from '#UNSAFE_TextField';\nimport { MaxLengthCounter } from './MaxLengthCounter';\nimport { Size } from '#utils/UNSAFE_size';\nimport { useCurrentValueReducer } from '#hooks/UNSAFE_useCurrentValueReducer';\nimport { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport { ComponentMessageItem } from '#UNSAFE_ComponentMessage';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport { LayoutColumnSpan } from '#utils/UNSAFE_styles/Layout';\nimport type { TestIdProps } from '#hooks/UNSAFE_useTestId';\nimport { HiddenAccessible } from '#UNSAFE_HiddenAccessible';\nimport { useId } from '#hooks/UNSAFE_useId';\nimport { SelectableHandle, useSelectableTextField } from '#hooks/UNSAFE_useSelectableTextField';\nimport { mergeProps } from '#utils/UNSAFE_mergeProps';\nimport { defaultTextAlignForVariant } from '#utils/PRIVATE_formControlUtils';\n\ntype TextFieldProps = ComponentProps<typeof TextField>;\ntype TextFieldInputProps = ComponentProps<typeof TextFieldInput>;\ntype InlineUserAssistanceProps = ComponentProps<typeof InlineUserAssistance>;\n\ntype Props = TestIdProps & {\n /**\n * The ID of an element (or space separated IDs of multiple elements) that\n * describes the input.\n */\n 'aria-describedby'?: TextFieldInputProps['aria-describedby'];\n\n /**\n * Text to provide guidance to help the user understand what to enter.\n */\n assistiveText?: InlineUserAssistanceProps['assistiveText'];\n /**\n * Dictates component's autocomplete state.\n * This attribute indicates whether the value of the control can be automatically completed by the browser.\n * The common values are \"on\" and \"off\".\n */\n autoComplete?: TextFieldInputProps['autoComplete'];\n /**\n * Autofocus specifies whether the component will get focus when the page is loaded.\n * If it is set to true then the associated component will get input focus when the page is loaded.\n * Setting this property doesn't set the focus to the component; it tells the browser to focus\n * to it when the element is inserted in the document.\n */\n autoFocus?: TextFieldInputProps['autoFocus'];\n /**\n * Specifies how many columns to span in a FormLayout with direction === 'row'\n */\n columnSpan?: LayoutColumnSpan;\n /**\n * Help source URL associated with the component.\n */\n helpSourceLink?: InlineUserAssistanceProps['helpSourceLink'];\n /**\n * Custom text to be rendered for the <code>helpSourceLink</code>.\n */\n helpSourceText?: InlineUserAssistanceProps['helpSourceText'];\n /**\n * Specifies whether the component is disabled.\n */\n isDisabled?: boolean;\n /**\n * Specifies whether the component is readonly.\n */\n isReadonly?: boolean;\n /**\n * Specifies for accessibility purposes whether a value is required.\n *\n * Setting this property to <code>false</code> means that a value is not required to be\n * committed by the user. Setting this property to <code>true</code> means that a value\n * is required to be committed by the user.\n */\n isRequired?: TextFieldInputProps['isRequired'];\n /**\n * Specifies whether to show an indicator on screen that a value is required, for example\n * before the user has committed a value.\n */\n isRequiredShown?: InlineUserAssistanceProps['isRequiredShown'];\n /**\n * Specifies the label associated with the field.\n */\n label: string;\n /**\n * Specifies where the label is positioned relative to the field.\n */\n labelEdge?: 'inside' | 'start' | 'top' | 'none';\n /**\n * Specifies the width of the label when <code>labelEdge</code> is <code>\"start\"</code>\n */\n labelStartWidth?: Size;\n /**\n * Specifies the maximum number of characters that can be entered in the input field.\n */\n maxLength?: number;\n /**\n * Determines whether the remaining number of characters that can be entered is shown or not.\n */\n maxLengthCounter?: 'none' | 'remaining';\n /**\n * Specifies how the input text characters are to be counted when maxLength is specified.\n */\n maxLengthUnit?: CountUnit;\n /**\n * Messages to show on screen that are associated with the component.\n */\n messages?: InlineUserAssistanceProps['messages'];\n /**\n * A short hint to display before the user enters a value.\n */\n placeholder?: TextFieldInputProps['placeholder'];\n /**\n * Specifies how the user is allowed to manually resize the TextArea component.\n */\n resize?: TextFieldProps['resize'];\n /**\n * Specifies the ARIA role type.\n */\n role?: TextFieldInputProps['role'];\n /**\n * Specifies the number of rows to display\n */\n rows?: TextFieldInputProps['rows'];\n /**\n * Specifies how to align text within the field.\n */\n textAlign?: TextFieldInputProps['textAlign'];\n /**\n * Specifies the density of the user assistance presentation. It can be set to:\n * <ul>\n * <li><code>'efficient'</code>: Show inline and reserve space to prevent layout reflow when user\n * assistance text is displayed.</li>\n * <li><code>'reflow'</code>: Show inline. Layout will reflow when text is displayed.</li>\n * <li><code>'compact'</code>: Messages, help, hints, and required will not be shown inline; they will show in a mode that keeps the screen more compact, like a popup for the messages, and a required icon to indicate Required. </li>\n * </ul>\n */\n userAssistanceDensity?: UserAssistanceDensityType;\n /**\n * The current display value of the component.\n */\n value?: TextFieldInputProps['value'];\n /**\n * The style variant of the component.\n */\n variant?: TextFieldInputProps['variant'];\n /**\n * Callback invoked when the user commits the entered value by blurring out of the field.\n */\n onCommit?: TextFieldInputProps['onCommit'];\n /**\n * Callback invoked each time the user changes the value of the field. For example, if the user\n * types 'abcd', this callback will be called four times with the value as 'a', 'ab', 'abc' and 'abcd'\n * respectively.\n */\n onInput: TextFieldInputProps['onInput'];\n};\n\ntype FocusSelectHandle = FocusableHandle & SelectableHandle;\n\n/**\n * A text area displays a field that allows a user to enter a multi-line text value.\n */\nexport const TextArea = forwardRef(\n (\n {\n 'aria-describedby': ariaDescribedBy,\n assistiveText,\n autoComplete = 'off',\n autoFocus = false,\n columnSpan,\n helpSourceLink,\n helpSourceText,\n isDisabled: propIsDisabled,\n isReadonly: propIsReadonly,\n isRequired = false,\n isRequiredShown,\n label,\n labelEdge: propLabelEdge,\n labelStartWidth: propLabelStartWidth,\n maxLength,\n maxLengthCounter = 'remaining',\n maxLengthUnit,\n messages,\n placeholder,\n resize,\n role,\n rows,\n textAlign: propTextAlign,\n userAssistanceDensity: propUserAssistanceDensity,\n value,\n variant = 'default',\n onInput,\n onCommit,\n testId\n }: Props,\n ref?: Ref<FocusSelectHandle>\n ) => {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const formControl_limitReached = maxLength\n ? translations.formControl_limitReached({\n CHARACTER_LIMIT: maxLength\n })\n : '';\n\n const { currentCommitValue, dispatch } = useCurrentValueReducer({ value });\n const onInputAndDispatch = useCallback(\n (detail: ValueUpdateDetail<string>) => {\n // Should dispatch happen first? This will queue up a re-render, ordering should not cause issues (this is async)\n dispatch({ type: 'input', payload: detail.value });\n onInput?.(detail);\n },\n [onInput, dispatch]\n );\n const onCommitAndDispatch = useCallback(\n (detail: ValueUpdateDetail<string>) => {\n // Should dispatch happen first? This will queue up a re-render, ordering should not cause issues (this is async)\n dispatch({ type: 'commit', payload: detail.value });\n onCommit?.(detail);\n },\n [onCommit, dispatch]\n );\n const {\n isDisabled: isFormDisabled,\n isReadonly: isFormReadonly,\n labelEdge: formLabelEdge,\n labelStartWidth: formLabelStartWidth,\n textAlign: formTextAlign,\n userAssistanceDensity: formUserAssistanceDensity\n } = useFormContext();\n\n // default to FormContext values if component properties are not specified\n const isDisabled = propIsDisabled ?? isFormDisabled;\n const isReadonly = propIsReadonly ?? isFormReadonly;\n const labelEdge = propLabelEdge ?? formLabelEdge;\n const labelStartWidth = propLabelStartWidth ?? formLabelStartWidth;\n const textAlign = propTextAlign ?? formTextAlign ?? defaultTextAlignForVariant(variant);\n const userAssistanceDensity = propUserAssistanceDensity ?? formUserAssistanceDensity;\n const maxLengthDescribedByIdRef = useRef<string>(useId());\n // The enabledAriaDescribedBy includes the maxLengthDescribedById in addition to what was passed in to aria-describedby.\n // We don't need to announce the max length message for readonly, as it only applies when editing the value.\n const enabledAriaDescribedBy = ariaDescribedBy\n ? `${ariaDescribedBy} ${maxLengthDescribedByIdRef.current}`\n : maxLengthDescribedByIdRef.current;\n\n const enabledElementRef = useRef<HTMLTextAreaElement>(null);\n const readonlyElementRef = useRef<HTMLTextAreaElement>(null);\n\n const {\n focusProps,\n isFocused,\n methods: focusMethods\n } = useFocusableTextField<HTMLTextAreaElement, HTMLTextAreaElement>({\n isDisabled,\n isReadonly,\n enabledElementRef,\n readonlyElementRef\n });\n\n const { methods: selectMethods } =\n useSelectableTextField<HTMLTextAreaElement>(enabledElementRef);\n\n useImperativeHandle(ref!, () => mergeProps(focusMethods, selectMethods), [\n focusMethods,\n selectMethods\n ]);\n\n // Handle length filter for user-typed inputs and controlled inputs\n const { isMaxLengthExceeded, isMaxLengthReached, valueLength, onFilteredInput } =\n useLengthFilter({\n maxLength,\n maxLengthUnit,\n value,\n onInput: onInputAndDispatch,\n onCommit: onCommitAndDispatch\n });\n\n const limitMessage = [{ detail: formControl_limitReached, severity: 'info' }];\n const allMessages = [\n ...(messages ?? []),\n ...(isMaxLengthReached ? limitMessage : [])\n ] as ComponentMessageItem[];\n\n const { formFieldContext, inputProps, labelProps, textFieldProps, userAssistanceProps } =\n useTextField({\n ariaDescribedBy: isReadonly || isDisabled ? ariaDescribedBy : enabledAriaDescribedBy,\n contentVariant: 'textarea',\n helpSourceLink,\n helpSourceText,\n isDisabled,\n isFocused,\n isReadonly,\n isRequiredShown,\n labelEdge,\n messages: allMessages,\n styleVariant: variant,\n userAssistanceDensity,\n value\n });\n\n const onClickCounter = useCallback(() => {\n const elm = enabledElementRef.current;\n // for setSelectionRange(), len needs to be a number or null.\n const len = elm ? elm.value.length : null;\n // Since the counter element is after the text, clicking in this\n // should put the selection at the end of the text\n enabledElementRef.current?.setSelectionRange(len, len);\n // Clicking the counter should put the focus on the input field\n enabledElementRef.current?.focus();\n }, [enabledElementRef]);\n\n const labelComp = labelEdge !== 'none' ? <Label {...labelProps}>{label}</Label> : undefined;\n\n const fieldLabelProps = {\n label: labelEdge !== 'none' ? labelComp : undefined,\n labelEdge: labelEdge !== 'none' ? labelEdge : undefined,\n labelStartWidth: labelEdge !== 'none' ? labelStartWidth : undefined,\n labelText: labelEdge === 'inside' && !isDisabled ? label : undefined\n };\n\n const ariaLabel = labelEdge === 'none' ? label : undefined;\n const isInlineDensity =\n userAssistanceDensity === 'efficient' || userAssistanceDensity === 'reflow';\n\n const inlineUserAssistance = isInlineDensity ? (\n isDisabled ? (\n // save space for user assistance if density is 'efficient', even though we don't\n // render user assistance for disabled fields\n userAssistanceDensity !== 'efficient' ? undefined : (\n <InlineUserAssistance\n userAssistanceDensity={userAssistanceDensity}\n {...userAssistanceProps}\n />\n )\n ) : isReadonly ? (\n <InlineUserAssistance\n fieldLabel={label}\n messages={messages}\n userAssistanceDensity={userAssistanceDensity}\n {...userAssistanceProps}\n />\n ) : (\n <InlineUserAssistance\n assistiveText={assistiveText}\n fieldLabel={label}\n helpSourceLink={helpSourceLink}\n helpSourceText={helpSourceText}\n messages={allMessages}\n isRequiredShown={isRequiredShown}\n userAssistanceDensity={userAssistanceDensity}\n {...userAssistanceProps}\n />\n )\n ) : undefined;\n\n const anchorRef = useRef<HTMLDivElement>(null);\n\n const compactUserAssistance =\n userAssistanceDensity === 'compact' ? (\n <CompactUserAssistance\n anchorRef={anchorRef}\n messages={allMessages}\n assistiveText={assistiveText}\n {...userAssistanceProps}\n />\n ) : undefined;\n\n if (isReadonly) {\n const mainContent = (\n <ReadonlyTextFieldInput\n aria-describedby={inputProps['aria-describedby']}\n aria-label={ariaLabel}\n aria-labelledby={labelProps.id}\n as=\"textarea\"\n elementRef={readonlyElementRef}\n formVariant={variant}\n rows={rows}\n autoFocus={autoFocus}\n textAlign={textAlign}\n value={value}\n variant=\"textarea\"\n hasEmptyLabel={label === '' && labelEdge === 'none'}\n hasInsideLabel={label !== undefined && labelEdge === 'inside'}\n onBlur={inputProps.onBlur}\n onFocus={inputProps.onFocus}\n />\n );\n return (\n <FormFieldContext.Provider value={formFieldContext}>\n <ReadonlyTextField\n role=\"presentation\"\n columnSpan={columnSpan}\n compactUserAssistance={compactUserAssistance}\n inlineUserAssistance={inlineUserAssistance}\n ref={anchorRef}\n testId={testId}\n variant=\"textarea\"\n mainContent={mainContent}\n resize={resize}\n {...fieldLabelProps}\n />\n </FormFieldContext.Provider>\n );\n }\n const hasMaxLength = maxLength !== undefined;\n const mainContent = (\n <>\n <TextFieldInput\n as=\"textarea\"\n aria-label={ariaLabel}\n autoComplete={autoComplete}\n autoFocus={autoFocus}\n currentCommitValue={currentCommitValue}\n hasEmptyLabel={label === '' && labelEdge === 'none'}\n hasInsideLabel={labelComp !== undefined && labelEdge === 'inside'}\n isRequired={isRequired}\n inputRef={enabledElementRef}\n onCommit={onCommitAndDispatch}\n onInput={onFilteredInput}\n placeholder={placeholder}\n role={role}\n rows={rows}\n textAlign={textAlign}\n value={value}\n {...inputProps}\n />\n {maxLengthCounter === 'remaining' && hasMaxLength && (\n <MaxLengthCounter\n maxLength={maxLength}\n valueLength={valueLength}\n onClick={onClickCounter}\n />\n )}\n {hasMaxLength && (\n <HiddenAccessible id={maxLengthDescribedByIdRef.current} isHidden={true}>\n {translations.formControl_maxLength({\n MAX_LENGTH: `${maxLength}`\n })}\n </HiddenAccessible>\n )}\n {hasMaxLength && isFocused && (\n <MaxLengthLiveRegion\n isMaxLengthExceeded={isMaxLengthExceeded}\n maxLength={maxLength}\n valueLength={valueLength}\n testId={testId ? testId + '_maxLength' : undefined}\n />\n )}\n </>\n );\n\n return (\n <FormFieldContext.Provider value={formFieldContext}>\n <TextField\n mainContent={mainContent}\n columnSpan={columnSpan}\n compactUserAssistance={compactUserAssistance}\n inlineUserAssistance={inlineUserAssistance}\n onBlur={focusProps?.onFocusOut}\n onFocus={focusProps?.onFocusIn}\n mainFieldRef={anchorRef}\n resize={resize}\n testId={testId}\n {...textFieldProps}\n {...fieldLabelProps}></TextField>\n </FormFieldContext.Provider>\n );\n }\n);\n"],"names":["TextArea","forwardRef","ariaDescribedBy","assistiveText","autoComplete","autoFocus","columnSpan","helpSourceLink","helpSourceText","isDisabled","propIsDisabled","isReadonly","propIsReadonly","isRequired","isRequiredShown","label","labelEdge","propLabelEdge","labelStartWidth","propLabelStartWidth","maxLength","maxLengthCounter","maxLengthUnit","messages","placeholder","resize","role","rows","textAlign","propTextAlign","userAssistanceDensity","propUserAssistanceDensity","value","variant","onInput","onCommit","testId","ref","translations","useTranslationBundle","formControl_limitReached","CHARACTER_LIMIT","currentCommitValue","dispatch","useCurrentValueReducer","onInputAndDispatch","useCallback","detail","type","payload","onCommitAndDispatch","isFormDisabled","isFormReadonly","formLabelEdge","formLabelStartWidth","formTextAlign","formUserAssistanceDensity","useFormContext","defaultTextAlignForVariant","maxLengthDescribedByIdRef","useRef","useId","enabledAriaDescribedBy","current","enabledElementRef","readonlyElementRef","focusProps","isFocused","methods","focusMethods","useFocusableTextField","selectMethods","useSelectableTextField","useImperativeHandle","mergeProps","isMaxLengthExceeded","isMaxLengthReached","valueLength","onFilteredInput","useLengthFilter","allMessages","severity","formFieldContext","inputProps","labelProps","textFieldProps","userAssistanceProps","useTextField","contentVariant","styleVariant","onClickCounter","elm","len","length","setSelectionRange","focus","labelComp","_jsx","jsx","Label","undefined","fieldLabelProps","labelText","ariaLabel","inlineUserAssistance","InlineUserAssistance","fieldLabel","anchorRef","compactUserAssistance","CompactUserAssistance","mainContent","ReadonlyTextFieldInput","id","as","elementRef","formVariant","hasEmptyLabel","hasInsideLabel","onBlur","onFocus","FormFieldContext","Provider","children","ReadonlyTextField","hasMaxLength","_jsxs","_Fragment","Fragment","TextFieldInput","inputRef","MaxLengthCounter","onClick","HiddenAccessible","isHidden","formControl_maxLength","MAX_LENGTH","MaxLengthLiveRegion","TextField","onFocusOut","onFocusIn","mainFieldRef"],"mappings":"y8DA4LaA,EAAWC,EAAAA,YACtB,EAEI,mBAAoBC,EACpBC,gBACAC,eAAe,MACfC,aAAY,EACZC,aACAC,iBACAC,iBACAC,WAAYC,EACZC,WAAYC,EACZC,cAAa,EACbC,kBACAC,QACAC,UAAWC,EACXC,gBAAiBC,EACjBC,YACAC,mBAAmB,YACnBC,gBACAC,WACAC,cACAC,SACAC,OACAC,OACAC,UAAWC,EACXC,sBAAuBC,EACvBC,QACAC,UAAU,UACVC,UACAC,WACAC,UAEFC,KAEA,MAAMC,EAAeC,uBAAiC,4BAChDC,GAA2BpB,EAC7BkB,EAAaE,yBAAyB,CACpCC,gBAAiBrB,IAEnB,IAEEsB,mBAAEA,GAAkBC,SAAEA,IAAaC,EAAAA,uBAAuB,CAAEZ,UAC5Da,GAAqBC,eACxBC,IAECJ,GAAS,CAAEK,KAAM,QAASC,QAASF,EAAOf,QAC1CE,IAAUa,EAAO,GAEnB,CAACb,EAASS,KAENO,GAAsBJ,eACzBC,IAECJ,GAAS,CAAEK,KAAM,SAAUC,QAASF,EAAOf,QAC3CG,IAAWY,EAAO,GAEpB,CAACZ,EAAUQ,MAGXlC,WAAY0C,GACZxC,WAAYyC,GACZpC,UAAWqC,GACXnC,gBAAiBoC,GACjB1B,UAAW2B,GACXzB,sBAAuB0B,IACrBC,EAAAA,iBAGEhD,GAAaC,GAAkByC,GAC/BxC,GAAaC,GAAkBwC,GAC/BpC,GAAYC,GAAiBoC,GAC7BnC,GAAkBC,GAAuBmC,GACzC1B,GAAYC,GAAiB0B,IAAiBG,EAA0BA,2BAACzB,GACzEH,GAAwBC,GAA6ByB,GACrDG,GAA4BC,EAAAA,OAAeC,EAAKA,SAGhDC,GAAyB5D,EAC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A,CACEzB,EAACC,IAAA8B,iBACC,CAAAf,GAAG,WACS,aAAAV,GACZnG,aAAcA,EACdC,UAAWA,EACXqC,mBAAoBA,GACpB0E,cAAyB,KAAVrG,GAA8B,SAAdC,GAC/BqG,oBAA8BjB,IAAdJ,IAAyC,WAAdhF,GAC3CH,WAAYA,EACZoH,SAAUjE,GACV7B,SAAUe,GACVhB,QAAS4C,GACTtD,YAAaA,EACbE,KAAMA,EACNC,KAAMA,EACNC,UAAWA,GACXI,MAAOA,KACHmD,KAEgB,cAArB9D,GAAoCuG,IACnC3B,EAAAA,IAACiC,EAAAA,kBACC9G,UAAWA,EACXyD,YAAaA,GACbsD,QAASzC,KAGZkC,IACC3B,MAACmC,EAAAA,iBAAgB,CAACpB,GAAIrD,GAA0BI,QAASsE,UAAU,EAAIX,SACpEpF,EAAagG,sBAAsB,CAClCC,WAAY,GAAGnH,QAIpBwG,IAAgBzD,IACf8B,MAACuC,EAAAA,oBAAmB,CAClB7D,oBAAqBA,GACrBvD,UAAWA,EACXyD,YAAaA,GACbzC,OAAQA,EAASA,EAAS,kBAAegE,OAMjD,OACEH,EAAAA,IAACuB,EAAAA,iBAAiBC,SAAS,CAAAzF,MAAOkD,GAChCwC,SAAAzB,EAAAC,IAACuC,EAASA,UAAA,CACR3B,YAAaA,GACbxG,WAAYA,EACZsG,sBAAuBA,GACvBJ,qBAAsBA,GACtBc,OAAQpD,IAAYwE,WACpBnB,QAASrD,IAAYyE,UACrBC,aAAcjC,GACdlF,OAAQA,EACRW,OAAQA,KACJiD,MACAgB,MAER"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
define(['exports', 'preact/jsx-runtime', 'preact/compat', './FormContext-6b0879a0', './useFormContext-b8cbbb21', './FormFieldContext-a024b891', 'preact/hooks', './useFocusableTextField-8b755b15', './Label-3c17bcc9', './keyboardUtils-fb6219eb', './TextFieldInput-eb40adaa', 'css!./ObfuscatedTextFieldInputStyles.styles.css', './ReadonlyTextFieldInput-e5723c48', './StyledTextField-5e554e5b', './TextField-51b63f5f', './MaxLengthLiveRegion-1f30f975', './UNSAFE_TextField/themes/TextFieldStyles.css', 'css!./SkeletonStyles.styles.css', 'css!./TextFieldLoadingStyles.styles.css', 'css!./TextFieldStyles.styles.css', 'module', './UNSAFE_TextField/themes/redwood/TextFieldVariants.css', './useTextField-3ab0a23b', './logger-0f873e29', './TabbableModeContext-a9c97640', './useId-c9578d26', './useTranslationBundle-27bf6340', 'css!./UserAssistanceStyles.styles.css', 'module', './UNSAFE_UserAssistance/themes/redwood/UserAssistanceVariants.css', './InlineUserAssistance-e406e352', './CompactUserAssistance-5ef03b0a', './mergeProps-bcfa6a92', './LayerHost-7d4aa6d3', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-3c8a0253', 'preact', 'css!./IconStyle.styles.css', './Popup-062b66ff', 'css!./LabelStyles.styles.css', 'module', './UNSAFE_Label/themes/redwood/LabelVariants.css', './InputGroupContext-372087af', './HiddenAccessible-037ef42d', 'module', './UNSAFE_Popup/themes/redwood/PopupVariants.css', './useLengthFilter-c05fd679', './useCurrentValueReducer-faded381', './useSelectableTextField-900d2860', './formControlUtils-de035f75', './MaxLengthCounter-cadff1c7'], (function(e,s,t,n,a,o,l,i,r,d,c,u,m,x,p,b,h,F,f,g,y,T,A,L,v,R,S,C,U,E,w,I,j,_,P,B,H,V,k,D,N,M,q,W,$,z,G,O,X,J,K,Q,Y){"use strict";const Z=({isReadonly:e,enabledElementRef:s,readonlyElementRef:t,minRows:n=2,maxRows:a,value:o})=>{l.useLayoutEffect((()=>{const o=e?t:s;if(null===o.current)return;if(o.current instanceof HTMLDivElement)return;const l=o.current,i=(e=>{const s=window.getComputedStyle(e),t=s.lineHeight;if("normal"===t)return 1.2*parseFloat(s.fontSize);return parseFloat(t)})(l);l.style.height="0";const{paddingHeight:r,borderHeight:d}=(e=>{const s=window.getComputedStyle(e);return{paddingHeight:parseFloat(s.paddingTop)+parseFloat(s.paddingBottom),borderHeight:parseFloat(s.borderTop)+parseFloat(s.borderBottom)}})(l),c=i*n+r+d,u=l.scrollHeight+d;let m=0;if(void 0===a)m=u<c?c:u;else if(a>n){const e=i*a+r+d;m=u>e?e:u<c?c:u}else m=c;l.style.height=m+.5+"px"}),[o,n,a,e,s,t])},ee=t.forwardRef((({"aria-describedby":e,assistiveText:n,autoComplete:l="off",autoFocus:d=!1,columnSpan:u,helpSourceLink:h,helpSourceText:F,isDisabled:f,isReadonly:g,isRequired:y=!1,isRequiredShown:T,label:L,labelEdge:v,labelStartWidth:C,maxLength:U,maxLengthCounter:E="remaining",maxLengthUnit:_,maxRows:P,messages:B,minRows:H=2,placeholder:V,role:k,textAlign:D,userAssistanceDensity:N,value:M,variant:q="default",onInput:W,onCommit:$,testId:G},O)=>{const ee=S.useTranslationBundle("@oracle/oraclejet-preact"),se=U?ee.formControl_limitReached({CHARACTER_LIMIT:U}):"",{currentCommitValue:te,dispatch:ne}=J.useCurrentValueReducer({value:M}),ae=t.useCallback((e=>{ne({type:"input",payload:e.value}),W?.(e)}),[W,ne]),oe=t.useCallback((e=>{ne({type:"commit",payload:e.value}),$?.(e)}),[$,ne]),{isDisabled:le,isReadonly:ie,labelEdge:re,labelStartWidth:de,textAlign:ce,userAssistanceDensity:ue}=a.useFormContext(),me=f??le,xe=g??ie,pe=v??re,be=C??de,he=D??ce??Q.defaultTextAlignForVariant(q),Fe=N??ue,fe=t.useRef(R.useId()),ge=e?`${e} ${fe.current}`:fe.current,ye=t.useRef(null),Te=t.useRef(null),{focusProps:Ae,isFocused:Le,methods:ve}=i.useFocusableTextField({isDisabled:me,isReadonly:xe,enabledElementRef:ye,readonlyElementRef:Te}),{methods:Re}=K.useSelectableTextField(ye);t.useImperativeHandle(O,(()=>j.mergeProps(ve,Re)),[ve,Re]);const{isMaxLengthExceeded:Se,isMaxLengthReached:Ce,valueLength:Ue,onFilteredInput:Ee}=X.useLengthFilter({maxLength:U,maxLengthUnit:_,value:M,onInput:ae,onCommit:oe}),we=[...B??[],...Ce?[{detail:se,severity:"info"}]:[]],{formFieldContext:Ie,inputProps:je,labelProps:_e,textFieldProps:Pe,userAssistanceProps:Be}=A.useTextField({ariaDescribedBy:xe||me?e:ge,contentVariant:"textarea",helpSourceLink:h,helpSourceText:F,isDisabled:me,isFocused:Le,isReadonly:xe,isRequiredShown:T,labelEdge:pe,messages:we,styleVariant:q,userAssistanceDensity:Fe,value:M}),He=t.useCallback((()=>{const e=ye.current,s=e?e.value.length:null;ye.current?.setSelectionRange(s,s),ye.current?.focus()}),[ye]),Ve="none"!==pe?s.jsx(r.Label,{..._e,children:L}):void 0,ke={label:"none"!==pe?Ve:void 0,labelEdge:"none"!==pe?pe:void 0,labelStartWidth:"none"!==pe?be:void 0,labelText:"inside"!==pe||me?void 0:L},De="none"===pe?L:void 0,Ne="efficient"===Fe||"reflow"===Fe?me?"efficient"!==Fe?void 0:s.jsx(w.InlineUserAssistance,{userAssistanceDensity:Fe,...Be}):xe?s.jsx(w.InlineUserAssistance,{fieldLabel:L,messages:B,userAssistanceDensity:Fe,...Be}):s.jsx(w.InlineUserAssistance,{assistiveText:n,fieldLabel:L,helpSourceLink:h,helpSourceText:F,messages:we,isRequiredShown:T,userAssistanceDensity:Fe,...Be}):void 0,Me=t.useRef(null),qe="compact"===Fe?s.jsx(I.CompactUserAssistance,{anchorRef:Me,messages:we,assistiveText:n,...Be}):void 0;if(Z({isReadonly:xe,enabledElementRef:ye,readonlyElementRef:Te,minRows:H,maxRows:P,value:M}),xe){const e=s.jsx(m.ReadonlyTextFieldInput,{"aria-describedby":je["aria-describedby"],"aria-label":De,"aria-labelledby":_e.id,autoFocus:d,elementRef:Te,formVariant:q,...P?{as:"textarea",rows:H}:{as:"div"},onBlur:je.onBlur,onFocus:je.onFocus,textAlign:he,value:M,variant:"textarea",hasEmptyLabel:""===L&&"none"===pe,hasInsideLabel:void 0!==L&&"inside"===pe});return s.jsx(o.FormFieldContext.Provider,{value:Ie,children:s.jsx(x.ReadonlyTextField,{role:"presentation",columnSpan:u,compactUserAssistance:qe,inlineUserAssistance:Ne,variant:"textarea",mainContent:e,ref:Me,testId:G,...ke})})}const We=void 0!==U,$e=s.jsxs(s.Fragment,{children:[s.jsx(c.TextFieldInput,{as:"textarea","aria-label":De,autoComplete:l,autoFocus:d,currentCommitValue:te,hasEmptyLabel:""===L&&"none"===pe,hasInsideLabel:void 0!==Ve&&"inside"===pe,isRequired:y,inputRef:ye,onCommit:oe,onInput:Ee,placeholder:V,role:k,rows:H,textAlign:he,value:M,...je}),"remaining"===E&&We&&s.jsx(Y.MaxLengthCounter,{maxLength:U,valueLength:Ue,onClick:He}),We&&s.jsx(z.HiddenAccessible,{id:fe.current,children:ee.formControl_maxLength({MAX_LENGTH:`${U}`})}),We&&Le&&s.jsx(b.MaxLengthLiveRegion,{isMaxLengthExceeded:Se,maxLength:U,valueLength:Ue,testId:G?G+"_maxLength":void 0})]});return s.jsx(o.FormFieldContext.Provider,{value:Ie,children:s.jsx(p.TextField,{mainContent:$e,columnSpan:u,compactUserAssistance:qe,inlineUserAssistance:Ne,onBlur:Ae?.onFocusOut,onFocus:Ae?.onFocusIn,mainFieldRef:Me,testId:G,...Pe,...ke})})}));e.TextAreaAutosize=ee}));
|
|
2
|
+
//# sourceMappingURL=TextAreaAutosize-cbdc9644.js.map
|