@oracle/oraclejet-preact 20.0.1 → 20.0.3
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/BaseCardView-b8119561.js +2 -0
- package/amd/{BaseCardView-16fda4c3.js.map → BaseCardView-b8119561.js.map} +1 -1
- package/amd/CardFlexView-aa2f3de8.js +2 -0
- package/amd/{CardFlexView-d3eb7373.js.map → CardFlexView-aa2f3de8.js.map} +1 -1
- package/amd/CardGridView-85f90c75.js +2 -0
- package/amd/{CardGridView-842f70cd.js.map → CardGridView-85f90c75.js.map} +1 -1
- package/amd/ColorPicker-141fa49d.js +2 -0
- package/amd/{ColorPicker-e3167e4c.js.map → ColorPicker-141fa49d.js.map} +1 -1
- package/amd/{InlineSelectSingle-f4438110.js → InlineSelectSingle-87bc8a45.js} +2 -2
- package/amd/{InlineSelectSingle-f4438110.js.map → InlineSelectSingle-87bc8a45.js.map} +1 -1
- package/amd/{InputColor-51d7e40c.js → InputColor-58e3fce3.js} +2 -2
- package/amd/{InputColor-51d7e40c.js.map → InputColor-58e3fce3.js.map} +1 -1
- package/amd/InputDatePicker-7227a858.js +2 -0
- package/amd/{InputDatePicker-030e345a.js.map → InputDatePicker-7227a858.js.map} +1 -1
- package/amd/ListView-2678b2af.js +2 -0
- package/amd/{ListView-02a92d18.js.map → ListView-2678b2af.js.map} +1 -1
- package/amd/NavigationList-a6bb123d.js +2 -0
- package/amd/NavigationList-a6bb123d.js.map +1 -0
- package/amd/NavigationListItem-10bf6656.js +2 -0
- package/amd/NavigationListItem-10bf6656.js.map +1 -0
- package/amd/NavigationListLinkItem-df1826e6.js +2 -0
- package/amd/NavigationListLinkItem-df1826e6.js.map +1 -0
- package/amd/{OverflowTabBar-5ff68da7.js → OverflowTabBar-f8bf9356.js} +2 -2
- package/amd/{OverflowTabBar-5ff68da7.js.map → OverflowTabBar-f8bf9356.js.map} +1 -1
- package/amd/OverflowTabBarItem-0aa39512.js +2 -0
- package/amd/{OverflowTabBarItem-926b0c8a.js.map → OverflowTabBarItem-0aa39512.js.map} +1 -1
- package/amd/PRIVATE_BaseCardView.js +1 -1
- package/amd/PRIVATE_SelectCommon.js +1 -1
- package/amd/PRIVATE_TableList.js +1 -1
- package/amd/RemovableNavigationListItem-60593d4c.js +2 -0
- package/amd/{RemovableNavigationListItem-e298c5de.js.map → RemovableNavigationListItem-60593d4c.js.map} +1 -1
- package/amd/ReorderableTabBar-19a503c7.js +2 -0
- package/amd/{ReorderableTabBar-0c69bfd4.js.map → ReorderableTabBar-19a503c7.js.map} +1 -1
- package/amd/{SelectMobileFieldInput-83f56b22.js → SelectMobileFieldInput-4795a794.js} +2 -2
- package/amd/{SelectMobileFieldInput-83f56b22.js.map → SelectMobileFieldInput-4795a794.js.map} +1 -1
- package/amd/{SelectMultiple-cb5fdd20.js → SelectMultiple-e216b16c.js} +2 -2
- package/amd/{SelectMultiple-cb5fdd20.js.map → SelectMultiple-e216b16c.js.map} +1 -1
- package/amd/{SelectSingle-02e85b6e.js → SelectSingle-d53cf202.js} +2 -2
- package/amd/{SelectSingle-02e85b6e.js.map → SelectSingle-d53cf202.js.map} +1 -1
- package/amd/TabBar-92bac52f.js +2 -0
- package/amd/{TabBar-de723fbc.js.map → TabBar-92bac52f.js.map} +1 -1
- package/amd/TabBarMixed-5b5a5047.js +2 -0
- package/amd/{TabBarMixed-cfd346bf.js.map → TabBarMixed-5b5a5047.js.map} +1 -1
- package/amd/Theme-redwood/theme.css +80 -80
- package/amd/Theme-stable/theme.css +276 -276
- package/amd/UNSAFE_CardFlexView.js +1 -1
- package/amd/UNSAFE_CardGridView.js +1 -1
- package/amd/UNSAFE_ColorPicker.js +1 -1
- package/amd/UNSAFE_InlineSelectSingle.js +1 -1
- package/amd/UNSAFE_InputColor.js +1 -1
- package/amd/UNSAFE_InputDatePicker.js +1 -1
- package/amd/UNSAFE_ListView.js +1 -1
- package/amd/UNSAFE_NavigationList.js +1 -1
- package/amd/UNSAFE_NavigationListCommon.js +1 -1
- package/amd/UNSAFE_OverflowTabBar.js +1 -1
- package/amd/UNSAFE_ReorderableTabBar.js +1 -1
- package/amd/UNSAFE_SelectMultiple.js +1 -1
- package/amd/UNSAFE_SelectSingle.js +1 -1
- package/amd/UNSAFE_TabBar.js +1 -1
- package/amd/UNSAFE_TabBarCommon.js +1 -1
- package/amd/UNSAFE_TabBarMixed.js +1 -1
- package/amd/{useDisplayValue-e70c76d8.js → useDisplayValue-9b671893.js} +2 -2
- package/amd/{useDisplayValue-e70c76d8.js.map → useDisplayValue-9b671893.js.map} +1 -1
- package/amd/useNavigationListItem-582f5564.js +2 -0
- package/amd/useNavigationListItem-582f5564.js.map +1 -0
- package/amd/useSelectCommon-f33709d2.js +2 -0
- package/amd/useSelectCommon-f33709d2.js.map +1 -0
- package/cjs/{BaseCardView-c0909427.js → BaseCardView-ba63723a.js} +4 -1
- package/cjs/{BaseCardView-c0909427.js.map → BaseCardView-ba63723a.js.map} +1 -1
- package/cjs/{Chart-13a198f3.js → Chart-966da017.js} +2 -2
- package/cjs/{Chart-13a198f3.js.map → Chart-966da017.js.map} +1 -1
- package/cjs/{ColorPicker-2c99c0fb.js → ColorPicker-8f0b6000.js} +2 -2
- package/cjs/{ColorPicker-2c99c0fb.js.map → ColorPicker-8f0b6000.js.map} +1 -1
- package/cjs/{NavigationListItem-cdfd0740.js → NavigationList-d0d74565.js} +3 -8
- package/cjs/NavigationList-d0d74565.js.map +1 -0
- package/cjs/NavigationListItem-b0b03089.js +12 -0
- package/cjs/NavigationListItem-b0b03089.js.map +1 -0
- package/cjs/{NavigationListLinkItem-62c3912e.js → NavigationListLinkItem-317a5200.js} +8 -99
- package/cjs/NavigationListLinkItem-317a5200.js.map +1 -0
- package/cjs/{OverflowTabBarItem-4bbd5830.js → OverflowTabBarItem-19ad4971.js} +6 -4
- package/cjs/{OverflowTabBarItem-4bbd5830.js.map → OverflowTabBarItem-19ad4971.js.map} +1 -1
- package/cjs/PRIVATE_BaseCardView.js +1 -1
- package/cjs/PRIVATE_Chart.js +4 -4
- package/cjs/PRIVATE_SelectCommon.js +2 -2
- package/cjs/PRIVATE_TableList.js +4 -4
- package/cjs/SegmentStyles.styles.css +9 -12
- package/cjs/SegmentStyles.styles2.css +12 -9
- package/cjs/{SelectMobileFieldInput-111a95a5.js → SelectMobileFieldInput-cbf57541.js} +2 -2
- package/cjs/{SelectMobileFieldInput-111a95a5.js.map → SelectMobileFieldInput-cbf57541.js.map} +1 -1
- package/cjs/{TabBar-27ae2c21.js → TabBar-d84e222e.js} +9 -1
- package/cjs/{TabBar-27ae2c21.js.map → TabBar-d84e222e.js.map} +1 -1
- package/cjs/{TabBarLinkItem-891a5f10.js → TabBarLinkItem-e924f83b.js} +2 -2
- package/cjs/{TabBarLinkItem-891a5f10.js.map → TabBarLinkItem-e924f83b.js.map} +1 -1
- package/cjs/Theme-redwood/theme.css +160 -160
- package/cjs/Theme-stable/theme.css +150 -150
- package/cjs/UNSAFE_BarChart.js +4 -4
- package/cjs/UNSAFE_CardFlexView.js +1 -1
- package/cjs/UNSAFE_CardGridView.js +1 -1
- package/cjs/UNSAFE_ColorPicker.js +25 -25
- package/cjs/UNSAFE_ComboChart.js +4 -4
- package/cjs/UNSAFE_InlineSelectSingle.js +2 -2
- package/cjs/UNSAFE_InputColor.js +2 -2
- package/cjs/UNSAFE_LineAreaChart.js +4 -4
- package/cjs/UNSAFE_ListView.js +53 -53
- package/cjs/UNSAFE_NavigationList.js +10 -8
- package/cjs/UNSAFE_NavigationList.js.map +1 -1
- package/cjs/UNSAFE_NavigationListCommon.js +14 -13
- package/cjs/UNSAFE_NavigationListCommon.js.map +1 -1
- package/cjs/UNSAFE_OverflowTabBar.js +56 -53
- package/cjs/UNSAFE_OverflowTabBar.js.map +1 -1
- package/cjs/UNSAFE_ReorderableTabBar.js +43 -30
- package/cjs/UNSAFE_ReorderableTabBar.js.map +1 -1
- package/cjs/UNSAFE_ScatterChart.js +4 -4
- package/cjs/UNSAFE_SelectMultiple.js +2 -2
- package/cjs/UNSAFE_SelectSingle.js +3 -3
- package/cjs/UNSAFE_TabBar.js +57 -54
- package/cjs/UNSAFE_TabBar.js.map +1 -1
- package/cjs/UNSAFE_TabBarCommon.js +78 -75
- package/cjs/UNSAFE_TabBarCommon.js.map +1 -1
- package/cjs/UNSAFE_TabBarMixed.js +38 -35
- package/cjs/UNSAFE_TabBarMixed.js.map +1 -1
- package/cjs/{useDisplayValue-60dbe1c3.js → useDisplayValue-4ace417c.js} +2 -2
- package/cjs/{useDisplayValue-60dbe1c3.js.map → useDisplayValue-4ace417c.js.map} +1 -1
- package/cjs/useNavigationListItem-b97e76d5.js +104 -0
- package/cjs/useNavigationListItem-b97e76d5.js.map +1 -0
- package/cjs/{useSelectCommon-b0d7feb3.js → useSelectCommon-27afecfa.js} +8 -3
- package/cjs/useSelectCommon-27afecfa.js.map +1 -0
- package/es/{BaseButton-243d200f.js → BaseButton-41068c85.js} +2 -2
- package/es/{BaseButton-243d200f.js.map → BaseButton-41068c85.js.map} +1 -1
- package/es/BaseCardView-b3d8bae0.js +6 -6
- package/es/BaseDiagram-b5b22e53.js +7 -7
- package/es/BaseRichSelection-223d9830.js +9 -9
- package/es/BaseSelector-7cbc48bc.js +1 -1
- package/es/BaseSwatchView-2e1e6bd2.js +2 -2
- package/es/{Button-a76ecfa8.js → Button-956f51c7.js} +2 -2
- package/es/{Button-a76ecfa8.js.map → Button-956f51c7.js.map} +1 -1
- package/es/ButtonSet-b7464e9a.js +2 -2
- package/es/ButtonSetButton-8685c752.js +1 -1
- package/es/ButtonSetIconButton-c8ed85f9.js +4 -4
- package/es/{Center-3860fe60.js → Center-71a03e65.js} +2 -2
- package/es/{Center-3860fe60.js.map → Center-71a03e65.js.map} +1 -1
- package/es/{Chart-b866a74c.js → Chart-8c63da28.js} +12 -12
- package/es/{Chart-b866a74c.js.map → Chart-8c63da28.js.map} +1 -1
- package/es/CheckboxControl-c008372a.js +6 -6
- package/es/CheckboxRadioField-a387b3cb.js +6 -6
- package/es/CheckboxRadioLabelValueLayout-e3845f16.js +1 -1
- package/es/CheckboxSet-3aab5935.js +1 -1
- package/es/Chip-4efea02e.js +1 -1
- package/es/ClearIcon-f85ea340.js +1 -1
- package/es/CollapseIcon-84f6ba8e.js +1 -1
- package/es/Collapsible-2608ce3b.js +2 -2
- package/es/ColorPalette-950c6fc6.js +2 -2
- package/es/{ColorPicker-8c297849.js → ColorPicker-ae648c4c.js} +3 -3
- package/es/{ColorPicker-8c297849.js.map → ColorPicker-ae648c4c.js.map} +1 -1
- package/es/ColorSwatch-8339ee2f.js +4 -4
- package/es/{CompactLabelAssistance-50ff3f7e.js → CompactLabelAssistance-e2fcfcab.js} +6 -6
- package/es/{CompactLabelAssistance-50ff3f7e.js.map → CompactLabelAssistance-e2fcfcab.js.map} +1 -1
- package/es/CompactUserAssistance-6aa8894b.js +5 -5
- package/es/ComponentMessageContainer-d16c8b1f.js +4 -4
- package/es/{DatePicker-fa7d39a7.js → DatePicker-7287f0f9.js} +8 -8
- package/es/{DatePicker-fa7d39a7.js.map → DatePicker-7287f0f9.js.map} +1 -1
- package/es/DatePickerHeader-f8cf86bb.js +3 -3
- package/es/DiagramStyles.styles2.css +16 -10
- package/es/DiagramStyles.styles3.css +10 -16
- package/es/{Dialog-d1de5b06.js → Dialog-83368f52.js} +7 -7
- package/es/{Dialog-d1de5b06.js.map → Dialog-83368f52.js.map} +1 -1
- package/es/DirectionalCollapseArrowIcon-132761da.js +1 -1
- package/es/DirectionalExpandArrowIcon-5bc45cad.js +1 -1
- package/es/{Dropdown-9d9813a9.js → Dropdown-019aba37.js} +6 -6
- package/es/{Dropdown-9d9813a9.js.map → Dropdown-019aba37.js.map} +1 -1
- package/es/{EmbeddedIconButton-9f0e56b7.js → EmbeddedIconButton-46434710.js} +2 -2
- package/es/{EmbeddedIconButton-9f0e56b7.js.map → EmbeddedIconButton-46434710.js.map} +1 -1
- package/es/{EnvironmentProvider-6cf8ed37.js → EnvironmentProvider-6a0a8212.js} +3 -3
- package/es/{EnvironmentProvider-6cf8ed37.js.map → EnvironmentProvider-6a0a8212.js.map} +1 -1
- package/es/Expander-1347e769.js +1 -1
- package/es/{Flex-fc483125.js → Flex-03129963.js} +2 -2
- package/es/{Flex-fc483125.js.map → Flex-03129963.js.map} +1 -1
- package/es/{Floating-be4c0cb6.js → Floating-4a82db94.js} +4 -4
- package/es/{Floating-be4c0cb6.js.map → Floating-4a82db94.js.map} +1 -1
- package/es/{Grid-6f92d323.js → Grid-9e4b4f19.js} +2 -2
- package/es/{Grid-6f92d323.js.map → Grid-9e4b4f19.js.map} +1 -1
- package/es/GroupLoadingIndicator-19c6545a.js +1 -1
- package/es/{HighlightText-dd484ffd.js → HighlightText-0205faef.js} +2 -2
- package/es/{HighlightText-dd484ffd.js.map → HighlightText-0205faef.js.map} +1 -1
- package/es/Icon-4983d06e.js +3 -3
- package/es/IconButton-7f91481c.js +4 -4
- package/es/IconSwitchButton-05f1f602.js +4 -4
- package/es/IconToggleButton-808818f5.js +4 -4
- package/es/{IconUserAssistance-6abc7837.js → IconUserAssistance-61978211.js} +3 -3
- package/es/{IconUserAssistance-6abc7837.js.map → IconUserAssistance-61978211.js.map} +1 -1
- package/es/InlineHelp-9eaac91c.js +1 -1
- package/es/InlineUserAssistance-890293dd.js +5 -5
- package/es/InputDateMask-ec27aee7.js +7 -7
- package/es/Label-5d1ae8d7.js +8 -8
- package/es/LabelValueLayout-c6b9945a.js +1 -1
- package/es/{Layer-6c27170e.js → Layer-535577b5.js} +3 -3
- package/es/{Layer-6c27170e.js.map → Layer-535577b5.js.map} +1 -1
- package/es/{LayerHost-3cf255a6.js → LayerHost-7931b424.js} +2 -2
- package/es/{LayerHost-3cf255a6.js.map → LayerHost-7931b424.js.map} +1 -1
- package/es/{LayerManager-e30fbfd6.js → LayerManager-52a26c55.js} +2 -2
- package/es/{LayerManager-e30fbfd6.js.map → LayerManager-52a26c55.js.map} +1 -1
- package/es/Link-8503aab2.js +1 -1
- package/es/List-4636ba9b.js +5 -5
- package/es/{LiveRegion-2e8830ae.js → LiveRegion-cebac18d.js} +2 -2
- package/es/{LiveRegion-2e8830ae.js.map → LiveRegion-cebac18d.js.map} +1 -1
- package/es/{MaxLengthLiveRegion-8f552ae2.js → MaxLengthLiveRegion-8099fde5.js} +3 -3
- package/es/{MaxLengthLiveRegion-8f552ae2.js.map → MaxLengthLiveRegion-8099fde5.js.map} +1 -1
- package/es/Message-510c2db8.js +2 -2
- package/es/{MessageLayer-1dbdc0b6.js → MessageLayer-2a7fdec7.js} +6 -6
- package/es/{MessageLayer-1dbdc0b6.js.map → MessageLayer-2a7fdec7.js.map} +1 -1
- package/es/MessagesManager-47000438.js +3 -3
- package/es/Modal-c0f730b8.js +3 -3
- package/es/{MonthView-4e05e712.js → MonthView-4b2b483a.js} +4 -4
- package/es/{MonthView-4e05e712.js.map → MonthView-4b2b483a.js.map} +1 -1
- package/es/NavigationListItem-340ab770.js +8 -8
- package/es/NavigationListLinkItem-e28fd846.js +5 -5
- package/es/NumberInputText-60be5757.js +6 -6
- package/es/OverflowTabBarItem-aa0ce915.js +5 -5
- package/es/PRIVATE_BaseCardView.js +22 -22
- package/es/PRIVATE_BaseDiagram.js +29 -29
- package/es/PRIVATE_BaseSelector.js +17 -17
- package/es/PRIVATE_BaseSwatchView.js +18 -18
- package/es/PRIVATE_Chart.js +38 -38
- package/es/PRIVATE_CheckboxControl.js +25 -25
- package/es/PRIVATE_CheckboxRadioField.js +27 -27
- package/es/PRIVATE_ClearIcon.js +18 -18
- package/es/PRIVATE_CollapsibleNavigationList.js +20 -20
- package/es/PRIVATE_DatePickerHeader.js +20 -20
- package/es/PRIVATE_DatePickerLayout.js +4 -4
- package/es/PRIVATE_EmbeddedIconButton.js +6 -6
- package/es/PRIVATE_Expander.js +19 -19
- package/es/PRIVATE_FormControls.js +21 -21
- package/es/PRIVATE_IconSwitchButton.js +17 -17
- package/es/PRIVATE_Icons/CheckboxCrossed.js +16 -16
- package/es/PRIVATE_Icons/CheckboxMixed.js +16 -16
- package/es/PRIVATE_Icons/CheckboxOff.js +16 -16
- package/es/PRIVATE_Icons/CheckboxOn.js +16 -16
- package/es/PRIVATE_Icons/DragV.js +16 -16
- package/es/PRIVATE_Icons/None.js +16 -16
- package/es/PRIVATE_List.js +21 -21
- package/es/PRIVATE_Message.js +20 -20
- package/es/PRIVATE_MessageLayer.js +12 -12
- package/es/PRIVATE_MonthView.js +7 -7
- package/es/PRIVATE_MonthYearGridView.js +7 -7
- package/es/PRIVATE_PlotArea.js +5 -5
- package/es/PRIVATE_RevealToggleIcon.js +18 -18
- package/es/PRIVATE_RichSelectionCommon.js +28 -28
- package/es/PRIVATE_SelectCommon.js +33 -33
- package/es/PRIVATE_StyledCard.js +3 -3
- package/es/PRIVATE_StyledCheckbox.js +16 -16
- package/es/PRIVATE_StyledSwitch.js +4 -4
- package/es/PRIVATE_SwatchFlexView.js +18 -18
- package/es/PRIVATE_Table.js +35 -35
- package/es/PRIVATE_TableDisplay.js +19 -19
- package/es/PRIVATE_TableList.js +26 -26
- package/es/PRIVATE_ThemedIcons/CalendarIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/ChartMarqueeSelectIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/ChartPanIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/ChartZoomIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/CheckIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/CheckboxCrossedIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/CheckboxMixedIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/CheckboxOffIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/CheckboxOnIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/CloseIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/CollapseIcon.js +17 -17
- package/es/PRIVATE_ThemedIcons/CollapseUpIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/DecrementIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/DeleteIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/DirectionalCollapseArrowIcon.js +17 -17
- package/es/PRIVATE_ThemedIcons/DirectionalExpandArrowIcon.js +17 -17
- package/es/PRIVATE_ThemedIcons/DragHandleIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/DropdownArrowIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/ExpandIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/HelpIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/IncrementIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/MenuButtonDropdownIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/MessageConfirmationIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/MessageErrorIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/MessageInfoIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/MessageWarningIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/MinusIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/NavDownIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/None.js +16 -16
- package/es/PRIVATE_ThemedIcons/OverviewHorizontalDragHandleIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/PlusIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/RadioOffIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/RadioOnIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/SortAscendingIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/SortDescendingIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/ViewHideIcon.js +16 -16
- package/es/PRIVATE_ThemedIcons/ViewIcon.js +16 -16
- package/es/PRIVATE_TimeComponent.js +19 -19
- package/es/PRIVATE_TruncatingLink.js +16 -16
- package/es/PRIVATE_VisOverview.js +16 -16
- package/es/PRIVATE_VisStatusMessage.js +5 -5
- package/es/PRIVATE_VisTabularDatatip.js +4 -4
- package/es/{Popup-22d51095.js → Popup-992b6c27.js} +10 -10
- package/es/{Popup-22d51095.js.map → Popup-992b6c27.js.map} +1 -1
- package/es/ProgressButtonLabelLayout-69549cf9.js +3 -3
- package/es/{ProgressCircle-bce87dad.js → ProgressCircle-46084d0b.js} +2 -2
- package/es/{ProgressCircle-bce87dad.js.map → ProgressCircle-46084d0b.js.map} +1 -1
- package/es/RadioItem-94909632.js +6 -6
- package/es/ReadonlyTextFieldInput-106ce959.js +1 -1
- package/es/{ReferenceLineArea-cc72b070.js → ReferenceLineArea-53129f72.js} +3 -3
- package/es/{ReferenceLineArea-cc72b070.js.map → ReferenceLineArea-53129f72.js.map} +1 -1
- package/es/RevealToggleIcon-2d622d8f.js +1 -1
- package/es/{SectionedContent-897e9c4e.js → SectionedContent-30e5bf98.js} +5 -5
- package/es/{SectionedContent-897e9c4e.js.map → SectionedContent-30e5bf98.js.map} +1 -1
- package/es/SelectMenuGroupContext-aa1fe822.js +6 -6
- package/es/{SelectMobileFieldInput-0a7c968c.js → SelectMobileFieldInput-345c4d45.js} +10 -10
- package/es/{SelectMobileFieldInput-0a7c968c.js.map → SelectMobileFieldInput-345c4d45.js.map} +1 -1
- package/es/{SelectorAll-3d39196b.js → SelectorAll-de7ba2e1.js} +5 -5
- package/es/{SelectorAll-3d39196b.js.map → SelectorAll-de7ba2e1.js.map} +1 -1
- package/es/Sheet-f9f8a4a4.js +2 -2
- package/es/SortControl-1044fcd9.js +3 -3
- package/es/SplitMenuButtonTheme.styles.css +4 -4
- package/es/SplitMenuButtonTheme.styles2.css +4 -4
- package/es/StyledCard-77623731.js +1 -1
- package/es/{StyledLabelValueLayout-bddfb884.js → StyledLabelValueLayout-bb05f474.js} +2 -2
- package/es/{StyledLabelValueLayout-bddfb884.js.map → StyledLabelValueLayout-bb05f474.js.map} +1 -1
- package/es/StyledSwitch-dbf29d95.js +2 -2
- package/es/StyledTextField-7605d76a.js +5 -5
- package/es/Submenu-cbd77756.js +1 -1
- package/es/TabBar-67ca442c.js +6 -6
- package/es/TabBarContextMenu-c3326d67.js +2 -2
- package/es/TabBarLayout-9b67d1b6.js +1 -1
- package/es/Table-2f197c6a.js +11 -11
- package/es/TableColGroup-d74bd4f5.js +1 -1
- package/es/TextArea-93ce78a7.js +225 -0
- package/es/TextArea-93ce78a7.js.map +1 -0
- package/es/TextField-7884fcd7.js +3 -3
- package/es/Theme-redwood/theme.css +465 -465
- package/es/Theme-stable/theme.css +481 -481
- package/es/TimeComponentCanvas2D-cfb0066d.js +6 -6
- package/es/ToggleButton-bb69cf10.js +1 -1
- package/es/TruncatingLink-298c6343.js +4 -4
- package/es/TruncatingText-1bf00351.js +1 -1
- package/es/UNSAFE_AccordionItemMultiple.js +18 -18
- package/es/UNSAFE_AccordionItemSingle.js +18 -18
- package/es/UNSAFE_ActionCard.js +2 -2
- package/es/UNSAFE_BarChart.js +39 -39
- package/es/UNSAFE_BareButton.js +2 -2
- package/es/UNSAFE_BaseButton.js +5 -5
- package/es/UNSAFE_Button.js +6 -6
- package/es/UNSAFE_ButtonSet.js +4 -4
- package/es/UNSAFE_ButtonSetButton.js +5 -5
- package/es/UNSAFE_ButtonSetIconButton.js +17 -17
- package/es/UNSAFE_ButtonSetItem.js +18 -18
- package/es/UNSAFE_ButtonSetMultiple.js +4 -4
- package/es/UNSAFE_ButtonSetSingle.js +4 -4
- package/es/UNSAFE_Card.js +3 -3
- package/es/UNSAFE_CardFlexView.js +22 -22
- package/es/UNSAFE_CardGridView.js +22 -22
- package/es/UNSAFE_Center.js +5 -5
- package/es/UNSAFE_Checkbox.js +25 -25
- package/es/UNSAFE_CheckboxItem.js +27 -27
- package/es/UNSAFE_CheckboxRadioField.js +4 -4
- package/es/UNSAFE_CheckboxSet.js +26 -26
- package/es/UNSAFE_Chip.js +2 -2
- package/es/UNSAFE_Collapsible.js +18 -18
- package/es/UNSAFE_ColorPalette.js +19 -19
- package/es/UNSAFE_ColorPicker.js +21 -21
- package/es/UNSAFE_ColorSwatch.js +17 -17
- package/es/UNSAFE_ComboChart.js +39 -39
- package/es/UNSAFE_ComponentMessage.js +20 -20
- package/es/UNSAFE_ContainerDiagram/themes/DiagramStyles.css.js +1 -1
- package/es/UNSAFE_ContainerDiagram.js +29 -29
- package/es/UNSAFE_ConveyorBelt.js +18 -18
- package/es/UNSAFE_DatePicker.js +27 -27
- package/es/UNSAFE_Diagram/themes/DiagramStyles.css.js +1 -1
- package/es/UNSAFE_Diagram.js +29 -29
- package/es/UNSAFE_Dialog.js +22 -22
- package/es/UNSAFE_DragHandle.js +17 -17
- package/es/UNSAFE_DrawerLayout.js +12 -12
- package/es/UNSAFE_DrawerPopup.js +11 -11
- package/es/UNSAFE_Dropdown.js +15 -15
- package/es/UNSAFE_Environment.js +4 -4
- package/es/UNSAFE_ExpandableList.js +25 -25
- package/es/UNSAFE_FilePicker.js +4 -4
- package/es/UNSAFE_FlatTreeView.js +25 -25
- package/es/UNSAFE_Flex.js +4 -4
- package/es/UNSAFE_Floating.js +11 -11
- package/es/UNSAFE_FormLayout.js +2 -2
- package/es/UNSAFE_Gantt.js +23 -23
- package/es/UNSAFE_Grid.js +4 -4
- package/es/UNSAFE_HighlightText.js +4 -4
- package/es/UNSAFE_Icon.js +16 -16
- package/es/UNSAFE_IconButton.js +17 -17
- package/es/UNSAFE_IconMenuButton.js +25 -25
- package/es/UNSAFE_IconProgressButton.js +21 -21
- package/es/UNSAFE_IconToggleButton.js +17 -17
- package/es/UNSAFE_Indexer.js +19 -19
- package/es/UNSAFE_InlineSelectSingle.js +34 -34
- package/es/UNSAFE_InputColor.js +32 -32
- package/es/UNSAFE_InputDateMask.js +26 -26
- package/es/UNSAFE_InputDatePicker.js +36 -36
- package/es/UNSAFE_InputPassword.js +26 -26
- package/es/UNSAFE_InputSensitiveText.js +27 -27
- package/es/UNSAFE_InputText.js +28 -28
- package/es/UNSAFE_InputTimeMask.js +26 -26
- package/es/UNSAFE_Label.js +25 -25
- package/es/UNSAFE_LabelValueLayout.js +4 -4
- package/es/UNSAFE_LabelledLink.js +27 -27
- package/es/UNSAFE_Layer.js +8 -8
- package/es/UNSAFE_Legend.js +27 -27
- package/es/UNSAFE_LineAreaChart.js +39 -39
- package/es/UNSAFE_Link.js +2 -2
- package/es/UNSAFE_ListItemLayout.js +4 -4
- package/es/UNSAFE_ListView.js +28 -28
- package/es/UNSAFE_LiveRegion.js +4 -4
- package/es/UNSAFE_Menu.js +26 -26
- package/es/UNSAFE_MenuButton.js +25 -25
- package/es/UNSAFE_MessageBanner.js +20 -20
- package/es/UNSAFE_MessageToast.js +22 -22
- package/es/UNSAFE_MeterBar.js +16 -16
- package/es/UNSAFE_MeterCircle.js +17 -17
- package/es/UNSAFE_Modal.js +8 -8
- package/es/UNSAFE_NavigationList.js +28 -28
- package/es/UNSAFE_NavigationListCommon.js +20 -20
- package/es/UNSAFE_NumberInputText.js +28 -28
- package/es/UNSAFE_OverflowTabBar.js +27 -27
- package/es/UNSAFE_PictoChart.js +25 -25
- package/es/UNSAFE_PieChart.js +26 -26
- package/es/UNSAFE_Popup.js +18 -18
- package/es/UNSAFE_ProgressBar.js +4 -4
- package/es/UNSAFE_ProgressButton.js +21 -21
- package/es/UNSAFE_ProgressButtonLabelLayout.js +10 -10
- package/es/UNSAFE_ProgressCircle.js +4 -4
- package/es/UNSAFE_RadioItem.js +25 -25
- package/es/UNSAFE_RadioSet.js +27 -27
- package/es/UNSAFE_RatingGauge.js +18 -18
- package/es/UNSAFE_ReorderableTabBar.js +27 -27
- package/es/UNSAFE_RichCheckboxSet.js +28 -28
- package/es/UNSAFE_RichRadioSet.js +29 -29
- package/es/UNSAFE_RichSelectionItem.js +30 -30
- package/es/UNSAFE_ScatterChart.js +39 -39
- package/es/UNSAFE_SectionalLegend.js +27 -27
- package/es/UNSAFE_SelectMultiple.js +37 -37
- package/es/UNSAFE_SelectSingle.js +37 -37
- package/es/UNSAFE_SelectionCard.js +3 -3
- package/es/UNSAFE_Selector.js +17 -17
- package/es/UNSAFE_SelectorAll.js +19 -19
- package/es/UNSAFE_Sheet.js +11 -11
- package/es/UNSAFE_SortControl.js +20 -20
- 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 +26 -26
- package/es/UNSAFE_Switch.js +26 -26
- package/es/UNSAFE_TabBar.js +28 -28
- package/es/UNSAFE_TabBarCommon.js +28 -28
- package/es/UNSAFE_TabBarMixed.js +28 -28
- package/es/UNSAFE_TableView.js +35 -35
- package/es/UNSAFE_TagCloud.js +26 -26
- package/es/UNSAFE_TextArea.js +117 -237
- package/es/UNSAFE_TextArea.js.map +1 -1
- package/es/UNSAFE_TextAreaAutosize.js +28 -28
- package/es/UNSAFE_TextField.js +20 -20
- package/es/UNSAFE_ToggleButton.js +5 -5
- package/es/UNSAFE_Toolbar.js +4 -4
- package/es/UNSAFE_Train.js +17 -17
- package/es/UNSAFE_TruncatingBadge.js +17 -17
- package/es/UNSAFE_TruncatingText.js +17 -17
- package/es/UNSAFE_UserAssistance.js +26 -26
- package/es/UNSAFE_View.js +7 -7
- package/es/UNSAFE_VirtualizedListView.js +21 -21
- package/es/UNSAFE_VisInvalidDataMessage.js +6 -6
- package/es/UNSAFE_VisNoDataMessage.js +6 -6
- package/es/UNSAFE_VisProgressiveLoader.js +5 -5
- package/es/UNSAFE_WindowOverlay.js +4 -4
- package/es/{View-818f2f31.js → View-5bdd9b3c.js} +5 -5
- package/es/{View-818f2f31.js.map → View-5bdd9b3c.js.map} +1 -1
- package/es/{VisStatusMessage-09c532e3.js → VisStatusMessage-e2d629bb.js} +2 -2
- package/es/{VisStatusMessage-09c532e3.js.map → VisStatusMessage-e2d629bb.js.map} +1 -1
- package/es/{VisTabularDatatip-f45069f1.js → VisTabularDatatip-85b00c1b.js} +2 -2
- package/es/{VisTabularDatatip-f45069f1.js.map → VisTabularDatatip-85b00c1b.js.map} +1 -1
- package/es/{WindowOverlay-467c2d12.js → WindowOverlay-7264c44a.js} +2 -2
- package/es/{WindowOverlay-467c2d12.js.map → WindowOverlay-7264c44a.js.map} +1 -1
- package/es/{YearsGridView-5286a756.js → YearsGridView-6c18094a.js} +4 -4
- package/es/{YearsGridView-5286a756.js.map → YearsGridView-6c18094a.js.map} +1 -1
- package/es/hoc/PRIVATE_withDirectionIcon.js +4 -4
- package/es/hoc/PRIVATE_withThemeIcon.js +3 -3
- package/es/hoc/UNSAFE_withThemeProps.js +3 -3
- package/es/hooks/PRIVATE_useChartContextMenu.js +23 -23
- package/es/hooks/PRIVATE_useChartDatatip.js +14 -14
- package/es/hooks/PRIVATE_useChartEvents.js +19 -19
- package/es/hooks/PRIVATE_useChartMarquee.js +19 -19
- package/es/hooks/PRIVATE_useCollectionFocusRing.js +17 -17
- package/es/hooks/PRIVATE_useCssVars.js +7 -7
- package/es/hooks/PRIVATE_useCurrentKey.js +4 -4
- package/es/hooks/PRIVATE_useDatatip.js +12 -12
- package/es/hooks/PRIVATE_useDetectHorizontalOverflow.js +16 -16
- package/es/hooks/PRIVATE_useFloating.js +4 -4
- package/es/hooks/PRIVATE_useItemAction.js +17 -17
- package/es/hooks/PRIVATE_useListCommon.js +19 -19
- package/es/hooks/PRIVATE_useOutsideMousedown.js +9 -9
- package/es/hooks/PRIVATE_useRadioFocusManager.js +4 -4
- package/es/hooks/PRIVATE_useReorderable.js +19 -19
- package/es/hooks/PRIVATE_useRovingTabIndexContainer.js +4 -4
- package/es/hooks/PRIVATE_useSelection.js +4 -4
- package/es/hooks/PRIVATE_useTabBar.js +26 -26
- package/es/hooks/PRIVATE_useTabbableModeSet.js +17 -17
- package/es/hooks/PRIVATE_useTooltipOnTruncation.js +17 -17
- package/es/hooks/PRIVATE_useVisContextMenu.js +23 -23
- package/es/hooks/PRIVATE_useVisDragModeControls.js +19 -19
- package/es/hooks/PRIVATE_useVisEvents.js +4 -4
- package/es/hooks/PRIVATE_useVisMeterEvents.js +14 -14
- package/es/hooks/PRIVATE_useVisSelection.js +15 -15
- package/es/hooks/UNSAFE_useBareButton.js +2 -2
- package/es/hooks/UNSAFE_useColorScheme.js +3 -3
- package/es/hooks/UNSAFE_useCurrentBgColor.js +2 -2
- package/es/hooks/UNSAFE_useDensity.js +3 -3
- package/es/hooks/UNSAFE_useHiddenTestMethod.js +3 -3
- package/es/hooks/UNSAFE_useOutsideClick.js +8 -8
- package/es/hooks/UNSAFE_usePrefixSuffix.js +4 -4
- package/es/hooks/UNSAFE_useScale.js +3 -3
- package/es/hooks/UNSAFE_useTestId.js +3 -3
- package/es/hooks/UNSAFE_useTheme.js +3 -3
- package/es/hooks/UNSAFE_useThemeInterpolations.js +6 -6
- package/es/hooks/UNSAFE_useTooltip.js +17 -17
- package/es/hooks/UNSAFE_useTranslationBundle.js +3 -3
- package/es/hooks/UNSAFE_useUser.js +3 -3
- package/es/{popupUtils-7774330e.js → popupUtils-51366a29.js} +2 -2
- package/es/{popupUtils-7774330e.js.map → popupUtils-51366a29.js.map} +1 -1
- package/es/{tooltipUtils-90fb656f.js → tooltipUtils-af0abd38.js} +5 -5
- package/es/{tooltipUtils-90fb656f.js.map → tooltipUtils-af0abd38.js.map} +1 -1
- package/es/useBareButton-ff4bd21e.js +1 -1
- package/es/useCellNavigation-0565b6dd.js +1 -1
- package/es/useChartContextMenu-5de82cd7.js +2 -2
- package/es/{useChartDatatip-cba78e0f.js → useChartDatatip-8dd22b71.js} +4 -4
- package/es/{useChartDatatip-cba78e0f.js.map → useChartDatatip-8dd22b71.js.map} +1 -1
- package/es/{useColorScheme-67245285.js → useColorScheme-c4f6caab.js} +2 -2
- package/es/{useColorScheme-67245285.js.map → useColorScheme-c4f6caab.js.map} +1 -1
- package/es/useContextMenu-730d6c12.js +2 -2
- package/es/{useCssVars-048a52d8.js → useCssVars-bc2527ac.js} +5 -5
- package/es/{useCssVars-048a52d8.js.map → useCssVars-bc2527ac.js.map} +1 -1
- package/es/{useCurrentKey-38e5f097.js → useCurrentKey-5f865bbd.js} +2 -2
- package/es/{useCurrentKey-38e5f097.js.map → useCurrentKey-5f865bbd.js.map} +1 -1
- package/es/{useDatatip-ef5c47a7.js → useDatatip-4895a07a.js} +4 -4
- package/es/{useDatatip-ef5c47a7.js.map → useDatatip-4895a07a.js.map} +1 -1
- package/es/{useDensity-969273f3.js → useDensity-1acb0153.js} +2 -2
- package/es/{useDensity-969273f3.js.map → useDensity-1acb0153.js.map} +1 -1
- package/es/{useDisplayValue-5bbf2830.js → useDisplayValue-65bbc74e.js} +7 -7
- package/es/{useDisplayValue-5bbf2830.js.map → useDisplayValue-65bbc74e.js.map} +1 -1
- package/es/{useExpandCollapse-51f9bb4b.js → useExpandCollapse-5739cfd2.js} +2 -2
- package/es/{useExpandCollapse-51f9bb4b.js.map → useExpandCollapse-5739cfd2.js.map} +1 -1
- package/es/{useFloating-c74a7f54.js → useFloating-b9d680f7.js} +2 -2
- package/es/{useFloating-c74a7f54.js.map → useFloating-b9d680f7.js.map} +1 -1
- package/es/{useHiddenTestMethod-ec7b3989.js → useHiddenTestMethod-f3f25093.js} +2 -2
- package/es/{useHiddenTestMethod-ec7b3989.js.map → useHiddenTestMethod-f3f25093.js.map} +1 -1
- package/es/{useKeyboardEvents-a1495728.js → useKeyboardEvents-9aae7ea3.js} +2 -2
- package/es/{useKeyboardEvents-a1495728.js.map → useKeyboardEvents-9aae7ea3.js.map} +1 -1
- package/es/useLegendContextMenu-a678b26f.js +4 -4
- package/es/{useMeterDatatip-f61ca3e0.js → useMeterDatatip-538a4d53.js} +3 -3
- package/es/{useMeterDatatip-f61ca3e0.js.map → useMeterDatatip-538a4d53.js.map} +1 -1
- package/es/useNavigation-b257c33a.js +1 -1
- package/es/{useOutsideClick-01f3d3e1.js → useOutsideClick-b777a43e.js} +2 -2
- package/es/{useOutsideClick-01f3d3e1.js.map → useOutsideClick-b777a43e.js.map} +1 -1
- package/es/{useOutsideMousedown-e0866d58.js → useOutsideMousedown-c45c22c0.js} +2 -2
- package/es/{useOutsideMousedown-e0866d58.js.map → useOutsideMousedown-c45c22c0.js.map} +1 -1
- package/es/{usePopupAnimation-7c5db425.js → usePopupAnimation-96d2bc83.js} +2 -2
- package/es/{usePopupAnimation-7c5db425.js.map → usePopupAnimation-96d2bc83.js.map} +1 -1
- package/es/{usePrefixSuffix-95fc00fd.js → usePrefixSuffix-f981b65f.js} +2 -2
- package/es/{usePrefixSuffix-95fc00fd.js.map → usePrefixSuffix-f981b65f.js.map} +1 -1
- package/es/{useRadioFocusManager-d9eecfb4.js → useRadioFocusManager-36eb283e.js} +2 -2
- package/es/{useRadioFocusManager-d9eecfb4.js.map → useRadioFocusManager-36eb283e.js.map} +1 -1
- package/es/{useReorderableItem-06bd7a7b.js → useReorderableItem-857636b7.js} +3 -3
- package/es/{useReorderableItem-06bd7a7b.js.map → useReorderableItem-857636b7.js.map} +1 -1
- package/es/{useRovingTabIndexContainer-c0356f5d.js → useRovingTabIndexContainer-5992e107.js} +2 -2
- package/es/{useRovingTabIndexContainer-c0356f5d.js.map → useRovingTabIndexContainer-5992e107.js.map} +1 -1
- package/es/{useScale-93490e54.js → useScale-434ad939.js} +2 -2
- package/es/{useScale-93490e54.js.map → useScale-434ad939.js.map} +1 -1
- package/es/{useSelectCommon-309d0f07.js → useSelectCommon-a3c69d60.js} +13 -8
- package/es/useSelectCommon-a3c69d60.js.map +1 -0
- package/es/{useSelectDrill-2f855daa.js → useSelectDrill-f669e729.js} +3 -3
- package/es/{useSelectDrill-2f855daa.js.map → useSelectDrill-f669e729.js.map} +1 -1
- package/es/{useSelection-d6fefa3d.js → useSelection-65134722.js} +2 -2
- package/es/{useSelection-d6fefa3d.js.map → useSelection-65134722.js.map} +1 -1
- package/es/{useSelection-10ed8060.js → useSelection-82bec039.js} +6 -6
- package/es/{useSelection-10ed8060.js.map → useSelection-82bec039.js.map} +1 -1
- package/es/useTabBar-c5558e77.js +3 -3
- package/es/{useTestId-ab1bede6.js → useTestId-f24ac480.js} +2 -2
- package/es/{useTestId-ab1bede6.js.map → useTestId-f24ac480.js.map} +1 -1
- package/es/{useTheme-c2cfbc29.js → useTheme-0e7497db.js} +2 -2
- package/es/{useTheme-c2cfbc29.js.map → useTheme-0e7497db.js.map} +1 -1
- package/es/{useThemeInterpolations-5f358139.js → useThemeInterpolations-e144e8ec.js} +5 -5
- package/es/{useThemeInterpolations-5f358139.js.map → useThemeInterpolations-e144e8ec.js.map} +1 -1
- package/es/{useTooltip-ab739df0.js → useTooltip-94af94d4.js} +2 -2
- package/es/{useTooltip-ab739df0.js.map → useTooltip-94af94d4.js.map} +1 -1
- package/es/{useTooltipControlled-b7f30aee.js → useTooltipControlled-f2cfa454.js} +5 -5
- package/es/{useTooltipControlled-b7f30aee.js.map → useTooltipControlled-f2cfa454.js.map} +1 -1
- package/es/{useTooltipOnTruncation-31afc3f2.js → useTooltipOnTruncation-94282e75.js} +4 -4
- package/es/{useTooltipOnTruncation-31afc3f2.js.map → useTooltipOnTruncation-94282e75.js.map} +1 -1
- package/es/{useTranslationBundle-bc6e0896.js → useTranslationBundle-4822502f.js} +2 -2
- package/es/{useTranslationBundle-bc6e0896.js.map → useTranslationBundle-4822502f.js.map} +1 -1
- package/es/{useUser-e543b73c.js → useUser-06d34d19.js} +2 -2
- package/es/{useUser-e543b73c.js.map → useUser-06d34d19.js.map} +1 -1
- package/es/useVisDragModeControls-af64848c.js +1 -1
- package/es/{useVisEvents-0edc925f.js → useVisEvents-256dee29.js} +2 -2
- package/es/{useVisEvents-0edc925f.js.map → useVisEvents-256dee29.js.map} +1 -1
- package/es/utils/PRIVATE_collectionUtils.js +17 -17
- package/es/utils/PRIVATE_tabBarUtils.js +17 -17
- package/es/utils/PRIVATE_tooltipUtils.js +14 -14
- package/es/utils/PRIVATE_visTestUtils.js +4 -4
- package/es/utils/UNSAFE_popupUtils.js +8 -8
- package/es/{withDirectionIcon-b725a6d7.js → withDirectionIcon-a8d84a3d.js} +2 -2
- package/es/{withDirectionIcon-b725a6d7.js.map → withDirectionIcon-a8d84a3d.js.map} +1 -1
- package/es/withThemeProps-dbd4fedf.js +2 -2
- package/package.json +2 -2
- package/amd/BaseCardView-16fda4c3.js +0 -2
- package/amd/CardFlexView-d3eb7373.js +0 -2
- package/amd/CardGridView-842f70cd.js +0 -2
- package/amd/ColorPicker-e3167e4c.js +0 -2
- package/amd/InputDatePicker-030e345a.js +0 -2
- package/amd/ListView-02a92d18.js +0 -2
- package/amd/NavigationListItem-9df5446c.js +0 -2
- package/amd/NavigationListItem-9df5446c.js.map +0 -1
- package/amd/NavigationListLinkItem-161049bb.js +0 -2
- package/amd/NavigationListLinkItem-161049bb.js.map +0 -1
- package/amd/OverflowTabBarItem-926b0c8a.js +0 -2
- package/amd/RemovableNavigationListItem-e298c5de.js +0 -2
- package/amd/ReorderableTabBar-0c69bfd4.js +0 -2
- package/amd/TabBar-de723fbc.js +0 -2
- package/amd/TabBarMixed-cfd346bf.js +0 -2
- package/amd/useSelectCommon-28307b63.js +0 -2
- package/amd/useSelectCommon-28307b63.js.map +0 -1
- package/cjs/NavigationListItem-cdfd0740.js.map +0 -1
- package/cjs/NavigationListLinkItem-62c3912e.js.map +0 -1
- package/cjs/useSelectCommon-b0d7feb3.js.map +0 -1
- package/es/useSelectCommon-309d0f07.js.map +0 -1
- package/es/useTextAreaAltEnter-ac460f4c.js +0 -61
- package/es/useTextAreaAltEnter-ac460f4c.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineSelectSingle-f4438110.js","sources":["../../src/UNSAFE_InlineSelectSingle/InlineSelectSingle.tsx","../../src/UNSAFE_InlineSelectSingle/useInlineSelectSingle.ts"],"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 { ContextType, JSX, Ref } from 'preact';\nimport { forwardRef } from 'preact/compat';\nimport { useCallback } from 'preact/hooks';\n\nimport {\n DefaultList,\n DropdownList,\n EmptyResults,\n type SelectSingleCollectionRendererContext\n} from '#PRIVATE_SelectCommon';\nimport { Flex } from '#UNSAFE_Flex';\nimport { Label } from '#UNSAFE_Label';\nimport { SelectSingleField } from '#UNSAFE_SelectSingle/SelectSingleField';\nimport { SelectSingleFieldInput } from '#UNSAFE_SelectSingle/SelectSingleFieldInput';\nimport { Separator } from '#UNSAFE_Separator';\nimport { InlineUserAssistance } from '#UNSAFE_UserAssistance';\nimport { View } from '#UNSAFE_View';\nimport { FormFieldContext } from '#hooks/UNSAFE_useFormFieldContext';\nimport { TabbableModeContext } from '#hooks/UNSAFE_useTabbableMode';\nimport type { Data, InlineSelectHandle, InlineSelectSingleProps, Key } from './types';\nimport { useInlineSelectSingle } from './useInlineSelectSingle';\n\nconst PREVENT_TABBING = { isTabbable: false } satisfies ContextType<typeof TabbableModeContext>;\n\n/**\n * A InlineSelectSingle is a text field with an inline list that supports single selection and search filtering.\n * Note: This is only meant to be used by the Spectra Smart Search component. As such, it only has limited features\n * needed for the Smart Search component.\n */\nfunction InlineSelectSingleImpl<K extends Key, D extends Data>(\n props: InlineSelectSingleProps<K, D>,\n ref: Ref<InlineSelectHandle>\n) {\n const {\n data,\n itemRenderer,\n itemText,\n label,\n onLoadRange,\n testId,\n userAssistancePosition = 'belowList'\n } = props;\n const {\n collectionRendererContext,\n formFieldContext,\n hasUserAssistance,\n isEmptyResults,\n isUserFiltering,\n labelProps,\n listContainerProps,\n selectSingleFieldProps,\n selectFieldInputProps,\n userAssistanceProps\n } = useInlineSelectSingle(props, ref);\n\n const defaultCollectionRenderer = useCallback(\n ({\n onPersistCurrentRowKey,\n onRowAction,\n selected,\n searchText,\n currentRowKeyOverride\n }: SelectSingleCollectionRendererContext<K, D>) => (\n <DefaultList\n aria-label={label}\n componentName=\"InlineSelectSingle\"\n currentItemVariant=\"highlight\"\n currentKey={currentRowKeyOverride}\n data={data}\n itemRenderer={itemRenderer}\n itemText={itemText}\n onCurrentKeyChange={onPersistCurrentRowKey}\n onItemAction={onRowAction}\n onLoadRange={onLoadRange}\n searchText={isUserFiltering ? searchText : undefined}\n selectedKeys={selected}\n selectionMode=\"single\"\n />\n ),\n [data, isUserFiltering, itemRenderer, itemText, label, onLoadRange]\n );\n\n const userAssistance = (\n <View minWidth=\"100%\" padding=\"2x\">\n <InlineUserAssistance\n testId={testId && `${testId}_userAssistance`}\n {...userAssistanceProps}\n />\n </View>\n );\n\n return (\n <Flex direction=\"column\" gap=\"2x\" maxHeight=\"100%\" width=\"100%\">\n <FormFieldContext.Provider value={formFieldContext}>\n <View flex={0}>\n <SelectSingleField\n {...selectSingleFieldProps}\n label={<Label {...labelProps} />}\n testId={testId && `${testId}_selectSingleField`}>\n <SelectSingleFieldInput {...selectFieldInputProps} />\n </SelectSingleField>\n {/* Render separator & UA without gaps when we are configured for UA between the field and the dropdown */}\n {userAssistancePosition === 'aboveList' && <Separator />}\n {userAssistancePosition === 'aboveList' && hasUserAssistance && (\n <>\n {userAssistance}\n <Separator />\n </>\n )}\n </View>\n {/* Render separator with gaps when we are not configured for UA between the field and the dropdown */}\n {userAssistancePosition !== 'aboveList' && <Separator />}\n <DropdownList\n {...listContainerProps}\n // Add bottom gap only when we are configured to show UA above the list\n hasBottomGap={userAssistancePosition === 'aboveList'}\n hasTopGap={false}>\n <TabbableModeContext.Provider value={PREVENT_TABBING}>\n {isEmptyResults ? (\n <EmptyResults />\n ) : (\n defaultCollectionRenderer(collectionRendererContext)\n )}\n </TabbableModeContext.Provider>\n </DropdownList>\n {userAssistancePosition === 'belowList' && hasUserAssistance && (\n <div>\n <Separator />\n {userAssistance}\n </div>\n )}\n </FormFieldContext.Provider>\n </Flex>\n );\n}\n\nexport const InlineSelectSingle = forwardRef(InlineSelectSingleImpl) as {\n <K extends Key, D extends Data>(\n props: InlineSelectSingleProps<K, D> & { ref?: Ref<InlineSelectHandle> }\n ): JSX.Element;\n}; // forwardRef will remove generics, so we cast it explicitly to preserve generics.;\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, Ref } from 'preact';\nimport { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'preact/hooks';\n\nimport {\n type DropdownList,\n isBeforeDataFetch,\n isPhone,\n isSearchTextEmptyOrUndefined,\n useCollectionRenderer,\n UseCollectionRendererSelectSingleParams,\n useSelectCommon\n} from '#PRIVATE_SelectCommon';\nimport type { Label } from '#UNSAFE_Label';\nimport type { SelectSingleField } from '#UNSAFE_SelectSingle/SelectSingleField';\nimport type { SelectSingleFieldInput } from '#UNSAFE_SelectSingle/SelectSingleFieldInput';\nimport { useDisplayValue } from '#UNSAFE_SelectSingle/useDisplayValue';\nimport type { InlineUserAssistance } from '#UNSAFE_UserAssistance';\nimport { useFormContext } from '#hooks/UNSAFE_useFormContext';\nimport { useLoadingIndicatorTimer } from '#hooks/UNSAFE_useLoadingIndicatorTimer';\nimport { useTextField } from '#hooks/UNSAFE_useTextField';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport type { BundleType } from '#resources/nls/bundle';\nimport { isControlOrFunctionKey, KEYS } from '#utils/PRIVATE_keyboardUtils';\nimport { allTabbableElements } from '#utils/PRIVATE_tabbableUtils';\nimport type { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport type {\n CommitMetadata,\n Data,\n InlineSelectHandle,\n InlineSelectSingleProps,\n Key\n} from './types';\nimport { UNSAFE_DOM_ACCESS } from '#utils/UNSAFE_unsafeDomAccess';\n\ntype UseInlineSelectSingleOptions<K extends Key, D extends Data> = InlineSelectSingleProps<K, D>;\n\n/**\n * A custom hook for determining prop values for the InlineSelectSingle's child\n * components from its own props.\n * @param param0 options\n * @param ref The ref handle of the component.\n */\nexport function useInlineSelectSingle<K extends Key, D extends Data>(\n {\n 'aria-describedby': ariaDescribedBy,\n assistiveText,\n data,\n hasBackIcon = 'never',\n hasClearIcon = 'never',\n helpSourceLink,\n helpSourceText,\n isLoading: propIsLoading,\n itemText,\n label,\n onBackIconAction,\n onCommit: propOnCommit,\n onFilter,\n placeholder,\n textAlign: propTextAlign,\n valueItem,\n virtualKeyboard\n }: UseInlineSelectSingleOptions<K, D>,\n ref: Ref<InlineSelectHandle>\n) {\n const inputRef = useRef<HTMLInputElement>(null);\n const { textAlign: formTextAlign } = useFormContext();\n const textAlign = propTextAlign ?? formTextAlign ?? 'start';\n const isDataFetched = data != null && !isBeforeDataFetch<K, D>(data);\n const isEmptyResults = isDataFetched && data?.totalSize === 0;\n\n // Refs to keep track of prop changes and sync internal state\n const prevDataRef = useRef(data);\n const prevValueItemRef = useRef(valueItem);\n const isInitialRender = useRef(true);\n\n // State for holding the selected keys in the list\n const [selectedKeys, setSelectedKeys] = useState(\n valueItem === undefined ? undefined : new Set([valueItem.key])\n );\n\n // The incoming propIsLoading tells us that we are in a loading state, but we don't want to\n // show the loading indicator until after a delay, because showing it immediately could result\n // in unwanted flashing. The isLoading var below will be set to true by useLoadingIndicatorTimer\n // after the delay, when the timer expires, at which point we should show the loading indicator.\n // If propIsLoading is set to false before the timer expires, then the timer will be cancelled\n // and no loading indicator will be shown.\n // (ListView detects its loading state by checking data === null. While it would be nice for\n // us to be consistent and check valueItems === null, we need to use a separate isLoading prop.\n // If valueItems === null triggers our loading state, then the selections in the dropdown\n // are cleared for that period of time, which is undesirable.)\n const isLoading = useLoadingIndicatorTimer(propIsLoading ?? false);\n const displayValue = useDisplayValue(itemText, valueItem, 'InlineSelectSingle');\n\n // add methods to the ref\n useImperativeHandle(\n ref,\n () => ({\n focus: () => inputRef.current?.focus(),\n blur: () => inputRef.current?.blur(),\n [UNSAFE_DOM_ACCESS]: inputRef.current!\n }),\n []\n );\n\n const {\n currentRowKeyRef,\n currentRowOverride,\n dropdownRef,\n isFocused,\n isUserFiltering,\n onCurrentKeyChange,\n searchText,\n setCurrentRowOverride,\n stopFiltering,\n updateFiltering,\n userInput\n } = useSelectCommon<K, D>({\n data,\n inputRef,\n // The component can only be in a focused visual state\n isFocused: true,\n onFilter\n });\n\n const { baseId, formFieldContext, inputProps, labelProps, userAssistanceProps } = useTextField({\n ariaDescribedBy,\n helpSourceLink,\n helpSourceText,\n isFocused,\n isLoading,\n value: valueItem !== undefined ? true : undefined\n });\n const listId = `${baseId}-list`;\n\n // If we're waiting for the selected values to load, the component should look like it\n // has a value in the meantime.\n // Use the original propIsLoading instead of isLoading because we don't want to delay\n // the inside label position by a timer like we do the progressive loading indicator.\n formFieldContext.hasValue = propIsLoading || formFieldContext.hasValue;\n\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const liveRegionText = isDataFetched\n ? data?.totalSize === 0\n ? translations.select_noMatchesFound()\n : data?.totalSize === 1\n ? translations.select_oneMatchFound()\n : data?.sizePrecision === 'exact'\n ? translations.select_sizeMatchesFound({ TOTAL_SIZE: `${data?.totalSize}` })\n : translations.select_sizeOrMoreMatchesFound({ TOTAL_SIZE: `${data?.totalSize}` })\n : '';\n\n /**\n * Lifecycle updates\n */\n // When the valueItem changes, save the new selectedKeys\n if (prevValueItemRef.current !== valueItem) {\n prevValueItemRef.current = valueItem;\n setSelectedKeys(valueItem === undefined ? undefined : new Set([valueItem.key]));\n }\n\n // When data changes, highlight the first result\n if (prevDataRef.current !== data) {\n prevDataRef.current = data;\n // when filtering, set the first result of the filtered data set to be the current item\n // (check the data offset so we don't try to highlight again if the user scrolls through\n // the list and more data is fetched)\n if (isUserFiltering && data != null && data.offset === 0 && data.data.length > 0) {\n // if there are results and search text, highlight the first row, otherwise clear\n // an existing highlight\n setCurrentRowOverride({\n rowKey: !isSearchTextEmptyOrUndefined(searchText) ? data.data[0].metadata.key : undefined\n });\n }\n }\n\n // During the initial render, set the current row override if we have selected values.\n // This way pressing DOWN arrow will start the navigation from the selected row.\n if (isInitialRender.current) {\n isInitialRender.current = false;\n setCurrentRowOverride({ rowKey: [...(selectedKeys ?? [undefined])][0] });\n }\n\n /**\n * A helper onCommit wrapper that consumes the metadata and calls the\n * propOnCommit with only the necessary information.\n * (Similar to onCommit in useSelectSingle.ts)\n */\n const onCommit = useCallback(\n (value: K | undefined, metadata: CommitMetadata) => {\n propOnCommit?.({\n value: value,\n previousValue: valueItem !== undefined ? valueItem.key : undefined,\n reason: metadata.reason\n });\n },\n [propOnCommit, valueItem]\n );\n\n /**\n * A helper function to clear the selectedKeys and commits empty value.\n * (Similar to clearValue in useSelectSingle.ts but without dropdown related logic)\n */\n const clearValue = useCallback(\n (metadata: CommitMetadata) => {\n setSelectedKeys(new Set<K>());\n // call the onCommit callback so that the consuming code can update the valueItem\n onCommit(undefined, metadata);\n },\n [onCommit]\n );\n\n /**\n * Determine if we need to clear the value because the user has deleted all the text.\n * (Similar to isClearValueNeeded in useSelectSingle.ts)\n */\n const isClearValueNeeded = useCallback(() => {\n return isUserFiltering && userInput === '' && valueItem !== undefined;\n }, [isUserFiltering, userInput, valueItem]);\n\n /**\n * Handler for List.onItemAction\n * (Similar to useSelectSingle.ts's onItemAction but without dropdown related logic)\n * This is used for handling:\n * - Commits value when one performs an action on the list\n */\n const handleItemAction = useCallback<\n UseCollectionRendererSelectSingleParams<K, D>['onItemAction']\n >(\n (detail) => {\n // after selecting a value, the user is no longer actively filtering, so update related\n // state accordingly so that the newly selected value appears in the field\n stopFiltering();\n\n const newKey = detail.context.key;\n // update the selectedKeys so that the selection visual state of the collection\n // updates immediately while waiting for a new valueItem to be set\n setSelectedKeys(new Set([newKey]));\n // call the onCommit callback so that the consuming code can update the valueItem\n onCommit(newKey, { reason: 'itemAction' });\n },\n [onCommit, stopFiltering]\n );\n\n /**\n * Handler for SelectSingleFieldInput.onInput\n * This is used for handling:\n * - Typing in text in the field should filter the results (i.e. invoke onFilter with the text)\n */\n const handleFieldInput = useCallback(\n ({ value }: ValueUpdateDetail<string>) => {\n updateFiltering(value);\n onFilter?.({ searchText: value });\n },\n [onFilter, updateFiltering]\n );\n\n /**\n * Handler for SelectSingleFieldInput.onKeyDown\n * This is used for handling:\n * - Prevents default browser behavior on UP/DOWN to avoid scrolling\n * - Clears value or selects current row on ENTER\n * - Clears value or selects current row on TAB\n */\n const handleFieldKeyDown = useCallback(\n (event: KeyboardEvent) => {\n // ignore ctrl and fn key events\n if (isControlOrFunctionKey(event)) return;\n\n switch (event.code) {\n case KEYS.UP:\n case KEYS.DOWN:\n // prevent the default action, since we do not want the page to scroll\n event.preventDefault();\n break;\n case KEYS.ENTER:\n case KEYS.TAB: {\n // if this is on a mobile device (only phone and not in tablet devices), do not do anything\n if (isPhone()) return;\n\n // Otherwise, proceed\n const commitMetadata: CommitMetadata = {\n reason: event.code === KEYS.TAB ? 'tabKey' : 'itemAction'\n };\n // check to see if we need to clear the value\n if (isClearValueNeeded()) {\n // in this case, clear the value and return.\n clearValue(commitMetadata);\n return;\n }\n\n // if there is no data to select, no need to handle this event\n if (data == null || data.data.length === 0) return;\n\n // If we will be making a selection, the user is no longer actively filtering,\n // so update related state accordingly so that the newly selected value appears in the field.\n stopFiltering();\n\n // Current design have this component in a dropdown/modal. So, pressing Tab from\n // the main field without doing any other interaction is still considered a selection\n // unlike SelectSingle (see JET-68215). So, we handle both Enter and Tab similarly.\n // If there is a currentRow in the dropdown (meaning a highlighted item that would\n // have keyboard focus if the dropdown list had physical focus, which may be different\n // from the currently selected item), select it and commit it.\n if (currentRowKeyRef.current !== undefined && data != null && data.data.length > 0) {\n setSelectedKeys(new Set<K>([currentRowKeyRef.current]));\n onCommit(currentRowKeyRef.current, commitMetadata);\n return;\n }\n // Otherwise commit the currently selected value again so that a valueAction event\n // can be fired from the core-pack side.\n onCommit(valueItem?.key ?? undefined, commitMetadata);\n break;\n }\n }\n },\n [clearValue, currentRowKeyRef, data, isClearValueNeeded, onCommit, stopFiltering, valueItem]\n );\n\n /**\n * Handler for SelectSingleFieldInput.onKeyUp\n * This is used for handling:\n * - Pressing UP/DOWN from the main field should move the focus to the list\n * - If Ctrl or Fn key is pressed, then ignore the event\n */\n const handleFieldKeyUp = useCallback(\n (event: KeyboardEvent) => {\n // ignore ctrl and fn key events\n if (isControlOrFunctionKey(event)) return;\n\n switch (event.code) {\n case KEYS.UP:\n case KEYS.DOWN:\n // Transfer physical focus into the dropdown only if the data is present and the dropdown\n // has rendered the data. Otherwise, keep the focus in the field.\n if (data != null && dropdownRef.current) {\n // get the focusable element from the dropdown.\n // consider element with tabindex=-1 as well.\n const firstFocusableElem = allTabbableElements(dropdownRef.current, undefined, true)[0];\n // focus the first element if it exists\n firstFocusableElem?.focus();\n\n // set the first row as current row if there is no current row at the moment\n if (currentRowOverride.rowKey === undefined) {\n setCurrentRowOverride({ rowKey: data.data[0]?.metadata?.key });\n }\n }\n // prevent the default action, since we are handling it\n event.preventDefault();\n break;\n }\n },\n [currentRowOverride, data, dropdownRef, setCurrentRowOverride]\n );\n\n /**\n * Handler for DropdownList.onKeyDown\n * This is used for handling:\n * - Pressing Tab when highlighted on a list item should select & commit that item as value\n */\n const handleListKeyDown = useCallback(\n (event: KeyboardEvent) => {\n switch (event.code) {\n case KEYS.TAB:\n // if there is a currentRow in the dropdown, select it and commit it\n if (currentRowKeyRef.current !== undefined && data != null && data.data.length > 0) {\n setSelectedKeys(new Set<K>([currentRowKeyRef.current]));\n onCommit(currentRowKeyRef.current, { reason: 'tabKey' });\n }\n break;\n }\n },\n [currentRowKeyRef, data, onCommit]\n );\n\n /**\n * Handler for ClearButton.onClick\n * This is for handling:\n * - on clicking the clear icon, the value & selection should be cleared.\n */\n const handleClearButtonClick = useCallback(() => {\n // reset the user filter and the value of the component\n stopFiltering();\n // clear the value\n clearValue({ reason: 'itemAction' });\n // set focus to the input\n inputRef.current?.focus();\n // call onFilter with undefined\n onFilter?.({ searchText: undefined });\n }, [clearValue, onFilter, stopFiltering]);\n\n /**\n * Create collection Renderer context. This will be used by the default\n * collectionRenderer.\n */\n const collectionRendererContext = useCollectionRenderer<K, D>({\n currentKey: currentRowOverride.rowKey,\n searchText,\n selectedKeys,\n onCurrentKeyChange,\n onItemAction: handleItemAction\n });\n\n // TODO: JET-73973 - ListView is not respecting TabbableMode\n // Currently List does not respect TabbableMode, so for now explicitly set tabindex=\"-1\".\n // When this bug is fixed, this useEffect can be removed.\n useEffect(() => {\n const list = dropdownRef.current?.querySelector('div[role=\"listbox\"][tabindex=\"0\"]');\n list?.setAttribute('tabindex', '-1');\n });\n\n return {\n collectionRendererContext,\n formFieldContext,\n hasUserAssistance: Boolean(assistiveText || helpSourceLink),\n isEmptyResults,\n isUserFiltering,\n labelProps: {\n ...labelProps,\n children: label\n } satisfies ComponentProps<typeof Label>,\n listContainerProps: {\n id: listId,\n dropdownListRef: dropdownRef,\n onKeyDown: handleListKeyDown\n } satisfies ComponentProps<typeof DropdownList>,\n selectSingleFieldProps: {\n contentVariant: 'input',\n // InlineSelectSingle currently only supports inside label.\n hasInsideLabel: true,\n isBackButtonShown: hasBackIcon === 'always',\n isClearButtonShown: hasClearIcon === 'conditionally' && valueItem !== undefined,\n onBackButtonClick: onBackIconAction,\n onClearButtonClick: handleClearButtonClick,\n styleVariant: 'embedded' as const\n } satisfies Omit<ComponentProps<typeof SelectSingleField>, 'children'>,\n selectFieldInputProps: {\n ...inputProps,\n 'aria-controls': listId,\n // InlineSelectSingle always have the list open, so it will always be in an expanded state.\n 'aria-expanded': true,\n displayValue,\n // InlineSelectSingle currently only supports inside label,\n // so it is expected to always have a label.\n hasEmptyLabel: false,\n // InlineSelectSingle currently only supports inside label.\n hasInsideLabel: true,\n inputRef,\n // InlineSelectSingle currently does not support Add to List.\n isAddToListShown: false,\n // InlineSelectSingle currently does not support Advanced Search.\n isAdvancedSearchShown: false,\n // InlineSelectSingle currently does not support Required.\n isRequired: false,\n isUserFiltering,\n liveRegionText,\n onInput: handleFieldInput,\n onKeyDown: handleFieldKeyDown,\n onKeyUp: handleFieldKeyUp,\n placeholder,\n textAlign,\n userInput,\n variant: 'embedded',\n virtualKeyboard\n } satisfies ComponentProps<typeof SelectSingleFieldInput>,\n userAssistanceProps: {\n ...userAssistanceProps,\n assistiveText,\n fieldLabel: label,\n helpSourceLink,\n helpSourceText\n } satisfies ComponentProps<typeof InlineUserAssistance>\n };\n}\n"],"names":["PREVENT_TABBING","isTabbable","InlineSelectSingle","forwardRef","props","ref","data","itemRenderer","itemText","label","onLoadRange","testId","userAssistancePosition","collectionRendererContext","formFieldContext","hasUserAssistance","isEmptyResults","isUserFiltering","labelProps","listContainerProps","selectSingleFieldProps","selectFieldInputProps","userAssistanceProps","ariaDescribedBy","assistiveText","hasBackIcon","hasClearIcon","helpSourceLink","helpSourceText","isLoading","propIsLoading","onBackIconAction","onCommit","propOnCommit","onFilter","placeholder","textAlign","propTextAlign","valueItem","virtualKeyboard","inputRef","useRef","formTextAlign","useFormContext","isDataFetched","isBeforeDataFetch","totalSize","prevDataRef","prevValueItemRef","isInitialRender","selectedKeys","setSelectedKeys","useState","undefined","Set","key","useLoadingIndicatorTimer","displayValue","useDisplayValue","useImperativeHandle","focus","current","blur","UNSAFE_DOM_ACCESS","currentRowKeyRef","currentRowOverride","dropdownRef","isFocused","onCurrentKeyChange","searchText","setCurrentRowOverride","stopFiltering","updateFiltering","userInput","useSelectCommon","baseId","inputProps","useTextField","value","listId","hasValue","translations","useTranslationBundle","liveRegionText","select_noMatchesFound","select_oneMatchFound","sizePrecision","select_sizeMatchesFound","TOTAL_SIZE","select_sizeOrMoreMatchesFound","offset","length","rowKey","isSearchTextEmptyOrUndefined","metadata","useCallback","previousValue","reason","clearValue","isClearValueNeeded","handleItemAction","detail","newKey","context","handleFieldInput","handleFieldKeyDown","event","isControlOrFunctionKey","code","KEYS","UP","DOWN","preventDefault","ENTER","TAB","isPhone","commitMetadata","handleFieldKeyUp","firstFocusableElem","allTabbableElements","handleListKeyDown","handleClearButtonClick","useCollectionRenderer","currentKey","onItemAction","useEffect","list","querySelector","setAttribute","Boolean","children","id","dropdownListRef","onKeyDown","contentVariant","hasInsideLabel","isBackButtonShown","isClearButtonShown","onBackButtonClick","onClearButtonClick","styleVariant","hasEmptyLabel","isAddToListShown","isAdvancedSearchShown","isRequired","onInput","onKeyUp","variant","fieldLabel","useInlineSelectSingle","defaultCollectionRenderer","onPersistCurrentRowKey","onRowAction","selected","currentRowKeyOverride","_jsx","DefaultList","componentName","currentItemVariant","selectionMode","userAssistance","View","minWidth","padding","jsx","InlineUserAssistance","Flex","direction","gap","maxHeight","width","_jsxs","FormFieldContext","Provider","flex","SelectSingleField","Label","SelectSingleFieldInput","Separator","DropdownList","hasBottomGap","hasTopGap","TabbableModeContext","EmptyResults","jsxs"],"mappings":"s7DA8BA,MAAMA,EAAkB,CAAEC,YAAY,GAkHzB,MAAAC,EAAqBC,EAAUA,YA3G5C,SACEC,EACAC,GAEA,MAAMC,KACJA,EAAIC,aACJA,EAAYC,SACZA,EAAQC,MACRA,EAAKC,YACLA,EAAWC,OACXA,EAAMC,uBACNA,EAAyB,aACvBR,GACES,0BACJA,EAAyBC,iBACzBA,EAAgBC,kBAChBA,EAAiBC,eACjBA,EAAcC,gBACdA,EAAeC,WACfA,EAAUC,mBACVA,EAAkBC,uBAClBA,EAAsBC,sBACtBA,EAAqBC,oBACrBA,GCVE,UAEF,mBAAoBC,EAAeC,cACnCA,EAAalB,KACbA,EAAImB,YACJA,EAAc,QAAOC,aACrBA,EAAe,QAAOC,eACtBA,EAAcC,eACdA,EACAC,UAAWC,EAAatB,SACxBA,EAAQC,MACRA,EAAKsB,iBACLA,EACAC,SAAUC,EAAYC,SACtBA,EAAQC,YACRA,EACAC,UAAWC,EAAaC,UACxBA,EAASC,gBACTA,GAEFlC,GAEA,MAAMmC,EAAWC,SAAyB,OAClCL,UAAWM,GAAkBC,EAAcA,iBAC7CP,EAAYC,GAAiBK,GAAiB,QAC9CE,EAAwB,MAARtC,IAAiBuC,EAAiBA,kBAAOvC,GACzDU,EAAiB4B,GAAqC,IAApBtC,GAAMwC,UAGxCC,EAAcN,SAAOnC,GACrB0C,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GlB,CAACzJ,EAAMW,EAAiBV,EAAcC,EAAUC,EAAOC,IAGnDsJ,EACJL,MAACM,EAAAA,KAAI,CAACC,SAAS,OAAOC,QAAQ,KAAIjC,SAChCyB,EAACS,IAAAC,EAAoBA,qBACnB,CAAA1J,OAAQA,GAAU,GAAGA,sBACjBW,MAKV,OACEqI,EAAAA,IAACW,EAAAA,KAAI,CAACC,UAAU,SAASC,IAAI,KAAKC,UAAU,OAAOC,MAAM,OAAMxC,SAC7DyC,OAACC,EAAAA,iBAAiBC,UAAS/F,MAAOhE,EAChCoH,SAAA,CAAAyC,EAAAA,KAACV,EAAAA,KAAK,CAAAa,KAAM,EACV5C,SAAA,CAAAyB,EAAAA,IAACoB,EAAAA,kBACK,IAAA3J,EACJX,MAAOkJ,EAAAA,IAACqB,EAAAA,MAAK,IAAK9J,IAClBP,OAAQA,GAAU,GAAGA,+BACrBgJ,EAACS,IAAAa,EAAsBA,uBAAK,IAAA5J,MAGF,cAA3BT,GAA0C+I,EAAAA,IAACuB,EAAAA,UAAY,CAAA,GAC5B,cAA3BtK,GAA0CG,GACzC4J,6BACGX,EACDL,MAACuB,EAAAA,UAAS,CAAA,SAKY,cAA3BtK,GAA0C+I,EAACS,IAAAc,gBAC5CvB,MAACwB,EAAAA,aAAY,IACPhK,EAEJiK,aAAyC,cAA3BxK,EACdyK,WAAW,EAAKnD,SAChByB,EAACS,IAAAkB,sBAAoBT,UAAS/F,MAAO9E,EAAekI,SACjDlH,EACC2I,EAAAS,IAACmB,eAAY,CAAA,GAEbjC,EAA0BzI,OAIJ,cAA3BD,GAA0CG,GACzC4J,EAAAa,KAAA,MAAA,CAAAtD,SAAA,CACEyB,EAAAA,IAACuB,EAASA,UAAG,CAAA,GACZlB,SAMb"}
|
|
1
|
+
{"version":3,"file":"InlineSelectSingle-87bc8a45.js","sources":["../../src/UNSAFE_InlineSelectSingle/InlineSelectSingle.tsx","../../src/UNSAFE_InlineSelectSingle/useInlineSelectSingle.ts"],"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 { ContextType, JSX, Ref } from 'preact';\nimport { forwardRef } from 'preact/compat';\nimport { useCallback } from 'preact/hooks';\n\nimport {\n DefaultList,\n DropdownList,\n EmptyResults,\n type SelectSingleCollectionRendererContext\n} from '#PRIVATE_SelectCommon';\nimport { Flex } from '#UNSAFE_Flex';\nimport { Label } from '#UNSAFE_Label';\nimport { SelectSingleField } from '#UNSAFE_SelectSingle/SelectSingleField';\nimport { SelectSingleFieldInput } from '#UNSAFE_SelectSingle/SelectSingleFieldInput';\nimport { Separator } from '#UNSAFE_Separator';\nimport { InlineUserAssistance } from '#UNSAFE_UserAssistance';\nimport { View } from '#UNSAFE_View';\nimport { FormFieldContext } from '#hooks/UNSAFE_useFormFieldContext';\nimport { TabbableModeContext } from '#hooks/UNSAFE_useTabbableMode';\nimport type { Data, InlineSelectHandle, InlineSelectSingleProps, Key } from './types';\nimport { useInlineSelectSingle } from './useInlineSelectSingle';\n\nconst PREVENT_TABBING = { isTabbable: false } satisfies ContextType<typeof TabbableModeContext>;\n\n/**\n * A InlineSelectSingle is a text field with an inline list that supports single selection and search filtering.\n * Note: This is only meant to be used by the Spectra Smart Search component. As such, it only has limited features\n * needed for the Smart Search component.\n */\nfunction InlineSelectSingleImpl<K extends Key, D extends Data>(\n props: InlineSelectSingleProps<K, D>,\n ref: Ref<InlineSelectHandle>\n) {\n const {\n data,\n itemRenderer,\n itemText,\n label,\n onLoadRange,\n testId,\n userAssistancePosition = 'belowList'\n } = props;\n const {\n collectionRendererContext,\n formFieldContext,\n hasUserAssistance,\n isEmptyResults,\n isUserFiltering,\n labelProps,\n listContainerProps,\n selectSingleFieldProps,\n selectFieldInputProps,\n userAssistanceProps\n } = useInlineSelectSingle(props, ref);\n\n const defaultCollectionRenderer = useCallback(\n ({\n onPersistCurrentRowKey,\n onRowAction,\n selected,\n searchText,\n currentRowKeyOverride\n }: SelectSingleCollectionRendererContext<K, D>) => (\n <DefaultList\n aria-label={label}\n componentName=\"InlineSelectSingle\"\n currentItemVariant=\"highlight\"\n currentKey={currentRowKeyOverride}\n data={data}\n itemRenderer={itemRenderer}\n itemText={itemText}\n onCurrentKeyChange={onPersistCurrentRowKey}\n onItemAction={onRowAction}\n onLoadRange={onLoadRange}\n searchText={isUserFiltering ? searchText : undefined}\n selectedKeys={selected}\n selectionMode=\"single\"\n />\n ),\n [data, isUserFiltering, itemRenderer, itemText, label, onLoadRange]\n );\n\n const userAssistance = (\n <View minWidth=\"100%\" padding=\"2x\">\n <InlineUserAssistance\n testId={testId && `${testId}_userAssistance`}\n {...userAssistanceProps}\n />\n </View>\n );\n\n return (\n <Flex direction=\"column\" gap=\"2x\" maxHeight=\"100%\" width=\"100%\">\n <FormFieldContext.Provider value={formFieldContext}>\n <View flex={0}>\n <SelectSingleField\n {...selectSingleFieldProps}\n label={<Label {...labelProps} />}\n testId={testId && `${testId}_selectSingleField`}>\n <SelectSingleFieldInput {...selectFieldInputProps} />\n </SelectSingleField>\n {/* Render separator & UA without gaps when we are configured for UA between the field and the dropdown */}\n {userAssistancePosition === 'aboveList' && <Separator />}\n {userAssistancePosition === 'aboveList' && hasUserAssistance && (\n <>\n {userAssistance}\n <Separator />\n </>\n )}\n </View>\n {/* Render separator with gaps when we are not configured for UA between the field and the dropdown */}\n {userAssistancePosition !== 'aboveList' && <Separator />}\n <DropdownList\n {...listContainerProps}\n // Add bottom gap only when we are configured to show UA above the list\n hasBottomGap={userAssistancePosition === 'aboveList'}\n hasTopGap={false}>\n <TabbableModeContext.Provider value={PREVENT_TABBING}>\n {isEmptyResults ? (\n <EmptyResults />\n ) : (\n defaultCollectionRenderer(collectionRendererContext)\n )}\n </TabbableModeContext.Provider>\n </DropdownList>\n {userAssistancePosition === 'belowList' && hasUserAssistance && (\n <div>\n <Separator />\n {userAssistance}\n </div>\n )}\n </FormFieldContext.Provider>\n </Flex>\n );\n}\n\nexport const InlineSelectSingle = forwardRef(InlineSelectSingleImpl) as {\n <K extends Key, D extends Data>(\n props: InlineSelectSingleProps<K, D> & { ref?: Ref<InlineSelectHandle> }\n ): JSX.Element;\n}; // forwardRef will remove generics, so we cast it explicitly to preserve generics.;\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, Ref } from 'preact';\nimport { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'preact/hooks';\n\nimport {\n type DropdownList,\n isBeforeDataFetch,\n isPhone,\n isSearchTextEmptyOrUndefined,\n useCollectionRenderer,\n UseCollectionRendererSelectSingleParams,\n useSelectCommon\n} from '#PRIVATE_SelectCommon';\nimport type { Label } from '#UNSAFE_Label';\nimport type { SelectSingleField } from '#UNSAFE_SelectSingle/SelectSingleField';\nimport type { SelectSingleFieldInput } from '#UNSAFE_SelectSingle/SelectSingleFieldInput';\nimport { useDisplayValue } from '#UNSAFE_SelectSingle/useDisplayValue';\nimport type { InlineUserAssistance } from '#UNSAFE_UserAssistance';\nimport { useFormContext } from '#hooks/UNSAFE_useFormContext';\nimport { useLoadingIndicatorTimer } from '#hooks/UNSAFE_useLoadingIndicatorTimer';\nimport { useTextField } from '#hooks/UNSAFE_useTextField';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport type { BundleType } from '#resources/nls/bundle';\nimport { isControlOrFunctionKey, KEYS } from '#utils/PRIVATE_keyboardUtils';\nimport { allTabbableElements } from '#utils/PRIVATE_tabbableUtils';\nimport type { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport type {\n CommitMetadata,\n Data,\n InlineSelectHandle,\n InlineSelectSingleProps,\n Key\n} from './types';\nimport { UNSAFE_DOM_ACCESS } from '#utils/UNSAFE_unsafeDomAccess';\n\ntype UseInlineSelectSingleOptions<K extends Key, D extends Data> = InlineSelectSingleProps<K, D>;\n\n/**\n * A custom hook for determining prop values for the InlineSelectSingle's child\n * components from its own props.\n * @param param0 options\n * @param ref The ref handle of the component.\n */\nexport function useInlineSelectSingle<K extends Key, D extends Data>(\n {\n 'aria-describedby': ariaDescribedBy,\n assistiveText,\n data,\n hasBackIcon = 'never',\n hasClearIcon = 'never',\n helpSourceLink,\n helpSourceText,\n isLoading: propIsLoading,\n itemText,\n label,\n onBackIconAction,\n onCommit: propOnCommit,\n onFilter,\n placeholder,\n textAlign: propTextAlign,\n valueItem,\n virtualKeyboard\n }: UseInlineSelectSingleOptions<K, D>,\n ref: Ref<InlineSelectHandle>\n) {\n const inputRef = useRef<HTMLInputElement>(null);\n const { textAlign: formTextAlign } = useFormContext();\n const textAlign = propTextAlign ?? formTextAlign ?? 'start';\n const isDataFetched = data != null && !isBeforeDataFetch<K, D>(data);\n const isEmptyResults = isDataFetched && data?.totalSize === 0;\n\n // Refs to keep track of prop changes and sync internal state\n const prevDataRef = useRef(data);\n const prevValueItemRef = useRef(valueItem);\n const isInitialRender = useRef(true);\n\n // State for holding the selected keys in the list\n const [selectedKeys, setSelectedKeys] = useState(\n valueItem === undefined ? undefined : new Set([valueItem.key])\n );\n\n // The incoming propIsLoading tells us that we are in a loading state, but we don't want to\n // show the loading indicator until after a delay, because showing it immediately could result\n // in unwanted flashing. The isLoading var below will be set to true by useLoadingIndicatorTimer\n // after the delay, when the timer expires, at which point we should show the loading indicator.\n // If propIsLoading is set to false before the timer expires, then the timer will be cancelled\n // and no loading indicator will be shown.\n // (ListView detects its loading state by checking data === null. While it would be nice for\n // us to be consistent and check valueItems === null, we need to use a separate isLoading prop.\n // If valueItems === null triggers our loading state, then the selections in the dropdown\n // are cleared for that period of time, which is undesirable.)\n const isLoading = useLoadingIndicatorTimer(propIsLoading ?? false);\n const displayValue = useDisplayValue(itemText, valueItem, 'InlineSelectSingle');\n\n // add methods to the ref\n useImperativeHandle(\n ref,\n () => ({\n focus: () => inputRef.current?.focus(),\n blur: () => inputRef.current?.blur(),\n [UNSAFE_DOM_ACCESS]: inputRef.current!\n }),\n []\n );\n\n const {\n currentRowKeyRef,\n currentRowOverride,\n dropdownRef,\n isFocused,\n isUserFiltering,\n onCurrentKeyChange,\n searchText,\n setCurrentRowOverride,\n stopFiltering,\n updateFiltering,\n userInput\n } = useSelectCommon<K, D>({\n data,\n inputRef,\n // The component can only be in a focused visual state\n isFocused: true,\n onFilter\n });\n\n const { baseId, formFieldContext, inputProps, labelProps, userAssistanceProps } = useTextField({\n ariaDescribedBy,\n helpSourceLink,\n helpSourceText,\n isFocused,\n isLoading,\n value: valueItem !== undefined ? true : undefined\n });\n const listId = `${baseId}-list`;\n\n // If we're waiting for the selected values to load, the component should look like it\n // has a value in the meantime.\n // Use the original propIsLoading instead of isLoading because we don't want to delay\n // the inside label position by a timer like we do the progressive loading indicator.\n formFieldContext.hasValue = propIsLoading || formFieldContext.hasValue;\n\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const liveRegionText = isDataFetched\n ? data?.totalSize === 0\n ? translations.select_noMatchesFound()\n : data?.totalSize === 1\n ? translations.select_oneMatchFound()\n : data?.sizePrecision === 'exact'\n ? translations.select_sizeMatchesFound({ TOTAL_SIZE: `${data?.totalSize}` })\n : translations.select_sizeOrMoreMatchesFound({ TOTAL_SIZE: `${data?.totalSize}` })\n : '';\n\n /**\n * Lifecycle updates\n */\n // When the valueItem changes, save the new selectedKeys\n if (prevValueItemRef.current !== valueItem) {\n prevValueItemRef.current = valueItem;\n setSelectedKeys(valueItem === undefined ? undefined : new Set([valueItem.key]));\n }\n\n // When data changes, highlight the first result\n if (prevDataRef.current !== data) {\n prevDataRef.current = data;\n // when filtering, set the first result of the filtered data set to be the current item\n // (check the data offset so we don't try to highlight again if the user scrolls through\n // the list and more data is fetched)\n if (isUserFiltering && data != null && data.offset === 0 && data.data.length > 0) {\n // if there are results and search text, highlight the first row, otherwise clear\n // an existing highlight\n setCurrentRowOverride({\n rowKey: !isSearchTextEmptyOrUndefined(searchText) ? data.data[0].metadata.key : undefined\n });\n }\n }\n\n // During the initial render, set the current row override if we have selected values.\n // This way pressing DOWN arrow will start the navigation from the selected row.\n if (isInitialRender.current) {\n isInitialRender.current = false;\n setCurrentRowOverride({ rowKey: [...(selectedKeys ?? [undefined])][0] });\n }\n\n /**\n * A helper onCommit wrapper that consumes the metadata and calls the\n * propOnCommit with only the necessary information.\n * (Similar to onCommit in useSelectSingle.ts)\n */\n const onCommit = useCallback(\n (value: K | undefined, metadata: CommitMetadata) => {\n propOnCommit?.({\n value: value,\n previousValue: valueItem !== undefined ? valueItem.key : undefined,\n reason: metadata.reason\n });\n },\n [propOnCommit, valueItem]\n );\n\n /**\n * A helper function to clear the selectedKeys and commits empty value.\n * (Similar to clearValue in useSelectSingle.ts but without dropdown related logic)\n */\n const clearValue = useCallback(\n (metadata: CommitMetadata) => {\n setSelectedKeys(new Set<K>());\n // call the onCommit callback so that the consuming code can update the valueItem\n onCommit(undefined, metadata);\n },\n [onCommit]\n );\n\n /**\n * Determine if we need to clear the value because the user has deleted all the text.\n * (Similar to isClearValueNeeded in useSelectSingle.ts)\n */\n const isClearValueNeeded = useCallback(() => {\n return isUserFiltering && userInput === '' && valueItem !== undefined;\n }, [isUserFiltering, userInput, valueItem]);\n\n /**\n * Handler for List.onItemAction\n * (Similar to useSelectSingle.ts's onItemAction but without dropdown related logic)\n * This is used for handling:\n * - Commits value when one performs an action on the list\n */\n const handleItemAction = useCallback<\n UseCollectionRendererSelectSingleParams<K, D>['onItemAction']\n >(\n (detail) => {\n // after selecting a value, the user is no longer actively filtering, so update related\n // state accordingly so that the newly selected value appears in the field\n stopFiltering();\n\n const newKey = detail.context.key;\n // update the selectedKeys so that the selection visual state of the collection\n // updates immediately while waiting for a new valueItem to be set\n setSelectedKeys(new Set([newKey]));\n // call the onCommit callback so that the consuming code can update the valueItem\n onCommit(newKey, { reason: 'itemAction' });\n },\n [onCommit, stopFiltering]\n );\n\n /**\n * Handler for SelectSingleFieldInput.onInput\n * This is used for handling:\n * - Typing in text in the field should filter the results (i.e. invoke onFilter with the text)\n */\n const handleFieldInput = useCallback(\n ({ value }: ValueUpdateDetail<string>) => {\n updateFiltering(value);\n onFilter?.({ searchText: value });\n },\n [onFilter, updateFiltering]\n );\n\n /**\n * Handler for SelectSingleFieldInput.onKeyDown\n * This is used for handling:\n * - Prevents default browser behavior on UP/DOWN to avoid scrolling\n * - Clears value or selects current row on ENTER\n * - Clears value or selects current row on TAB\n */\n const handleFieldKeyDown = useCallback(\n (event: KeyboardEvent) => {\n // ignore ctrl and fn key events\n if (isControlOrFunctionKey(event)) return;\n\n switch (event.code) {\n case KEYS.UP:\n case KEYS.DOWN:\n // prevent the default action, since we do not want the page to scroll\n event.preventDefault();\n break;\n case KEYS.ENTER:\n case KEYS.TAB: {\n // if this is on a mobile device (only phone and not in tablet devices), do not do anything\n if (isPhone()) return;\n\n // Otherwise, proceed\n const commitMetadata: CommitMetadata = {\n reason: event.code === KEYS.TAB ? 'tabKey' : 'itemAction'\n };\n // check to see if we need to clear the value\n if (isClearValueNeeded()) {\n // in this case, clear the value and return.\n clearValue(commitMetadata);\n return;\n }\n\n // if there is no data to select, no need to handle this event\n if (data == null || data.data.length === 0) return;\n\n // If we will be making a selection, the user is no longer actively filtering,\n // so update related state accordingly so that the newly selected value appears in the field.\n stopFiltering();\n\n // Current design have this component in a dropdown/modal. So, pressing Tab from\n // the main field without doing any other interaction is still considered a selection\n // unlike SelectSingle (see JET-68215). So, we handle both Enter and Tab similarly.\n // If there is a currentRow in the dropdown (meaning a highlighted item that would\n // have keyboard focus if the dropdown list had physical focus, which may be different\n // from the currently selected item), select it and commit it.\n if (currentRowKeyRef.current !== undefined && data != null && data.data.length > 0) {\n setSelectedKeys(new Set<K>([currentRowKeyRef.current]));\n onCommit(currentRowKeyRef.current, commitMetadata);\n return;\n }\n // Otherwise commit the currently selected value again so that a valueAction event\n // can be fired from the core-pack side.\n onCommit(valueItem?.key ?? undefined, commitMetadata);\n break;\n }\n }\n },\n [clearValue, currentRowKeyRef, data, isClearValueNeeded, onCommit, stopFiltering, valueItem]\n );\n\n /**\n * Handler for SelectSingleFieldInput.onKeyUp\n * This is used for handling:\n * - Pressing UP/DOWN from the main field should move the focus to the list\n * - If Ctrl or Fn key is pressed, then ignore the event\n */\n const handleFieldKeyUp = useCallback(\n (event: KeyboardEvent) => {\n // ignore ctrl and fn key events\n if (isControlOrFunctionKey(event)) return;\n\n switch (event.code) {\n case KEYS.UP:\n case KEYS.DOWN:\n // Transfer physical focus into the dropdown only if the data is present and the dropdown\n // has rendered the data. Otherwise, keep the focus in the field.\n if (data != null && dropdownRef.current) {\n // get the focusable element from the dropdown.\n // consider element with tabindex=-1 as well.\n const firstFocusableElem = allTabbableElements(dropdownRef.current, undefined, true)[0];\n // focus the first element if it exists\n firstFocusableElem?.focus();\n\n // set the first row as current row if there is no current row at the moment\n if (currentRowOverride.rowKey === undefined) {\n setCurrentRowOverride({ rowKey: data.data[0]?.metadata?.key });\n }\n }\n // prevent the default action, since we are handling it\n event.preventDefault();\n break;\n }\n },\n [currentRowOverride, data, dropdownRef, setCurrentRowOverride]\n );\n\n /**\n * Handler for DropdownList.onKeyDown\n * This is used for handling:\n * - Pressing Tab when highlighted on a list item should select & commit that item as value\n */\n const handleListKeyDown = useCallback(\n (event: KeyboardEvent) => {\n switch (event.code) {\n case KEYS.TAB:\n // if there is a currentRow in the dropdown, select it and commit it\n if (currentRowKeyRef.current !== undefined && data != null && data.data.length > 0) {\n setSelectedKeys(new Set<K>([currentRowKeyRef.current]));\n onCommit(currentRowKeyRef.current, { reason: 'tabKey' });\n }\n break;\n }\n },\n [currentRowKeyRef, data, onCommit]\n );\n\n /**\n * Handler for ClearButton.onClick\n * This is for handling:\n * - on clicking the clear icon, the value & selection should be cleared.\n */\n const handleClearButtonClick = useCallback(() => {\n // reset the user filter and the value of the component\n stopFiltering();\n // clear the value\n clearValue({ reason: 'itemAction' });\n // set focus to the input\n inputRef.current?.focus();\n // call onFilter with undefined\n onFilter?.({ searchText: undefined });\n }, [clearValue, onFilter, stopFiltering]);\n\n /**\n * Create collection Renderer context. This will be used by the default\n * collectionRenderer.\n */\n const collectionRendererContext = useCollectionRenderer<K, D>({\n currentKey: currentRowOverride.rowKey,\n searchText,\n selectedKeys,\n onCurrentKeyChange,\n onItemAction: handleItemAction\n });\n\n // TODO: JET-73973 - ListView is not respecting TabbableMode\n // Currently List does not respect TabbableMode, so for now explicitly set tabindex=\"-1\".\n // When this bug is fixed, this useEffect can be removed.\n useEffect(() => {\n const list = dropdownRef.current?.querySelector('div[role=\"listbox\"][tabindex=\"0\"]');\n list?.setAttribute('tabindex', '-1');\n });\n\n return {\n collectionRendererContext,\n formFieldContext,\n hasUserAssistance: Boolean(assistiveText || helpSourceLink),\n isEmptyResults,\n isUserFiltering,\n labelProps: {\n ...labelProps,\n children: label\n } satisfies ComponentProps<typeof Label>,\n listContainerProps: {\n id: listId,\n dropdownListRef: dropdownRef,\n onKeyDown: handleListKeyDown\n } satisfies ComponentProps<typeof DropdownList>,\n selectSingleFieldProps: {\n contentVariant: 'input',\n // InlineSelectSingle currently only supports inside label.\n hasInsideLabel: true,\n isBackButtonShown: hasBackIcon === 'always',\n isClearButtonShown: hasClearIcon === 'conditionally' && valueItem !== undefined,\n onBackButtonClick: onBackIconAction,\n onClearButtonClick: handleClearButtonClick,\n styleVariant: 'embedded' as const\n } satisfies Omit<ComponentProps<typeof SelectSingleField>, 'children'>,\n selectFieldInputProps: {\n ...inputProps,\n 'aria-controls': listId,\n // InlineSelectSingle always have the list open, so it will always be in an expanded state.\n 'aria-expanded': true,\n displayValue,\n // InlineSelectSingle currently only supports inside label,\n // so it is expected to always have a label.\n hasEmptyLabel: false,\n // InlineSelectSingle currently only supports inside label.\n hasInsideLabel: true,\n inputRef,\n // InlineSelectSingle currently does not support Add to List.\n isAddToListShown: false,\n // InlineSelectSingle currently does not support Advanced Search.\n isAdvancedSearchShown: false,\n // InlineSelectSingle currently does not support Required.\n isRequired: false,\n isUserFiltering,\n liveRegionText,\n onInput: handleFieldInput,\n onKeyDown: handleFieldKeyDown,\n onKeyUp: handleFieldKeyUp,\n placeholder,\n textAlign,\n userInput,\n variant: 'embedded',\n virtualKeyboard\n } satisfies ComponentProps<typeof SelectSingleFieldInput>,\n userAssistanceProps: {\n ...userAssistanceProps,\n assistiveText,\n fieldLabel: label,\n helpSourceLink,\n helpSourceText\n } satisfies ComponentProps<typeof InlineUserAssistance>\n };\n}\n"],"names":["PREVENT_TABBING","isTabbable","InlineSelectSingle","forwardRef","props","ref","data","itemRenderer","itemText","label","onLoadRange","testId","userAssistancePosition","collectionRendererContext","formFieldContext","hasUserAssistance","isEmptyResults","isUserFiltering","labelProps","listContainerProps","selectSingleFieldProps","selectFieldInputProps","userAssistanceProps","ariaDescribedBy","assistiveText","hasBackIcon","hasClearIcon","helpSourceLink","helpSourceText","isLoading","propIsLoading","onBackIconAction","onCommit","propOnCommit","onFilter","placeholder","textAlign","propTextAlign","valueItem","virtualKeyboard","inputRef","useRef","formTextAlign","useFormContext","isDataFetched","isBeforeDataFetch","totalSize","prevDataRef","prevValueItemRef","isInitialRender","selectedKeys","setSelectedKeys","useState","undefined","Set","key","useLoadingIndicatorTimer","displayValue","useDisplayValue","useImperativeHandle","focus","current","blur","UNSAFE_DOM_ACCESS","currentRowKeyRef","currentRowOverride","dropdownRef","isFocused","onCurrentKeyChange","searchText","setCurrentRowOverride","stopFiltering","updateFiltering","userInput","useSelectCommon","baseId","inputProps","useTextField","value","listId","hasValue","translations","useTranslationBundle","liveRegionText","select_noMatchesFound","select_oneMatchFound","sizePrecision","select_sizeMatchesFound","TOTAL_SIZE","select_sizeOrMoreMatchesFound","offset","length","rowKey","isSearchTextEmptyOrUndefined","metadata","useCallback","previousValue","reason","clearValue","isClearValueNeeded","handleItemAction","detail","newKey","context","handleFieldInput","handleFieldKeyDown","event","isControlOrFunctionKey","code","KEYS","UP","DOWN","preventDefault","ENTER","TAB","isPhone","commitMetadata","handleFieldKeyUp","firstFocusableElem","allTabbableElements","handleListKeyDown","handleClearButtonClick","useCollectionRenderer","currentKey","onItemAction","useEffect","list","querySelector","setAttribute","Boolean","children","id","dropdownListRef","onKeyDown","contentVariant","hasInsideLabel","isBackButtonShown","isClearButtonShown","onBackButtonClick","onClearButtonClick","styleVariant","hasEmptyLabel","isAddToListShown","isAdvancedSearchShown","isRequired","onInput","onKeyUp","variant","fieldLabel","useInlineSelectSingle","defaultCollectionRenderer","onPersistCurrentRowKey","onRowAction","selected","currentRowKeyOverride","_jsx","DefaultList","componentName","currentItemVariant","selectionMode","userAssistance","View","minWidth","padding","jsx","InlineUserAssistance","Flex","direction","gap","maxHeight","width","_jsxs","FormFieldContext","Provider","flex","SelectSingleField","Label","SelectSingleFieldInput","Separator","DropdownList","hasBottomGap","hasTopGap","TabbableModeContext","EmptyResults","jsxs"],"mappings":"s7DA8BA,MAAMA,EAAkB,CAAEC,YAAY,GAkHzB,MAAAC,EAAqBC,EAAUA,YA3G5C,SACEC,EACAC,GAEA,MAAMC,KACJA,EAAIC,aACJA,EAAYC,SACZA,EAAQC,MACRA,EAAKC,YACLA,EAAWC,OACXA,EAAMC,uBACNA,EAAyB,aACvBR,GACES,0BACJA,EAAyBC,iBACzBA,EAAgBC,kBAChBA,EAAiBC,eACjBA,EAAcC,gBACdA,EAAeC,WACfA,EAAUC,mBACVA,EAAkBC,uBAClBA,EAAsBC,sBACtBA,EAAqBC,oBACrBA,GCVE,UAEF,mBAAoBC,EAAeC,cACnCA,EAAalB,KACbA,EAAImB,YACJA,EAAc,QAAOC,aACrBA,EAAe,QAAOC,eACtBA,EAAcC,eACdA,EACAC,UAAWC,EAAatB,SACxBA,EAAQC,MACRA,EAAKsB,iBACLA,EACAC,SAAUC,EAAYC,SACtBA,EAAQC,YACRA,EACAC,UAAWC,EAAaC,UACxBA,EAASC,gBACTA,G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AAA,CAAAtD,SAAA,CACEyB,EAAAA,IAACuB,EAASA,UAAG,CAAA,GACZlB,SAMb"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(['exports', 'preact/jsx-runtime', 'preact/compat', 'preact/hooks', './swatchData-ef8329c2', './clientHints-6d361eaa', './FormFieldContext-a024b891', './logger-0f873e29', './TabbableModeContext-a9c97640', './useTranslationBundle-e4dd341e', 'css!./UserAssistanceStyles.styles.css', 'module', './UNSAFE_UserAssistance/themes/redwood/UserAssistanceVariants.css', './InlineUserAssistance-a59440e5', './Flex-4b81b412', 'css!./MessageBannerStyles.styles.css', 'module', './UNSAFE_MessageBanner/themes/redwood/MessageBannerVariants.css', 'preact', './LayerHost-0b288129', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-2bb62284', 'css!./IconStyle.styles.css', './IconButton-dc1be00e', 'css!./MessageStyles.styles.css', './MessageFormattingUtils-ea0be23e', './TransitionGroup-3b9d81b6', './MessagesContext-602a69a2', 'css!./HiddenAccessibleStyles.styles.css', 'css!./ComponentMessageStyles.styles.css', 'module', './UNSAFE_ComponentMessage/themes/redwood/ComponentMessageVariants.css', './Popup-6b57cc3e', './UNSAFE_Separator/themes/SeparatorStyles.css', 'css!./LabelStyles.styles.css', 'module', './UNSAFE_Label/themes/redwood/LabelVariants.css', './InputGroupContext-372087af', 'module', './UNSAFE_Popup/themes/redwood/PopupVariants.css', './UNSAFE_InputColor/themes/InputColorPickerDropdownStyles.css', './Sheet-1d02491d', './ColorPicker-e3167e4c', './SectionedContent-74559d9d', './ColorSwatch-04ab5601', './useDownToggle-80b61b43', './useClearIcon-2bedc84f', './useFocusableTextField-8b755b15', './FormContext-6b0879a0', './useFormContext-b8cbbb21', './useHover-8b8a1496', './useTextField-3ab0a23b', './Label-701506b1', './keyboardUtils-fb6219eb', './TextFieldInput-f8635c62', 'css!./ObfuscatedTextFieldInputStyles.styles.css', './ReadonlyTextFieldInput-41384d7e', './StyledTextField-2b62c81d', './TextField-c8c71735', 'css!./LiveRegionStyles.styles.css', './UNSAFE_TextField/themes/TextFieldStyles.css', 'css!./SkeletonStyles.styles.css', 'css!./TextFieldLoadingStyles.styles.css', 'css!./TextFieldStyles.styles.css', 'module', './UNSAFE_TextField/themes/redwood/TextFieldVariants.css', './CompactUserAssistance-fcc04dcc', './mergeProps-bcfa6a92', './ClearIcon-b3c8c741', './useCurrentValueReducer-faded381', './useSelectableTextField-900d2860'], (function(e,s,t,o,l,a,n,r,i,c,d,u,p,m,b,h,y,x,C,S,f,v,F,T,g,A,I,R,w,V,U,k,D,E,j,P,_,B,L,H,M,N,O,z,W,q,G,K,Z,$,J,Q,X,Y,ee,se,te,oe,le,ae,ne,re,ie,ce,de,ue,pe,me,be,he,ye,xe,Ce){"use strict";const Se=({anchorRef:e,assistiveText:t,swatchSize:l,palette:a,helpSourceLink:r,helpSourceText:i,isDisabled:d,isOpen:u,isReadonly:p,label:b,onClose:h,onCommit:y,messages:x,testId:C,userAssistanceDensity:S,value:f})=>{const[v,F]=o.useState(!1),[T,g]=o.useState(u),A=o.useCallback((e=>{F(e.placement.startsWith("top"))}),[]);T!==u&&(g(u),u||F(!1));const I=fe(),{colorPicker_label:R}=c.useTranslationBundle("@oracle/oraclejet-preact"),w=R(),V=s.jsx(W.ColorPicker,{height:I?void 0:"auto",onCommit:y,maxWidth:I?"100%":void 0,width:"100%",swatchSize:l,palette:a,testId:C,value:f}),U=!u||v&&!I||d||p||!(t||r||x&&x.length>0)||"efficient"!==S&&"reflow"!==S?void 0:s.jsx(n.FormFieldContext.Provider,{value:{isFocused:!0},children:s.jsx("div",{class:O.userAssistanceStyles,children:s.jsx(m.InlineUserAssistance,{assistiveText:t,fieldLabel:b,helpSourceLink:r,helpSourceText:i,messages:x,userAssistanceDensity:S})})}),k=C?C+(I?"_sheet":"_dropdown"):void 0,D=s.jsx("div",{class:O.dropdownStyles,children:s.jsx(q.SectionedContent,{paddingBlockEnd:"3.5x",paddingBlockStart:"3.5x",paddingInlineEnd:"3.5x",paddingInlineStart:"3.5x","aria-label":w,footer:U,hasFocusTrap:!0,main:V,role:"dialog",testId:k})});return I?s.jsx(z.Sheet,{isOpen:u,onClose:h,children:s.jsx(q.SectionedContent,{"aria-label":w,footer:U,hasFocusTrap:!0,main:V,role:"dialog",testId:k})}):s.jsx(q.StickyPositioningDropdown,{anchorRef:e,isOpen:u,onClose:h,onPosition:A,sizeOptions:{isMaxWidthAdjusted:!1,isMaxHeightAdjusted:!0},children:D})},fe=()=>"phone"===a.getClientHints().deviceType,ve=(e,s)=>{switch(s.type){case"colorChanged":case"colorSelected":return{...e,colorValue:s.data};case"reset":return{colorValue:s.data};default:return e}},Fe=({onCommit:e,onInput:s,value:t})=>{const[a,n]=o.useState(!1),r=o.useRef(null),i=o.useRef(null),c=o.useRef(!1),d=o.useRef(),u=o.useRef(t),p=o.useRef(t),m=o.useRef(t),b=o.useRef(!1),{state:h,dispatch:y}=(({value:e})=>{const[s,t]=o.useReducer(ve,{colorValue:e});return{state:s,dispatch:t}})({value:t});l.colorsAreDifferent(m.current,t)&&(m.current=t,l.colorsAreDifferent(t,h.colorValue)&&(y({type:"reset",data:t}),p.current=t,u.current=t)),o.useEffect((()=>{l.colorsAreDifferent(h.colorValue,p.current)&&(s({previousValue:p.current,value:h.colorValue}),p.current=h.colorValue),b.current&&l.colorsAreDifferent(h.colorValue,u.current)&&(e?.({previousValue:u.current,value:h.colorValue}),u.current=h.colorValue,b.current=!1)}),[e,s,h.colorValue]);const x=o.useCallback((e=>{y({type:"colorChanged",data:e.value})}),[y]),C=o.useCallback((()=>{l.colorsAreDifferent(u.current,h.colorValue)&&(e?.({value:h.colorValue,previousValue:u.current}),u.current=h.colorValue)}),[e,h.colorValue]),S=o.useCallback((()=>{c.current||n((e=>!e)),c.current=!1}),[]),f=o.useCallback((e=>{"outsideMousedown"===e.reason?(c.current=!0,clearTimeout(d.current),d.current=setTimeout((()=>{c.current=!1}),200)):"dismissed"!==e.reason&&"keyboardDismissed"!==e.reason||r.current?.focus(),n(!1)}),[]),v=o.useCallback((e=>{r.current?.focus(),b.current=!0,y({type:"colorSelected",data:e.value}),n(!1)}),[y]),F=o.useCallback((()=>{n(!0)}),[]),{triggerProps:T}=K.useDownToggle({isOpen:a,onToggle:F});return{colorIconActionHandler:S,colorPickerCommitHandler:v,dropdownCloseHandler:f,containerDropdownProps:T,colorValue:h.colorValue,iconRef:r,isOpen:a,colorCommitHandler:C,colorInputHandler:x,colorRef:i}},Te=t.forwardRef((({"aria-describedby":e,swatchSize:t,palette:a,value:r,isDisabled:i,isReadonly:d,labelEdge:u,labelStartWidth:p,isRequiredShown:b=!1,isRequired:h=!1,placeholder:y,hasClearIcon:x,columnSpan:C,textAlign:S,autoComplete:f,messages:v,assistiveText:F,helpSourceLink:T,helpSourceText:g,label:A,onCommit:I,onInput:R,testId:w,variant:V,userAssistanceDensity:U},k)=>{const{colorIconActionHandler:D,colorPickerCommitHandler:E,dropdownCloseHandler:j,colorValue:P,containerDropdownProps:_,iconRef:B,isOpen:L,colorCommitHandler:H,colorInputHandler:M,colorRef:N}=Fe({onCommit:I,onInput:R,value:r}),O=o.useRef(null),{inputColor_selectColor:z}=c.useTranslationBundle("@oracle/oraclejet-preact"),W=z(),{onKeyDown:q,...K}=_,{currentCommitValue:J,dispatch:se}=xe.useCurrentValueReducer({value:P}),oe=o.useCallback((e=>{se({type:"input",payload:e.value}),M?.(e)}),[M,se]),re=o.useCallback((e=>{se({type:"commit",payload:e.value}),H?.(e)}),[H,se]),{isDisabled:ie,isReadonly:ce,labelEdge:de,labelStartWidth:ue,textAlign:pe,userAssistanceDensity:me}=Q.useFormContext(),fe=i??ie,ve=d??ce,Te=u??de,Ae=p??ue,Ie=S??pe,Re=U??me,we=o.useRef(null),{focusProps:Ve,isFocused:Ue,methods:ke}=$.useFocusableTextField({isDisabled:fe,isReadonly:ve,enabledElementRef:N,readonlyElementRef:we}),{methods:De}=Ce.useSelectableTextField(N);o.useImperativeHandle(k,(()=>he.mergeProps(ke,De)),[ke,De]);const{hoverProps:Ee,isHover:je}=X.useHover({isDisabled:ve||fe||!1}),{formFieldContext:Pe,inputProps:_e,labelProps:Be,textFieldProps:Le,userAssistanceProps:He}=Y.useTextField({ariaDescribedBy:e,helpSourceLink:T,helpSourceText:g,isDisabled:fe,isFocused:Ue||L,isReadonly:ve,isRequiredShown:b,labelEdge:Te,messages:v,styleVariant:V,userAssistanceDensity:Re,value:P}),Me=o.useCallback((()=>{N.current?.focus();const e=void 0;P!==e&&oe?.({previousValue:P,value:e})}),[oe,P,N]),Ne=Z.useClearIcon({clearIcon:s.jsx(ye.ClearIcon,{onClick:Me,testId:`${w}_clearicon`}),display:x,hasValue:Pe.hasValue,isFocused:Ue,isEnabled:!ve&&!fe,isHover:je}),Oe=void 0!==A&&"inside"===Te,ze="none"!==Te?s.jsx(ee.Label,{...Be,children:A}):void 0,We={label:"none"!==Te?ze:void 0,labelEdge:"none"!==Te?Te:void 0,labelStartWidth:"none"!==Te?Ae:void 0},qe="none"===Te?A:void 0,Ge="efficient"===Re||"reflow"===Re?fe||ve?"efficient"!==Re?void 0:s.jsx(m.InlineUserAssistance,{userAssistanceDensity:Re,...He}):s.jsx(m.InlineUserAssistance,{assistiveText:F,fieldLabel:A,helpSourceLink:T,helpSourceText:g,messages:v,isRequiredShown:b,userAssistanceDensity:Re,...He}):void 0,Ke=o.useRef(null),Ze=O??Ke,$e="compact"===Re?s.jsx(be.CompactUserAssistance,{anchorRef:Ze,messages:v,assistiveText:F,...He}):void 0,Je=ve?s.jsx(le.ReadonlyTextFieldInput,{"aria-describedby":_e["aria-describedby"],"aria-label":qe,"aria-labelledby":Be.id,as:"div",elementRef:we,textAlign:Ie,value:P,hasEmptyLabel:""===A&&"none"===Te,hasInsideLabel:Oe}):s.jsx(te.TextFieldInput,{"aria-labelledby":Be.id,"aria-label":qe,autoComplete:f,currentCommitValue:J,hasEmptyLabel:""===A&&"none"===Te,hasEndContent:!1,hasInsideLabel:void 0!==ze&&"inside"===Te,hasStartContent:!0,inputRef:N,isRequired:h,placeholder:y,textAlign:Ie,type:ge()?"text":void 0,value:P,onCommit:re,onInput:oe,onKeyDown:q,..._e});return s.jsxs(s.Fragment,{children:[s.jsx(n.FormFieldContext.Provider,{value:Pe,children:ve?s.jsx(ae.ReadonlyTextField,{role:"presentation",columnSpan:C,compactUserAssistance:$e,inlineUserAssistance:Ge,onBlur:Ve.onFocusOut,onFocus:Ve.onFocusIn,ref:Ze,mainContent:Je,testId:w,...We}):s.jsx(ne.TextField,{endContent:Ne,columnSpan:C,compactUserAssistance:$e,inlineUserAssistance:Ge,mainContent:Je,onBlur:Ve.onFocusOut,onFocus:Ve.onFocusIn,startContent:s.jsx(G.ColorSwatch,{size:"xs","aria-haspopup":a?"grid":void 0,"aria-label":a?W:void 0,isDisabled:fe,isButton:!0,isTooltipDisabled:L,ref:B,testId:w?w+"_colorIcon":void 0,value:J,onToggle:fe||!a?void 0:D}),mainFieldRef:Ze,hasZeroStartMargin:!0,testId:w,...Le,...We,...Ee,...K})}),L&&!ve&&!fe&&s.jsx(Se,{anchorRef:O,assistiveText:F,helpSourceLink:T,helpSourceText:g,isDisabled:fe,isReadonly:ve,isOpen:L,label:A,onClose:j,onCommit:E,messages:v,testId:w?w+"_colorPicker":void 0,userAssistanceDensity:Re,value:P&&l.isValidColorValue(P)?P:void 0,palette:a,swatchSize:t})]})}));function ge(){const e=a.getClientHints().deviceType;return"phone"===e||"tablet"===e}Te.displayName="InputColor",e.InputColor=Te}));
|
|
2
|
-
//# sourceMappingURL=InputColor-
|
|
1
|
+
define(['exports', 'preact/jsx-runtime', 'preact/compat', 'preact/hooks', './swatchData-ef8329c2', './clientHints-6d361eaa', './FormFieldContext-a024b891', './logger-0f873e29', './TabbableModeContext-a9c97640', './useTranslationBundle-e4dd341e', 'css!./UserAssistanceStyles.styles.css', 'module', './UNSAFE_UserAssistance/themes/redwood/UserAssistanceVariants.css', './InlineUserAssistance-a59440e5', './Flex-4b81b412', 'css!./MessageBannerStyles.styles.css', 'module', './UNSAFE_MessageBanner/themes/redwood/MessageBannerVariants.css', 'preact', './LayerHost-0b288129', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-2bb62284', 'css!./IconStyle.styles.css', './IconButton-dc1be00e', 'css!./MessageStyles.styles.css', './MessageFormattingUtils-ea0be23e', './TransitionGroup-3b9d81b6', './MessagesContext-602a69a2', 'css!./HiddenAccessibleStyles.styles.css', 'css!./ComponentMessageStyles.styles.css', 'module', './UNSAFE_ComponentMessage/themes/redwood/ComponentMessageVariants.css', './Popup-6b57cc3e', './UNSAFE_Separator/themes/SeparatorStyles.css', 'css!./LabelStyles.styles.css', 'module', './UNSAFE_Label/themes/redwood/LabelVariants.css', './InputGroupContext-372087af', 'module', './UNSAFE_Popup/themes/redwood/PopupVariants.css', './UNSAFE_InputColor/themes/InputColorPickerDropdownStyles.css', './Sheet-1d02491d', './ColorPicker-141fa49d', './SectionedContent-74559d9d', './ColorSwatch-04ab5601', './useDownToggle-80b61b43', './useClearIcon-2bedc84f', './useFocusableTextField-8b755b15', './FormContext-6b0879a0', './useFormContext-b8cbbb21', './useHover-8b8a1496', './useTextField-3ab0a23b', './Label-701506b1', './keyboardUtils-fb6219eb', './TextFieldInput-f8635c62', 'css!./ObfuscatedTextFieldInputStyles.styles.css', './ReadonlyTextFieldInput-41384d7e', './StyledTextField-2b62c81d', './TextField-c8c71735', 'css!./LiveRegionStyles.styles.css', './UNSAFE_TextField/themes/TextFieldStyles.css', 'css!./SkeletonStyles.styles.css', 'css!./TextFieldLoadingStyles.styles.css', 'css!./TextFieldStyles.styles.css', 'module', './UNSAFE_TextField/themes/redwood/TextFieldVariants.css', './CompactUserAssistance-fcc04dcc', './mergeProps-bcfa6a92', './ClearIcon-b3c8c741', './useCurrentValueReducer-faded381', './useSelectableTextField-900d2860'], (function(e,s,t,o,a,l,n,r,i,c,d,u,p,m,b,h,y,x,C,S,f,v,F,T,g,A,I,R,w,V,U,k,D,E,j,P,_,B,L,H,M,N,O,z,W,q,G,K,Z,$,J,Q,X,Y,ee,se,te,oe,ae,le,ne,re,ie,ce,de,ue,pe,me,be,he,ye,xe,Ce){"use strict";const Se=({anchorRef:e,assistiveText:t,swatchSize:a,palette:l,helpSourceLink:r,helpSourceText:i,isDisabled:d,isOpen:u,isReadonly:p,label:b,onClose:h,onCommit:y,messages:x,testId:C,userAssistanceDensity:S,value:f})=>{const[v,F]=o.useState(!1),[T,g]=o.useState(u),A=o.useCallback((e=>{F(e.placement.startsWith("top"))}),[]);T!==u&&(g(u),u||F(!1));const I=fe(),{colorPicker_label:R}=c.useTranslationBundle("@oracle/oraclejet-preact"),w=R(),V=s.jsx(W.ColorPicker,{height:I?void 0:"auto",onCommit:y,maxWidth:I?"100%":void 0,width:"100%",swatchSize:a,palette:l,testId:C,value:f}),U=!u||v&&!I||d||p||!(t||r||x&&x.length>0)||"efficient"!==S&&"reflow"!==S?void 0:s.jsx(n.FormFieldContext.Provider,{value:{isFocused:!0},children:s.jsx("div",{class:O.userAssistanceStyles,children:s.jsx(m.InlineUserAssistance,{assistiveText:t,fieldLabel:b,helpSourceLink:r,helpSourceText:i,messages:x,userAssistanceDensity:S})})}),k=C?C+(I?"_sheet":"_dropdown"):void 0,D=s.jsx("div",{class:O.dropdownStyles,children:s.jsx(q.SectionedContent,{paddingBlockEnd:"3.5x",paddingBlockStart:"3.5x",paddingInlineEnd:"3.5x",paddingInlineStart:"3.5x","aria-label":w,footer:U,hasFocusTrap:!0,main:V,role:"dialog",testId:k})});return I?s.jsx(z.Sheet,{isOpen:u,onClose:h,children:s.jsx(q.SectionedContent,{"aria-label":w,footer:U,hasFocusTrap:!0,main:V,role:"dialog",testId:k})}):s.jsx(q.StickyPositioningDropdown,{anchorRef:e,isOpen:u,onClose:h,onPosition:A,sizeOptions:{isMaxWidthAdjusted:!1,isMaxHeightAdjusted:!0},children:D})},fe=()=>"phone"===l.getClientHints().deviceType,ve=(e,s)=>{switch(s.type){case"colorChanged":case"colorSelected":return{...e,colorValue:s.data};case"reset":return{colorValue:s.data};default:return e}},Fe=({onCommit:e,onInput:s,value:t})=>{const[l,n]=o.useState(!1),r=o.useRef(null),i=o.useRef(null),c=o.useRef(!1),d=o.useRef(),u=o.useRef(t),p=o.useRef(t),m=o.useRef(t),b=o.useRef(!1),{state:h,dispatch:y}=(({value:e})=>{const[s,t]=o.useReducer(ve,{colorValue:e});return{state:s,dispatch:t}})({value:t});a.colorsAreDifferent(m.current,t)&&(m.current=t,a.colorsAreDifferent(t,h.colorValue)&&(y({type:"reset",data:t}),p.current=t,u.current=t)),o.useEffect((()=>{a.colorsAreDifferent(h.colorValue,p.current)&&(s({previousValue:p.current,value:h.colorValue}),p.current=h.colorValue),b.current&&a.colorsAreDifferent(h.colorValue,u.current)&&(e?.({previousValue:u.current,value:h.colorValue}),u.current=h.colorValue,b.current=!1)}),[e,s,h.colorValue]);const x=o.useCallback((e=>{y({type:"colorChanged",data:e.value})}),[y]),C=o.useCallback((()=>{a.colorsAreDifferent(u.current,h.colorValue)&&(e?.({value:h.colorValue,previousValue:u.current}),u.current=h.colorValue)}),[e,h.colorValue]),S=o.useCallback((()=>{c.current||n((e=>!e)),c.current=!1}),[]),f=o.useCallback((e=>{"outsideMousedown"===e.reason?(c.current=!0,clearTimeout(d.current),d.current=setTimeout((()=>{c.current=!1}),200)):"dismissed"!==e.reason&&"keyboardDismissed"!==e.reason||r.current?.focus(),n(!1)}),[]),v=o.useCallback((e=>{r.current?.focus(),b.current=!0,y({type:"colorSelected",data:e.value}),n(!1)}),[y]),F=o.useCallback((()=>{n(!0)}),[]),{triggerProps:T}=K.useDownToggle({isOpen:l,onToggle:F});return{colorIconActionHandler:S,colorPickerCommitHandler:v,dropdownCloseHandler:f,containerDropdownProps:T,colorValue:h.colorValue,iconRef:r,isOpen:l,colorCommitHandler:C,colorInputHandler:x,colorRef:i}},Te=t.forwardRef((({"aria-describedby":e,swatchSize:t,palette:l,value:r,isDisabled:i,isReadonly:d,labelEdge:u,labelStartWidth:p,isRequiredShown:b=!1,isRequired:h=!1,placeholder:y,hasClearIcon:x,columnSpan:C,textAlign:S,autoComplete:f,messages:v,assistiveText:F,helpSourceLink:T,helpSourceText:g,label:A,onCommit:I,onInput:R,testId:w,variant:V,userAssistanceDensity:U},k)=>{const{colorIconActionHandler:D,colorPickerCommitHandler:E,dropdownCloseHandler:j,colorValue:P,containerDropdownProps:_,iconRef:B,isOpen:L,colorCommitHandler:H,colorInputHandler:M,colorRef:N}=Fe({onCommit:I,onInput:R,value:r}),O=o.useRef(null),{inputColor_selectColor:z}=c.useTranslationBundle("@oracle/oraclejet-preact"),W=z(),{onKeyDown:q,...K}=_,{currentCommitValue:J,dispatch:se}=xe.useCurrentValueReducer({value:P}),oe=o.useCallback((e=>{se({type:"input",payload:e.value}),M?.(e)}),[M,se]),re=o.useCallback((e=>{se({type:"commit",payload:e.value}),H?.(e)}),[H,se]),{isDisabled:ie,isReadonly:ce,labelEdge:de,labelStartWidth:ue,textAlign:pe,userAssistanceDensity:me}=Q.useFormContext(),fe=i??ie,ve=d??ce,Te=u??de,Ae=p??ue,Ie=S??pe,Re=U??me,we=o.useRef(null),{focusProps:Ve,isFocused:Ue,methods:ke}=$.useFocusableTextField({isDisabled:fe,isReadonly:ve,enabledElementRef:N,readonlyElementRef:we}),{methods:De}=Ce.useSelectableTextField(N);o.useImperativeHandle(k,(()=>he.mergeProps(ke,De)),[ke,De]);const{hoverProps:Ee,isHover:je}=X.useHover({isDisabled:ve||fe||!1}),{formFieldContext:Pe,inputProps:_e,labelProps:Be,textFieldProps:Le,userAssistanceProps:He}=Y.useTextField({ariaDescribedBy:e,helpSourceLink:T,helpSourceText:g,isDisabled:fe,isFocused:Ue||L,isReadonly:ve,isRequiredShown:b,labelEdge:Te,messages:v,styleVariant:V,userAssistanceDensity:Re,value:P}),Me=o.useCallback((()=>{N.current?.focus();const e=void 0;P!==e&&oe?.({previousValue:P,value:e})}),[oe,P,N]),Ne=Z.useClearIcon({clearIcon:s.jsx(ye.ClearIcon,{onClick:Me,testId:`${w}_clearicon`}),display:x,hasValue:Pe.hasValue,isFocused:Ue,isEnabled:!ve&&!fe,isHover:je}),Oe=void 0!==A&&"inside"===Te,ze="none"!==Te?s.jsx(ee.Label,{...Be,children:A}):void 0,We={label:"none"!==Te?ze:void 0,labelEdge:"none"!==Te?Te:void 0,labelStartWidth:"none"!==Te?Ae:void 0},qe="none"===Te?A:void 0,Ge="efficient"===Re||"reflow"===Re?fe||ve?"efficient"!==Re?void 0:s.jsx(m.InlineUserAssistance,{userAssistanceDensity:Re,...He}):s.jsx(m.InlineUserAssistance,{assistiveText:F,fieldLabel:A,helpSourceLink:T,helpSourceText:g,messages:v,isRequiredShown:b,userAssistanceDensity:Re,...He}):void 0,Ke=o.useRef(null),Ze=O??Ke,$e="compact"===Re?s.jsx(be.CompactUserAssistance,{anchorRef:Ze,messages:v,assistiveText:F,...He}):void 0,Je=ve?s.jsx(ae.ReadonlyTextFieldInput,{"aria-describedby":_e["aria-describedby"],"aria-label":qe,"aria-labelledby":Be.id,as:"div",elementRef:we,textAlign:Ie,value:P,hasEmptyLabel:""===A&&"none"===Te,hasInsideLabel:Oe}):s.jsx(te.TextFieldInput,{"aria-labelledby":Be.id,"aria-label":qe,autoComplete:f,currentCommitValue:J,hasEmptyLabel:""===A&&"none"===Te,hasEndContent:!1,hasInsideLabel:void 0!==ze&&"inside"===Te,hasStartContent:!0,inputRef:N,isRequired:h,placeholder:y,textAlign:Ie,type:ge()?"text":void 0,value:P,onCommit:re,onInput:oe,onKeyDown:q,..._e});return s.jsxs(s.Fragment,{children:[s.jsx(n.FormFieldContext.Provider,{value:Pe,children:ve?s.jsx(le.ReadonlyTextField,{role:"presentation",columnSpan:C,compactUserAssistance:$e,inlineUserAssistance:Ge,onBlur:Ve.onFocusOut,onFocus:Ve.onFocusIn,ref:Ze,mainContent:Je,testId:w,...We}):s.jsx(ne.TextField,{endContent:Ne,columnSpan:C,compactUserAssistance:$e,inlineUserAssistance:Ge,mainContent:Je,onBlur:Ve.onFocusOut,onFocus:Ve.onFocusIn,startContent:s.jsx(G.ColorSwatch,{size:"xs","aria-haspopup":l?"grid":void 0,"aria-label":l?W:void 0,isDisabled:fe,isButton:!0,isTooltipDisabled:L,ref:B,testId:w?w+"_colorIcon":void 0,value:J,onToggle:fe||!l?void 0:D}),mainFieldRef:Ze,hasZeroStartMargin:!0,testId:w,...Le,...We,...Ee,...K})}),L&&!ve&&!fe&&s.jsx(Se,{anchorRef:O,assistiveText:F,helpSourceLink:T,helpSourceText:g,isDisabled:fe,isReadonly:ve,isOpen:L,label:A,onClose:j,onCommit:E,messages:v,testId:w?w+"_colorPicker":void 0,userAssistanceDensity:Re,value:P&&a.isValidColorValue(P)?P:void 0,palette:l,swatchSize:t})]})}));function ge(){const e=l.getClientHints().deviceType;return"phone"===e||"tablet"===e}Te.displayName="InputColor",e.InputColor=Te}));
|
|
2
|
+
//# sourceMappingURL=InputColor-58e3fce3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputColor-51d7e40c.js","sources":["../../src/UNSAFE_InputColor/InputColorPickerDropdown.tsx","../../src/UNSAFE_InputColor/useInputColorState.ts","../../src/UNSAFE_InputColor/useInputColor.ts","../../src/UNSAFE_InputColor/InputColor.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 { ColorPicker } from '#UNSAFE_ColorPicker';\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 { dropdownStyles, userAssistanceStyles } from './themes/InputColorPickerDropdownStyles.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';\nimport { InputColorPublicProps as InputColorProps } from './InputColor.types';\n\ntype StickyPositioningDropdownProps = ComponentProps<typeof StickyPositioningDropdown>;\ntype ColorPickerProps = ComponentProps<typeof ColorPicker>;\ntype PickedPropsFromColorPicker = Pick<ColorPickerProps, 'value' | 'onCommit'>;\ntype PickedPropsFromDropdown = Omit<StickyPositioningDropdownProps, 'onClose'>;\ntype CloseDetail = SheetCloseDetail | DropdownCloseDetail;\ntype PickedPropsFromInputColor = Pick<\n InputColorProps,\n | 'swatchSize'\n | 'palette'\n | 'value'\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 Props = PickedPropsFromColorPicker &\n PickedPropsFromInputColor &\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 ColorPicker either inside a dropdown or sheet; in mobile,\n * 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 InputColorPickerDropdown = ({\n anchorRef,\n assistiveText,\n swatchSize,\n palette,\n helpSourceLink,\n helpSourceText,\n isDisabled,\n isOpen,\n isReadonly,\n label,\n onClose,\n onCommit,\n messages,\n testId,\n userAssistanceDensity,\n value\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 { colorPicker_label } = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const colorPickerAriaLabel = colorPicker_label();\n\n const colorPickerMainContent = (\n <ColorPicker\n height={!shouldShowSheet ? 'auto' : undefined}\n onCommit={onCommit}\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 swatchSize={swatchSize}\n palette={palette}\n testId={testId}\n value={value}\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: color 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 paddingBlockEnd=\"3.5x\"\n paddingBlockStart=\"3.5x\"\n paddingInlineEnd=\"3.5x\"\n paddingInlineStart=\"3.5x\"\n aria-label={colorPickerAriaLabel}\n footer={inlineUserAssistanceFooter}\n hasFocusTrap={true}\n main={colorPickerMainContent}\n role=\"dialog\"\n testId={contentTestId}\n />\n </div>\n );\n\n const dropdown = shouldShowSheet ? (\n <Sheet isOpen={isOpen} onClose={onClose}>\n <SectionedContent\n aria-label={colorPickerAriaLabel}\n footer={inlineUserAssistanceFooter}\n hasFocusTrap={true}\n main={colorPickerMainContent}\n role=\"dialog\"\n testId={contentTestId}\n />\n </Sheet>\n ) : (\n <StickyPositioningDropdown\n anchorRef={anchorRef}\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 { InputColorPickerDropdown, 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 ColorValue } from '#utils/UNSAFE_color';\n\ntype InputColorState = {\n /**\n * Represents the current color value of the component. The user either selected\n * the color in the picker, or typed it into the color field.\n */\n colorValue?: ColorValue;\n};\n\ntype ColorChangedAction = { type: 'colorChanged'; data?: ColorValue };\ntype ColorResetAction = { type: 'reset'; data?: ColorValue };\ntype ColorSelectedAction = { type: 'colorSelected'; data?: ColorValue };\ntype InputColorReducerAction = ColorChangedAction | ColorResetAction | ColorSelectedAction;\n\n// Use a reducer function to manage InputColorState.\nconst inputColorReducer = (\n state: InputColorState,\n action: InputColorReducerAction\n): InputColorState => {\n switch (action.type) {\n case 'colorChanged': {\n return {\n ...state,\n colorValue: action.data\n };\n }\n case 'colorSelected': {\n return { ...state, colorValue: action.data };\n }\n case 'reset': {\n return {\n colorValue: action.data\n };\n }\n default:\n return state;\n }\n};\n\ntype Props = {\n /**\n * The value of the InputColor, or undefined.\n */\n value?: ColorValue;\n};\n\n/**\n * useInputColorState calls useReducer to determine the initial state. Any changes to that state\n * are managed by dispatching actions to the reducer function.\n */\nconst useInputColorState = ({ value }: Props) => {\n const [state, dispatch] = useReducer(inputColorReducer, {\n colorValue: value\n });\n\n return { state, dispatch };\n};\n\nexport { useInputColorState };\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 { useCallback, useEffect, useRef, useState } from 'preact/hooks';\nimport { ElementRef } from 'preact/compat';\nimport { colorsAreDifferent, type ColorValue } from '#utils/UNSAFE_color';\nimport { ColorPicker } from '#UNSAFE_ColorPicker';\nimport { ColorSwatch } from '#UNSAFE_ColorSwatch';\nimport { CloseDetail, InputColorPickerDropdown } from './InputColorPickerDropdown';\nimport { useInputColorState } from './useInputColorState';\nimport type { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport { useDownToggle } from '#hooks/UNSAFE_useDownToggle';\nimport { InputColorPublicProps as InputColorProps } from './InputColor.types';\n\ntype SwatchHandle = ElementRef<typeof ColorSwatch>;\n\ntype ColorPickerProps = ComponentProps<typeof ColorPicker>;\ntype ColorSwatchProps = ComponentProps<typeof ColorSwatch>;\ntype DropdownProps = ComponentProps<typeof InputColorPickerDropdown>;\n\ntype Props = {\n onCommit: InputColorProps['onCommit'];\n onInput: InputColorProps['onInput'];\n value: InputColorProps['value'];\n};\n\n/**\n * Hook that provides handlers and other functionality for InputColor.\n */\nconst useInputColor = ({ onCommit, onInput, value: currentValue }: Props) => {\n // Whether the dropdown is open.\n const [isOpen, setIsOpen] = useState<boolean>(false);\n\n // Ref to the swatch icon button.\n const iconRef: RefObject<SwatchHandle> = useRef<SwatchHandle>(null);\n\n // Ref to the text input which holds color value\n const colorRef: RefObject<HTMLInputElement> = useRef<HTMLInputElement>(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 color values passed to onInput and onCommit.\n const lastCommittedColorRef = useRef<ColorValue | undefined>(currentValue);\n const lastColorRef = useRef<ColorValue | 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<ColorValue | undefined>(currentValue);\n\n // Keep track of whether a color was selected in the color picker.\n const colorSelectedRef = useRef<boolean>(false);\n\n const { state, dispatch } = useInputColorState({ 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 (colorsAreDifferent(lastValueFromParentRef.current, currentValue)) {\n lastValueFromParentRef.current = currentValue;\n if (colorsAreDifferent(currentValue, state.colorValue)) {\n dispatch({ type: 'reset', data: currentValue });\n lastColorRef.current = currentValue;\n lastCommittedColorRef.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 (colorsAreDifferent(state.colorValue, lastColorRef.current)) {\n onInput({ previousValue: lastColorRef.current, value: state.colorValue });\n lastColorRef.current = state.colorValue;\n }\n if (\n colorSelectedRef.current &&\n colorsAreDifferent(state.colorValue, lastCommittedColorRef.current)\n ) {\n onCommit?.({ previousValue: lastCommittedColorRef.current, value: state.colorValue });\n lastCommittedColorRef.current = state.colorValue;\n colorSelectedRef.current = false;\n }\n }, [onCommit, onInput, state.colorValue]);\n\n // Handle onInput from InputColor as values are entered in the input field.\n // We wait for the state to update before calling onInput.\n const colorInputHandler = useCallback<InputColorProps['onInput']>(\n (detail: ValueUpdateDetail<ColorValue>) => {\n dispatch({ type: 'colorChanged', data: detail.value });\n },\n [dispatch]\n );\n\n // Handle onCommit from InputColor, which is called when the user presses Enter or the field is blurred.\n const colorCommitHandler = useCallback<NonNullable<InputColorProps['onCommit']>>(() => {\n // If the current color value differs from the last committed value, then call onCommit.\n if (colorsAreDifferent(lastCommittedColorRef.current, state.colorValue)) {\n onCommit?.({ value: state.colorValue, previousValue: lastCommittedColorRef.current });\n lastCommittedColorRef.current = state.colorValue;\n }\n }, [onCommit, state.colorValue]);\n\n // Respond to onAction event from the swatch icon button. Toggles the color picker dropdown.\n const colorIconActionHandler = useCallback<NonNullable<ColorSwatchProps['onToggle']>>(() => {\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 swatch 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 swatch icon when the dropdown is closed.\n iconRef.current?.focus();\n }\n setIsOpen(false);\n },\n []\n );\n\n // Handle color selection in the picker.\n // - Updates the value in state.\n // - Closes the dropdown.\n // - Sets focus to the color field.\n const colorPickerCommitHandler = useCallback<ColorPickerProps['onCommit']>(\n (detail: ValueUpdateDetail<ColorValue>) => {\n // Set focus to the swatch when a color is selected.\n iconRef.current?.focus();\n\n // Set a ref indicating a color was selected.\n colorSelectedRef.current = true;\n dispatch({ type: 'colorSelected', data: detail.value });\n setIsOpen(false);\n },\n [dispatch]\n );\n\n // The Redwood UX design calls for the dropdown to open when the down arrow is pressed.\n // Handle opening the dropdown when the down arrow is pressed in the text edit field.\n const colorPickerDownHandler = useCallback(() => {\n setIsOpen(true);\n }, []);\n\n const { triggerProps: containerDropdownProps } = useDownToggle({\n isOpen,\n onToggle: colorPickerDownHandler\n });\n\n return {\n colorIconActionHandler,\n colorPickerCommitHandler,\n dropdownCloseHandler,\n containerDropdownProps,\n colorValue: state.colorValue,\n iconRef,\n isOpen,\n colorCommitHandler,\n colorInputHandler,\n colorRef\n };\n};\n\nexport { useInputColor };\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 { Ref } from 'preact';\nimport { forwardRef, ElementRef } from 'preact/compat';\nimport { useCallback, useImperativeHandle, useRef } from 'preact/hooks';\nimport { type BundleType } from '../resources/nls/bundle';\nimport { type ColorValue, isValidColorValue } from '#utils/UNSAFE_color';\nimport { InputColorPickerDropdown } from './InputColorPickerDropdown';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport { ColorSwatch } from '#UNSAFE_ColorSwatch';\nimport { useInputColor } from './useInputColor';\n\nimport { useClearIcon } from '../hooks/UNSAFE_useClearIcon';\nimport { FocusableHandle, useFocusableTextField } from '../hooks/UNSAFE_useFocusableTextField';\nimport { useFormContext } from '../hooks/UNSAFE_useFormContext';\nimport { FormFieldContext } from '../hooks/UNSAFE_useFormFieldContext';\nimport { useHover } from '../hooks/UNSAFE_useHover';\nimport { useTextField } from '../hooks/UNSAFE_useTextField';\nimport { Label } from '../UNSAFE_Label';\n\nimport {\n ReadonlyTextField,\n ReadonlyTextFieldInput,\n TextField,\n TextFieldInput\n} from '../UNSAFE_TextField';\nimport { CompactUserAssistance, InlineUserAssistance } from '../UNSAFE_UserAssistance';\nimport { getClientHints } from '../utils/PRIVATE_clientHints';\nimport { ClearIcon } from '../PRIVATE_ClearIcon/ClearIcon';\nimport { useCurrentValueReducer } from '../hooks/UNSAFE_useCurrentValueReducer';\nimport { SelectableHandle, useSelectableTextField } from '#hooks/UNSAFE_useSelectableTextField';\nimport { mergeProps } from '#utils/UNSAFE_mergeProps';\nimport { InputColorPublicProps as Props } from './InputColor.types';\n\ntype SwatchHandle = ElementRef<typeof ColorSwatch>;\n\ntype FocusSelectHandle = FocusableHandle & SelectableHandle;\n\n/**\n * An Input Color is a form field that allows users to select or input a color value,\n * using a color picker or by enterihg a HEX code.\n */\nexport const InputColor = forwardRef(\n (\n {\n 'aria-describedby': ariaDescribedBy,\n swatchSize,\n palette,\n value,\n isDisabled: propIsDisabled,\n isReadonly: propIsReadonly,\n labelEdge: propLabelEdge,\n labelStartWidth: propLabelStartWidth,\n isRequiredShown = false,\n isRequired = false,\n placeholder,\n hasClearIcon,\n columnSpan,\n textAlign: propTextAlign,\n autoComplete,\n messages,\n assistiveText,\n helpSourceLink,\n helpSourceText,\n label,\n onCommit,\n onInput,\n testId,\n variant,\n userAssistanceDensity: propUserAssistanceDensity\n }: Props,\n ref?: Ref<FocusSelectHandle>\n ) => {\n const {\n colorIconActionHandler,\n colorPickerCommitHandler,\n dropdownCloseHandler,\n colorValue,\n containerDropdownProps,\n iconRef,\n isOpen,\n colorCommitHandler,\n colorInputHandler,\n colorRef: enabledElementRef\n } = useInputColor({\n onCommit,\n onInput,\n value\n });\n\n const mainFieldRef = useRef<HTMLDivElement>(null);\n const { inputColor_selectColor } = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const colorIconAriaLabel = inputColor_selectColor();\n const { onKeyDown, ...inputContainerAriaProps } = containerDropdownProps;\n\n const { currentCommitValue, dispatch } = useCurrentValueReducer({ value: colorValue });\n const onInputAndDispatch = useCallback(\n (detail: ValueUpdateDetail<ColorValue>) => {\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 colorInputHandler?.(detail);\n },\n [colorInputHandler, dispatch]\n );\n const onCommitAndDispatch = useCallback(\n (detail: ValueUpdateDetail<ColorValue>) => {\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 colorCommitHandler?.(detail);\n },\n [colorCommitHandler, dispatch]\n );\n\n const startContent = () => (\n <ColorSwatch\n size=\"xs\"\n aria-haspopup={palette ? 'grid' : undefined} // with only palette, grid is a better choice than dialog for now.\n aria-label={palette ? colorIconAriaLabel : undefined}\n isDisabled={isDisabled}\n isButton={true}\n isTooltipDisabled={isOpen}\n ref={iconRef as Ref<SwatchHandle>}\n testId={testId ? testId + '_colorIcon' : undefined}\n value={currentCommitValue as ColorValue}\n onToggle={isDisabled || !palette ? undefined : colorIconActionHandler}\n />\n );\n const {\n isDisabled: isFormDisabled,\n isReadonly: isFormReadonly,\n labelEdge: formLabelEdge,\n labelStartWidth: formLabelStartWidth,\n textAlign: formTextAlign,\n userAssistanceDensity: formUserAssistanceDensity\n } = useFormContext();\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;\n const userAssistanceDensity = propUserAssistanceDensity ?? formUserAssistanceDensity;\n\n const readonlyElementRef = useRef<HTMLDivElement>(null);\n\n const {\n focusProps,\n isFocused,\n methods: focusMethods\n } = useFocusableTextField<HTMLInputElement, HTMLDivElement>({\n isDisabled,\n isReadonly,\n enabledElementRef,\n readonlyElementRef\n });\n\n const { methods: selectMethods } = useSelectableTextField<HTMLInputElement>(enabledElementRef);\n\n useImperativeHandle(ref!, () => mergeProps(focusMethods, selectMethods), [\n focusMethods,\n selectMethods\n ]);\n\n const { hoverProps, isHover } = useHover({ isDisabled: isReadonly || isDisabled || false });\n\n const { formFieldContext, inputProps, labelProps, textFieldProps, userAssistanceProps } =\n useTextField({\n ariaDescribedBy,\n helpSourceLink,\n helpSourceText,\n isDisabled,\n isFocused: isFocused || isOpen,\n isReadonly,\n isRequiredShown,\n labelEdge,\n messages,\n styleVariant: variant,\n userAssistanceDensity,\n value: colorValue\n });\n\n const onClickClearIcon = useCallback(() => {\n // Clicking the clear icon should put the focus on the input field\n enabledElementRef.current?.focus();\n // Send an event to clear the field's value if the value is not already cleared\n const nextValue = undefined;\n if (colorValue === nextValue) return;\n onInputAndDispatch?.({ previousValue: colorValue, value: nextValue });\n }, [onInputAndDispatch, colorValue, enabledElementRef]);\n\n const maybeClearIcon = useClearIcon({\n clearIcon: <ClearIcon onClick={onClickClearIcon} testId={`${testId}_clearicon`} />,\n display: hasClearIcon,\n hasValue: formFieldContext.hasValue,\n isFocused,\n isEnabled: !isReadonly && !isDisabled,\n isHover\n });\n\n const hasInsideLabel = label !== undefined && labelEdge === 'inside';\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 };\n\n const ariaLabel = labelEdge === 'none' ? label : undefined;\n const isInlineDensity =\n userAssistanceDensity === 'efficient' || userAssistanceDensity === 'reflow';\n\n const inlineUserAssistance = isInlineDensity ? (\n isDisabled || isReadonly ? (\n // save space for user assistance if density is 'efficient', even though we don't\n // render user assistance for disabled or readonly fields\n userAssistanceDensity !== 'efficient' ? undefined : (\n <InlineUserAssistance\n userAssistanceDensity={userAssistanceDensity}\n {...userAssistanceProps}\n />\n )\n ) : (\n <InlineUserAssistance\n assistiveText={assistiveText}\n fieldLabel={label}\n helpSourceLink={helpSourceLink}\n helpSourceText={helpSourceText}\n messages={messages}\n isRequiredShown={isRequiredShown}\n userAssistanceDensity={userAssistanceDensity}\n {...userAssistanceProps}\n />\n )\n ) : undefined;\n\n const aRef = useRef<HTMLDivElement>(null);\n const anchorRef = mainFieldRef ?? aRef;\n\n const compactUserAssistance =\n userAssistanceDensity === 'compact' ? (\n <CompactUserAssistance\n anchorRef={anchorRef}\n messages={messages}\n assistiveText={assistiveText}\n {...userAssistanceProps}\n />\n ) : undefined;\n\n const mainContent = isReadonly ? (\n <ReadonlyTextFieldInput\n aria-describedby={inputProps['aria-describedby']}\n aria-label={ariaLabel}\n aria-labelledby={labelProps.id}\n as=\"div\"\n elementRef={readonlyElementRef}\n textAlign={textAlign}\n value={colorValue}\n hasEmptyLabel={label === '' && labelEdge === 'none'}\n hasInsideLabel={hasInsideLabel}\n />\n ) : (\n <TextFieldInput\n aria-labelledby={labelProps.id}\n aria-label={ariaLabel}\n autoComplete={autoComplete}\n currentCommitValue={currentCommitValue}\n hasEmptyLabel={label === '' && labelEdge === 'none'}\n hasEndContent={false}\n hasInsideLabel={labelComp !== undefined && labelEdge === 'inside'}\n hasStartContent={true}\n inputRef={enabledElementRef}\n isRequired={isRequired}\n placeholder={placeholder}\n textAlign={textAlign}\n type={isMobile() ? 'text' : undefined}\n value={colorValue}\n onCommit={\n onCommitAndDispatch as (detail: ValueUpdateDetail<string>) => {\n value: string;\n }\n }\n onInput={\n onInputAndDispatch as (detail: ValueUpdateDetail<string>) => {\n value: string;\n }\n }\n onKeyDown={onKeyDown}\n {...inputProps}\n />\n );\n\n return (\n <>\n <FormFieldContext.Provider value={formFieldContext}>\n {isReadonly ? (\n <ReadonlyTextField\n role=\"presentation\"\n columnSpan={columnSpan}\n compactUserAssistance={compactUserAssistance}\n inlineUserAssistance={inlineUserAssistance}\n onBlur={focusProps.onFocusOut}\n onFocus={focusProps.onFocusIn}\n ref={anchorRef}\n mainContent={mainContent}\n testId={testId}\n {...fieldLabelProps}></ReadonlyTextField>\n ) : (\n <TextField\n endContent={maybeClearIcon}\n columnSpan={columnSpan}\n compactUserAssistance={compactUserAssistance}\n inlineUserAssistance={inlineUserAssistance}\n mainContent={mainContent}\n onBlur={focusProps.onFocusOut}\n onFocus={focusProps.onFocusIn}\n startContent={startContent()}\n mainFieldRef={anchorRef}\n hasZeroStartMargin={true}\n testId={testId}\n {...textFieldProps}\n {...fieldLabelProps}\n {...hoverProps}\n {...inputContainerAriaProps}\n />\n )}\n </FormFieldContext.Provider>\n\n {isOpen && !isReadonly && !isDisabled && (\n <InputColorPickerDropdown\n anchorRef={mainFieldRef}\n assistiveText={assistiveText}\n helpSourceLink={helpSourceLink}\n helpSourceText={helpSourceText}\n isDisabled={isDisabled}\n isReadonly={isReadonly}\n isOpen={isOpen}\n label={label}\n onClose={dropdownCloseHandler}\n onCommit={colorPickerCommitHandler}\n messages={messages}\n testId={testId ? testId + '_colorPicker' : undefined}\n userAssistanceDensity={userAssistanceDensity}\n // memoize this for performance\n value={colorValue && isValidColorValue(colorValue) ? colorValue : undefined}\n palette={palette}\n swatchSize={swatchSize}\n />\n )}\n </>\n );\n }\n);\n\n/**\n * Helper function to determine whether the current device is a mobile device\n * @returns true if running on a mobile device, false otherwise\n */\nfunction isMobile() {\n const deviceType = getClientHints().deviceType;\n return deviceType === 'phone' || deviceType === 'tablet';\n}\nInputColor.displayName = 'InputColor';\n"],"names":["InputColorPickerDropdown","anchorRef","assistiveText","swatchSize","palette","helpSourceLink","helpSourceText","isDisabled","isOpen","isReadonly","label","onClose","onCommit","messages","testId","userAssistanceDensity","value","isDropdownAbove","setDropdownAbove","useState","prevIsOpen","setPrevIsOpen","handleDropdownPosition","useCallback","data","placement","startsWith","shouldShowSheet","isPhone","colorPicker_label","useTranslationBundle","colorPickerAriaLabel","colorPickerMainContent","_jsx","ColorPicker","height","undefined","maxWidth","width","inlineUserAssistanceFooter","length","FormFieldContext","Provider","isFocused","children","jsx","class","userAssistanceStyles","InlineUserAssistance","fieldLabel","contentTestId","dropdownContent","dropdownStyles","SectionedContent","paddingBlockEnd","paddingBlockStart","paddingInlineEnd","paddingInlineStart","footer","hasFocusTrap","main","role","Sheet","StickyPositioningDropdown","onPosition","sizeOptions","isMaxWidthAdjusted","isMaxHeightAdjusted","getClientHints","deviceType","inputColorReducer","state","action","type","colorValue","useInputColor","onInput","currentValue","setIsOpen","iconRef","useRef","colorRef","outsideMousedownRef","outsideMousedownTimerRef","lastCommittedColorRef","lastColorRef","lastValueFromParentRef","colorSelectedRef","dispatch","useReducer","useInputColorState","colorsAreDifferent","current","useEffect","previousValue","colorInputHandler","detail","colorCommitHandler","colorIconActionHandler","dropdownCloseHandler","reason","clearTimeout","setTimeout","focus","colorPickerCommitHandler","colorPickerDownHandler","triggerProps","containerDropdownProps","useDownToggle","onToggle","InputColor","forwardRef","ariaDescribedBy","propIsDisabled","propIsReadonly","labelEdge","propLabelEdge","labelStartWidth","propLabelStartWidth","isRequiredShown","isRequired","placeholder","hasClearIcon","columnSpan","textAlign","propTextAlign","autoComplete","variant","propUserAssistanceDensity","ref","enabledElementRef","mainFieldRef","inputColor_selectColor","colorIconAriaLabel","onKeyDown","inputContainerAriaProps","currentCommitValue","useCurrentValueReducer","onInputAndDispatch","payload","onCommitAndDispatch","isFormDisabled","isFormReadonly","formLabelEdge","formLabelStartWidth","formTextAlign","formUserAssistanceDensity","useFormContext","readonlyElementRef","focusProps","methods","focusMethods","useFocusableTextField","selectMethods","useSelectableTextField","useImperativeHandle","mergeProps","hoverProps","isHover","useHover","formFieldContext","inputProps","labelProps","textFieldProps","userAssistanceProps","useTextField","styleVariant","onClickClearIcon","nextValue","maybeClearIcon","useClearIcon","clearIcon","ClearIcon","onClick","display","hasValue","isEnabled","hasInsideLabel","labelComp","Label","fieldLabelProps","ariaLabel","inlineUserAssistance","aRef","compactUserAssistance","CompactUserAssistance","mainContent","ReadonlyTextFieldInput","id","as","elementRef","hasEmptyLabel","TextFieldInput","hasEndContent","hasStartContent","inputRef","isMobile","_jsxs","ReadonlyTextField","onBlur","onFocusOut","onFocus","onFocusIn","TextField","endContent","startContent","ColorSwatch","size","isButton","isTooltipDisabled","hasZeroStartMargin","isValidColorValue","displayName"],"mappings":"ixFAwEA,MAAMA,GAA2B,EAC/BC,YACAC,gBACAC,aACAC,UACAC,iBACAC,iBACAC,aACAC,SACAC,aACAC,QACAC,UACAC,WACAC,WACAC,SACAC,wBACAC,YAGA,MAAOC,EAAiBC,GAAoBC,EAAQA,UAAC,IAC9CC,EAAYC,GAAiBF,EAAQA,SAACX,GACvCc,EAAyBC,eAE5BC,IACDN,EAAiBM,EAAKC,UAAUC,WAAW,OAAO,GACjD,IAECN,IAAeZ,IACjBa,EAAcb,GACTA,GACHU,GAAiB,IAIrB,MAMMS,EAAkBC,MAElBC,kBAAEA,GAAsBC,EAAoBA,qBAAa,4BACzDC,EAAuBF,IAEvBG,EACJC,MAACC,EAAAA,YACC,CAAAC,OAASR,OAA2BS,EAAT,OAC3BxB,SAAUA,EAEVyB,SAAUV,EAAkB,YAASS,EACrCE,MAAM,OACNnC,WAAYA,EACZC,QAASA,EACTU,OAAQA,EACRE,MAAOA,IAILuB,GACJ/B,GACES,IAAmBU,GACpBpB,GACAE,KACAP,GAAiBG,GAAmBQ,GAAYA,EAAS2B,OAAS,IACxC,cAA1BzB,GAAmE,WAA1BA,OAatCqB,EAZFH,MAACQ,EAAAA,iBAAiBC,SAAQ,CAAC1B,MAAO,CAAE2B,WAAW,GAAMC,SACnDX,EAAKY,IAAA,MAAA,CAAAC,MAAOC,gCACVd,EAAAA,IAACe,EAAAA,qBACC,CAA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,IACzB0B,EAAAA,IAACjC,GAAwB,CACvBC,UAAWkI,EACXjI,cAAeA,EACfG,eAAgBA,EAChBC,eAAgBA,EAChBC,WAAYA,GACZE,WAAYA,GACZD,OAAQA,EACRE,MAAOA,EACPC,QAASwF,EACTvF,SAAU4F,EACV3F,SAAUA,EACVC,OAAQA,EAASA,EAAS,oBAAiBsB,EAC3CrB,sBAAuBA,GAEvBC,MAAO0D,GAAcyI,EAAAA,kBAAkBzI,GAAcA,OAAatC,EAClEhC,QAASA,EACTD,WAAYA,MAIlB,IAQN,SAASiM,KACP,MAAM/H,EAAaD,mBAAiBC,WACpC,MAAsB,UAAfA,GAAyC,WAAfA,CACnC,CACAyC,GAAWsG,YAAc"}
|
|
1
|
+
{"version":3,"file":"InputColor-58e3fce3.js","sources":["../../src/UNSAFE_InputColor/InputColorPickerDropdown.tsx","../../src/UNSAFE_InputColor/useInputColorState.ts","../../src/UNSAFE_InputColor/useInputColor.ts","../../src/UNSAFE_InputColor/InputColor.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 { ColorPicker } from '#UNSAFE_ColorPicker';\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 { dropdownStyles, userAssistanceStyles } from './themes/InputColorPickerDropdownStyles.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';\nimport { InputColorPublicProps as InputColorProps } from './InputColor.types';\n\ntype StickyPositioningDropdownProps = ComponentProps<typeof StickyPositioningDropdown>;\ntype ColorPickerProps = ComponentProps<typeof ColorPicker>;\ntype PickedPropsFromColorPicker = Pick<ColorPickerProps, 'value' | 'onCommit'>;\ntype PickedPropsFromDropdown = Omit<StickyPositioningDropdownProps, 'onClose'>;\ntype CloseDetail = SheetCloseDetail | DropdownCloseDetail;\ntype PickedPropsFromInputColor = Pick<\n InputColorProps,\n | 'swatchSize'\n | 'palette'\n | 'value'\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 Props = PickedPropsFromColorPicker &\n PickedPropsFromInputColor &\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 ColorPicker either inside a dropdown or sheet; in mobile,\n * 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 InputColorPickerDropdown = ({\n anchorRef,\n assistiveText,\n swatchSize,\n palette,\n helpSourceLink,\n helpSourceText,\n isDisabled,\n isOpen,\n isReadonly,\n label,\n onClose,\n onCommit,\n messages,\n testId,\n userAssistanceDensity,\n value\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 { colorPicker_label } = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const colorPickerAriaLabel = colorPicker_label();\n\n const colorPickerMainContent = (\n <ColorPicker\n height={!shouldShowSheet ? 'auto' : undefined}\n onCommit={onCommit}\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 swatchSize={swatchSize}\n palette={palette}\n testId={testId}\n value={value}\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: color 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 paddingBlockEnd=\"3.5x\"\n paddingBlockStart=\"3.5x\"\n paddingInlineEnd=\"3.5x\"\n paddingInlineStart=\"3.5x\"\n aria-label={colorPickerAriaLabel}\n footer={inlineUserAssistanceFooter}\n hasFocusTrap={true}\n main={colorPickerMainContent}\n role=\"dialog\"\n testId={contentTestId}\n />\n </div>\n );\n\n const dropdown = shouldShowSheet ? (\n <Sheet isOpen={isOpen} onClose={onClose}>\n <SectionedContent\n aria-label={colorPickerAriaLabel}\n footer={inlineUserAssistanceFooter}\n hasFocusTrap={true}\n main={colorPickerMainContent}\n role=\"dialog\"\n testId={contentTestId}\n />\n </Sheet>\n ) : (\n <StickyPositioningDropdown\n anchorRef={anchorRef}\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 { InputColorPickerDropdown, 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 ColorValue } from '#utils/UNSAFE_color';\n\ntype InputColorState = {\n /**\n * Represents the current color value of the component. The user either selected\n * the color in the picker, or typed it into the color field.\n */\n colorValue?: ColorValue;\n};\n\ntype ColorChangedAction = { type: 'colorChanged'; data?: ColorValue };\ntype ColorResetAction = { type: 'reset'; data?: ColorValue };\ntype ColorSelectedAction = { type: 'colorSelected'; data?: ColorValue };\ntype InputColorReducerAction = ColorChangedAction | ColorResetAction | ColorSelectedAction;\n\n// Use a reducer function to manage InputColorState.\nconst inputColorReducer = (\n state: InputColorState,\n action: InputColorReducerAction\n): InputColorState => {\n switch (action.type) {\n case 'colorChanged': {\n return {\n ...state,\n colorValue: action.data\n };\n }\n case 'colorSelected': {\n return { ...state, colorValue: action.data };\n }\n case 'reset': {\n return {\n colorValue: action.data\n };\n }\n default:\n return state;\n }\n};\n\ntype Props = {\n /**\n * The value of the InputColor, or undefined.\n */\n value?: ColorValue;\n};\n\n/**\n * useInputColorState calls useReducer to determine the initial state. Any changes to that state\n * are managed by dispatching actions to the reducer function.\n */\nconst useInputColorState = ({ value }: Props) => {\n const [state, dispatch] = useReducer(inputColorReducer, {\n colorValue: value\n });\n\n return { state, dispatch };\n};\n\nexport { useInputColorState };\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 { useCallback, useEffect, useRef, useState } from 'preact/hooks';\nimport { ElementRef } from 'preact/compat';\nimport { colorsAreDifferent, type ColorValue } from '#utils/UNSAFE_color';\nimport { ColorPicker } from '#UNSAFE_ColorPicker';\nimport { ColorSwatch } from '#UNSAFE_ColorSwatch';\nimport { CloseDetail, InputColorPickerDropdown } from './InputColorPickerDropdown';\nimport { useInputColorState } from './useInputColorState';\nimport type { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport { useDownToggle } from '#hooks/UNSAFE_useDownToggle';\nimport { InputColorPublicProps as InputColorProps } from './InputColor.types';\n\ntype SwatchHandle = ElementRef<typeof ColorSwatch>;\n\ntype ColorPickerProps = ComponentProps<typeof ColorPicker>;\ntype ColorSwatchProps = ComponentProps<typeof ColorSwatch>;\ntype DropdownProps = ComponentProps<typeof InputColorPickerDropdown>;\n\ntype Props = {\n onCommit: InputColorProps['onCommit'];\n onInput: InputColorProps['onInput'];\n value: InputColorProps['value'];\n};\n\n/**\n * Hook that provides handlers and other functionality for InputColor.\n */\nconst useInputColor = ({ onCommit, onInput, value: currentValue }: Props) => {\n // Whether the dropdown is open.\n const [isOpen, setIsOpen] = useState<boolean>(false);\n\n // Ref to the swatch icon button.\n const iconRef: RefObject<SwatchHandle> = useRef<SwatchHandle>(null);\n\n // Ref to the text input which holds color value\n const colorRef: RefObject<HTMLInputElement> = useRef<HTMLInputElement>(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 color values passed to onInput and onCommit.\n const lastCommittedColorRef = useRef<ColorValue | undefined>(currentValue);\n const lastColorRef = useRef<ColorValue | 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<ColorValue | undefined>(currentValue);\n\n // Keep track of whether a color was selected in the color picker.\n const colorSelectedRef = useRef<boolean>(false);\n\n const { state, dispatch } = useInputColorState({ 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 (colorsAreDifferent(lastValueFromParentRef.current, currentValue)) {\n lastValueFromParentRef.current = currentValue;\n if (colorsAreDifferent(currentValue, state.colorValue)) {\n dispatch({ type: 'reset', data: currentValue });\n lastColorRef.current = currentValue;\n lastCommittedColorRef.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 (colorsAreDifferent(state.colorValue, lastColorRef.current)) {\n onInput({ previousValue: lastColorRef.current, value: state.colorValue });\n lastColorRef.current = state.colorValue;\n }\n if (\n colorSelectedRef.current &&\n colorsAreDifferent(state.colorValue, lastCommittedColorRef.current)\n ) {\n onCommit?.({ previousValue: lastCommittedColorRef.current, value: state.colorValue });\n lastCommittedColorRef.current = state.colorValue;\n colorSelectedRef.current = false;\n }\n }, [onCommit, onInput, state.colorValue]);\n\n // Handle onInput from InputColor as values are entered in the input field.\n // We wait for the state to update before calling onInput.\n const colorInputHandler = useCallback<InputColorProps['onInput']>(\n (detail: ValueUpdateDetail<ColorValue>) => {\n dispatch({ type: 'colorChanged', data: detail.value });\n },\n [dispatch]\n );\n\n // Handle onCommit from InputColor, which is called when the user presses Enter or the field is blurred.\n const colorCommitHandler = useCallback<NonNullable<InputColorProps['onCommit']>>(() => {\n // If the current color value differs from the last committed value, then call onCommit.\n if (colorsAreDifferent(lastCommittedColorRef.current, state.colorValue)) {\n onCommit?.({ value: state.colorValue, previousValue: lastCommittedColorRef.current });\n lastCommittedColorRef.current = state.colorValue;\n }\n }, [onCommit, state.colorValue]);\n\n // Respond to onAction event from the swatch icon button. Toggles the color picker dropdown.\n const colorIconActionHandler = useCallback<NonNullable<ColorSwatchProps['onToggle']>>(() => {\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 swatch 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 swatch icon when the dropdown is closed.\n iconRef.current?.focus();\n }\n setIsOpen(false);\n },\n []\n );\n\n // Handle color selection in the picker.\n // - Updates the value in state.\n // - Closes the dropdown.\n // - Sets focus to the color field.\n const colorPickerCommitHandler = useCallback<ColorPickerProps['onCommit']>(\n (detail: ValueUpdateDetail<ColorValue>) => {\n // Set focus to the swatch when a color is selected.\n iconRef.current?.focus();\n\n // Set a ref indicating a color was selected.\n colorSelectedRef.current = true;\n dispatch({ type: 'colorSelected', data: detail.value });\n setIsOpen(false);\n },\n [dispatch]\n );\n\n // The Redwood UX design calls for the dropdown to open when the down arrow is pressed.\n // Handle opening the dropdown when the down arrow is pressed in the text edit field.\n const colorPickerDownHandler = useCallback(() => {\n setIsOpen(true);\n }, []);\n\n const { triggerProps: containerDropdownProps } = useDownToggle({\n isOpen,\n onToggle: colorPickerDownHandler\n });\n\n return {\n colorIconActionHandler,\n colorPickerCommitHandler,\n dropdownCloseHandler,\n containerDropdownProps,\n colorValue: state.colorValue,\n iconRef,\n isOpen,\n colorCommitHandler,\n colorInputHandler,\n colorRef\n };\n};\n\nexport { useInputColor };\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 { Ref } from 'preact';\nimport { forwardRef, ElementRef } from 'preact/compat';\nimport { useCallback, useImperativeHandle, useRef } from 'preact/hooks';\nimport { type BundleType } from '../resources/nls/bundle';\nimport { type ColorValue, isValidColorValue } from '#utils/UNSAFE_color';\nimport { InputColorPickerDropdown } from './InputColorPickerDropdown';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport { ColorSwatch } from '#UNSAFE_ColorSwatch';\nimport { useInputColor } from './useInputColor';\n\nimport { useClearIcon } from '../hooks/UNSAFE_useClearIcon';\nimport { FocusableHandle, useFocusableTextField } from '../hooks/UNSAFE_useFocusableTextField';\nimport { useFormContext } from '../hooks/UNSAFE_useFormContext';\nimport { FormFieldContext } from '../hooks/UNSAFE_useFormFieldContext';\nimport { useHover } from '../hooks/UNSAFE_useHover';\nimport { useTextField } from '../hooks/UNSAFE_useTextField';\nimport { Label } from '../UNSAFE_Label';\n\nimport {\n ReadonlyTextField,\n ReadonlyTextFieldInput,\n TextField,\n TextFieldInput\n} from '../UNSAFE_TextField';\nimport { CompactUserAssistance, InlineUserAssistance } from '../UNSAFE_UserAssistance';\nimport { getClientHints } from '../utils/PRIVATE_clientHints';\nimport { ClearIcon } from '../PRIVATE_ClearIcon/ClearIcon';\nimport { useCurrentValueReducer } from '../hooks/UNSAFE_useCurrentValueReducer';\nimport { SelectableHandle, useSelectableTextField } from '#hooks/UNSAFE_useSelectableTextField';\nimport { mergeProps } from '#utils/UNSAFE_mergeProps';\nimport { InputColorPublicProps as Props } from './InputColor.types';\n\ntype SwatchHandle = ElementRef<typeof ColorSwatch>;\n\ntype FocusSelectHandle = FocusableHandle & SelectableHandle;\n\n/**\n * An Input Color is a form field that allows users to select or input a color value,\n * using a color picker or by enterihg a HEX code.\n */\nexport const InputColor = forwardRef(\n (\n {\n 'aria-describedby': ariaDescribedBy,\n swatchSize,\n palette,\n value,\n isDisabled: propIsDisabled,\n isReadonly: propIsReadonly,\n labelEdge: propLabelEdge,\n labelStartWidth: propLabelStartWidth,\n isRequiredShown = false,\n isRequired = false,\n placeholder,\n hasClearIcon,\n columnSpan,\n textAlign: propTextAlign,\n autoComplete,\n messages,\n assistiveText,\n helpSourceLink,\n helpSourceText,\n label,\n onCommit,\n onInput,\n testId,\n variant,\n userAssistanceDensity: propUserAssistanceDensity\n }: Props,\n ref?: Ref<FocusSelectHandle>\n ) => {\n const {\n colorIconActionHandler,\n colorPickerCommitHandler,\n dropdownCloseHandler,\n colorValue,\n containerDropdownProps,\n iconRef,\n isOpen,\n colorCommitHandler,\n colorInputHandler,\n colorRef: enabledElementRef\n } = useInputColor({\n onCommit,\n onInput,\n value\n });\n\n const mainFieldRef = useRef<HTMLDivElement>(null);\n const { inputColor_selectColor } = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const colorIconAriaLabel = inputColor_selectColor();\n const { onKeyDown, ...inputContainerAriaProps } = containerDropdownProps;\n\n const { currentCommitValue, dispatch } = useCurrentValueReducer({ value: colorValue });\n const onInputAndDispatch = useCallback(\n (detail: ValueUpdateDetail<ColorValue>) => {\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 colorInputHandler?.(detail);\n },\n [colorInputHandler, dispatch]\n );\n const onCommitAndDispatch = useCallback(\n (detail: ValueUpdateDetail<ColorValue>) => {\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 colorCommitHandler?.(detail);\n },\n [colorCommitHandler, dispatch]\n );\n\n const startContent = () => (\n <ColorSwatch\n size=\"xs\"\n aria-haspopup={palette ? 'grid' : undefined} // with only palette, grid is a better choice than dialog for now.\n aria-label={palette ? colorIconAriaLabel : undefined}\n isDisabled={isDisabled}\n isButton={true}\n isTooltipDisabled={isOpen}\n ref={iconRef as Ref<SwatchHandle>}\n testId={testId ? testId + '_colorIcon' : undefined}\n value={currentCommitValue as ColorValue}\n onToggle={isDisabled || !palette ? undefined : colorIconActionHandler}\n />\n );\n const {\n isDisabled: isFormDisabled,\n isReadonly: isFormReadonly,\n labelEdge: formLabelEdge,\n labelStartWidth: formLabelStartWidth,\n textAlign: formTextAlign,\n userAssistanceDensity: formUserAssistanceDensity\n } = useFormContext();\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;\n const userAssistanceDensity = propUserAssistanceDensity ?? formUserAssistanceDensity;\n\n const readonlyElementRef = useRef<HTMLDivElement>(null);\n\n const {\n focusProps,\n isFocused,\n methods: focusMethods\n } = useFocusableTextField<HTMLInputElement, HTMLDivElement>({\n isDisabled,\n isReadonly,\n enabledElementRef,\n readonlyElementRef\n });\n\n const { methods: selectMethods } = useSelectableTextField<HTMLInputElement>(enabledElementRef);\n\n useImperativeHandle(ref!, () => mergeProps(focusMethods, selectMethods), [\n focusMethods,\n selectMethods\n ]);\n\n const { hoverProps, isHover } = useHover({ isDisabled: isReadonly || isDisabled || false });\n\n const { formFieldContext, inputProps, labelProps, textFieldProps, userAssistanceProps } =\n useTextField({\n ariaDescribedBy,\n helpSourceLink,\n helpSourceText,\n isDisabled,\n isFocused: isFocused || isOpen,\n isReadonly,\n isRequiredShown,\n labelEdge,\n messages,\n styleVariant: variant,\n userAssistanceDensity,\n value: colorValue\n });\n\n const onClickClearIcon = useCallback(() => {\n // Clicking the clear icon should put the focus on the input field\n enabledElementRef.current?.focus();\n // Send an event to clear the field's value if the value is not already cleared\n const nextValue = undefined;\n if (colorValue === nextValue) return;\n onInputAndDispatch?.({ previousValue: colorValue, value: nextValue });\n }, [onInputAndDispatch, colorValue, enabledElementRef]);\n\n const maybeClearIcon = useClearIcon({\n clearIcon: <ClearIcon onClick={onClickClearIcon} testId={`${testId}_clearicon`} />,\n display: hasClearIcon,\n hasValue: formFieldContext.hasValue,\n isFocused,\n isEnabled: !isReadonly && !isDisabled,\n isHover\n });\n\n const hasInsideLabel = label !== undefined && labelEdge === 'inside';\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 };\n\n const ariaLabel = labelEdge === 'none' ? label : undefined;\n const isInlineDensity =\n userAssistanceDensity === 'efficient' || userAssistanceDensity === 'reflow';\n\n const inlineUserAssistance = isInlineDensity ? (\n isDisabled || isReadonly ? (\n // save space for user assistance if density is 'efficient', even though we don't\n // render user assistance for disabled or readonly fields\n userAssistanceDensity !== 'efficient' ? undefined : (\n <InlineUserAssistance\n userAssistanceDensity={userAssistanceDensity}\n {...userAssistanceProps}\n />\n )\n ) : (\n <InlineUserAssistance\n assistiveText={assistiveText}\n fieldLabel={label}\n helpSourceLink={helpSourceLink}\n helpSourceText={helpSourceText}\n messages={messages}\n isRequiredShown={isRequiredShown}\n userAssistanceDensity={userAssistanceDensity}\n {...userAssistanceProps}\n />\n )\n ) : undefined;\n\n const aRef = useRef<HTMLDivElement>(null);\n const anchorRef = mainFieldRef ?? aRef;\n\n const compactUserAssistance =\n userAssistanceDensity === 'compact' ? (\n <CompactUserAssistance\n anchorRef={anchorRef}\n messages={messages}\n assistiveText={assistiveText}\n {...userAssistanceProps}\n />\n ) : undefined;\n\n const mainContent = isReadonly ? (\n <ReadonlyTextFieldInput\n aria-describedby={inputProps['aria-describedby']}\n aria-label={ariaLabel}\n aria-labelledby={labelProps.id}\n as=\"div\"\n elementRef={readonlyElementRef}\n textAlign={textAlign}\n value={colorValue}\n hasEmptyLabel={label === '' && labelEdge === 'none'}\n hasInsideLabel={hasInsideLabel}\n />\n ) : (\n <TextFieldInput\n aria-labelledby={labelProps.id}\n aria-label={ariaLabel}\n autoComplete={autoComplete}\n currentCommitValue={currentCommitValue}\n hasEmptyLabel={label === '' && labelEdge === 'none'}\n hasEndContent={false}\n hasInsideLabel={labelComp !== undefined && labelEdge === 'inside'}\n hasStartContent={true}\n inputRef={enabledElementRef}\n isRequired={isRequired}\n placeholder={placeholder}\n textAlign={textAlign}\n type={isMobile() ? 'text' : undefined}\n value={colorValue}\n onCommit={\n onCommitAndDispatch as (detail: ValueUpdateDetail<string>) => {\n value: string;\n }\n }\n onInput={\n onInputAndDispatch as (detail: ValueUpdateDetail<string>) => {\n value: string;\n }\n }\n onKeyDown={onKeyDown}\n {...inputProps}\n />\n );\n\n return (\n <>\n <FormFieldContext.Provider value={formFieldContext}>\n {isReadonly ? (\n <ReadonlyTextField\n role=\"presentation\"\n columnSpan={columnSpan}\n compactUserAssistance={compactUserAssistance}\n inlineUserAssistance={inlineUserAssistance}\n onBlur={focusProps.onFocusOut}\n onFocus={focusProps.onFocusIn}\n ref={anchorRef}\n mainContent={mainContent}\n testId={testId}\n {...fieldLabelProps}></ReadonlyTextField>\n ) : (\n <TextField\n endContent={maybeClearIcon}\n columnSpan={columnSpan}\n compactUserAssistance={compactUserAssistance}\n inlineUserAssistance={inlineUserAssistance}\n mainContent={mainContent}\n onBlur={focusProps.onFocusOut}\n onFocus={focusProps.onFocusIn}\n startContent={startContent()}\n mainFieldRef={anchorRef}\n hasZeroStartMargin={true}\n testId={testId}\n {...textFieldProps}\n {...fieldLabelProps}\n {...hoverProps}\n {...inputContainerAriaProps}\n />\n )}\n </FormFieldContext.Provider>\n\n {isOpen && !isReadonly && !isDisabled && (\n <InputColorPickerDropdown\n anchorRef={mainFieldRef}\n assistiveText={assistiveText}\n helpSourceLink={helpSourceLink}\n helpSourceText={helpSourceText}\n isDisabled={isDisabled}\n isReadonly={isReadonly}\n isOpen={isOpen}\n label={label}\n onClose={dropdownCloseHandler}\n onCommit={colorPickerCommitHandler}\n messages={messages}\n testId={testId ? testId + '_colorPicker' : undefined}\n userAssistanceDensity={userAssistanceDensity}\n // memoize this for performance\n value={colorValue && isValidColorValue(colorValue) ? colorValue : undefined}\n palette={palette}\n swatchSize={swatchSize}\n />\n )}\n </>\n );\n }\n);\n\n/**\n * Helper function to determine whether the current device is a mobile device\n * @returns true if running on a mobile device, false otherwise\n */\nfunction isMobile() {\n const deviceType = getClientHints().deviceType;\n return deviceType === 'phone' || deviceType === 'tablet';\n}\nInputColor.displayName = 'InputColor';\n"],"names":["InputColorPickerDropdown","anchorRef","assistiveText","swatchSize","palette","helpSourceLink","helpSourceText","isDisabled","isOpen","isReadonly","label","onClose","onCommit","messages","testId","userAssistanceDensity","value","isDropdownAbove","setDropdownAbove","useState","prevIsOpen","setPrevIsOpen","handleDropdownPosition","useCallback","data","placement","startsWith","shouldShowSheet","isPhone","colorPicker_label","useTranslationBundle","colorPickerAriaLabel","colorPickerMainContent","_jsx","ColorPicker","height","undefined","maxWidth","width","inlineUserAssistanceFooter","length","FormFieldContext","Provider","isFocused","children","jsx","class","userAssistanceStyles","InlineUserAssistance","fieldLabel","contentTestId","dropdownContent","dropdownStyles","SectionedContent","paddingBlockEnd","paddingBlockStart","paddingInlineEnd","paddingInlineStart","footer","hasFocusTrap","main","role","Sheet","StickyPositioningDropdown","onPosition","sizeOptions","isMaxWidthAdjusted","isMaxHeightAdjusted","getClientHints","deviceType","inputColorReducer","state","action","type","colorValue","useInputColor","onInput","currentValue","setIsOpen","iconRef","useRef","colorRef","outsideMousedownRef","outsideMousedownTimerRef","lastCommittedColorRef","lastColorRef","lastValueFromParentRef","colorSelectedRef","dispatch","useReducer","useInputColorState","colorsAreDifferent","current","useEffect","previousValue","colorInputHandler","detail","colorCommitHandler","colorIconActionHandler","dropdownCloseHandler","reason","clearTimeout","setTimeout","focus","colorPickerCommitHandler","colorPickerDownHandler","triggerProps","containerDropdownProps","useDownToggle","onToggle","InputColor","forwardRef","ariaDescribedBy","propIsDisabled","propIsReadonly","labelEdge","propLabelEdge","labelStartWidth","propLabelStartWidth","isRequiredShown","isRequired","placeholder","hasClearIcon","columnSpan","textAlign","propTextAlign","autoComplete","variant","propUserAssistanceDensity","ref","enabledElementRef","mainFieldRef","inputColor_selectColor","colorIconAriaLabel","onKeyDown","inputContainerAriaProps","currentCommitValue","useCurrentValueReducer","onInputAndDispatch","payload","onCommitAndDispatch","isFormDisabled","isFormReadonly","formLabelEdge","formLabelStartWidth","formTextAlign","formUserAssistanceDensity","useFormContext","readonlyElementRef","focusProps","methods","focusMethods","useFocusableTextField","selectMethods","useSelectableTextField","useImperativeHandle","mergeProps","hoverProps","isHover","useHover","formFieldContext","inputProps","labelProps","textFieldProps","userAssistanceProps","useTextField","styleVariant","onClickClearIcon","nextValue","maybeClearIcon","useClearIcon","clearIcon","ClearIcon","onClick","display","hasValue","isEnabled","hasInsideLabel","labelComp","Label","fieldLabelProps","ariaLabel","inlineUserAssistance","aRef","compactUserAssistance","CompactUserAssistance","mainContent","ReadonlyTextFieldInput","id","as","elementRef","hasEmptyLabel","TextFieldInput","hasEndContent","hasStartContent","inputRef","isMobile","_jsxs","ReadonlyTextField","onBlur","onFocusOut","onFocus","onFocusIn","TextField","endContent","startContent","ColorSwatch","size","isButton","isTooltipDisabled","hasZeroStartMargin","isValidColorValue","displayName"],"mappings":"ixFAwEA,MAAMA,GAA2B,EAC/BC,YACAC,gBACAC,aACAC,UACAC,iBACAC,iBACAC,aACAC,SACAC,aACAC,QACAC,UACAC,WACAC,WACAC,SACAC,wBACAC,YAGA,MAAOC,EAAiBC,GAAoBC,EAAQA,UAAC,IAC9CC,EAAYC,GAAiBF,EAAQA,SAACX,GACvCc,EAAyBC,eAE5BC,IACDN,EAAiBM,EAAKC,UAAUC,WAAW,OAAO,GACjD,IAECN,IAAeZ,IACjBa,EAAcb,GACTA,GACHU,GAAiB,IAIrB,MAMMS,EAAkBC,MAElBC,kBAAEA,GAAsBC,EAAoBA,qBAAa,4BACzDC,EAAuBF,IAEvBG,EACJC,MAACC,EAAAA,YACC,CAAAC,OAASR,OAA2BS,EAAT,OAC3BxB,SAAUA,EAEVyB,SAAUV,EAAkB,YAASS,EACrCE,MAAM,OACNnC,WAAYA,EACZC,QAASA,EACTU,OAAQA,EACRE,MAAOA,IAILuB,GACJ/B,GACES,IAAmBU,GACpBpB,GACAE,KACAP,GAAiBG,GAAmBQ,GAAYA,EAAS2B,OAAS,IACxC,cAA1BzB,GAAmE,WAA1BA,OAatCqB,EAZFH,MAACQ,EAAAA,iBAAiBC,SAAQ,CAAC1B,MAAO,CAAE2B,WAAW,GAAMC,SACnDX,EAAKY,IAAA,MAAA,CAAAC,MAAOC,gCACVd,EAAAA,IAACe,EAAAA,qBACC,CAAA9C,cAAeA,EACf+C,WAAYvC,EACZL,eAAgBA,EAChBC,eAAgBA,EAChBO,SAAUA,EACVE,sBAAuBA,QAM3BmC,EAAgBpC,EAASA,GAAUa,EAAkB,SAAW,kBAAeS,EAI/Ee,EACJlB,EAAAA,IAAA,MAAA,CAAKa,MAAOM,EAAcA,eACxBR,SAAAX,EAAAY,IAACQ,EAAgBA,iBAAA,CACfC,gBAAgB,OA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GAAcyI,EAAAA,kBAAkBzI,GAAcA,OAAatC,EAClEhC,QAASA,EACTD,WAAYA,MAIlB,IAQN,SAASiM,KACP,MAAM/H,EAAaD,mBAAiBC,WACpC,MAAsB,UAAfA,GAAyC,WAAfA,CACnC,CACAyC,GAAWsG,YAAc"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
define(['exports', 'preact/jsx-runtime', 'preact/compat', 'preact/hooks', './Calendar-feffa985', './InputDateMask-c91323d7', './HiddenAccessible-037ef42d', './IconButton-dc1be00e', './clientHints-6d361eaa', './FormFieldContext-a024b891', './logger-0f873e29', './TabbableModeContext-a9c97640', './useTranslationBundle-e4dd341e', 'css!./UserAssistanceStyles.styles.css', 'module', './UNSAFE_UserAssistance/themes/redwood/UserAssistanceVariants.css', './InlineUserAssistance-a59440e5', './Flex-4b81b412', 'css!./MessageBannerStyles.styles.css', 'module', './UNSAFE_MessageBanner/themes/redwood/MessageBannerVariants.css', 'preact', './LayerHost-0b288129', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-2bb62284', 'css!./IconStyle.styles.css', 'css!./MessageStyles.styles.css', './MessageFormattingUtils-ea0be23e', './TransitionGroup-3b9d81b6', './MessagesContext-602a69a2', 'css!./HiddenAccessibleStyles.styles.css', 'css!./ComponentMessageStyles.styles.css', 'module', './UNSAFE_ComponentMessage/themes/redwood/ComponentMessageVariants.css', './Popup-6b57cc3e', './UNSAFE_Separator/themes/SeparatorStyles.css', 'css!./LabelStyles.styles.css', 'module', './UNSAFE_Label/themes/redwood/LabelVariants.css', './InputGroupContext-372087af', 'module', './UNSAFE_Popup/themes/redwood/PopupVariants.css', './UNSAFE_InputDatePicker/themes/InputDatePickerDropdownStyles.css', './Sheet-1d02491d', './DatePicker-bf521b1c', './SectionedContent-74559d9d', './stringUtils-4ffd9d59', './FormContext-6b0879a0', './useFormContext-b8cbbb21', './useId-c9578d26', './getFormatParse-918996fc', './maskUtils-339ed9b6', './useHiddenTestMethod-8321d341', './calendarDateUtils-ab83f6b1', './useTestId-f4240cbd'], (function(e,s,t,a,n,o,r,i,l,d,c,u,m,p,h,y,b,f,C,D,v,S,k,x,A,T,g,F,I,V,P,R,w,M,U,_,j,H,B,E,N,L,O,Y,Z,W,z,G,q,J,K,Q,X,$,ee,se,te){"use strict";const ae=({anchorRef:e,assistiveText:t,dayFormatter:n,daysOutsideMonth:o,helpSourceLink:r,helpSourceText:i,isDisabled:l,isOpen:c,isReadonly:u,label:p,onClose:h,onCommit:y,max:f,messages:C,min:D,monthAndYearPicker:v,testId:S,todayButton:k,todayTimeZone:x,userAssistanceDensity:A,value:T,weekDisplay:g})=>{const[F,I]=a.useState(!1),[V,P]=a.useState(c),R=a.useCallback((e=>{I(e.placement.startsWith("top"))}),[]);V!==c&&(P(c),c||I(!1));const w=ne(),{datePicker_label:M}=m.useTranslationBundle("@oracle/oraclejet-preact"),U=M(),_=s.jsx(z.DatePicker,{dayFormatter:n,daysOutsideMonth:o,height:w?void 0:"auto",onCommit:y,max:f,min:D,maxWidth:w?"100%":void 0,width:"100%",monthAndYearPicker:v,testId:S,todayTimeZone:x,todayButton:k,value:T,weekDisplay:g}),j=!c||F&&!w||l||u||!(t||r||C&&C.length>0)||"efficient"!==A&&"reflow"!==A?void 0:s.jsx(d.FormFieldContext.Provider,{value:{isFocused:!0},children:s.jsx("div",{class:Z.userAssistanceStyles,children:s.jsx(b.InlineUserAssistance,{assistiveText:t,fieldLabel:p,helpSourceLink:r,helpSourceText:i,messages:C,userAssistanceDensity:A})})}),H=S?S+(w?"_sheet":"_dropdown"):void 0,B=s.jsx("div",{class:Z.dropdownStyles,children:s.jsx(G.SectionedContent,{"aria-label":U,footer:j,hasFocusTrap:!0,main:_,role:"dialog",testId:H})});return w?s.jsx(W.Sheet,{initialFocus:"firstFocusable",isOpen:c,onClose:h,children:s.jsx(G.SectionedContent,{"aria-label":U,footer:j,hasFocusTrap:!0,main:_,role:"dialog",testId:H})}):s.jsx(G.StickyPositioningDropdown,{anchorRef:e,initialFocus:"firstFocusable",isOpen:c,onClose:h,onPosition:R,sizeOptions:{isMaxWidthAdjusted:!1,isMaxHeightAdjusted:!0},children:B})},ne=()=>"phone"===l.getClientHints().deviceType,oe=e=>e&&se.isCompleteCalendarDate(e)?e:void 0,re=(e,s)=>{switch(s.type){case"dateChanged":return{...e,dateValue:s.data,completeDateValue:oe(s.data)};case"dateSelected":return{...e,dateValue:s.data,completeDateValue:s.data};case"reset":return{completeDateValue:oe(s.data),dateValue:s.data};default:return e}},ie=({isDisabled:e,isReadonly:s,onCommit:t,onInput:n,rootRef:o,value:r})=>{const[i,l]=a.useState(!1),d=a.useRef(null),c=a.useRef(null),u=a.useRef(!1),m=a.useRef(),p=a.useRef(r),h=a.useRef(r),y=a.useRef(r),b=a.useRef(!1),{state:f,dispatch:C}=(({value:e})=>{const[s,t]=a.useReducer(re,{completeDateValue:oe(e),dateValue:e});return{state:s,dispatch:t}})({value:r});$.calendarDatesAreDifferent(y.current,r)&&(y.current=r,$.calendarDatesAreDifferent(r,f.dateValue)&&(C({type:"reset",data:r}),h.current=r,p.current=r)),a.useEffect((()=>{$.calendarDatesAreDifferent(f.dateValue,h.current)&&(n({previousValue:h.current,value:f.dateValue}),h.current=f.dateValue),b.current&&$.calendarDatesAreDifferent(f.dateValue,p.current)&&(t?.({previousValue:p.current,value:f.dateValue}),p.current=f.dateValue,b.current=!1)}),[t,n,f.dateValue]);const D=a.useCallback((e=>{C({type:"dateChanged",data:e.value})}),[C]),v=a.useCallback((e=>{$.calendarDatesAreDifferent(p.current,e.value)&&(t?.({value:e.value,previousValue:p.current}),p.current=e.value)}),[t]),S=a.useCallback((()=>{u.current||l((e=>!e)),u.current=!1}),[]),k=a.useCallback((e=>{"outsideMousedown"===e.reason?(u.current=!0,clearTimeout(m.current),m.current=setTimeout((()=>{u.current=!1}),200)):"dismissed"!==e.reason&&"keyboardDismissed"!==e.reason||d.current?.focus(),l(!1)}),[]),x=a.useCallback((e=>{d.current?.focus(),b.current=!0,C({type:"dateSelected",data:e.value}),l(!1)}),[C]),A=a.useCallback((a=>s||e?Promise.reject("Component is readonly or disabled"):(n({value:a,previousValue:r}),t?.({value:a,previousValue:r}),Promise.resolve())),[r,e,s,t,n]);return ee.useHiddenTestMethod({elementRef:o,method:A,name:"_changeValue"}),{calendarIconActionHandler:S,datePickerCommitHandler:x,dropdownCloseHandler:k,completeDateValue:f.completeDateValue,dateValue:f.dateValue,iconRef:d,isOpen:i,maskCommitHandler:v,maskInputHandler:D,maskRef:c}},le=t.forwardRef((({"aria-describedby":e,assistiveText:t,dayFormatter:l,daysOutsideMonth:d,helpSourceLink:c,helpSourceText:u,isDisabled:p,isReadonly:h,label:y,max:b,messages:f,min:C,monthAndYearPicker:D,todayTimeZone:v,todayButton:S,value:k,onCommit:x,onInput:A,testId:T,userAssistanceDensity:g,weekDisplay:F,...I},V)=>{const P=te.useTestId(T),R=a.useRef(null),{calendarIconActionHandler:w,datePickerCommitHandler:M,completeDateValue:U,dateValue:_,dropdownCloseHandler:j,iconRef:H,isOpen:B,maskCommitHandler:E,maskInputHandler:N,maskRef:L}=ie({isDisabled:p,isReadonly:h,onCommit:x,onInput:A,rootRef:R,value:k}),O=a.useRef(null),{inputDatePicker_selectDate:Y,inputDatePicker_instruction:Z}=m.useTranslationBundle("@oracle/oraclejet-preact"),W=Y(),{userAssistanceDensity:z}=K.useFormContext(),G=g??z;a.useImperativeHandle(V,(()=>({focus:()=>{L.current?.focus()},blur:()=>{L.current?.blur()}})));const J=Q.useId(),X=Z(),$=p||h?void 0:s.jsx(r.HiddenAccessible,{id:J,isHidden:!0,children:X}),ee=p||h?e:q.l([e,J]),se=s.jsx(i.IconButton,{"aria-haspopup":"dialog","aria-label":W,isDisabled:p,ref:H,size:"sm",testId:T?T+"_calendarIcon":void 0,variant:"ghost",onAction:w,children:s.jsx(n.SvgCalendar,{})}),ne=B;return s.jsxs("div",{...P,ref:R,children:[s.jsx(o.InputDateMaskContext.Provider,{value:{isDropdownOpen:B,isInputDatePickerParent:!0},children:s.jsx(o.InputDateMask,{"aria-describedby":ee,assistiveText:t,endContent:se,helpSourceLink:c,helpSourceText:u,isDisabled:p,isReadonly:h,label:y,onCommit:E,onInput:N,mainFieldRef:O,messages:f,testId:T?T+"_mask":void 0,ref:L,userAssistanceDensity:g,value:_,...I})}),$,ne&&s.jsx(ae,{anchorRef:O,assistiveText:t,dayFormatter:l,daysOutsideMonth:d,helpSourceLink:c,helpSourceText:u,isDisabled:p,isReadonly:h,isOpen:B,label:y,onClose:j,onCommit:M,max:b,messages:f,min:C,monthAndYearPicker:D,testId:T?T+"_datePicker":void 0,todayTimeZone:v,todayButton:S,userAssistanceDensity:G,value:U,weekDisplay:F})]})}));e.InputDatePicker=le}));
|
|
2
|
+
//# sourceMappingURL=InputDatePicker-7227a858.js.map
|