@oracle/oraclejet-preact 17.0.4 → 17.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/amd/ActionCard-c8070525.js +1 -1
- package/amd/{BarChart-6c921af0.js → BarChart-be1d51d4.js} +2 -2
- package/amd/{BarChart-6c921af0.js.map → BarChart-be1d51d4.js.map} +1 -1
- package/amd/BaseButton-83ce1d00.js +1 -1
- package/amd/BaseCardView-1aa0d986.js +1 -1
- package/amd/{BaseCardViewSelectionTest-28e25f08.js → BaseCardViewSelectionTest-09799a11.js} +2 -2
- package/amd/{BaseCardViewSelectionTest-28e25f08.js.map → BaseCardViewSelectionTest-09799a11.js.map} +1 -1
- package/amd/BaseNavigationListItem-4a940426.js +1 -1
- package/amd/ButtonSet-d8cd5447.js +1 -1
- package/amd/ButtonSetIconButton-08612ca6.js +1 -1
- package/amd/Center-ce88b58a.js +2 -0
- package/amd/{Center-5f845605.js.map → Center-ce88b58a.js.map} +1 -1
- package/amd/{Chart-0f54dae3.js → Chart-4796be31.js} +2 -2
- package/amd/{Chart-0f54dae3.js.map → Chart-4796be31.js.map} +1 -1
- package/amd/CheckboxControl-7d539ab3.js +1 -1
- package/amd/CheckboxRadioField-da88bd6f.js +1 -1
- package/amd/Chip-26339152.js +1 -1
- package/amd/ClearIcon-a29e57fb.js +1 -1
- package/amd/CollapseIcon-c433fd3e.js +1 -1
- package/amd/Collapsible-8f15bec2.js +1 -1
- package/amd/CompactHelpSource-7de24d56.js +1 -1
- package/amd/CompactLabelAssistance-9b6b3be2.js +2 -0
- package/amd/{CompactLabelAssistance-91aeaa2e.js.map → CompactLabelAssistance-9b6b3be2.js.map} +1 -1
- package/amd/CompactUserAssistance-b2cbdbad.js +1 -1
- package/amd/ComponentMessageContainer-dc4b7c7f.js +1 -1
- package/amd/ConveyorBeltItem-d398eaa6.js +1 -1
- package/amd/{DatePicker-3996fc76.js → DatePicker-70b1aba4.js} +2 -2
- package/amd/{DatePicker-3996fc76.js.map → DatePicker-70b1aba4.js.map} +1 -1
- package/amd/DatePickerHeader-52c085e6.js +1 -1
- package/amd/{Diagram-737e9921.js → Diagram-9627b062.js} +2 -2
- package/amd/{Diagram-737e9921.js.map → Diagram-9627b062.js.map} +1 -1
- package/amd/DirectionalCollapseArrowIcon-09a24655.js +1 -1
- package/amd/DirectionalExpandArrowIcon-c8f2e596.js +1 -1
- package/amd/DragHandle-351a20be.js +1 -1
- package/amd/{Dropdown-de472a1d.js → Dropdown-c62373dd.js} +2 -2
- package/amd/{Dropdown-de472a1d.js.map → Dropdown-c62373dd.js.map} +1 -1
- package/amd/{EnvironmentProvider-46d0a245.js → EnvironmentProvider-9e71b5c2.js} +2 -2
- package/amd/{EnvironmentProvider-46d0a245.js.map → EnvironmentProvider-9e71b5c2.js.map} +1 -1
- package/amd/FilePicker-9b2fb661.js +1 -1
- package/amd/{Flex-1f27b601.js → Flex-db3ddadb.js} +2 -2
- package/amd/{Flex-1f27b601.js.map → Flex-db3ddadb.js.map} +1 -1
- package/amd/{Floating-85851b1a.js → Floating-8f519f4d.js} +2 -2
- package/amd/{Floating-85851b1a.js.map → Floating-8f519f4d.js.map} +1 -1
- package/amd/FormLayout-80b89e74.js +1 -1
- package/amd/Gantt-6fe34398.js +1 -1
- package/amd/{Grid-85171367.js → Grid-209ab070.js} +2 -2
- package/amd/{Grid-85171367.js.map → Grid-209ab070.js.map} +1 -1
- package/amd/{Gridlines-11a94c28.js → Gridlines-8ca4f9ee.js} +2 -2
- package/amd/{Gridlines-11a94c28.js.map → Gridlines-8ca4f9ee.js.map} +1 -1
- package/amd/GroupLoadingIndicator-e66ed431.js +1 -1
- package/amd/HighlightText-415dc14f.js +2 -0
- package/amd/{HighlightText-ad9bc1f8.js.map → HighlightText-415dc14f.js.map} +1 -1
- package/amd/Icon-599f55f3.js +1 -1
- package/amd/IconButton-1b328b69.js +1 -1
- package/amd/IconMenuButton-c275cfbb.js +1 -1
- package/amd/IconSwitchButton-0e888503.js +1 -1
- package/amd/IconToggleButton-563a5127.js +1 -1
- package/amd/{IconUserAssistance-5bdaa6bf.js → IconUserAssistance-f8928f19.js} +2 -2
- package/amd/{IconUserAssistance-5bdaa6bf.js.map → IconUserAssistance-f8928f19.js.map} +1 -1
- package/amd/Indexer-204a6d88.js +1 -1
- package/amd/InlineHelpSource-359fd9df.js +1 -1
- package/amd/InlineUserAssistance-f4d1fa1b.js +1 -1
- package/amd/InputDateMask-b7a27faa.js +1 -1
- package/amd/InputDatePicker-da5d8728.js +1 -1
- package/amd/InputPassword-03f24e78.js +1 -1
- package/amd/InputText-da0a5c0f.js +1 -1
- package/amd/Label-3f8fc274.js +1 -1
- package/amd/LabelValueLayout-89e9f1be.js +1 -1
- package/amd/Layer-8d7bbd69.js +2 -0
- package/amd/{Layer-3cc44164.js.map → Layer-8d7bbd69.js.map} +1 -1
- package/amd/{LayerHost-eab40731.js → LayerHost-0a244de8.js} +2 -2
- package/amd/{LayerHost-eab40731.js.map → LayerHost-0a244de8.js.map} +1 -1
- package/amd/{LayerManager-d0836029.js → LayerManager-00983765.js} +2 -2
- package/amd/{LayerManager-d0836029.js.map → LayerManager-00983765.js.map} +1 -1
- package/amd/Legend-42f8653b.js +1 -1
- package/amd/{LineAreaChart-337cac30.js → LineAreaChart-b68c4620.js} +2 -2
- package/amd/{LineAreaChart-337cac30.js.map → LineAreaChart-b68c4620.js.map} +1 -1
- package/amd/Link-6f583879.js +1 -1
- package/amd/List-5958c802.js +1 -1
- package/amd/ListItemLayout-12aee4bd.js +2 -0
- package/amd/{ListItemLayout-dba9e24b.js.map → ListItemLayout-12aee4bd.js.map} +1 -1
- package/amd/ListView-27d10b67.js +1 -1
- package/amd/LiveRegion-09197914.js +2 -0
- package/amd/{LiveRegion-be6f36d7.js.map → LiveRegion-09197914.js.map} +1 -1
- package/amd/MaxLengthLiveRegion-e3856a98.js +2 -0
- package/amd/{MaxLengthLiveRegion-23d7e335.js.map → MaxLengthLiveRegion-e3856a98.js.map} +1 -1
- package/amd/{Menu-51409b28.js → Menu-6a5d7fce.js} +2 -2
- package/amd/{Menu-51409b28.js.map → Menu-6a5d7fce.js.map} +1 -1
- package/amd/MenuButton-c8fb534d.js +1 -1
- package/amd/MenuItem-644f8619.js +1 -1
- package/amd/Message-51d787d0.js +1 -1
- package/amd/MessageLayer-cf2fbea9.js +2 -0
- package/amd/{MessageLayer-d2c49999.js.map → MessageLayer-cf2fbea9.js.map} +1 -1
- package/amd/MessageToast-e0e07765.js +1 -1
- package/amd/MessagesManager-78a10f78.js +1 -1
- package/amd/MeterBar-38666619.js +1 -1
- package/amd/MeterCircle-f1561632.js +1 -1
- package/amd/{Modal-8c095bea.js → Modal-8f19889c.js} +2 -2
- package/amd/{Modal-8c095bea.js.map → Modal-8f19889c.js.map} +1 -1
- package/amd/{MonthView-b5d1d69d.js → MonthView-297fceb8.js} +2 -2
- package/amd/{MonthView-b5d1d69d.js.map → MonthView-297fceb8.js.map} +1 -1
- package/amd/NavigationListItem-c96ac144.js +2 -0
- package/amd/{NavigationListItem-0a4f8a9c.js.map → NavigationListItem-c96ac144.js.map} +1 -1
- package/amd/NumberInputText-0d8284f8.js +1 -1
- package/amd/{OverflowTabBarItem-aae4eb2f.js → OverflowTabBarItem-f781e527.js} +2 -2
- package/amd/{OverflowTabBarItem-aae4eb2f.js.map → OverflowTabBarItem-f781e527.js.map} +1 -1
- package/amd/PRIVATE_BaseCardView.js +1 -1
- package/amd/PRIVATE_Chart.js +1 -1
- package/amd/PRIVATE_CheckboxControl.js +1 -1
- package/amd/PRIVATE_CheckboxRadioField.js +1 -1
- package/amd/PRIVATE_ClearIcon.js +1 -1
- package/amd/PRIVATE_DatePickerHeader.js +1 -1
- package/amd/PRIVATE_DatePickerLayout.js +1 -1
- package/amd/PRIVATE_EmbeddedIconButton.js +1 -1
- package/amd/PRIVATE_FormControls.js +1 -1
- package/amd/PRIVATE_IconSwitchButton.js +1 -1
- package/amd/PRIVATE_Icons/CheckboxMixed.js +1 -1
- package/amd/PRIVATE_Icons/CheckboxOff.js +1 -1
- package/amd/PRIVATE_Icons/CheckboxOn.js +1 -1
- package/amd/PRIVATE_Icons/RadiobuttonOff.js +1 -1
- package/amd/PRIVATE_Icons/RadiobuttonOn.js +1 -1
- package/amd/PRIVATE_Icons/WarningS.js +1 -1
- package/amd/PRIVATE_List.js +1 -1
- package/amd/PRIVATE_Message.js +1 -1
- package/amd/PRIVATE_MessageLayer.js +1 -1
- package/amd/PRIVATE_MonthView.js +1 -1
- package/amd/PRIVATE_MonthYearGridView.js +1 -1
- package/amd/PRIVATE_PlotArea.js +1 -1
- package/amd/PRIVATE_RevealToggleIcon.js +1 -1
- package/amd/PRIVATE_SelectCommon.js +1 -1
- package/amd/PRIVATE_StyledCheckbox.js +1 -1
- package/amd/PRIVATE_Table.js +1 -1
- package/amd/PRIVATE_ThemedIcons/CalendarIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/ChartMarqueeSelectIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/ChartPanIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/ChartZoomIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/CheckIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/CheckboxMixedIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/CheckboxOffIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/CheckboxOnIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/CloseIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/CollapseIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/CollapseUpIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/DecrementIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/DeleteIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/DirectionalCollapseArrowIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/DirectionalExpandArrowIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/DropdownArrowIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/ExpandIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/HelpIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/IncrementIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/MenuButtonDropdownIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/MessageConfirmationIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/MessageErrorIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/MessageInfoIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/MessageWarningIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/MinusIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/NavDownIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/PlusIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/RadioOffIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/RadioOnIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/SortAscendingIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/SortDefaultIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/SortDescendingIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/ViewHideIcon.js +1 -1
- package/amd/PRIVATE_ThemedIcons/ViewIcon.js +1 -1
- package/amd/PRIVATE_TimeComponent.js +1 -1
- package/amd/PRIVATE_VisTabularDatatip.js +1 -1
- package/amd/PictoChart-4d70af90.js +1 -1
- package/amd/{PieChart-ab4c95f7.js → PieChart-295e2dbf.js} +2 -2
- package/amd/{PieChart-ab4c95f7.js.map → PieChart-295e2dbf.js.map} +1 -1
- package/amd/{Popup-249d77c3.js → Popup-b5495d55.js} +2 -2
- package/amd/{Popup-249d77c3.js.map → Popup-b5495d55.js.map} +1 -1
- package/amd/{ProgressBar-f82d6b43.js → ProgressBar-e9b37565.js} +2 -2
- package/amd/{ProgressBar-f82d6b43.js.map → ProgressBar-e9b37565.js.map} +1 -1
- package/amd/{ProgressCircle-fc85cd7c.js → ProgressCircle-3b0d70d1.js} +2 -2
- package/amd/{ProgressCircle-fc85cd7c.js.map → ProgressCircle-3b0d70d1.js.map} +1 -1
- package/amd/RadioItem-27c120ba.js +1 -1
- package/amd/RatingGauge-dfe9f698.js +1 -1
- package/amd/ReadonlyTextFieldInput-a5e85e5d.js +1 -1
- package/amd/RemovableNavigationListItem-87ecbae7.js +1 -1
- package/amd/RemovableTabBarItem-89287a9b.js +1 -1
- package/amd/ReorderableTabBar-05821909.js +1 -1
- package/amd/RevealToggleIcon-ef89d654.js +1 -1
- package/amd/SectionalLegend-798dbecb.js +1 -1
- package/amd/SectionedContent-d896b84f.js +2 -0
- package/amd/{SectionedContent-655a773a.js.map → SectionedContent-d896b84f.js.map} +1 -1
- package/amd/SelectMultiple-fabd883c.js +1 -1
- package/amd/SelectSingle-34d636a8.js +1 -1
- package/amd/SelectionCard-ec3ee20d.js +2 -0
- package/amd/{SelectionCard-0ecc7773.js.map → SelectionCard-ec3ee20d.js.map} +1 -1
- package/amd/Selector-ad2af152.js +1 -1
- package/amd/SelectorAll-879d186e.js +1 -1
- package/amd/{Sheet-6447f399.js → Sheet-a398d015.js} +2 -2
- package/amd/{Sheet-6447f399.js.map → Sheet-a398d015.js.map} +1 -1
- package/amd/SplitMenuButton-deb0fc04.js +1 -1
- package/amd/StyledTextField-8ac3bbb4.js +1 -1
- package/amd/Submenu-b20a55aa.js +1 -1
- package/amd/TabBar-10096a0c.js +1 -1
- package/amd/TabBarItem-7f4a5e0b.js +1 -1
- package/amd/TabBarLayout-f8e0fcad.js +1 -1
- package/amd/TabBarMixed-5adc54c4.js +1 -1
- package/amd/TabBarMixedSeparator-234c9a75.js +2 -0
- package/amd/{TabBarMixedSeparator-10a52b13.js.map → TabBarMixedSeparator-234c9a75.js.map} +1 -1
- package/amd/Table-fda0ad21.js +1 -1
- package/amd/TagCloud-a37fcea5.js +1 -1
- package/amd/TextArea-2c7af40c.js +2 -0
- package/amd/TextArea-2c7af40c.js.map +1 -0
- package/amd/TextAreaAutosize-9dc5bffe.js +2 -0
- package/amd/{TextAreaAutosize-0a023972.js.map → TextAreaAutosize-9dc5bffe.js.map} +1 -1
- package/amd/TextField-0fc70892.js +1 -1
- package/amd/TextFieldInput-dfd9529f.js +1 -1
- package/amd/Theme-redwood/theme.css +139 -139
- package/amd/Theme-stable/theme.css +285 -285
- package/amd/TimeComponentCanvas2D-d4a5891c.js +1 -1
- package/amd/Toolbar-98c1d888.js +1 -1
- package/amd/TruncatingBadge-67192c05.js +1 -1
- package/amd/TruncatingText-27ffd8e4.js +1 -1
- package/amd/UNSAFE_ActionCard.js +1 -1
- package/amd/UNSAFE_BarChart/__test__/BarChart.spec.js +1 -1
- package/amd/UNSAFE_BarChart.js +1 -1
- package/amd/UNSAFE_BaseButton.js +1 -1
- package/amd/UNSAFE_Button.js +1 -1
- package/amd/UNSAFE_ButtonLayout/tests/ButtonLayout.spec.js +1 -1
- package/amd/UNSAFE_ButtonSet.js +1 -1
- package/amd/UNSAFE_ButtonSetButton.js +1 -1
- package/amd/UNSAFE_ButtonSetIconButton.js +1 -1
- package/amd/UNSAFE_ButtonSetItem.js +1 -1
- package/amd/UNSAFE_ButtonSetMultiple.js +1 -1
- package/amd/UNSAFE_ButtonSetSingle.js +1 -1
- package/amd/UNSAFE_CardFlexView.js +1 -1
- package/amd/UNSAFE_CardGridView.js +1 -1
- package/amd/UNSAFE_Center.js +1 -1
- package/amd/UNSAFE_ChartWithLegend.js +1 -1
- package/amd/UNSAFE_Checkbox.js +1 -1
- package/amd/UNSAFE_CheckboxItem.js +1 -1
- package/amd/UNSAFE_CheckboxSet.js +1 -1
- package/amd/UNSAFE_Chip.js +1 -1
- package/amd/UNSAFE_Collapsible.js +1 -1
- package/amd/UNSAFE_ComponentMessage.js +1 -1
- package/amd/UNSAFE_ConveyorBelt.js +1 -1
- package/amd/UNSAFE_DatePicker.js +1 -1
- package/amd/UNSAFE_Diagram.js +1 -1
- package/amd/UNSAFE_Dialog.js +1 -1
- package/amd/UNSAFE_DragHandle.js +1 -1
- package/amd/UNSAFE_DrawerLayout.js +1 -1
- package/amd/UNSAFE_DrawerPopup.js +1 -1
- package/amd/UNSAFE_Dropdown.js +1 -1
- package/amd/UNSAFE_Environment.js +1 -1
- package/amd/UNSAFE_ExpandableList.js +1 -1
- package/amd/UNSAFE_FilePicker.js +1 -1
- package/amd/UNSAFE_Flex.js +1 -1
- package/amd/UNSAFE_Floating.js +1 -1
- package/amd/UNSAFE_FormLayout.js +1 -1
- package/amd/UNSAFE_Gantt.js +1 -1
- package/amd/UNSAFE_Grid.js +1 -1
- package/amd/UNSAFE_HighlightText.js +1 -1
- package/amd/UNSAFE_Icon.js +1 -1
- package/amd/UNSAFE_IconButton.js +1 -1
- package/amd/UNSAFE_IconMenuButton.js +1 -1
- package/amd/UNSAFE_IconToggleButton.js +1 -1
- package/amd/UNSAFE_Indexer.js +1 -1
- package/amd/UNSAFE_InputDateMask.js +1 -1
- package/amd/UNSAFE_InputDatePicker.js +1 -1
- package/amd/UNSAFE_InputPassword.js +1 -1
- package/amd/UNSAFE_InputSensitiveText.js +1 -1
- package/amd/UNSAFE_InputText.js +1 -1
- package/amd/UNSAFE_Label.js +1 -1
- package/amd/UNSAFE_LabelValueLayout.js +1 -1
- package/amd/UNSAFE_LabelledLink.js +1 -1
- package/amd/UNSAFE_Layer.js +1 -1
- package/amd/UNSAFE_Legend.js +1 -1
- package/amd/UNSAFE_LineAreaChart/__test__/LineChart.spec.js +1 -1
- package/amd/UNSAFE_LineAreaChart.js +1 -1
- package/amd/UNSAFE_Link.js +1 -1
- package/amd/UNSAFE_ListItemLayout.js +1 -1
- package/amd/UNSAFE_ListView.js +1 -1
- package/amd/UNSAFE_LiveRegion.js +1 -1
- package/amd/UNSAFE_Menu.js +1 -1
- package/amd/UNSAFE_MenuButton.js +1 -1
- package/amd/UNSAFE_MessageBanner.js +1 -1
- package/amd/UNSAFE_MessageToast.js +1 -1
- package/amd/UNSAFE_MeterBar.js +1 -1
- package/amd/UNSAFE_MeterCircle.js +1 -1
- package/amd/UNSAFE_Modal.js +1 -1
- package/amd/UNSAFE_NavigationList.js +1 -1
- package/amd/UNSAFE_NavigationListCommon.js +1 -1
- package/amd/UNSAFE_NumberInputText.js +1 -1
- package/amd/UNSAFE_OverflowTabBar.js +1 -1
- package/amd/UNSAFE_PictoChart.js +1 -1
- package/amd/UNSAFE_PieChart/__test__/PieChart.spec.js +1 -1
- package/amd/UNSAFE_PieChart.js +1 -1
- package/amd/UNSAFE_Popup.js +1 -1
- package/amd/UNSAFE_ProgressBar.js +1 -1
- package/amd/UNSAFE_ProgressCircle.js +1 -1
- package/amd/UNSAFE_RadioItem.js +1 -1
- package/amd/UNSAFE_RadioSet.js +1 -1
- package/amd/UNSAFE_RatingGauge.js +1 -1
- package/amd/UNSAFE_ReorderableTabBar.js +1 -1
- package/amd/UNSAFE_SectionalLegend.js +1 -1
- package/amd/UNSAFE_SelectMultiple.js +1 -1
- package/amd/UNSAFE_SelectSingle.js +1 -1
- package/amd/UNSAFE_SelectionCard.js +1 -1
- package/amd/UNSAFE_Selector.js +1 -1
- package/amd/UNSAFE_SelectorAll.js +1 -1
- package/amd/UNSAFE_Sheet/__test__/Sheet.spec.js +1 -1
- package/amd/UNSAFE_Sheet.js +1 -1
- package/amd/UNSAFE_SplitMenuButton.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/UNSAFE_TableView.js +1 -1
- package/amd/UNSAFE_TagCloud.js +1 -1
- package/amd/UNSAFE_TextArea.js +1 -1
- package/amd/UNSAFE_TextAreaAutosize.js +1 -1
- package/amd/UNSAFE_TextField.js +1 -1
- package/amd/UNSAFE_ToggleButton.js +1 -1
- package/amd/UNSAFE_Toolbar/tests/Toolbar.spec.js +1 -1
- package/amd/UNSAFE_Toolbar.js +1 -1
- package/amd/UNSAFE_Train.js +1 -1
- package/amd/UNSAFE_TruncatingBadge.js +1 -1
- package/amd/UNSAFE_TruncatingText.js +1 -1
- package/amd/UNSAFE_UserAssistance.js +1 -1
- package/amd/UNSAFE_View.js +1 -1
- package/amd/UNSAFE_VirtualizedListView.js +1 -1
- package/amd/UNSAFE_VisProgressiveLoader/__test__/VisProgressiveLoader.spec.js +1 -1
- package/amd/UNSAFE_VisProgressiveLoader.js +1 -1
- package/amd/UNSAFE_VisStatusMessage.js +1 -1
- package/amd/UNSAFE_WindowOverlay.js +1 -1
- package/amd/{View-8701dec6.js → View-10a5769c.js} +2 -2
- package/amd/{View-8701dec6.js.map → View-10a5769c.js.map} +1 -1
- package/amd/VisNoData-95d951c2.js +2 -0
- package/amd/{VisNoData-bfb5065e.js.map → VisNoData-95d951c2.js.map} +1 -1
- package/amd/{VisProgressiveLoader-ef9de93a.js → VisProgressiveLoader-39f1b4ef.js} +2 -2
- package/amd/{VisProgressiveLoader-ef9de93a.js.map → VisProgressiveLoader-39f1b4ef.js.map} +1 -1
- package/amd/{VisTabularDatatip-5e43455b.js → VisTabularDatatip-e945d6f6.js} +2 -2
- package/amd/{VisTabularDatatip-5e43455b.js.map → VisTabularDatatip-e945d6f6.js.map} +1 -1
- package/amd/{WindowOverlay-c09fece2.js → WindowOverlay-ad61cfea.js} +2 -2
- package/amd/{WindowOverlay-c09fece2.js.map → WindowOverlay-ad61cfea.js.map} +1 -1
- package/amd/{YearsGridView-91e4744d.js → YearsGridView-c76bb4da.js} +2 -2
- package/amd/{YearsGridView-91e4744d.js.map → YearsGridView-c76bb4da.js.map} +1 -1
- package/amd/hoc/PRIVATE_withDirectionIcon.js +1 -1
- package/amd/hoc/PRIVATE_withThemeIcon.js +1 -1
- package/amd/hoc/UNSAFE_withThemeProps.js +1 -1
- package/amd/hooks/PRIVATE_useChartContextMenu.js +1 -1
- package/amd/hooks/PRIVATE_useChartDatatip.js +1 -1
- package/amd/hooks/PRIVATE_useChartEvents.js +1 -1
- package/amd/hooks/PRIVATE_useChartMarquee.js +1 -1
- package/amd/hooks/PRIVATE_useCssVars.js +1 -1
- package/amd/hooks/PRIVATE_useCurrentKey.js +1 -1
- package/amd/hooks/PRIVATE_useDatatip.js +1 -1
- package/amd/hooks/PRIVATE_useFloating.js +1 -1
- package/amd/hooks/PRIVATE_useReorderable.js +1 -1
- package/amd/hooks/PRIVATE_useRovingTabIndexContainer.js +1 -1
- package/amd/hooks/PRIVATE_useSelection.js +1 -1
- package/amd/hooks/PRIVATE_useTabBar.js +1 -1
- package/amd/hooks/PRIVATE_useVisContextMenu.js +1 -1
- package/amd/hooks/PRIVATE_useVisEvents.js +1 -1
- package/amd/hooks/PRIVATE_useVisMeterEvents.js +1 -1
- package/amd/hooks/PRIVATE_useVisSelection.js +1 -1
- package/amd/hooks/UNSAFE_useColorScheme.js +1 -1
- package/amd/hooks/UNSAFE_useContainerBreakpointValues.js +1 -1
- package/amd/hooks/UNSAFE_useCurrentBgColor.js +1 -1
- package/amd/hooks/UNSAFE_useDensity.js +1 -1
- package/amd/hooks/UNSAFE_useOutsideClick.js +1 -1
- package/amd/hooks/UNSAFE_usePrefixSuffix.js +1 -1
- package/amd/hooks/UNSAFE_useScale.js +1 -1
- package/amd/hooks/UNSAFE_useTestId.js +1 -1
- package/amd/hooks/UNSAFE_useTheme.js +1 -1
- package/amd/hooks/UNSAFE_useThemeInterpolations.js +1 -1
- package/amd/hooks/UNSAFE_useTooltip.js +1 -1
- package/amd/hooks/UNSAFE_useTranslationBundle.js +1 -1
- package/amd/hooks/UNSAFE_useUser.js +1 -1
- package/amd/{index-17fdb080.js → index-8d4da04e.js} +2 -2
- package/amd/index-8d4da04e.js.map +1 -0
- package/amd/listViewSelectionTests-a0132dcc.js +1 -1
- package/amd/{render-9b32a558.js → render-6de552e4.js} +2 -2
- package/amd/{render-9b32a558.js.map → render-6de552e4.js.map} +1 -1
- package/amd/{tabbableUtils-5b5b70da.js → tabbableUtils-78cc49fd.js} +2 -2
- package/amd/{tabbableUtils-5b5b70da.js.map → tabbableUtils-78cc49fd.js.map} +1 -1
- package/amd/{testData-8e20304d.js → testData-6d873339.js} +2 -2
- package/amd/{testData-8e20304d.js.map → testData-6d873339.js.map} +1 -1
- package/amd/useCellNavigation-37e0539a.js +1 -1
- package/amd/useChartContextMenu-c50617f2.js +1 -1
- package/amd/{useChartDatatip-672232af.js → useChartDatatip-34e2636c.js} +2 -2
- package/amd/{useChartDatatip-672232af.js.map → useChartDatatip-34e2636c.js.map} +1 -1
- package/amd/useChartMarquee-0e818e77.js +1 -1
- package/amd/{useColorScheme-711c1e4b.js → useColorScheme-3ffd80c4.js} +2 -2
- package/amd/{useColorScheme-711c1e4b.js.map → useColorScheme-3ffd80c4.js.map} +1 -1
- package/amd/useContextMenu-e6b10380.js +1 -1
- package/amd/useCssVars-7efb591d.js +2 -0
- package/amd/{useCssVars-948d1e7c.js.map → useCssVars-7efb591d.js.map} +1 -1
- package/amd/{useCurrentBgColor-40103ccc.js → useCurrentBgColor-44e3f377.js} +2 -2
- package/amd/{useCurrentBgColor-40103ccc.js.map → useCurrentBgColor-44e3f377.js.map} +1 -1
- package/amd/useCurrentKey-26170e5e.js +2 -0
- package/amd/{useCurrentKey-00f81f0b.js.map → useCurrentKey-26170e5e.js.map} +1 -1
- package/amd/{useDatatip-d00735e9.js → useDatatip-34fb67d2.js} +2 -2
- package/amd/{useDatatip-d00735e9.js.map → useDatatip-34fb67d2.js.map} +1 -1
- package/amd/{useDensity-435224bb.js → useDensity-be2ff874.js} +2 -2
- package/amd/{useDensity-435224bb.js.map → useDensity-be2ff874.js.map} +1 -1
- package/amd/{useFloating-bbd3396b.js → useFloating-30975c41.js} +2 -2
- package/amd/{useFloating-bbd3396b.js.map → useFloating-30975c41.js.map} +1 -1
- package/amd/useKeyboardEvents-57008a1d.js +2 -0
- package/amd/{useKeyboardEvents-e9a2b72b.js.map → useKeyboardEvents-57008a1d.js.map} +1 -1
- package/amd/useLegendContextMenu-5b1ca75b.js +1 -1
- package/amd/{useMeterDatatip-60af9281.js → useMeterDatatip-1a3890aa.js} +2 -2
- package/amd/{useMeterDatatip-60af9281.js.map → useMeterDatatip-1a3890aa.js.map} +1 -1
- package/amd/{useOutsideClick-4519a64e.js → useOutsideClick-90052c27.js} +2 -2
- package/amd/{useOutsideClick-4519a64e.js.map → useOutsideClick-90052c27.js.map} +1 -1
- package/amd/{usePopupAnimation-273054a0.js → usePopupAnimation-a0193874.js} +2 -2
- package/amd/{usePopupAnimation-273054a0.js.map → usePopupAnimation-a0193874.js.map} +1 -1
- package/amd/usePrefixSuffix-da47e340.js +2 -0
- package/amd/{usePrefixSuffix-6ad5569e.js.map → usePrefixSuffix-da47e340.js.map} +1 -1
- package/amd/useReorderableItem-d977f935.js +1 -1
- package/amd/{useRovingTabIndexContainer-12784fca.js → useRovingTabIndexContainer-079ed64f.js} +2 -2
- package/amd/{useRovingTabIndexContainer-12784fca.js.map → useRovingTabIndexContainer-079ed64f.js.map} +1 -1
- package/amd/{useScale-e6b83382.js → useScale-fe3420c6.js} +2 -2
- package/amd/{useScale-e6b83382.js.map → useScale-fe3420c6.js.map} +1 -1
- package/amd/useSelectCommon-8657b927.js +1 -1
- package/amd/{useSelectDrill-f2ae347c.js → useSelectDrill-f69d15aa.js} +2 -2
- package/amd/{useSelectDrill-f2ae347c.js.map → useSelectDrill-f69d15aa.js.map} +1 -1
- package/amd/useSelection-2c9ff75a.js +2 -0
- package/amd/{useSelection-f1d96ce9.js.map → useSelection-2c9ff75a.js.map} +1 -1
- package/amd/useSelection-91c04393.js +2 -0
- package/amd/{useSelection-0440840d.js.map → useSelection-91c04393.js.map} +1 -1
- package/amd/{useTabBar-451e6953.js → useTabBar-254fbf75.js} +2 -2
- package/amd/{useTabBar-451e6953.js.map → useTabBar-254fbf75.js.map} +1 -1
- package/amd/{useTestId-82cf22a4.js → useTestId-f3b8b319.js} +2 -2
- package/amd/{useTestId-82cf22a4.js.map → useTestId-f3b8b319.js.map} +1 -1
- package/amd/{useTheme-1941efb7.js → useTheme-45e3b0b3.js} +2 -2
- package/amd/{useTheme-1941efb7.js.map → useTheme-45e3b0b3.js.map} +1 -1
- package/amd/useThemeInterpolations-1f5fd8f3.js +2 -0
- package/amd/{useThemeInterpolations-41cbd433.js.map → useThemeInterpolations-1f5fd8f3.js.map} +1 -1
- package/amd/useTooltip-e965a559.js +2 -0
- package/amd/{useTooltip-d28e9b0f.js.map → useTooltip-e965a559.js.map} +1 -1
- package/amd/{useTooltipControlled-abf886f2.js → useTooltipControlled-18271c7a.js} +2 -2
- package/amd/{useTooltipControlled-abf886f2.js.map → useTooltipControlled-18271c7a.js.map} +1 -1
- package/amd/{useTranslationBundle-6ef0dab6.js → useTranslationBundle-20bfc0f3.js} +2 -2
- package/amd/{useTranslationBundle-6ef0dab6.js.map → useTranslationBundle-20bfc0f3.js.map} +1 -1
- package/amd/{useUser-6dd85af9.js → useUser-9b166ca3.js} +2 -2
- package/amd/{useUser-6dd85af9.js.map → useUser-9b166ca3.js.map} +1 -1
- package/amd/{useVisEvents-75dbf576.js → useVisEvents-ac97d087.js} +2 -2
- package/amd/{useVisEvents-75dbf576.js.map → useVisEvents-ac97d087.js.map} +1 -1
- package/amd/utils/PRIVATE_visTestUtils.js +1 -1
- package/amd/{withDirectionIcon-c0ee0f7e.js → withDirectionIcon-9e4dae53.js} +2 -2
- package/amd/{withDirectionIcon-c0ee0f7e.js.map → withDirectionIcon-9e4dae53.js.map} +1 -1
- package/cjs/{BarChart-acda079d.js → BarChart-11c56b6a.js} +2 -2
- package/cjs/{BarChart-acda079d.js.map → BarChart-11c56b6a.js.map} +1 -1
- package/cjs/{Chart-c55ecfa4.js → Chart-6684fa6d.js} +2 -2
- package/cjs/{Chart-c55ecfa4.js.map → Chart-6684fa6d.js.map} +1 -1
- package/cjs/CheckboxSetContext-c62db26d.js +12 -0
- package/{es/CheckboxSetContext-1be56556.js.map → cjs/CheckboxSetContext-c62db26d.js.map} +1 -1
- package/cjs/{LineAreaChart-2320dafa.js → LineAreaChart-7e0e021f.js} +2 -2
- package/cjs/{LineAreaChart-2320dafa.js.map → LineAreaChart-7e0e021f.js.map} +1 -1
- package/cjs/PRIVATE_Chart.js +4 -4
- package/cjs/Theme-redwood/theme.css +180 -180
- package/cjs/Theme-stable/theme.css +199 -199
- package/cjs/UNSAFE_BarChart/__test__/BarChart.spec.js +5 -5
- package/cjs/UNSAFE_BarChart.js +5 -5
- package/cjs/UNSAFE_CheckboxItem.js +30 -80
- package/cjs/UNSAFE_CheckboxItem.js.map +1 -1
- package/cjs/UNSAFE_CheckboxSet.js +44 -15
- package/cjs/UNSAFE_CheckboxSet.js.map +1 -1
- package/cjs/UNSAFE_LineAreaChart/__test__/LineChart.spec.js +5 -5
- package/cjs/UNSAFE_LineAreaChart.js +5 -5
- package/cjs/hooks/UNSAFE_useContainerBreakpointValues.js +1 -1
- package/es/ActionCard-623c6191.js +1 -1
- package/es/BarChart-c8f78f4b.js +2 -2
- package/es/BaseButton-5b2791b1.js +2 -2
- package/es/BaseCardView-59efba85.js +6 -6
- package/es/{BaseCardViewSelectionTest-6796b2b4.js → BaseCardViewSelectionTest-ab83a0b0.js} +6 -6
- package/es/{BaseCardViewSelectionTest-6796b2b4.js.map → BaseCardViewSelectionTest-ab83a0b0.js.map} +1 -1
- package/es/BaseNavigationListItem-f3bf5d85.js +47 -0
- package/es/BaseNavigationListItem-f3bf5d85.js.map +1 -0
- package/es/ButtonSet-fa7e8acd.js +2 -2
- package/es/ButtonSetIconButton-c5860cc1.js +2 -2
- package/es/{Center-2ffc1dcc.js → Center-58d4b406.js} +2 -2
- package/es/{Center-2ffc1dcc.js.map → Center-58d4b406.js.map} +1 -1
- package/es/Chart-793bd008.js +9 -9
- package/es/CheckboxControl-7174e0b2.js +6 -6
- package/es/CheckboxRadioField-c7c4643e.js +5 -5
- package/es/CheckboxSet-836e3263.js +49 -0
- package/{cjs/CheckboxSet-13a5c10c.js.map → es/CheckboxSet-836e3263.js.map} +1 -1
- package/es/Chip-2c86a76f.js +1 -1
- package/es/ClearIcon-f1f796b4.js +1 -1
- package/es/CollapseIcon-b6d7cfd6.js +1 -1
- package/es/Collapsible-4cdc17e3.js +2 -2
- package/es/CompactHelpSource-548938ff.js +2 -2
- package/es/{CompactLabelAssistance-fc9478aa.js → CompactLabelAssistance-933d1d68.js} +4 -4
- package/es/{CompactLabelAssistance-fc9478aa.js.map → CompactLabelAssistance-933d1d68.js.map} +1 -1
- package/es/CompactUserAssistance-41c32c6f.js +4 -4
- package/es/ComponentMessageContainer-7d9228a3.js +4 -4
- package/es/ConveyorBeltItem-3d1d7f3c.js +2 -2
- package/es/{DatePicker-4356274b.js → DatePicker-e517dad2.js} +6 -6
- package/es/{DatePicker-4356274b.js.map → DatePicker-e517dad2.js.map} +1 -1
- package/es/DatePickerHeader-7078d6e8.js +3 -3
- package/es/{Diagram-214e374c.js → Diagram-15e246b6.js} +5 -5
- package/es/{Diagram-214e374c.js.map → Diagram-15e246b6.js.map} +1 -1
- package/es/DirectionalCollapseArrowIcon-0298f5ef.js +1 -1
- package/es/DirectionalExpandArrowIcon-cf8fd7a8.js +1 -1
- package/es/DragHandle-9514fcdc.js +1 -1
- package/es/{Dropdown-717319bb.js → Dropdown-2a328b40.js} +5 -5
- package/es/{Dropdown-717319bb.js.map → Dropdown-2a328b40.js.map} +1 -1
- package/es/{EnvironmentProvider-f543a463.js → EnvironmentProvider-6846a7ff.js} +3 -3
- package/es/{EnvironmentProvider-f543a463.js.map → EnvironmentProvider-6846a7ff.js.map} +1 -1
- package/es/FilePicker-d8a0ad3a.js +2 -2
- package/es/{Flex-24628925.js → Flex-5ff5aa5e.js} +2 -2
- package/es/{Flex-24628925.js.map → Flex-5ff5aa5e.js.map} +1 -1
- package/es/{Floating-9703160e.js → Floating-5b269acc.js} +4 -4
- package/es/{Floating-9703160e.js.map → Floating-5b269acc.js.map} +1 -1
- package/es/FormLayout-ecd0259b.js +1 -1
- package/es/Gantt-b21af627.js +9 -9
- package/es/{Grid-cfeac922.js → Grid-5d8f712b.js} +2 -2
- package/es/{Grid-cfeac922.js.map → Grid-5d8f712b.js.map} +1 -1
- package/es/{Gridlines-428bf909.js → Gridlines-4b7301e7.js} +2 -2
- package/es/{Gridlines-428bf909.js.map → Gridlines-4b7301e7.js.map} +1 -1
- package/es/GroupLoadingIndicator-9c995e99.js +1 -1
- package/es/{HighlightText-180e29f6.js → HighlightText-39781e79.js} +2 -2
- package/es/{HighlightText-180e29f6.js.map → HighlightText-39781e79.js.map} +1 -1
- package/es/Icon-90c3a630.js +2 -2
- package/es/IconButton-37310d21.js +2 -2
- package/es/IconMenuButton-9fe6cbf9.js +4 -4
- package/es/IconSwitchButton-61cabbfe.js +2 -2
- package/es/IconToggleButton-f57e5484.js +2 -2
- package/es/{IconUserAssistance-c226cb4f.js → IconUserAssistance-744d71a4.js} +3 -3
- package/es/{IconUserAssistance-c226cb4f.js.map → IconUserAssistance-744d71a4.js.map} +1 -1
- package/es/Indexer-a671092c.js +4 -4
- package/es/InlineHelpSource-b43def76.js +1 -1
- package/es/InlineUserAssistance-bb690d93.js +5 -5
- package/es/InputDateMask-7386adfe.js +7 -7
- package/es/InputDatePicker-aa02a34c.js +8 -8
- package/es/InputPassword-1f1f80b3.js +4 -4
- package/es/InputText-5fb896e7.js +6 -6
- package/es/Label-6674b3f2.js +5 -5
- package/es/LabelValueLayout-23b74176.js +1 -1
- package/es/{Layer-9b06412e.js → Layer-5d259d3a.js} +3 -3
- package/es/{Layer-9b06412e.js.map → Layer-5d259d3a.js.map} +1 -1
- package/es/{LayerHost-45f545d7.js → LayerHost-aaed41a1.js} +2 -2
- package/es/{LayerHost-45f545d7.js.map → LayerHost-aaed41a1.js.map} +1 -1
- package/es/{LayerManager-625d2503.js → LayerManager-87beee1e.js} +2 -2
- package/es/{LayerManager-625d2503.js.map → LayerManager-87beee1e.js.map} +1 -1
- package/es/Legend-98a79c12.js +3 -3
- package/es/{LineAreaChart-413e0043.js → LineAreaChart-35327196.js} +3 -3
- package/es/{LineAreaChart-413e0043.js.map → LineAreaChart-35327196.js.map} +1 -1
- package/es/Link-bfa35319.js +1 -1
- package/es/List-9026206d.js +5 -5
- package/es/{ListItemLayout-695ec1a5.js → ListItemLayout-961c8443.js} +2 -2
- package/es/{ListItemLayout-695ec1a5.js.map → ListItemLayout-961c8443.js.map} +1 -1
- package/es/ListView-c508c3a4.js +3 -3
- package/es/{LiveRegion-81216fe6.js → LiveRegion-4646cd7d.js} +2 -2
- package/es/{LiveRegion-81216fe6.js.map → LiveRegion-4646cd7d.js.map} +1 -1
- package/es/{MaxLengthLiveRegion-cd15b075.js → MaxLengthLiveRegion-1278e638.js} +3 -3
- package/es/{MaxLengthLiveRegion-cd15b075.js.map → MaxLengthLiveRegion-1278e638.js.map} +1 -1
- package/es/{Menu-c7ab8412.js → Menu-b0c28cfd.js} +8 -8
- package/es/{Menu-c7ab8412.js.map → Menu-b0c28cfd.js.map} +1 -1
- package/es/MenuButton-39563941.js +3 -3
- package/es/MenuItem-a8f9c954.js +1 -1
- package/es/Message-be36b84a.js +2 -2
- package/es/{MessageLayer-0946d6b7.js → MessageLayer-322485df.js} +6 -6
- package/es/{MessageLayer-0946d6b7.js.map → MessageLayer-322485df.js.map} +1 -1
- package/es/MessageToast-2fa3c9d4.js +8 -8
- package/es/MessagesManager-0d60fea1.js +3 -3
- package/es/MeterBar-bdd7f9da.js +4 -4
- package/es/MeterCircle-fd10f18b.js +4 -4
- package/es/{Modal-6b11d8cb.js → Modal-986872f3.js} +3 -3
- package/es/{Modal-6b11d8cb.js.map → Modal-986872f3.js.map} +1 -1
- package/es/{MonthView-cc017afe.js → MonthView-99cc26ac.js} +4 -4
- package/es/{MonthView-cc017afe.js.map → MonthView-99cc26ac.js.map} +1 -1
- package/es/{NavigationListItem-ea899fab.js → NavigationList-40cfa2f7.js} +8 -12
- package/es/NavigationList-40cfa2f7.js.map +1 -0
- package/es/NavigationListItem-1efd88f0.js +10 -0
- package/es/NavigationListItem-1efd88f0.js.map +1 -0
- package/es/NumberInputText-21ded33a.js +6 -6
- package/es/{OverflowTabBarItem-8f35961d.js → OverflowTabBarItem-d0a9dae6.js} +7 -6
- package/es/{OverflowTabBarItem-8f35961d.js.map → OverflowTabBarItem-d0a9dae6.js.map} +1 -1
- package/es/PRIVATE_BaseCardView.js +19 -19
- package/es/PRIVATE_Chart.js +29 -29
- package/es/PRIVATE_CheckboxControl.js +21 -21
- package/es/PRIVATE_CheckboxRadioField.js +22 -22
- package/es/PRIVATE_ClearIcon.js +16 -16
- package/es/PRIVATE_DatePickerHeader.js +18 -18
- package/es/PRIVATE_DatePickerLayout.js +4 -4
- package/es/PRIVATE_EmbeddedIconButton.js +3 -3
- package/es/PRIVATE_FormControls.js +19 -19
- package/es/PRIVATE_IconSwitchButton.js +14 -14
- package/es/PRIVATE_Icons/CheckboxMixed.js +14 -14
- package/es/PRIVATE_Icons/CheckboxOff.js +14 -14
- package/es/PRIVATE_Icons/CheckboxOn.js +14 -14
- package/es/PRIVATE_Icons/RadiobuttonOff.js +14 -14
- package/es/PRIVATE_Icons/RadiobuttonOn.js +14 -14
- package/es/PRIVATE_Icons/WarningS.js +14 -14
- package/es/PRIVATE_List.js +18 -18
- package/es/PRIVATE_Message.js +17 -17
- package/es/PRIVATE_MessageLayer.js +11 -11
- package/es/PRIVATE_MonthView.js +7 -7
- package/es/PRIVATE_MonthYearGridView.js +7 -7
- package/es/PRIVATE_PlotArea.js +4 -4
- package/es/PRIVATE_RevealToggleIcon.js +15 -15
- package/es/PRIVATE_SelectCommon.js +26 -26
- package/es/PRIVATE_StyledCheckbox.js +14 -14
- package/es/PRIVATE_Table.js +16 -16
- package/es/PRIVATE_ThemedIcons/CalendarIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/ChartMarqueeSelectIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/ChartPanIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/ChartZoomIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/CheckIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/CheckboxMixedIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/CheckboxOffIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/CheckboxOnIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/CloseIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/CollapseIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/CollapseUpIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/DecrementIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/DeleteIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/DirectionalCollapseArrowIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/DirectionalExpandArrowIcon.js +15 -15
- package/es/PRIVATE_ThemedIcons/DropdownArrowIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/ExpandIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/HelpIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/IncrementIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/MenuButtonDropdownIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/MessageConfirmationIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/MessageErrorIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/MessageInfoIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/MessageWarningIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/MinusIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/NavDownIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/PlusIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/RadioOffIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/RadioOnIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/SortAscendingIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/SortDefaultIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/SortDescendingIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/ViewHideIcon.js +14 -14
- package/es/PRIVATE_ThemedIcons/ViewIcon.js +14 -14
- package/es/PRIVATE_TimeComponent.js +17 -17
- package/es/PRIVATE_VisTabularDatatip.js +4 -4
- package/es/PictoChart-20c9a0c2.js +6 -6
- package/es/{PieChart-f349498b.js → PieChart-e41e3463.js} +5 -5
- package/es/{PieChart-f349498b.js.map → PieChart-e41e3463.js.map} +1 -1
- package/es/{Popup-8889a781.js → Popup-6288438d.js} +9 -9
- package/es/{Popup-8889a781.js.map → Popup-6288438d.js.map} +1 -1
- package/es/{ProgressBar-afafe39a.js → ProgressBar-ed0c5ba0.js} +3 -3
- package/es/{ProgressBar-afafe39a.js.map → ProgressBar-ed0c5ba0.js.map} +1 -1
- package/es/{ProgressCircle-fa5866a3.js → ProgressCircle-95a70910.js} +2 -2
- package/es/{ProgressCircle-fa5866a3.js.map → ProgressCircle-95a70910.js.map} +1 -1
- package/es/ProgressCircleVariants.styles.css +4 -4
- package/es/ProgressCircleVariants.styles2.css +4 -4
- package/es/RadioItem-e5b1f50b.js +6 -6
- package/es/RatingGauge-4d8a68df.js +7 -7
- package/es/RatingGaugeVariants.styles.css +15 -15
- package/es/RatingGaugeVariants.styles2.css +15 -15
- package/es/ReadonlyTextFieldInput-4392c7aa.js +1 -1
- package/es/{RemovableNavigationListItem-4c86bec8.js → RemovableNavigationListItem-d55724ff.js} +4 -3
- package/es/{RemovableNavigationListItem-4c86bec8.js.map → RemovableNavigationListItem-d55724ff.js.map} +1 -1
- package/es/RemovableTabBarItem-217d4a0b.js +2 -2
- package/es/{ReorderableTabBar-84640a66.js → ReorderableTabBar-aae17355.js} +4 -4
- package/es/{ReorderableTabBar-84640a66.js.map → ReorderableTabBar-aae17355.js.map} +1 -1
- package/es/RevealToggleIcon-9236963e.js +1 -1
- package/es/SectionalLegend-6ffb4255.js +4 -4
- package/es/{SectionedContent-815e377a.js → SectionedContent-13d72f4b.js} +5 -5
- package/es/{SectionedContent-815e377a.js.map → SectionedContent-13d72f4b.js.map} +1 -1
- package/es/SelectMultiple-fd3ea6f8.js +8 -8
- package/es/SelectSingle-8a8d1f5e.js +7 -7
- package/es/{SelectionCard-79044c5f.js → SelectionCard-8496e467.js} +2 -2
- package/es/{SelectionCard-79044c5f.js.map → SelectionCard-8496e467.js.map} +1 -1
- package/es/Selector-e56a73a8.js +1 -1
- package/es/SelectorAll-6f080f88.js +5 -5
- package/es/{Sheet-e4121f4a.js → Sheet-8914df23.js} +3 -3
- package/es/{Sheet-e4121f4a.js.map → Sheet-8914df23.js.map} +1 -1
- package/es/SplitMenuButton-79bdfe96.js +3 -3
- package/es/StyledTextField-c79f5438.js +3 -3
- package/es/Submenu-8b3fa593.js +1 -1
- package/es/{TabBar-e39e8dbd.js → TabBar-935be8eb.js} +12 -7
- package/es/{TabBar-e39e8dbd.js.map → TabBar-935be8eb.js.map} +1 -1
- package/es/TabBarItem-c681fa07.js +3 -3
- package/es/TabBarItemVariants.styles.css +3 -3
- package/es/TabBarItemVariants.styles2.css +3 -3
- package/es/TabBarLayout-a0d89ec4.js +1 -1
- package/es/{TabBarMixed-3658d3d2.js → TabBarMixed-1742d71e.js} +12 -7
- package/es/{TabBarMixed-3658d3d2.js.map → TabBarMixed-1742d71e.js.map} +1 -1
- package/es/{TabBarMixedSeparator-8ab78880.js → TabBarMixedSeparator-da2254c9.js} +2 -2
- package/es/{TabBarMixedSeparator-8ab78880.js.map → TabBarMixedSeparator-da2254c9.js.map} +1 -1
- package/es/Table-e3ef68ad.js +3 -3
- package/es/TagCloud-78991c29.js +9 -9
- package/es/TextArea-d97aac1f.js +5 -5
- package/es/TextAreaAutosize-68a4786d.js +5 -5
- package/es/TextField-323fe0e9.js +3 -3
- package/es/TextFieldInput-3c39cb7b.js +1 -1
- package/es/Theme-redwood/theme.css +477 -477
- package/es/Theme-stable/theme.css +371 -371
- package/es/TimeComponentCanvas2D-c2ab38ba.js +4 -4
- package/es/Toolbar-f0e57a9d.js +1 -1
- package/es/TruncatingBadge-084c6682.js +2 -2
- package/es/TruncatingText-780cbb19.js +2 -2
- package/es/UNSAFE_ActionCard.js +2 -2
- package/es/UNSAFE_BarChart/__test__/BarChart.spec.js +29 -29
- package/es/UNSAFE_BarChart.js +29 -29
- package/es/UNSAFE_BaseButton.js +3 -3
- package/es/UNSAFE_Button.js +3 -3
- package/es/UNSAFE_ButtonLayout/tests/ButtonLayout.spec.js +18 -18
- package/es/UNSAFE_ButtonSet.js +4 -4
- package/es/UNSAFE_ButtonSetButton.js +3 -3
- package/es/UNSAFE_ButtonSetIconButton.js +14 -14
- package/es/UNSAFE_ButtonSetItem.js +14 -14
- package/es/UNSAFE_ButtonSetMultiple.js +4 -4
- package/es/UNSAFE_ButtonSetSingle.js +4 -4
- package/es/UNSAFE_CardFlexView.js +19 -19
- package/es/UNSAFE_CardGridView.js +19 -19
- package/es/UNSAFE_Center.js +5 -5
- package/es/UNSAFE_ChartWithLegend.js +4 -4
- package/es/UNSAFE_Checkbox.js +21 -21
- package/es/UNSAFE_CheckboxItem.js +100 -50
- package/es/UNSAFE_CheckboxItem.js.map +1 -1
- package/es/UNSAFE_CheckboxSet.js +31 -65
- package/es/UNSAFE_CheckboxSet.js.map +1 -1
- package/es/UNSAFE_Chip.js +2 -2
- package/es/UNSAFE_Collapsible.js +16 -16
- package/es/UNSAFE_ComponentMessage.js +17 -17
- package/es/UNSAFE_ConveyorBelt.js +14 -14
- package/es/UNSAFE_DatePicker.js +23 -23
- package/es/UNSAFE_Diagram.js +15 -15
- package/es/UNSAFE_Dialog.js +9 -9
- package/es/UNSAFE_DragHandle.js +15 -15
- package/es/UNSAFE_DrawerLayout.js +11 -11
- package/es/UNSAFE_DrawerPopup.js +10 -10
- package/es/UNSAFE_Dropdown.js +12 -12
- package/es/UNSAFE_Environment.js +4 -4
- package/es/UNSAFE_ExpandableList.js +21 -21
- package/es/UNSAFE_FilePicker.js +4 -4
- package/es/UNSAFE_Flex.js +4 -4
- package/es/UNSAFE_Floating.js +10 -10
- package/es/UNSAFE_FormLayout.js +2 -2
- package/es/UNSAFE_Gantt.js +21 -21
- package/es/UNSAFE_Grid.js +4 -4
- package/es/UNSAFE_HighlightText.js +4 -4
- package/es/UNSAFE_Icon.js +14 -14
- package/es/UNSAFE_IconButton.js +14 -14
- package/es/UNSAFE_IconMenuButton.js +18 -18
- package/es/UNSAFE_IconToggleButton.js +14 -14
- package/es/UNSAFE_Indexer.js +6 -6
- package/es/UNSAFE_InputDateMask.js +22 -22
- package/es/UNSAFE_InputDatePicker.js +31 -31
- package/es/UNSAFE_InputPassword.js +21 -21
- package/es/UNSAFE_InputSensitiveText.js +23 -23
- package/es/UNSAFE_InputText.js +24 -24
- package/es/UNSAFE_Label.js +21 -21
- package/es/UNSAFE_LabelValueLayout.js +4 -4
- package/es/UNSAFE_LabelledLink.js +23 -23
- package/es/UNSAFE_Layer.js +7 -7
- package/es/UNSAFE_Legend.js +22 -22
- package/es/UNSAFE_LineAreaChart/__test__/LineChart.spec.js +29 -29
- package/es/UNSAFE_LineAreaChart.js +30 -30
- package/es/UNSAFE_Link.js +2 -2
- package/es/UNSAFE_ListItemLayout.js +5 -5
- package/es/UNSAFE_ListView.js +24 -24
- package/es/UNSAFE_LiveRegion.js +4 -4
- package/es/UNSAFE_Menu.js +20 -20
- package/es/UNSAFE_MenuButton.js +18 -18
- package/es/UNSAFE_MessageBanner.js +17 -17
- package/es/UNSAFE_MessageToast.js +20 -20
- package/es/UNSAFE_MeterBar.js +14 -14
- package/es/UNSAFE_MeterCircle.js +14 -14
- package/es/UNSAFE_Modal.js +7 -7
- package/es/UNSAFE_NavigationList.js +33 -31
- package/es/UNSAFE_NavigationList.js.map +1 -1
- package/es/UNSAFE_NavigationListCommon.js +67 -66
- package/es/UNSAFE_NavigationListCommon.js.map +1 -1
- package/es/UNSAFE_NumberInputText.js +23 -23
- package/es/UNSAFE_OverflowTabBar.js +46 -44
- package/es/UNSAFE_OverflowTabBar.js.map +1 -1
- package/es/UNSAFE_PictoChart.js +13 -13
- package/es/UNSAFE_PieChart/__test__/PieChart.spec.js +14 -14
- package/es/UNSAFE_PieChart.js +14 -14
- package/es/UNSAFE_Popup.js +15 -15
- package/es/UNSAFE_ProgressBar.js +5 -5
- package/es/UNSAFE_ProgressCircle/themes/redwood/ProgressCircleTheme.js +1 -1
- package/es/UNSAFE_ProgressCircle/themes/redwood/ProgressCircleVariants.css.js +1 -1
- package/es/UNSAFE_ProgressCircle/themes/stable/ProgressCircleTheme.js +1 -1
- package/es/UNSAFE_ProgressCircle/themes/stable/ProgressCircleVariants.css.js +1 -1
- package/es/UNSAFE_ProgressCircle.js +5 -5
- package/es/UNSAFE_RadioItem.js +21 -21
- package/es/UNSAFE_RadioSet.js +21 -21
- package/es/UNSAFE_RatingGauge/themes/redwood/RatingGaugeTheme.js +1 -1
- package/es/UNSAFE_RatingGauge/themes/redwood/RatingGaugeVariants.css.js +1 -1
- package/es/UNSAFE_RatingGauge/themes/stable/RatingGaugeTheme.js +1 -1
- package/es/UNSAFE_RatingGauge/themes/stable/RatingGaugeVariants.css.js +1 -1
- package/es/UNSAFE_RatingGauge.js +16 -16
- package/es/UNSAFE_ReorderableTabBar.js +42 -28
- package/es/UNSAFE_ReorderableTabBar.js.map +1 -1
- package/es/UNSAFE_SectionalLegend.js +23 -23
- package/es/UNSAFE_SelectMultiple.js +29 -29
- package/es/UNSAFE_SelectSingle.js +29 -29
- package/es/UNSAFE_SelectionCard.js +4 -4
- package/es/UNSAFE_Selector.js +14 -14
- package/es/UNSAFE_SelectorAll.js +17 -17
- package/es/UNSAFE_Sheet/__test__/Sheet.spec.js +13 -13
- package/es/UNSAFE_Sheet.js +10 -10
- package/es/UNSAFE_SplitMenuButton.js +18 -18
- package/es/UNSAFE_TabBar.js +48 -46
- package/es/UNSAFE_TabBar.js.map +1 -1
- package/es/UNSAFE_TabBarCommon/themes/redwood/TabBarItemTheme.js +1 -1
- package/es/UNSAFE_TabBarCommon/themes/redwood/TabBarItemVariants.css.js +1 -1
- package/es/UNSAFE_TabBarCommon/themes/stable/TabBarItemTheme.js +1 -1
- package/es/UNSAFE_TabBarCommon/themes/stable/TabBarItemVariants.css.js +1 -1
- package/es/UNSAFE_TabBarCommon.js +43 -41
- package/es/UNSAFE_TabBarCommon.js.map +1 -1
- package/es/UNSAFE_TabBarMixed.js +51 -49
- package/es/UNSAFE_TabBarMixed.js.map +1 -1
- package/es/UNSAFE_TableView.js +16 -16
- package/es/UNSAFE_TagCloud.js +22 -22
- package/es/UNSAFE_TextArea.js +23 -23
- package/es/UNSAFE_TextAreaAutosize.js +23 -23
- package/es/UNSAFE_TextField.js +7 -7
- package/es/UNSAFE_ToggleButton.js +3 -3
- package/es/UNSAFE_Toolbar/tests/Toolbar.spec.js +20 -20
- package/es/UNSAFE_Toolbar.js +4 -4
- package/es/UNSAFE_Train.js +15 -15
- package/es/UNSAFE_TruncatingBadge.js +15 -15
- package/es/UNSAFE_TruncatingText.js +15 -15
- package/es/UNSAFE_UserAssistance.js +22 -22
- package/es/UNSAFE_View.js +7 -7
- package/es/UNSAFE_VirtualizedListView.js +18 -18
- package/es/UNSAFE_VisProgressiveLoader/__test__/VisProgressiveLoader.spec.js +8 -8
- package/es/UNSAFE_VisProgressiveLoader.js +6 -6
- package/es/UNSAFE_VisStatusMessage.js +6 -6
- package/es/UNSAFE_WindowOverlay.js +4 -4
- package/es/{View-6013acac.js → View-4dc6ce42.js} +5 -5
- package/es/{View-6013acac.js.map → View-4dc6ce42.js.map} +1 -1
- package/es/{VisNoData-8593beaa.js → VisNoData-c69e8f5e.js} +3 -3
- package/es/{VisNoData-8593beaa.js.map → VisNoData-c69e8f5e.js.map} +1 -1
- package/es/{VisProgressiveLoader-0d9a0dd0.js → VisProgressiveLoader-cc1ab7cc.js} +3 -3
- package/es/{VisProgressiveLoader-0d9a0dd0.js.map → VisProgressiveLoader-cc1ab7cc.js.map} +1 -1
- package/es/{VisTabularDatatip-1f16ca1f.js → VisTabularDatatip-418525b0.js} +2 -2
- package/es/{VisTabularDatatip-1f16ca1f.js.map → VisTabularDatatip-418525b0.js.map} +1 -1
- package/es/{WindowOverlay-e14f8324.js → WindowOverlay-88b63ede.js} +2 -2
- package/es/{WindowOverlay-e14f8324.js.map → WindowOverlay-88b63ede.js.map} +1 -1
- package/es/{YearsGridView-165e5eec.js → YearsGridView-76892288.js} +4 -4
- package/es/{YearsGridView-165e5eec.js.map → YearsGridView-76892288.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 +18 -18
- package/es/hooks/PRIVATE_useChartDatatip.js +13 -13
- package/es/hooks/PRIVATE_useChartEvents.js +17 -17
- package/es/hooks/PRIVATE_useChartMarquee.js +16 -16
- package/es/hooks/PRIVATE_useCssVars.js +7 -7
- package/es/hooks/PRIVATE_useCurrentKey.js +4 -4
- package/es/hooks/PRIVATE_useDatatip.js +11 -11
- package/es/hooks/PRIVATE_useFloating.js +4 -4
- package/es/hooks/PRIVATE_useReorderable.js +4 -4
- package/es/hooks/PRIVATE_useRovingTabIndexContainer.js +4 -4
- package/es/hooks/PRIVATE_useSelection.js +4 -4
- package/es/hooks/PRIVATE_useTabBar.js +5 -5
- package/es/hooks/PRIVATE_useVisContextMenu.js +18 -18
- package/es/hooks/PRIVATE_useVisEvents.js +4 -4
- package/es/hooks/PRIVATE_useVisMeterEvents.js +13 -13
- package/es/hooks/PRIVATE_useVisSelection.js +12 -12
- package/es/hooks/UNSAFE_useColorScheme.js +3 -3
- package/es/hooks/UNSAFE_useContainerBreakpointValues.js +1 -1
- package/es/hooks/UNSAFE_useCurrentBgColor.js +3 -3
- package/es/hooks/UNSAFE_useDensity.js +3 -3
- package/es/hooks/UNSAFE_useOutsideClick.js +7 -7
- 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 +5 -5
- package/es/hooks/UNSAFE_useTooltip.js +15 -15
- package/es/hooks/UNSAFE_useTranslationBundle.js +3 -3
- package/es/hooks/UNSAFE_useUser.js +3 -3
- package/es/{index-5f0f1501.js → index-75f23286.js} +2 -2
- package/es/index-75f23286.js.map +1 -0
- package/es/listViewSelectionTests-ebf987d2.js +4 -4
- package/es/{render-c90e85c7.js → render-8e2a09d1.js} +3 -3
- package/es/{render-c90e85c7.js.map → render-8e2a09d1.js.map} +1 -1
- package/es/{tabbableUtils-e6193af2.js → tabbableUtils-73a9ba14.js} +3 -3
- package/es/{tabbableUtils-e6193af2.js.map → tabbableUtils-73a9ba14.js.map} +1 -1
- package/es/{testData-2998863b.js → testData-0aee4d83.js} +3 -3
- package/es/{testData-2998863b.js.map → testData-0aee4d83.js.map} +1 -1
- package/es/useCellNavigation-006fbce0.js +1 -1
- package/es/useChartContextMenu-0014fc73.js +3 -3
- package/es/{useChartDatatip-b6b2b00a.js → useChartDatatip-f7bacd9b.js} +4 -4
- package/es/{useChartDatatip-b6b2b00a.js.map → useChartDatatip-f7bacd9b.js.map} +1 -1
- package/es/useChartMarquee-38dbb5f9.js +1 -1
- package/es/{useColorScheme-e1b17324.js → useColorScheme-bf110202.js} +2 -2
- package/es/{useColorScheme-e1b17324.js.map → useColorScheme-bf110202.js.map} +1 -1
- package/es/useContextMenu-81db2534.js +3 -3
- package/es/{useCssVars-64d9b696.js → useCssVars-b3bf30fb.js} +5 -5
- package/es/{useCssVars-64d9b696.js.map → useCssVars-b3bf30fb.js.map} +1 -1
- package/es/{useCurrentBgColor-d89afadb.js → useCurrentBgColor-b3ebd7be.js} +2 -2
- package/es/{useCurrentBgColor-d89afadb.js.map → useCurrentBgColor-b3ebd7be.js.map} +1 -1
- package/es/{useCurrentKey-db7d3bb9.js → useCurrentKey-1f99b0f6.js} +2 -2
- package/es/{useCurrentKey-db7d3bb9.js.map → useCurrentKey-1f99b0f6.js.map} +1 -1
- package/es/{useDatatip-7c661980.js → useDatatip-f9bcaab9.js} +4 -4
- package/es/{useDatatip-7c661980.js.map → useDatatip-f9bcaab9.js.map} +1 -1
- package/es/{useDensity-60cfa748.js → useDensity-9f6c6bf0.js} +2 -2
- package/es/{useDensity-60cfa748.js.map → useDensity-9f6c6bf0.js.map} +1 -1
- package/es/{useFloating-c99976f8.js → useFloating-1cca9e4f.js} +2 -2
- package/es/{useFloating-c99976f8.js.map → useFloating-1cca9e4f.js.map} +1 -1
- package/es/{useKeyboardEvents-102b4feb.js → useKeyboardEvents-11b26017.js} +2 -2
- package/es/{useKeyboardEvents-102b4feb.js.map → useKeyboardEvents-11b26017.js.map} +1 -1
- package/es/useLegendContextMenu-d88be99d.js +5 -5
- package/es/{useMeterDatatip-262c0e39.js → useMeterDatatip-7366880d.js} +3 -3
- package/es/{useMeterDatatip-262c0e39.js.map → useMeterDatatip-7366880d.js.map} +1 -1
- package/es/{BaseNavigationListItem-3a377d46.js → useNavigationListItem-5f7cd66b.js} +3 -41
- package/es/useNavigationListItem-5f7cd66b.js.map +1 -0
- package/es/{useOutsideClick-eb8324f6.js → useOutsideClick-ab98bfa3.js} +2 -2
- package/es/{useOutsideClick-eb8324f6.js.map → useOutsideClick-ab98bfa3.js.map} +1 -1
- package/es/{usePopupAnimation-4be04290.js → usePopupAnimation-4969107b.js} +2 -2
- package/es/{usePopupAnimation-4be04290.js.map → usePopupAnimation-4969107b.js.map} +1 -1
- package/es/{usePrefixSuffix-71a410f4.js → usePrefixSuffix-a14dacb0.js} +2 -2
- package/es/{usePrefixSuffix-71a410f4.js.map → usePrefixSuffix-a14dacb0.js.map} +1 -1
- package/es/useReorderableItem-25aa1c34.js +2 -2
- package/es/{useRovingTabIndexContainer-e7926bd6.js → useRovingTabIndexContainer-91fd85f3.js} +2 -2
- package/es/{useRovingTabIndexContainer-e7926bd6.js.map → useRovingTabIndexContainer-91fd85f3.js.map} +1 -1
- package/es/{useScale-d64a1a28.js → useScale-42018695.js} +2 -2
- package/es/{useScale-d64a1a28.js.map → useScale-42018695.js.map} +1 -1
- package/es/useSelectCommon-b6d67057.js +11 -11
- package/es/{useSelectDrill-9ce5bccf.js → useSelectDrill-333650bd.js} +3 -3
- package/es/{useSelectDrill-9ce5bccf.js.map → useSelectDrill-333650bd.js.map} +1 -1
- package/es/{useSelection-c12f7802.js → useSelection-48f572e5.js} +5 -5
- package/es/{useSelection-c12f7802.js.map → useSelection-48f572e5.js.map} +1 -1
- package/es/{useSelection-ce0f9a43.js → useSelection-a098b3af.js} +2 -2
- package/es/{useSelection-ce0f9a43.js.map → useSelection-a098b3af.js.map} +1 -1
- package/es/{useTabBar-8af19c50.js → useTabBar-4b318196.js} +2 -2
- package/es/{useTabBar-8af19c50.js.map → useTabBar-4b318196.js.map} +1 -1
- package/es/{useTestId-adde554c.js → useTestId-f5aed66c.js} +2 -2
- package/es/{useTestId-adde554c.js.map → useTestId-f5aed66c.js.map} +1 -1
- package/es/{useTheme-1f6035d2.js → useTheme-e7ea1253.js} +2 -2
- package/es/{useTheme-1f6035d2.js.map → useTheme-e7ea1253.js.map} +1 -1
- package/es/{useThemeInterpolations-9bddc683.js → useThemeInterpolations-66ce2e56.js} +4 -4
- package/es/{useThemeInterpolations-9bddc683.js.map → useThemeInterpolations-66ce2e56.js.map} +1 -1
- package/es/{useTooltip-9dec25b3.js → useTooltip-30a4a4fc.js} +2 -2
- package/es/{useTooltip-9dec25b3.js.map → useTooltip-30a4a4fc.js.map} +1 -1
- package/es/{useTooltipControlled-2044f639.js → useTooltipControlled-eafec36e.js} +8 -8
- package/es/{useTooltipControlled-2044f639.js.map → useTooltipControlled-eafec36e.js.map} +1 -1
- package/es/{useTranslationBundle-cd815e10.js → useTranslationBundle-e8a8c4f3.js} +2 -2
- package/es/{useTranslationBundle-cd815e10.js.map → useTranslationBundle-e8a8c4f3.js.map} +1 -1
- package/es/{useUser-99920e02.js → useUser-fb09e212.js} +2 -2
- package/es/{useUser-99920e02.js.map → useUser-fb09e212.js.map} +1 -1
- package/es/{useVisEvents-4cfe354c.js → useVisEvents-e31dcd17.js} +2 -2
- package/es/{useVisEvents-4cfe354c.js.map → useVisEvents-e31dcd17.js.map} +1 -1
- package/es/utils/PRIVATE_visTestUtils.js +6 -6
- package/es/{withDirectionIcon-f8ff778c.js → withDirectionIcon-6eefb71a.js} +2 -2
- package/es/{withDirectionIcon-f8ff778c.js.map → withDirectionIcon-6eefb71a.js.map} +1 -1
- package/package.json +2 -2
- package/amd/Center-5f845605.js +0 -2
- package/amd/CompactLabelAssistance-91aeaa2e.js +0 -2
- package/amd/HighlightText-ad9bc1f8.js +0 -2
- package/amd/Layer-3cc44164.js +0 -2
- package/amd/ListItemLayout-dba9e24b.js +0 -2
- package/amd/LiveRegion-be6f36d7.js +0 -2
- package/amd/MaxLengthCounter-caafceef.js +0 -2
- package/amd/MaxLengthCounter-caafceef.js.map +0 -1
- package/amd/MaxLengthLiveRegion-23d7e335.js +0 -2
- package/amd/MessageLayer-d2c49999.js +0 -2
- package/amd/NavigationListItem-0a4f8a9c.js +0 -2
- package/amd/SectionedContent-655a773a.js +0 -2
- package/amd/SelectionCard-0ecc7773.js +0 -2
- package/amd/TabBarMixedSeparator-10a52b13.js +0 -2
- package/amd/TextArea-44c90bc4.js +0 -2
- package/amd/TextArea-44c90bc4.js.map +0 -1
- package/amd/TextAreaAutosize-0a023972.js +0 -2
- package/amd/VisNoData-bfb5065e.js +0 -2
- package/amd/index-17fdb080.js.map +0 -1
- package/amd/useCssVars-948d1e7c.js +0 -2
- package/amd/useCurrentKey-00f81f0b.js +0 -2
- package/amd/useKeyboardEvents-e9a2b72b.js +0 -2
- package/amd/usePrefixSuffix-6ad5569e.js +0 -2
- package/amd/useSelection-0440840d.js +0 -2
- package/amd/useSelection-f1d96ce9.js +0 -2
- package/amd/useThemeInterpolations-41cbd433.js +0 -2
- package/amd/useTooltip-d28e9b0f.js +0 -2
- package/cjs/CheckboxSet-13a5c10c.js +0 -53
- package/es/BaseNavigationListItem-3a377d46.js.map +0 -1
- package/es/CheckboxSetContext-1be56556.js +0 -9
- package/es/NavigationListItem-ea899fab.js.map +0 -1
- package/es/index-5f0f1501.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSelection-0440840d.js","sources":["../../src/hooks/PRIVATE_useVisSelection/ClearSelectionButton.tsx","../../src/hooks/PRIVATE_useVisSelection/useClearSelection.tsx","../../src/hooks/PRIVATE_useVisSelection/useSelection.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 */\nimport { BaseButton } from '../../UNSAFE_BaseButton';\nimport { Text } from '#UNSAFE_Text';\nimport { useTranslationBundle } from '../UNSAFE_useTranslationBundle';\nimport type { BundleType } from '../../resources/nls/bundle';\nimport { clearButtonStyles } from './themes/ClearSelection.css';\n\ntype Props = {\n onAction: () => void;\n};\n\n/**\n * Clear selection button component\n */\nexport const ClearSelectionButton = ({ onAction }: Props) => {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const clearSelectionLabel = `${translations.vis_clearSelection()}`;\n return (\n <div class={clearButtonStyles.base}>\n <BaseButton\n styling={['default']}\n elementDetails={{ type: 'span', isFocusable: false, isLabel: true }}\n variant=\"outlined\"\n onAction={onAction}>\n <Text truncation={'ellipsis'} weight={'inherit'}>\n {clearSelectionLabel}\n </Text>\n </BaseButton>\n </div>\n );\n};\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 { useRef, useState } from 'preact/hooks';\nimport { ClearSelectionButton } from './ClearSelectionButton';\nimport { Layer } from '../../UNSAFE_Layer';\nimport { Floating } from '../../UNSAFE_Floating';\n\n/**\n * The default offset for clear selection mainAxis.\n */\nconst DEFAULT_OFFSET = 18;\ntype Props = {\n clearSelection: () => void;\n};\ntype SelectionMode = 'none' | 'single' | 'multiple';\n\nexport function useClearSelection<K>({ clearSelection }: Props) {\n const [isVisible, setIsVisible] = useState(false);\n const coordinates = useRef({ x: 0, y: 0 });\n\n const tryToggleClearButton = (\n event: PointerEvent,\n key: K | undefined,\n selectionMode: SelectionMode,\n selectedIds: Set<K>\n ) => {\n if (\n event.pointerType === 'touch' &&\n key === undefined &&\n selectionMode === 'multiple' &&\n selectedIds.size > 1\n ) {\n setIsVisible(!isVisible);\n coordinates.current = { x: event.clientX, y: event.clientY };\n return true;\n }\n return false;\n };\n\n const offsetValue = { mainAxis: 2 * DEFAULT_OFFSET };\n const anchorRef = { current: coordinates.current };\n\n const clearSelectionContent = isVisible ? (\n <Layer>\n <Floating\n anchorRef={anchorRef}\n offsetValue={offsetValue}\n placement=\"top\"\n flipOptions={{ crossAxis: false, mainAxis: false }}\n shiftOptions={{ crossAxis: true, mainAxis: true }}>\n <ClearSelectionButton\n onAction={() => {\n setIsVisible(false);\n clearSelection();\n }}\n />\n </Floating>\n </Layer>\n ) : null;\n\n return {\n clearSelectionContent,\n tryToggleClearButton\n };\n}\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 { useCallback, useRef } from 'preact/hooks';\nimport { isEqual } from '../../utils/UNSAFE_visUtils/eventsUtils';\nimport { useClearSelection } from './useClearSelection';\n\nexport type SelectionMode = 'none' | 'single' | 'multiple';\nexport type SelectionDetail<K, D> = {\n ids: K[];\n data: (D | undefined)[];\n};\ntype SelectionBehavior = 'toggle' | 'replace';\n\nconst NAVKEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];\n\n/**\n * The constant that defines time to wait to change selection after pointer up is fired.\n * If double click didn't happen\n */\nconst DBLCLICK_THRESHOLD = 250;\n\n/**\n * Handles the selection.\n * @param itemId The id of the item.\n * @param selectedIds The set of selected item ids.\n * @param selectionMode The selection mode.\n * @param selectionBehavior The selection behavior. If 'toggle', unselected item will be selected and\n * vice versa. If 'replace', the item will replace the previous selection.\n * @param getDataById The callback to get item data from idDataMap.\n * @param onChange The callback to trigger when selection changes.\n */\nconst handleSelect = <K, D>(\n itemId: K | undefined,\n selectedIds: Set<K>,\n selectionMode: SelectionMode,\n selectionBehavior: SelectionBehavior,\n getDataById: (id: K) => D | undefined,\n onChange?: (detail: SelectionDetail<K, D>) => void\n) => {\n let ids = new Set<K>([]);\n if (itemId != null) {\n ids = new Set(selectedIds);\n const isSelected = selectedIds.has(itemId);\n\n if (selectionBehavior === 'toggle') {\n if (isSelected) {\n ids.delete(itemId);\n } else if (selectionMode === 'single') {\n ids = new Set([itemId]); // only selection\n } else {\n ids.add(itemId); // add to selection in \"multiple\" selectionMode\n }\n } else if (!isSelected) {\n // In \"multiple\" selection mode, only replace selection if unselected item is selected.\n // In \"single\" selection mode, only need to replace if unselected item is selected.\n ids = new Set([itemId]);\n }\n }\n\n if (!isEqual<K>(ids, selectedIds)) {\n onChange?.({ ids: [...ids], data: [...ids].map(getDataById) });\n }\n};\n\ntype Props<K, D> = {\n selection?: K[];\n selectionMode?: SelectionMode;\n idExtracter: (event: Event) => K | undefined;\n onChange?: (detail: SelectionDetail<K, D>) => void;\n isKeyboardSelection?: (event: KeyboardEvent) => boolean;\n isDrillEnabled?: boolean;\n getDataById: (id: K) => D | undefined;\n};\n\n/**\n * The hook to handle the selection behavior in vizualization components.\n */\nexport function useSelection<K, D>({\n selection = [],\n selectionMode = 'none',\n idExtracter,\n onChange,\n isDrillEnabled,\n isKeyboardSelection,\n getDataById\n}: Props<K, D>) {\n const setTimeOutRef = useRef<ReturnType<typeof setTimeout>>();\n\n const clearSelection = () => {\n handleSelect<K, D>(\n undefined,\n new Set(selection),\n selectionMode,\n 'replace',\n getDataById,\n onChange\n );\n };\n\n const { clearSelectionContent, tryToggleClearButton } = useClearSelection<K>({ clearSelection });\n\n const onPointerUp = useCallback(\n (event: PointerEvent) => {\n const selectedIds = new Set(selection);\n if (setTimeOutRef.current && isDrillEnabled) {\n clearTimeout(setTimeOutRef.current);\n setTimeOutRef.current = undefined;\n // doubleClick happened\n return;\n }\n\n const key = idExtracter(event);\n\n if (tryToggleClearButton(event, key, selectionMode, selectedIds)) {\n return;\n }\n\n const isMeta = event.metaKey;\n const isCtrl = event.ctrlKey;\n // If there was a previous pointerUp event that occurred that should prevent selection,\n // event.preventDefault was called\n if (event.defaultPrevented || (key == null && (isMeta || isCtrl))) {\n return;\n }\n\n // TODO: Encorporate more logic of dvt.EventManager.prototype._onClick\n // this is a simple version of EventManager.prototype._onClick. Currently we are not checking\n // for event.pageX, event.pageY to determine if they are exactly clicked on the same point.\n // for now, the assumption is that if the pointerups are within 250ms, they are for a same double click.\n if (isDrillEnabled) {\n setTimeOutRef.current = setTimeout(() => {\n // double pointer up didn't happen\n handleSelect<K, D>(\n key,\n selectedIds,\n selectionMode,\n isMeta || isCtrl || event.pointerType === 'touch' ? 'toggle' : 'replace',\n getDataById,\n onChange\n );\n setTimeOutRef.current = undefined;\n }, DBLCLICK_THRESHOLD);\n } else {\n handleSelect<K, D>(\n key,\n selectedIds,\n selectionMode,\n isMeta || isCtrl || event.pointerType === 'touch' ? 'toggle' : 'replace',\n getDataById,\n onChange\n );\n }\n },\n [\n selection,\n selectionMode,\n onChange,\n idExtracter,\n isDrillEnabled,\n getDataById,\n tryToggleClearButton\n ]\n );\n\n const onContextMenu = useCallback(\n (event: MouseEvent) => {\n const key = idExtracter(event);\n const isCtrl = event.ctrlKey;\n handleSelect<K, D>(\n key,\n new Set(selection),\n selectionMode,\n isCtrl ? 'toggle' : 'replace',\n getDataById,\n onChange\n );\n },\n [selection, selectionMode, onChange, idExtracter, getDataById]\n );\n\n const onKeyUp = useCallback(\n (event: KeyboardEvent) => {\n const isShift = event.shiftKey;\n const isSpaceCtrl = event.ctrlKey && event.key === ' ';\n const isArrowKey = NAVKEYS.indexOf(event.key) !== -1;\n const itemKey = idExtracter(event);\n\n if (isArrowKey || isSpaceCtrl || (isKeyboardSelection && isKeyboardSelection(event))) {\n const behavior = isShift || isSpaceCtrl ? 'toggle' : 'replace';\n handleSelect<K, D>(\n itemKey,\n new Set(selection),\n selectionMode,\n behavior,\n getDataById,\n onChange\n );\n }\n },\n [selection, selectionMode, onChange, idExtracter, isKeyboardSelection, getDataById]\n );\n\n return {\n selectionContent: clearSelectionContent,\n selectionProps:\n selectionMode === 'none' || onChange == null\n ? {}\n : {\n onKeyUp,\n onContextMenu,\n onPointerUp\n }\n };\n}\n"],"names":["ClearSelectionButton","onAction","clearSelectionLabel","useTranslationBundle","vis_clearSelection","_jsx","class","clearButtonStyles","base","children","BaseButton","styling","elementDetails","type","isFocusable","isLabel","variant","Text","truncation","weight","DEFAULT_OFFSET","NAVKEYS","handleSelect","itemId","selectedIds","selectionMode","selectionBehavior","getDataById","onChange","ids","Set","isSelected","has","delete","add","isEqual","data","map","selection","idExtracter","isDrillEnabled","isKeyboardSelection","setTimeOutRef","useRef","clearSelectionContent","tryToggleClearButton","clearSelection","isVisible","setIsVisible","useState","coordinates","x","y","offsetValue","mainAxis","anchorRef","current","Layer","jsx","Floating","placement","flipOptions","crossAxis","shiftOptions","event","key","pointerType","undefined","size","clientX","clientY","useClearSelection","onPointerUp","useCallback","clearTimeout","isMeta","metaKey","isCtrl","ctrlKey","defaultPrevented","setTimeout","onContextMenu","onKeyUp","isShift","shiftKey","isSpaceCtrl","isArrowKey","indexOf","itemKey","behavior","selectionContent","selectionProps"],"mappings":"wVAoBO,MAAMA,EAAuB,EAAGC,eACrC,MACMC,EAAsB,GADPC,uBAAiC,4BACVC,uBAC5C,OACEC,EAAAA,IAAK,MAAA,CAAAC,MAAOC,EAAAA,kBAAkBC,KAC5BC,SAAAJ,M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S,SAAW,UACpBlD,EACAC,EACD,GAEH,CAACU,EAAWb,EAAeG,EAAUW,EAAaZ,IAG9CuD,EAAUT,eACbT,IACC,MAAMmB,EAAUnB,EAAMoB,SAChBC,EAAcrB,EAAMc,SAAyB,MAAdd,EAAMC,IACrCqB,GAA6C,IAAhCjE,EAAQkE,QAAQvB,EAAMC,KACnCuB,EAAUjD,EAAYyB,GAE5B,GAAIsB,GAAcD,GAAgB5C,GAAuBA,EAAoBuB,GAAS,CACpF,MAAMyB,EAAWN,GAAWE,EAAc,SAAW,UACrD/D,EACEkE,EACA,IAAI1D,IAAIQ,GACRb,EACAgE,EACA9D,EACAC,EAEH,IAEH,CAACU,EAAWb,EAAeG,EAAUW,EAAaE,EAAqBd,IAGzE,MAAO,CACL+D,iBAAkB9C,EAClB+C,eACoB,SAAlBlE,GAAwC,MAAZG,EACxB,CAAE,EACF,CACEsD,UACAD,gBACAT,eAGZ"}
|
|
1
|
+
{"version":3,"file":"useSelection-91c04393.js","sources":["../../src/hooks/PRIVATE_useVisSelection/ClearSelectionButton.tsx","../../src/hooks/PRIVATE_useVisSelection/useClearSelection.tsx","../../src/hooks/PRIVATE_useVisSelection/useSelection.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 */\nimport { BaseButton } from '../../UNSAFE_BaseButton';\nimport { Text } from '#UNSAFE_Text';\nimport { useTranslationBundle } from '../UNSAFE_useTranslationBundle';\nimport type { BundleType } from '../../resources/nls/bundle';\nimport { clearButtonStyles } from './themes/ClearSelection.css';\n\ntype Props = {\n onAction: () => void;\n};\n\n/**\n * Clear selection button component\n */\nexport const ClearSelectionButton = ({ onAction }: Props) => {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const clearSelectionLabel = `${translations.vis_clearSelection()}`;\n return (\n <div class={clearButtonStyles.base}>\n <BaseButton\n styling={['default']}\n elementDetails={{ type: 'span', isFocusable: false, isLabel: true }}\n variant=\"outlined\"\n onAction={onAction}>\n <Text truncation={'ellipsis'} weight={'inherit'}>\n {clearSelectionLabel}\n </Text>\n </BaseButton>\n </div>\n );\n};\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 { useRef, useState } from 'preact/hooks';\nimport { ClearSelectionButton } from './ClearSelectionButton';\nimport { Layer } from '../../UNSAFE_Layer';\nimport { Floating } from '../../UNSAFE_Floating';\n\n/**\n * The default offset for clear selection mainAxis.\n */\nconst DEFAULT_OFFSET = 18;\ntype Props = {\n clearSelection: () => void;\n};\ntype SelectionMode = 'none' | 'single' | 'multiple';\n\nexport function useClearSelection<K>({ clearSelection }: Props) {\n const [isVisible, setIsVisible] = useState(false);\n const coordinates = useRef({ x: 0, y: 0 });\n\n const tryToggleClearButton = (\n event: PointerEvent,\n key: K | undefined,\n selectionMode: SelectionMode,\n selectedIds: Set<K>\n ) => {\n if (\n event.pointerType === 'touch' &&\n key === undefined &&\n selectionMode === 'multiple' &&\n selectedIds.size > 1\n ) {\n setIsVisible(!isVisible);\n coordinates.current = { x: event.clientX, y: event.clientY };\n return true;\n }\n return false;\n };\n\n const offsetValue = { mainAxis: 2 * DEFAULT_OFFSET };\n const anchorRef = { current: coordinates.current };\n\n const clearSelectionContent = isVisible ? (\n <Layer>\n <Floating\n anchorRef={anchorRef}\n offsetValue={offsetValue}\n placement=\"top\"\n flipOptions={{ crossAxis: false, mainAxis: false }}\n shiftOptions={{ crossAxis: true, mainAxis: true }}>\n <ClearSelectionButton\n onAction={() => {\n setIsVisible(false);\n clearSelection();\n }}\n />\n </Floating>\n </Layer>\n ) : null;\n\n return {\n clearSelectionContent,\n tryToggleClearButton\n };\n}\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 { useCallback, useRef } from 'preact/hooks';\nimport { isEqual } from '../../utils/UNSAFE_visUtils/eventsUtils';\nimport { useClearSelection } from './useClearSelection';\n\nexport type SelectionMode = 'none' | 'single' | 'multiple';\nexport type SelectionDetail<K, D> = {\n ids: K[];\n data: (D | undefined)[];\n};\ntype SelectionBehavior = 'toggle' | 'replace';\n\nconst NAVKEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];\n\n/**\n * The constant that defines time to wait to change selection after pointer up is fired.\n * If double click didn't happen\n */\nconst DBLCLICK_THRESHOLD = 250;\n\n/**\n * Handles the selection.\n * @param itemId The id of the item.\n * @param selectedIds The set of selected item ids.\n * @param selectionMode The selection mode.\n * @param selectionBehavior The selection behavior. If 'toggle', unselected item will be selected and\n * vice versa. If 'replace', the item will replace the previous selection.\n * @param getDataById The callback to get item data from idDataMap.\n * @param onChange The callback to trigger when selection changes.\n */\nconst handleSelect = <K, D>(\n itemId: K | undefined,\n selectedIds: Set<K>,\n selectionMode: SelectionMode,\n selectionBehavior: SelectionBehavior,\n getDataById: (id: K) => D | undefined,\n onChange?: (detail: SelectionDetail<K, D>) => void\n) => {\n let ids = new Set<K>([]);\n if (itemId != null) {\n ids = new Set(selectedIds);\n const isSelected = selectedIds.has(itemId);\n\n if (selectionBehavior === 'toggle') {\n if (isSelected) {\n ids.delete(itemId);\n } else if (selectionMode === 'single') {\n ids = new Set([itemId]); // only selection\n } else {\n ids.add(itemId); // add to selection in \"multiple\" selectionMode\n }\n } else if (!isSelected) {\n // In \"multiple\" selection mode, only replace selection if unselected item is selected.\n // In \"single\" selection mode, only need to replace if unselected item is selected.\n ids = new Set([itemId]);\n }\n }\n\n if (!isEqual<K>(ids, selectedIds)) {\n onChange?.({ ids: [...ids], data: [...ids].map(getDataById) });\n }\n};\n\ntype Props<K, D> = {\n selection?: K[];\n selectionMode?: SelectionMode;\n idExtracter: (event: Event) => K | undefined;\n onChange?: (detail: SelectionDetail<K, D>) => void;\n isKeyboardSelection?: (event: KeyboardEvent) => boolean;\n isDrillEnabled?: boolean;\n getDataById: (id: K) => D | undefined;\n};\n\n/**\n * The hook to handle the selection behavior in vizualization components.\n */\nexport function useSelection<K, D>({\n selection = [],\n selectionMode = 'none',\n idExtracter,\n onChange,\n isDrillEnabled,\n isKeyboardSelection,\n getDataById\n}: Props<K, D>) {\n const setTimeOutRef = useRef<ReturnType<typeof setTimeout>>();\n\n const clearSelection = () => {\n handleSelect<K, D>(\n undefined,\n new Set(selection),\n selectionMode,\n 'replace',\n getDataById,\n onChange\n );\n };\n\n const { clearSelectionContent, tryToggleClearButton } = useClearSelection<K>({ clearSelection });\n\n const onPointerUp = useCallback(\n (event: PointerEvent) => {\n const selectedIds = new Set(selection);\n if (setTimeOutRef.current && isDrillEnabled) {\n clearTimeout(setTimeOutRef.current);\n setTimeOutRef.current = undefined;\n // doubleClick happened\n return;\n }\n\n const key = idExtracter(event);\n\n if (tryToggleClearButton(event, key, selectionMode, selectedIds)) {\n return;\n }\n\n const isMeta = event.metaKey;\n const isCtrl = event.ctrlKey;\n // If there was a previous pointerUp event that occurred that should prevent selection,\n // event.preventDefault was called\n if (event.defaultPrevented || (key == null && (isMeta || isCtrl))) {\n return;\n }\n\n // TODO: Encorporate more logic of dvt.EventManager.prototype._onClick\n // this is a simple version of EventManager.prototype._onClick. Currently we are not checking\n // for event.pageX, event.pageY to determine if they are exactly clicked on the same point.\n // for now, the assumption is that if the pointerups are within 250ms, they are for a same double click.\n if (isDrillEnabled) {\n setTimeOutRef.current = setTimeout(() => {\n // double pointer up didn't happen\n handleSelect<K, D>(\n key,\n selectedIds,\n selectionMode,\n isMeta || isCtrl || event.pointerType === 'touch' ? 'toggle' : 'replace',\n getDataById,\n onChange\n );\n setTimeOutRef.current = undefined;\n }, DBLCLICK_THRESHOLD);\n } else {\n handleSelect<K, D>(\n key,\n selectedIds,\n selectionMode,\n isMeta || isCtrl || event.pointerType === 'touch' ? 'toggle' : 'replace',\n getDataById,\n onChange\n );\n }\n },\n [\n selection,\n selectionMode,\n onChange,\n idExtracter,\n isDrillEnabled,\n getDataById,\n tryToggleClearButton\n ]\n );\n\n const onContextMenu = useCallback(\n (event: MouseEvent) => {\n const key = idExtracter(event);\n const isCtrl = event.ctrlKey;\n handleSelect<K, D>(\n key,\n new Set(selection),\n selectionMode,\n isCtrl ? 'toggle' : 'replace',\n getDataById,\n onChange\n );\n },\n [selection, selectionMode, onChange, idExtracter, getDataById]\n );\n\n const onKeyUp = useCallback(\n (event: KeyboardEvent) => {\n const isShift = event.shiftKey;\n const isSpaceCtrl = event.ctrlKey && event.key === ' ';\n const isArrowKey = NAVKEYS.indexOf(event.key) !== -1;\n const itemKey = idExtracter(event);\n\n if (isArrowKey || isSpaceCtrl || (isKeyboardSelection && isKeyboardSelection(event))) {\n const behavior = isShift || isSpaceCtrl ? 'toggle' : 'replace';\n handleSelect<K, D>(\n itemKey,\n new Set(selection),\n selectionMode,\n behavior,\n getDataById,\n onChange\n );\n }\n },\n [selection, selectionMode, onChange, idExtracter, isKeyboardSelection, getDataById]\n );\n\n return {\n selectionContent: clearSelectionContent,\n selectionProps:\n selectionMode === 'none' || onChange == null\n ? {}\n : {\n onKeyUp,\n onContextMenu,\n onPointerUp\n }\n };\n}\n"],"names":["ClearSelectionButton","onAction","clearSelectionLabel","useTranslationBundle","vis_clearSelection","_jsx","class","clearButtonStyles","base","children","BaseButton","styling","elementDetails","type","isFocusable","isLabel","variant","Text","truncation","weight","DEFAULT_OFFSET","NAVKEYS","handleSelect","itemId","selectedIds","selectionMode","selectionBehavior","getDataById","onChange","ids","Set","isSelected","has","delete","add","isEqual","data","map","selection","idExtracter","isDrillEnabled","isKeyboardSelection","setTimeOutRef","useRef","clearSelectionContent","tryToggleClearButton","clearSelection","isVisible","setIsVisible","useState","coordinates","x","y","offsetValue","mainAxis","anchorRef","current","Layer","jsx","Floating","placement","flipOptions","crossAxis","shiftOptions","event","key","pointerType","undefined","size","clientX","clientY","useClearSelection","onPointerUp","useCallback","clearTimeout","isMeta","metaKey","isCtrl","ctrlKey","defaultPrevented","setTimeout","onContextMenu","onKeyUp","isShift","shiftKey","isSpaceCtrl","isArrowKey","indexOf","itemKey","behavior","selectionContent","selectionProps"],"mappings":"wVAoBO,MAAMA,EAAuB,EAAGC,eACrC,MACMC,EAAsB,GADPC,uBAAiC,4BACVC,uBAC5C,OACEC,EAAAA,IAAK,MAAA,CAAAC,MAAOC,EAAAA,kBAAkBC,KAC5BC,SAAAJ,MAACK,EAAAA,WAAU,CACTC,QAAS,CAAC,WACVC,eAAgB,CAAEC,KAAM,OAAQC,aAAa,EAAOC,SAAS,GAC7DC,QAAQ,WACRf,SAAUA,EAAQQ,SAClBJ,EAAAA,IAACY,EAAIA,KAAC,CAAAC,WAAY,WAAYC,OAAQ,UACnCV,SAAAP,OAIP,ECnBEkB,EAAiB,GCGvB,MAAMC,EAAU,CAAC,UAAW,YAAa,YAAa,cAkBhDC,EAAe,CACnBC,EACAC,EACAC,EACAC,EACAC,EACAC,KAEA,IAAIC,EAAM,IAAIC,IAAO,IACrB,GAAc,MAAVP,EAAgB,CAClBM,EAAM,IAAIC,IAAIN,GACd,MAAMO,EAAaP,EAAYQ,IAAIT,GAET,WAAtBG,EACEK,EACFF,EAAII,OAAOV,GACgB,WAAlBE,EACTI,EAAM,IAAIC,IAAI,CAACP,IAEfM,EAAIK,IAAIX,GAEAQ,IAGVF,EAAM,IAAIC,IAAI,CAACP,IAElB,CAEIY,EAAOA,QAAIN,EAAKL,IACnBI,IAAW,CAAEC,IAAK,IAAIA,GAAMO,KAAM,IAAIP,GAAKQ,IAAIV,IAChD,iBAgBG,UAA6BW,UACjCA,EAAY,GAAEb,cACdA,EAAgB,OAAMc,YACtBA,EAAWX,SACXA,EAAQY,eACRA,EAAcC,oBACdA,EAAmBd,Y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AAW,KAEjC1D,EACE2C,EACAzC,EACAC,EACAkD,GAAUE,GAAgC,UAAtBb,EAAME,YAA0B,SAAW,UAC/DvC,EACAC,GAEFc,EAAcc,aAAUW,CAAS,GAzHhB,KA4HnB7C,EACE2C,EACAzC,EACAC,EACAkD,GAAUE,GAAgC,UAAtBb,EAAME,YAA0B,SAAW,UAC/DvC,EACAC,GAEH,GAEH,CACEU,EACAb,EACAG,EACAW,EACAC,EACAb,EACAkB,IAIEoC,EAAgBR,eACnBT,IACC,MAAMC,EAAM1B,EAAYyB,GAClBa,EAASb,EAAMc,QACrBxD,EACE2C,EACA,IAAInC,IAAIQ,GACRb,EACAoD,EAAS,SAAW,UACpBlD,EACAC,EACD,GAEH,CAACU,EAAWb,EAAeG,EAAUW,EAAaZ,IAG9CuD,EAAUT,eACbT,IACC,MAAMmB,EAAUnB,EAAMoB,SAChBC,EAAcrB,EAAMc,SAAyB,MAAdd,EAAMC,IACrCqB,GAA6C,IAAhCjE,EAAQkE,QAAQvB,EAAMC,KACnCuB,EAAUjD,EAAYyB,GAE5B,GAAIsB,GAAcD,GAAgB5C,GAAuBA,EAAoBuB,GAAS,CACpF,MAAMyB,EAAWN,GAAWE,EAAc,SAAW,UACrD/D,EACEkE,EACA,IAAI1D,IAAIQ,GACRb,EACAgE,EACA9D,EACAC,EAEH,IAEH,CAACU,EAAWb,EAAeG,EAAUW,EAAaE,EAAqBd,IAGzE,MAAO,CACL+D,iBAAkB9C,EAClB+C,eACoB,SAAlBlE,GAAwC,MAAZG,EACxB,CAAE,EACF,CACEsD,UACAD,gBACAT,eAGZ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(['exports', 'preact/hooks', './mergeProps-bcfa6a92', './collectionUtils-6740111c', './useCollectionFocusRing-64636529', './useCurrentKey-
|
|
2
|
-
//# sourceMappingURL=useTabBar-
|
|
1
|
+
define(['exports', 'preact/hooks', './mergeProps-bcfa6a92', './collectionUtils-6740111c', './useCollectionFocusRing-64636529', './useCurrentKey-26170e5e', './useId-c9578d26'], (function(e,t,r,n,o,s,c){"use strict";const u='[role="tab"]',i="data-oj-removable";const l=(e,t,r)=>{const o=e.closest(t);if(o){if(o.hasAttribute(i)){const t=e.closest(r);if(t&&o?.contains(t))return null}return n.getKey(o)}return null},a=(e,t,r)=>{const n=r.indexOf(e);if(-1===n)return t[0];let o=0,s=!1;for(n===r.length-1?(o=n-1,s=!0):o=n+1;o!==n&&o>-1&&o<r.length;){const e=r[o];if(-1!==t.indexOf(e))return e;s?o--:o++}return t[0]};e.useTabBar=function(e){const{children:f,class:y,display:d,edge:g="top",selection:m,onSelect:b,onRemove:v,ref:p,size:K}=e,h=t.useRef(null),R=p||h,k=c.useId(),[x,A]=t.useState(m),[E,P]=t.useState(!1),S=k+"_",C=t.useRef();t.useEffect((()=>{if(R.current){const e=Array.from(R.current.querySelectorAll(u)).map((e=>n.getKey(e)));x&&!e.includes(x)&&(C.current?A(a(x,e,C.current)):A(e[0])),C.current=e}}),[f,x,R]);const[F,w]=o.useCollectionFocusRing(R,["ArrowRight","ArrowLeft","Home","End"]),{currentKeyProps:B}=s.useCurrentKey((e=>v?l(e,u,'[data-oj-tabbar-item-remove-icon="true"]'):n.keyExtractor(e,u)),!1,void 0,void 0,n.getPrevNextKeyUsingRef(R,x,!0,u),n.getPrevNextKeyUsingRef(R,x,!1,u),x,(e=>{A(e.value),P(!1)})),D={onKeyDown:e=>{if(R.current&&x){if("Home"===e.key||"End"===e.key){const t=Array.from(R.current.querySelectorAll(u),(e=>n.getKey(e)));e.preventDefault(),A?.(t["Home"===e.key?0:t.length-1])}if("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),b?.({value:x})),"Delete"===e.key){n.findElementByKey(R.current,x,u).hasAttribute(i)&&v?.({value:x})}"Escape"===e.key&&P(!0)}},onFocus:()=>{if(R.current&&void 0===x){const e=n.getFirstVisibleKey(R.current,u);e&&A(e)}}};return{rootProps:r.mergeProps({"aria-activedescendant":x?S+x:"","aria-multiselectable":!1,class:y,ref:R,role:"tablist",tabIndex:0},B,w,D),tabBarContext:{currentKey:x,display:d,isEdgeBottom:"bottom"===g,layout:"condense",onRemove:v,onSelect:b,showFocusRing:F,hideTooltip:E,selection:m,size:K,tabItemPrefix:S}}}}));
|
|
2
|
+
//# sourceMappingURL=useTabBar-254fbf75.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTabBar-451e6953.js","sources":["../../src/hooks/PRIVATE_useTabBar/useTabBar.ts"],"sourcesContent":["import { useState, useRef, useEffect } from 'preact/hooks';\nimport { mergeProps } from '../../utils/UNSAFE_mergeProps';\nimport {\n getPrevNextKeyUsingRef,\n getFirstVisibleKey,\n getKey,\n keyExtractor,\n findElementByKey\n} from '../../utils/PRIVATE_collectionUtils';\nimport { useCollectionFocusRing } from '../PRIVATE_useCollectionFocusRing';\nimport { useCurrentKey } from '../PRIVATE_useCurrentKey';\nimport { useId } from '../UNSAFE_useId';\n\nimport { ComponentProps, ContextType, RefObject } from 'preact';\nimport type { TabBarContext, TabBarLayout } from '../../UNSAFE_TabBarCommon';\n\ntype TabBarContextValue = ContextType<typeof TabBarContext>;\n\nexport type useTabBarOptions = {\n class?: string;\n display?: TabBarContextValue['display'];\n edge?: 'bottom' | 'top';\n onRemove?: TabBarContextValue['onRemove'];\n onSelect?: TabBarContextValue['onSelect'];\n ref?: RefObject<HTMLDivElement>;\n selection?: TabBarContextValue['selection'];\n size?: TabBarContextValue['size'];\n children?: ComponentProps<typeof TabBarLayout>['children'];\n};\n\nconst ITEM_SELECTOR = '[role=\"tab\"]';\nconst REMOVABLE_ICON_SELECTOR = '[data-oj-tabbar-item-remove-icon=\"true\"]';\nconst REMOVABLE_ITEM_ATTRIBUTE = 'data-oj-removable';\n\n/**\n * Implements TabBar behavior for focus and keyboad handling\n */\nexport function useTabBar<K extends string | number>(options: useTabBarOptions) {\n const {\n children,\n class: className,\n display,\n edge = 'top',\n selection,\n onSelect,\n onRemove,\n ref: userRef,\n size\n } = options;\n\n const internalRef = useRef<HTMLDivElement>(null);\n const rootRef = userRef || internalRef;\n\n const tabId = useId();\n const [currentKey, setCurrentKey] = useState<K | undefined>(selection as K);\n const [hideTooltip, setHideTooltip] = useState(false);\n\n const tabItemPrefix = tabId + '_';\n\n /**\n * A reference to the previous set of tab keys that this TabBar\n * contains before children were re-rendered. In the event the \"current\" tab\n * is removed and the \"currentKey\" reference is broken, we can redirect\n * the \"currentKey\" to another tab based on the index of the removed tab.\n */\n const prevTabKeys = useRef<(string | number | undefined)[]>();\n\n useEffect(() => {\n if (rootRef.current) {\n const tabKeys = Array.from(rootRef.current.querySelectorAll(ITEM_SELECTOR)).map((elem) =>\n getKey(elem as HTMLElement)\n );\n if (currentKey && !tabKeys.includes(currentKey as K)) {\n //If prevTabs does not exist set the first visible key as currentKey\n prevTabKeys.current\n ? setCurrentKey(findNextValidKey(currentKey, tabKeys, prevTabKeys.current) as K)\n : setCurrentKey(tabKeys[0] as K);\n }\n prevTabKeys.current = tabKeys;\n }\n }, [children, currentKey, rootRef]);\n\n const [showFocusRing, focusRingProps] = useCollectionFocusRing(rootRef, [\n 'ArrowRight',\n 'ArrowLeft',\n 'Home',\n 'End'\n ]);\n\n const { currentKeyProps } = useCurrentKey(\n (element) =>\n onRemove\n ? extractOnlyItemKey(element, ITEM_SELECTOR, REMOVABLE_ICON_SELECTOR)\n : keyExtractor(element, ITEM_SELECTOR),\n false,\n undefined,\n undefined,\n getPrevNextKeyUsingRef(rootRef, currentKey, true, ITEM_SELECTOR),\n getPrevNextKeyUsingRef(rootRef, currentKey, false, ITEM_SELECTOR),\n currentKey,\n (detail) => {\n setCurrentKey(detail.value as K);\n setHideTooltip(false);\n }\n );\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (rootRef.current && currentKey) {\n if (event.key === 'Home' || event.key === 'End') {\n const tabBarItemKey = Array.from(rootRef.current.querySelectorAll(ITEM_SELECTOR), (elem) =>\n getKey(elem as HTMLElement)\n );\n event.preventDefault();\n setCurrentKey?.(tabBarItemKey[event.key === 'Home' ? 0 : tabBarItemKey.length - 1] as K);\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n onSelect?.({ value: currentKey });\n }\n if (event.key === 'Delete') {\n const tabBarItem = findElementByKey(\n rootRef.current,\n currentKey,\n ITEM_SELECTOR\n ) as HTMLElement;\n if (tabBarItem.hasAttribute(REMOVABLE_ITEM_ATTRIBUTE)) {\n onRemove?.({ value: currentKey });\n }\n }\n if (event.key === 'Escape') {\n setHideTooltip(true);\n }\n }\n };\n\n const onFocus = () => {\n if (rootRef.current && currentKey === undefined) {\n const key = getFirstVisibleKey(rootRef.current, ITEM_SELECTOR);\n if (key) {\n setCurrentKey(key as K);\n }\n }\n };\n\n const eventProps = { onKeyDown, onFocus };\n\n return {\n rootProps: mergeProps(\n {\n 'aria-activedescendant': currentKey ? tabItemPrefix + currentKey : '',\n 'aria-multiselectable': false,\n class: className,\n ref: rootRef,\n role: 'tablist',\n tabIndex: 0\n },\n currentKeyProps,\n focusRingProps,\n eventProps\n ),\n tabBarContext: {\n currentKey,\n display,\n isEdgeBottom: edge === 'bottom',\n layout: 'condense',\n onRemove,\n onSelect,\n showFocusRing,\n hideTooltip,\n selection,\n size,\n tabItemPrefix\n }\n } as const;\n}\n\n//useCurrentKey use click capture that captures first click, which is on remove button\n//when we remove and sets the item being removed to currentKey. So we should not allow\n//this if click is on remove button\nconst extractOnlyItemKey = (element: HTMLElement, itemSelector: string, itemEliminator: string) => {\n const tabBarItem = element.closest(itemSelector);\n if (tabBarItem) {\n if (tabBarItem.hasAttribute(REMOVABLE_ITEM_ATTRIBUTE)) {\n const removeButton = element.closest(itemEliminator);\n if (removeButton && tabBarItem?.contains(removeButton)) {\n return null;\n }\n }\n return getKey(tabBarItem as HTMLElement);\n }\n return null;\n};\n\nconst findNextValidKey = <K>(currentKey: K, currTabs: K[], prevTabs: K[]) => {\n const index = prevTabs.indexOf(currentKey);\n // update current key to be the first one if currentKey is invalid\n if (index === -1) {\n return currTabs[0];\n }\n let nextIndex = 0;\n let isLastKey = false;\n if (index === prevTabs.length - 1) {\n nextIndex = index - 1;\n isLastKey = true;\n } else {\n nextIndex = index + 1;\n }\n while (nextIndex !== index && nextIndex > -1 && nextIndex < prevTabs.length) {\n const nextKey = prevTabs[nextIndex];\n if (currTabs.indexOf(nextKey) !== -1) {\n return nextKey;\n }\n isLastKey ? nextIndex-- : nextIndex++;\n }\n // update current key to be the first one if we can't find a suitable next key\n return currTabs[0];\n};\n"],"names":["ITEM_SELECTOR","REMOVABLE_ITEM_ATTRIBUTE","extractOnlyItemKey","element","itemSelector","itemEliminator","tabBarItem","closest","hasAttribute","removeButton","contains","getKey","findNextValidKey","currentKey","currTabs","prevTabs","index","indexOf","nextIndex","isLastKey","length","nextKey","options","children","class","className","display","edge","selection","onSelect","onRemove","ref","userRef","size","internalRef","useRef","rootRef","tabId","useId","setCurrentKey","useState","hideTooltip","setHideTooltip","tabItemPrefix","prevTabKeys","useEffect","current","tabKeys","Array","from","querySelectorAll","map","elem","includes","showFocusRing","focusRingProps","useCollectionFocusRing","currentKeyProps","useCurrentKey","keyExtractor","undefined","getPrevNextKeyUsingRef","detail","value","eventProps","onKeyDown","event","key","tabBarItemKey","preventDefault","findElementByKey","onFocus","getFirstVisibleKey","rootProps","mergeProps","role","tabIndex","tabBarContext","isEdgeBottom","layout"],"mappings":"+MA8BA,MAAMA,EAAgB,eAEhBC,EAA2B,oBAmJjC,MAAMC,EAAqB,CAACC,EAAsBC,EAAsBC,KACtE,MAAMC,EAAaH,EAAQI,QAAQH,GACnC,GAAIE,EAAY,CACd,GAAIA,EAAWE,aAAaP,GAA2B,CACrD,MAAMQ,EAAeN,EAAQI,QAAQF,GACrC,GAAII,GAAgBH,GAAYI,SAASD,GACvC,OAAO,IAEV,CACD,OAAOE,EAAAA,OAAOL,EACf,CACD,OAAO,IAAI,EAGPM,EAAmB,CAAIC,EAAeC,EAAeC,KACzD,MAAMC,EAAQD,EAASE,QAAQJ,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b,GAClD6D,yBAAuBzB,EAASvB,GAAY,EAAOb,GACnDa,GACCiD,IACCvB,EAAcuB,EAAOC,OACrBrB,GAAe,EAAM,IA0CnBsB,EAAa,CAAEC,UAtCFC,IACjB,GAAI9B,EAAQU,SAAWjC,EAAY,CACjC,GAAkB,SAAdqD,EAAMC,KAAgC,QAAdD,EAAMC,IAAe,CAC/C,MAAMC,EAAgBpB,MAAMC,KAAKb,EAAQU,QAAQI,iBAAiBlD,IAAiBoD,GACjFzC,SAAOyC,KAETc,EAAMG,iBACN9B,IAAgB6B,EAA4B,SAAdF,EAAMC,IAAiB,EAAIC,EAAchD,OAAS,GACjF,CAKD,GAJkB,UAAd8C,EAAMC,KAAiC,MAAdD,EAAMC,MACjCD,EAAMG,iBACNxC,IAAW,CAAEkC,MAAOlD,KAEJ,WAAdqD,EAAMC,IAAkB,CACPG,EAAAA,iBACjBlC,EAAQU,QACRjC,EACAb,GAEaQ,aAAaP,IAC1B6B,IAAW,CAAEiC,MAAOlD,GAEvB,CACiB,WAAdqD,EAAMC,KACRzB,GAAe,EAElB,GAY6B6B,QAThB,KACd,GAAInC,EAAQU,cAA0Bc,IAAf/C,EAA0B,CAC/C,MAAMsD,EAAMK,EAAkBA,mBAACpC,EAAQU,QAAS9C,GAC5CmE,GACF5B,EAAc4B,EAEjB,IAKH,MAAO,CACLM,UAAWC,EAAAA,WACT,CACE,wBAAyB7D,EAAa8B,EAAgB9B,EAAa,GACnE,wBAAwB,EACxBW,MAAOC,EACPM,IAAKK,EACLuC,KAAM,UACNC,SAAU,GAEZnB,EACAF,EACAS,GAEFa,cAAe,CACbhE,aACAa,UACAoD,aAAuB,WAATnD,EACdoD,OAAQ,WACRjD,WACAD,WACAyB,gBACAb,cACAb,YACAK,OACAU,iBAGN"}
|
|
1
|
+
{"version":3,"file":"useTabBar-254fbf75.js","sources":["../../src/hooks/PRIVATE_useTabBar/useTabBar.ts"],"sourcesContent":["import { useState, useRef, useEffect } from 'preact/hooks';\nimport { mergeProps } from '../../utils/UNSAFE_mergeProps';\nimport {\n getPrevNextKeyUsingRef,\n getFirstVisibleKey,\n getKey,\n keyExtractor,\n findElementByKey\n} from '../../utils/PRIVATE_collectionUtils';\nimport { useCollectionFocusRing } from '../PRIVATE_useCollectionFocusRing';\nimport { useCurrentKey } from '../PRIVATE_useCurrentKey';\nimport { useId } from '../UNSAFE_useId';\n\nimport { ComponentProps, ContextType, RefObject } from 'preact';\nimport type { TabBarContext, TabBarLayout } from '../../UNSAFE_TabBarCommon';\n\ntype TabBarContextValue = ContextType<typeof TabBarContext>;\n\nexport type useTabBarOptions = {\n class?: string;\n display?: TabBarContextValue['display'];\n edge?: 'bottom' | 'top';\n onRemove?: TabBarContextValue['onRemove'];\n onSelect?: TabBarContextValue['onSelect'];\n ref?: RefObject<HTMLDivElement>;\n selection?: TabBarContextValue['selection'];\n size?: TabBarContextValue['size'];\n children?: ComponentProps<typeof TabBarLayout>['children'];\n};\n\nconst ITEM_SELECTOR = '[role=\"tab\"]';\nconst REMOVABLE_ICON_SELECTOR = '[data-oj-tabbar-item-remove-icon=\"true\"]';\nconst REMOVABLE_ITEM_ATTRIBUTE = 'data-oj-removable';\n\n/**\n * Implements TabBar behavior for focus and keyboad handling\n */\nexport function useTabBar<K extends string | number>(options: useTabBarOptions) {\n const {\n children,\n class: className,\n display,\n edge = 'top',\n selection,\n onSelect,\n onRemove,\n ref: userRef,\n size\n } = options;\n\n const internalRef = useRef<HTMLDivElement>(null);\n const rootRef = userRef || internalRef;\n\n const tabId = useId();\n const [currentKey, setCurrentKey] = useState<K | undefined>(selection as K);\n const [hideTooltip, setHideTooltip] = useState(false);\n\n const tabItemPrefix = tabId + '_';\n\n /**\n * A reference to the previous set of tab keys that this TabBar\n * contains before children were re-rendered. In the event the \"current\" tab\n * is removed and the \"currentKey\" reference is broken, we can redirect\n * the \"currentKey\" to another tab based on the index of the removed tab.\n */\n const prevTabKeys = useRef<(string | number | undefined)[]>();\n\n useEffect(() => {\n if (rootRef.current) {\n const tabKeys = Array.from(rootRef.current.querySelectorAll(ITEM_SELECTOR)).map((elem) =>\n getKey(elem as HTMLElement)\n );\n if (currentKey && !tabKeys.includes(currentKey as K)) {\n //If prevTabs does not exist set the first visible key as currentKey\n prevTabKeys.current\n ? setCurrentKey(findNextValidKey(currentKey, tabKeys, prevTabKeys.current) as K)\n : setCurrentKey(tabKeys[0] as K);\n }\n prevTabKeys.current = tabKeys;\n }\n }, [children, currentKey, rootRef]);\n\n const [showFocusRing, focusRingProps] = useCollectionFocusRing(rootRef, [\n 'ArrowRight',\n 'ArrowLeft',\n 'Home',\n 'End'\n ]);\n\n const { currentKeyProps } = useCurrentKey(\n (element) =>\n onRemove\n ? extractOnlyItemKey(element, ITEM_SELECTOR, REMOVABLE_ICON_SELECTOR)\n : keyExtractor(element, ITEM_SELECTOR),\n false,\n undefined,\n undefined,\n getPrevNextKeyUsingRef(rootRef, currentKey, true, ITEM_SELECTOR),\n getPrevNextKeyUsingRef(rootRef, currentKey, false, ITEM_SELECTOR),\n currentKey,\n (detail) => {\n setCurrentKey(detail.value as K);\n setHideTooltip(false);\n }\n );\n\n const onKeyDown = (event: KeyboardEvent) => {\n if (rootRef.current && currentKey) {\n if (event.key === 'Home' || event.key === 'End') {\n const tabBarItemKey = Array.from(rootRef.current.querySelectorAll(ITEM_SELECTOR), (elem) =>\n getKey(elem as HTMLElement)\n );\n event.preventDefault();\n setCurrentKey?.(tabBarItemKey[event.key === 'Home' ? 0 : tabBarItemKey.length - 1] as K);\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n onSelect?.({ value: currentKey });\n }\n if (event.key === 'Delete') {\n const tabBarItem = findElementByKey(\n rootRef.current,\n currentKey,\n ITEM_SELECTOR\n ) as HTMLElement;\n if (tabBarItem.hasAttribute(REMOVABLE_ITEM_ATTRIBUTE)) {\n onRemove?.({ value: currentKey });\n }\n }\n if (event.key === 'Escape') {\n setHideTooltip(true);\n }\n }\n };\n\n const onFocus = () => {\n if (rootRef.current && currentKey === undefined) {\n const key = getFirstVisibleKey(rootRef.current, ITEM_SELECTOR);\n if (key) {\n setCurrentKey(key as K);\n }\n }\n };\n\n const eventProps = { onKeyDown, onFocus };\n\n return {\n rootProps: mergeProps(\n {\n 'aria-activedescendant': currentKey ? tabItemPrefix + currentKey : '',\n 'aria-multiselectable': false,\n class: className,\n ref: rootRef,\n role: 'tablist',\n tabIndex: 0\n },\n currentKeyProps,\n focusRingProps,\n eventProps\n ),\n tabBarContext: {\n currentKey,\n display,\n isEdgeBottom: edge === 'bottom',\n layout: 'condense',\n onRemove,\n onSelect,\n showFocusRing,\n hideTooltip,\n selection,\n size,\n tabItemPrefix\n }\n } as const;\n}\n\n//useCurrentKey use click capture that captures first click, which is on remove button\n//when we remove and sets the item being removed to currentKey. So we should not allow\n//this if click is on remove button\nconst extractOnlyItemKey = (element: HTMLElement, itemSelector: string, itemEliminator: string) => {\n const tabBarItem = element.closest(itemSelector);\n if (tabBarItem) {\n if (tabBarItem.hasAttribute(REMOVABLE_ITEM_ATTRIBUTE)) {\n const removeButton = element.closest(itemEliminator);\n if (removeButton && tabBarItem?.contains(removeButton)) {\n return null;\n }\n }\n return getKey(tabBarItem as HTMLElement);\n }\n return null;\n};\n\nconst findNextValidKey = <K>(currentKey: K, currTabs: K[], prevTabs: K[]) => {\n const index = prevTabs.indexOf(currentKey);\n // update current key to be the first one if currentKey is invalid\n if (index === -1) {\n return currTabs[0];\n }\n let nextIndex = 0;\n let isLastKey = false;\n if (index === prevTabs.length - 1) {\n nextIndex = index - 1;\n isLastKey = true;\n } else {\n nextIndex = index + 1;\n }\n while (nextIndex !== index && nextIndex > -1 && nextIndex < prevTabs.length) {\n const nextKey = prevTabs[nextIndex];\n if (currTabs.indexOf(nextKey) !== -1) {\n return nextKey;\n }\n isLastKey ? nextIndex-- : nextIndex++;\n }\n // update current key to be the first one if we can't find a suitable next key\n return currTabs[0];\n};\n"],"names":["ITEM_SELECTOR","REMOVABLE_ITEM_ATTRIBUTE","extractOnlyItemKey","element","itemSelector","itemEliminator","tabBarItem","closest","hasAttribute","removeButton","contains","getKey","findNextValidKey","currentKey","currTabs","prevTabs","index","indexOf","nextIndex","isLastKey","length","nextKey","options","children","class","className","display","edge","selection","onSelect","onRemove","ref","userRef","size","internalRef","useRef","rootRef","tabId","useId","setCurrentKey","useState","hideTooltip","setHideTooltip","tabItemPrefix","prevTabKeys","useEffect","current","tabKeys","Array","from","querySelectorAll","map","elem","includes","showFocusRing","focusRingProps","useCollectionFocusRing","currentKeyProps","useCurrentKey","keyExtractor","undefined","getPrevNextKeyUsingRef","detail","value","eventProps","onKeyDown","event","key","tabBarItemKey","preventDefault","findElementByKey","onFocus","getFirstVisibleKey","rootProps","mergeProps","role","tabIndex","tabBarContext","isEdgeBottom","layout"],"mappings":"+MA8BA,MAAMA,EAAgB,eAEhBC,EAA2B,oBAmJjC,MAAMC,EAAqB,CAACC,EAAsBC,EAAsBC,KACtE,MAAMC,EAAaH,EAAQI,QAAQH,GACnC,GAAIE,EAAY,CACd,GAAIA,EAAWE,aAAaP,GAA2B,CACrD,MAAMQ,EAAeN,EAAQI,QAAQF,GACrC,GAAII,GAAgBH,GAAYI,SAASD,GACvC,OAAO,IAEV,CACD,OAAOE,EAAAA,OAAOL,EACf,CACD,OAAO,IAAI,EAGPM,EAAmB,CAAIC,EAAeC,EAAeC,KACzD,MAAMC,EAAQD,EAASE,QAAQJ,GAE/B,IAAe,IAAXG,EACF,OAAOF,EAAS,GAElB,IAAII,EAAY,EACZC,GAAY,EAOhB,IANIH,IAAUD,EAASK,OAAS,GAC9BF,EAAYF,EAAQ,EACpBG,GAAY,GAEZD,EAAYF,EAAQ,EAEfE,IAAcF,GAASE,GAAa,GAAKA,EAAYH,EAASK,QAAQ,CAC3E,MAAMC,EAAUN,EAASG,GACzB,IAAmC,IAA/BJ,EAASG,QAAQI,GACnB,OAAOA,EAETF,EAAYD,IAAcA,GAC3B,CAED,OAAOJ,EAAS,EAAE,cAlLd,SAA+CQ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dF,EAAMC,IAAiB,EAAIC,EAAchD,OAAS,GACjF,CAKD,GAJkB,UAAd8C,EAAMC,KAAiC,MAAdD,EAAMC,MACjCD,EAAMG,iBACNxC,IAAW,CAAEkC,MAAOlD,KAEJ,WAAdqD,EAAMC,IAAkB,CACPG,EAAAA,iBACjBlC,EAAQU,QACRjC,EACAb,GAEaQ,aAAaP,IAC1B6B,IAAW,CAAEiC,MAAOlD,GAEvB,CACiB,WAAdqD,EAAMC,KACRzB,GAAe,EAElB,GAY6B6B,QAThB,KACd,GAAInC,EAAQU,cAA0Bc,IAAf/C,EAA0B,CAC/C,MAAMsD,EAAMK,EAAkBA,mBAACpC,EAAQU,QAAS9C,GAC5CmE,GACF5B,EAAc4B,EAEjB,IAKH,MAAO,CACLM,UAAWC,EAAAA,WACT,CACE,wBAAyB7D,EAAa8B,EAAgB9B,EAAa,GACnE,wBAAwB,EACxBW,MAAOC,EACPM,IAAKK,EACLuC,KAAM,UACNC,SAAU,GAEZnB,EACAF,EACAS,GAEFa,cAAe,CACbhE,aACAa,UACAoD,aAAuB,WAATnD,EACdoD,OAAQ,WACRjD,WACAD,WACAyB,gBACAb,cACAb,YACAK,OACAU,iBAGN"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(['exports', './LayerHost-
|
|
2
|
-
//# sourceMappingURL=useTestId-
|
|
1
|
+
define(['exports', './LayerHost-0a244de8', 'preact/jsx-runtime', 'preact/hooks', 'preact/compat'], (function(t,e,n,o,r){"use strict";t.useTestId=function(t){return"production"===o.useContext(e.EnvironmentContext).mode||""===t?{}:{"data-testid":t}}}));
|
|
2
|
+
//# sourceMappingURL=useTestId-f3b8b319.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTestId-
|
|
1
|
+
{"version":3,"file":"useTestId-f3b8b319.js","sources":["../../src/hooks/UNSAFE_useTestId/useTestId.ts"],"sourcesContent":["import { EnvironmentContext } from '../../UNSAFE_Environment';\nimport { useContext } from 'preact/hooks';\n\nexport type TestIdProps = {\n testId?: string;\n};\n/**\n * Returns the set of attributes to be applied to the DOM node if the application's mode is not\n * set to \"production\".\n */\nexport function useTestId(testId?: string) {\n const context = useContext(EnvironmentContext);\n return context.mode === 'production' || testId === ''\n ? {}\n : {\n 'data-testid': testId\n };\n}\n"],"names":["testId","useContext","EnvironmentContext","mode"],"mappings":"4IAUM,SAAoBA,GAExB,MAAwB,eADRC,aAAWC,EAAAA,oBACZC,MAAoC,KAAXH,EACpC,CAAE,EACF,CACE,cAAeA,EAEvB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(['exports', 'preact/hooks', './LayerHost-
|
|
2
|
-
//# sourceMappingURL=useTheme-
|
|
1
|
+
define(['exports', 'preact/hooks', './LayerHost-0a244de8', 'preact/jsx-runtime', 'preact/compat'], (function(e,t,n,o,r){"use strict";e.useTheme=function(){return t.useContext(n.EnvironmentContext).theme}}));
|
|
2
|
+
//# sourceMappingURL=useTheme-45e3b0b3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme-
|
|
1
|
+
{"version":3,"file":"useTheme-45e3b0b3.js","sources":["../../src/hooks/UNSAFE_useTheme/useTheme.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 { useContext } from 'preact/hooks';\nimport { EnvironmentContext } from '../../UNSAFE_Environment';\n\nexport function useTheme() {\n return useContext(EnvironmentContext).theme;\n}\n"],"names":["useContext","EnvironmentContext","theme"],"mappings":"sJAYE,OAAOA,EAAUA,WAACC,sBAAoBC,KACxC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
define(['exports', './useColorScheme-3ffd80c4', './useScale-fe3420c6', './theme-a8f3d819', './mergeInterpolations-9ede4cf7', './LayerHost-0a244de8'], (function(e,o,t,s,n,c){"use strict";e.useThemeInterpolations=function(){const e=o.useColorScheme(),r=t.useScale(),a=r!==c.DefaultEnvironment.scale?r:void 0,l=n.mergeInterpolations([...Object.values(s.themeInterpolations)]),{class:u}=l({colorScheme:e,scale:a});return u}}));
|
|
2
|
+
//# sourceMappingURL=useThemeInterpolations-1f5fd8f3.js.map
|
package/amd/{useThemeInterpolations-41cbd433.js.map → useThemeInterpolations-1f5fd8f3.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThemeInterpolations-
|
|
1
|
+
{"version":3,"file":"useThemeInterpolations-1f5fd8f3.js","sources":["../../src/hooks/UNSAFE_useThemeInterpolations/useThemeInterpolations.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 */\nimport { useColorScheme } from '../UNSAFE_useColorScheme';\nimport { useScale } from '../UNSAFE_useScale';\nimport { themeInterpolations } from '../../utils/UNSAFE_interpolations/theme';\nimport type { ThemeProps } from '../../utils/UNSAFE_interpolations/theme';\nimport { mergeInterpolations } from '../../utils/UNSAFE_mergeInterpolations';\nimport { DefaultEnvironment } from '../../UNSAFE_Environment/EnvironmentContext';\n\n// This hook encasulates the logic required to determine which theme style classes are needed\n// for the current environment context's colorScheme and scale value. This would be used when\n// rendering dom outside of the current dom tree, but desire to match the colorScheme and scale\n// of the original dom tree.\nexport function useThemeInterpolations() {\n const colorScheme = useColorScheme();\n const currentScale = useScale();\n // We don't want to interpolate the default environment values for scacle. Those should get picked up by default.\n // This fixes an issue for core pack components that utilize the Layer component, when in a legacy cookbook page.\n const scale = currentScale !== DefaultEnvironment.scale ? currentScale : undefined;\n\n const interpolations = mergeInterpolations<ThemeProps>([...Object.values(themeInterpolations)]);\n const { class: classes } = interpolations({ colorScheme, scale });\n return classes;\n}\n"],"names":["colorScheme","useColorScheme","currentScale","useScale","scale","DefaultEnvironment","undefined","interpolations","mergeInterpolations","Object","values","themeInterpolations","class","classes"],"mappings":"wNAmBE,MAAMA,EAAcC,EAAAA,iBACdC,EAAeC,EAAAA,WAGfC,EAAQF,IAAiBG,EAAAA,mBAAmBD,MAAQF,OAAeI,EAEnEC,EAAiBC,EAAAA,oBAAgC,IAAIC,OAAOC,OAAOC,EAAAA,wBACjEC,MAAOC,GAAYN,EAAe,CAAEP,cAAaI,UACzD,OAAOS,CACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
define(['exports', 'preact/hooks', './useTooltipControlled-18271c7a'], (function(t,o,e){"use strict";t.useTooltip=({text:t,position:s="bottom",isDisabled:i=!1,anchor:n={x:"element",y:"element"},offset:l,variant:a="tooltip",testId:p})=>{const[r,c]=o.useState(!1),u=i||!t,d=l||{mainAxis:8,crossAxis:0},f=o.useCallback((t=>{c(t.value)}),[]),{tooltipContent:x,tooltipProps:C}=e.useTooltipControlled({text:t,isOpen:r,position:s,isDisabled:u,offset:d,anchor:n,variant:a,onToggle:f,testId:p});return{tooltipContent:x,tooltipProps:C}}}));
|
|
2
|
+
//# sourceMappingURL=useTooltip-e965a559.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTooltip-
|
|
1
|
+
{"version":3,"file":"useTooltip-e965a559.js","sources":["../../src/hooks/UNSAFE_useTooltip/useTooltip.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 { useState, useCallback } from 'preact/hooks';\nimport { useTooltipControlled } from './useTooltipControlled';\nimport { TestIdProps } from '../UNSAFE_useTestId';\n\nconst defaultOffset = 8; // Redwood tooltip has a default offset of 8 pixels\n\ntype tooltipParameters = Parameters<typeof useTooltipControlled>[0];\n\ntype Props = {\n text?: string;\n position?: tooltipParameters['position'];\n isDisabled?: boolean;\n anchor?: tooltipParameters['anchor'];\n offset?: { mainAxis?: number; crossAxis?: number };\n variant?: tooltipParameters['variant'];\n} & TestIdProps;\n\n/**\n * A hook with tooltip implementation.\n * Returns event handlers that can enhance the target element with a tooltip displayed\n * on hover and focus.\n *\n * @param text tooltip text\n * @param position tooltip placement relative to the target element\n * @param isDisabled determines if the tooltip is disabled\n * @param anchor determines if the target is an element or the pointer\n * @param offset offset from the placement\n * @param variant specifies if the rendered popup should have 'tooltip' or 'datatip' look and behavior\n * @returns an object with the 'tooltipContent' and 'tooltipProps' properties.\n */\nexport const useTooltip = ({\n text,\n position = 'bottom',\n isDisabled = false,\n anchor = { x: 'element', y: 'element' },\n offset,\n variant = 'tooltip',\n testId\n}: Props): ReturnType<typeof useTooltipControlled> => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const disabled = isDisabled || !text;\n const newOffset = offset ? offset : { mainAxis: defaultOffset, crossAxis: 0 };\n\n const onToggleHandler = useCallback((details: { value: boolean }) => {\n setIsOpen(details.value);\n }, []);\n\n const { tooltipContent, tooltipProps } = useTooltipControlled({\n text,\n isOpen,\n position,\n isDisabled: disabled,\n offset: newOffset,\n anchor,\n variant,\n onToggle: onToggleHandler,\n testId\n });\n\n return {\n tooltipContent,\n tooltipProps\n };\n};\n"],"names":["text","position","isDisabled","anchor","x","y","offset","variant","testId","isOpen","setIsOpen","useState","disabled","newOffset","mainAxis","crossAxis","onToggleHandler","useCallback","details","value","tooltipContent","tooltipProps","useTooltipControlled","onToggle"],"mappings":"+GAsC0B,EACxBA,OACAC,WAAW,SACXC,cAAa,EACbC,SAAS,CAAEC,EAAG,UAAWC,EAAG,WAC5BC,SACAC,UAAU,UACVC,aAEA,MAAOC,EAAQC,GAAaC,EAAQA,UAAU,GACxCC,EAAWV,IAAeF,EAC1Ba,EAAYP,GAAkB,CAAEQ,SArClB,EAqC2CC,UAAW,GAEpEC,EAAkBC,eAAaC,IACnCR,EAAUQ,EAAQC,MAAM,GACvB,KAEGC,eAAEA,EAAcC,aAAEA,GAAiBC,uBAAqB,CAC5DtB,OACAS,SACAR,WACAC,WAAYU,EACZN,OAAQO,EACRV,SACAI,UACAgB,SAAUP,EACVR,WAGF,MAAO,CACLY,iBACAC,eACD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(['exports', 'preact/jsx-runtime', 'preact/hooks', './useId-c9578d26', './Floating-
|
|
2
|
-
//# sourceMappingURL=useTooltipControlled-
|
|
1
|
+
define(['exports', 'preact/jsx-runtime', 'preact/hooks', './useId-c9578d26', './Floating-8f519f4d', './Layer-8d7bbd69', 'preact/compat', './LayerHost-0a244de8', './useHover-1890d6a0', './useFocus-4194fc59', './useTouch-37489bb5', './mergeProps-bcfa6a92', './useAnimation-5bd3adfc', './useComponentTheme-5aa41a8f', './useTestId-f3b8b319', './useThemeInterpolations-1f5fd8f3', './classNames-08d99695', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentTheme', './EnvironmentProvider-9e71b5c2', './useColorScheme-3ffd80c4'], (function(e,t,n,o,s,r,u,i,c,a,l,d,m,f,h,p,g,b,v,T){"use strict";const y=({children:e,id:o,isOpen:s,isDatatip:r,onTransitionEnd:u,testId:i,...c})=>{const a=n.useRef(null),l=n.useRef(null),d=h.useTestId(i),{baseTheme:v,variantClasses:T,styles:y}=f.useComponentTheme(b.TooltipContentRedwoodTheme,{variant:r?"datatip":"tooltip"}),k=p.useThemeInterpolations(),{nodeRef:P}=m.useAnimation(s?"mounted":"unmounted",{animationStates:{mounted:e=>{const t=e.firstChild;return{from:{maxHeight:"0",opacity:"0%"},to:{maxHeight:`${t?.offsetHeight}px`,opacity:r?"100%":"95%"},options:{duration:r?1:100,easing:[0,0,.2,1]}}},unmounted:e=>({from:{opacity:r?"100%":"95%"},to:{maxHeight:"0",opacity:"0%"},options:{duration:r?1:100,easing:[0,0,.2,1]}})},isAnimatedOnMount:!0,onAnimationEnd:()=>u?.()});return n.useEffect((()=>{a.current&&l.current?.offsetHeight&&(a.current.style.height=`${l.current?.offsetHeight}px`)}),[]),t.jsx("div",{ref:a,id:o,role:"tooltip",class:g.classNames([y.wrapper,k,v]),...d,children:t.jsx("div",{ref:P,class:y.inner,...c,children:t.jsx("div",{ref:l,class:g.classNames([T,y.content]),children:e})})})};const k=new class{constructor(){this.keyDownHandler=e=>{"Tab"===e.key&&(this.tabKeyActive=!0,setTimeout((()=>{this.tabKeyActive=!1}),100))},this.register=e=>{this.activeCallback&&this.activeCallback!==e&&this.activeCallback(),this.activeCallback=e},this.unregister=e=>{this.activeCallback===e&&(this.activeCallback=null)},this.isTabKeyActive=()=>this.tabKeyActive,this.activeCallback=null,this.tabKeyActive=!1,window.addEventListener("keydown",this.keyDownHandler,!0)}};e.useTooltipControlled=({text:e,isOpen:u=!1,variant:i="tooltip",position:m="bottom",focusStrategy:f="browser",isDisabled:h=!1,anchor:p={x:"element",y:"element"},offset:g={mainAxis:0,crossAxis:0},onToggle:b,testId:P})=>{const x=h||!e,C=n.useRef(!0),[E,A]=n.useState(!x&&u?"mounting":"unmounted"),R=n.useRef(E),w=e=>{R.current=e,A(e)},[H,D]=n.useState(!1);D(!1);const I="datatip"===i,[S,j]=n.useState(!1),F="logical"===f,L=n.useRef(!0),{hoverProps:K,isHover:B}=c.useHover({}),{touchProps:M,isTouch:N}=l.useTouch({isDisabled:h}),{focusProps:O,isFocus:_}=a.useFocus({isDisabled:F}),{hoverProps:G,isHover:U}=c.useHover({isDisabled:h}),$="pointer"===p.x||"pointer"===p.y,V=n.useRef(o.useId()),X=n.useRef(null),Y=n.useRef({x:-9999,y:-9999}),q=$&&!_?Y:X,z=I?0:250,J=n.useRef(null),Q=T.useColorScheme(),W=Q&&"light"!==Q?"light":"dark",Z=n.useRef(!1),ee=n.useRef(!1),te=()=>{J.current&&(clearTimeout(J.current),J.current=null)};n.useEffect((()=>{Z.current=F?S:_&&k.isTabKeyActive(),Z.current&&(ee.current=!1)}),[_,S,F]),n.useEffect((()=>{ee.current=B,ee.current&&(Z.current=!1)}),[B]),n.useEffect((()=>{L.current?L.current=!1:$&&B&&"unmounted"===E||(e=>{if(e)switch(E){case"unmounted":w("mountPending");break;case"unmounting":w("mounting"),b?.({value:!0});break;case"unmountPending":te(),w("mounted")}else switch(E){case"mounting":case"mounted":w("unmountPending");break;case"mountPending":te(),de(),w("unmounted")}})(B&&ee.current||(_||S)&&Z.current||U||N)}),[B,_,S,U,N,$,E,b]);const ne=n.useCallback((()=>{Z.current=!1,ee.current=!1,b?.({value:!1})}),[]);n.useEffect((()=>{C.current?C.current=!1:w(u?"mounting":"unmounting")}),[u]),n.useEffect((()=>()=>{te(),Z.current=!1,ee.current=!1}),[]),n.useEffect((()=>{"mounted"===E?k.register(ne):"unmounted"===E&&k.unregister(ne)}),[E,ne]),n.useEffect((()=>(J.current||"mountPending"!==E&&"unmountPending"!==E||(J.current=setTimeout((()=>{te(),"mountPending"!==E&&"unmountPending"!==E||E!==R.current||b?.({value:"mountPending"===E})}),z)),()=>{te()})),[E,z,b]);const oe=e=>{j(!0),X.current=e,q.current=e},se=()=>{j(!1)},re=n.useCallback((e=>{(e.eventPhase===Event.AT_TARGET||e.eventPhase===Event.BUBBLING_PHASE&&I)&&(X.current=e.target)}),[I]),ue=n.useCallback((e=>{e.eventPhase===Event.AT_TARGET&&(Z.current=!1)}),[]),ie=F?{}:{onFocus:re,onBlur:ue},ce={onMouseEnter:n.useCallback((e=>{X.current=e.target}),[])},ae={onKeyDown:n.useCallback((e=>{"Escape"===e.code&&Z.current&&(e.preventDefault(),Z.current=!1,b?.({value:!1}))}),[b])};let le;const de=()=>{Y.current={x:-9999,y:-9999}};if(x)le=d.mergeProps(K,O,ce,ie);else{const e={"aria-describedby":V.current,...$&&{onMouseLeave:()=>{"mounting"!==E&&te()},onMouseMove:e=>{(e=>{if("unmounted"!==E&&("datatip"!==i||"mounted"!==E))return;const t=X?.current?.getBoundingClientRect(),n=document.body.scrollLeft+(t?.left||0)+(t?.width||0),o=document.body.scrollTop+(t?.top||0)+(t?.height||0),s="pointer"===p.x?e.clientX:n,r="pointer"===p.y?e.clientY:o;"mounted"===E?(Y.current={x:s,y:r},!0!==H&&D(!0)):"unmounted"===E&&(te(),J.current=setTimeout((()=>{"unmounted"===E&&(Y.current={x:s,y:r},b?.({value:!0}))}),z))})(e)}}};le=d.mergeProps(K,O,M,ce,ie,e,ae,F?{onLogicalFocus:oe,onLogicalBlur:se}:{})}if(x)return te(),de(),{tooltipContent:null,tooltipProps:le};const me=(e=>{let t="bottom";switch(e){case"top":case"end":case"bottom":case"start":t=e;break;case"top-end":t="top-end-corner";break;case"bottom-end":t="bottom-end-corner";break;case"bottom-start":t="bottom-start-corner";break;case"top-start":t="top-start-corner"}return t})(m),fe=t.jsx(y,{id:V.current,testId:P,isOpen:["mounting","mounted","unmountPending"].includes(E),...G,isDatatip:I,onTransitionEnd:()=>{"mounting"===E&&w("mounted"),"unmounting"===E&&(de(),w("unmounted"))},children:e}),he=t.jsx(r.Layer,{children:t.jsx(s.Floating,{anchorRef:q,placement:me,offsetValue:g,children:"tooltip"===i?t.jsx(v.EnvironmentProvider,{environment:{colorScheme:W},children:fe}):t.jsx(t.Fragment,{children:fe})})});return{tooltipContent:!["unmounted","mountPending"].includes(E)&&he,tooltipProps:le}}}));
|
|
2
|
+
//# sourceMappingURL=useTooltipControlled-18271c7a.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTooltipControlled-abf886f2.js","sources":["../../src/hooks/UNSAFE_useTooltip/TooltipContent.tsx","../../src/hooks/UNSAFE_useTooltip/useTooltipControlled.tsx","../../src/hooks/UNSAFE_useTooltip/TooltipManager.ts"],"sourcesContent":["import { useAnimation } from '../UNSAFE_useAnimation';\nimport { useComponentTheme } from '../UNSAFE_useComponentTheme';\nimport { useEffect, useRef } from 'preact/hooks';\nimport { HTMLAttributesSignalExcluded } from '../../utils/UNSAFE_attributeUtils';\nimport {\n TooltipContentVariantOptions,\n TooltipContentStyles\n} from './themes/TooltipContentStyles.css';\n\nimport { useTestId, TestIdProps } from '../UNSAFE_useTestId';\nimport { useThemeInterpolations } from '../UNSAFE_useThemeInterpolations';\nimport { classNames } from '../../utils/UNSAFE_classNames';\nimport { TooltipContentRedwoodTheme } from './themes/redwood/TooltipContentTheme';\n\ntype IntrinsicProps = Pick<HTMLAttributesSignalExcluded<HTMLDivElement>, 'children'>;\n\ntype Status = 'mounted' | 'unmounted';\n\ntype ContentProps = IntrinsicProps & {\n id: string;\n isOpen: boolean;\n isDatatip: boolean;\n onTransitionEnd: () => void;\n} & TestIdProps;\n\nexport const TooltipContent = ({\n children,\n id,\n isOpen,\n isDatatip,\n onTransitionEnd,\n testId,\n ...props\n}: ContentProps) => {\n const wrapperRef = useRef<HTMLDivElement>(null);\n const popoverRef = useRef<HTMLDivElement>(null);\n\n const testIdProps = useTestId(testId);\n\n const { baseTheme, variantClasses, styles } = useComponentTheme<\n TooltipContentVariantOptions,\n TooltipContentStyles\n >(TooltipContentRedwoodTheme, {\n variant: isDatatip ? 'datatip' : 'tooltip'\n });\n\n const schemeClass = useThemeInterpolations();\n\n const { nodeRef } = useAnimation<Status, HTMLDivElement>(isOpen ? 'mounted' : 'unmounted', {\n animationStates: {\n mounted: (_node) => {\n const childNode = _node.firstChild as HTMLDivElement;\n return {\n from: {\n maxHeight: '0',\n opacity: '0%'\n },\n to: {\n maxHeight: `${childNode?.offsetHeight}px`,\n opacity: isDatatip ? '100%' : '95%'\n },\n options: {\n duration: isDatatip ? 1 : 100,\n easing: [0.0, 0.0, 0.2, 1]\n }\n };\n },\n unmounted: (_node) => {\n return {\n from: {\n opacity: isDatatip ? '100%' : '95%'\n },\n to: {\n maxHeight: '0',\n opacity: '0%'\n },\n options: {\n duration: isDatatip ? 1 : 100,\n easing: [0.0, 0.0, 0.2, 1]\n }\n };\n }\n },\n isAnimatedOnMount: true,\n onAnimationEnd: () => onTransitionEnd?.()\n });\n\n // Set up initial wrapper height so Tooltip can animate from the bottom to the top\n useEffect(() => {\n if (wrapperRef.current && popoverRef.current?.offsetHeight) {\n wrapperRef.current.style.height = `${popoverRef.current?.offsetHeight}px`;\n }\n }, []);\n\n return (\n <div\n ref={wrapperRef}\n id={id}\n role=\"tooltip\"\n class={classNames([styles.wrapper, schemeClass, baseTheme])}\n {...testIdProps}>\n <div ref={nodeRef} class={styles.inner} {...props}>\n <div ref={popoverRef} class={classNames([variantClasses, styles.content])}>\n {children}\n </div>\n </div>\n </div>\n );\n};\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 { ComponentChild } from 'preact';\nimport { useState, useRef, useEffect, useCallback } from 'preact/hooks';\nimport { useId } from '../UNSAFE_useId';\nimport { Floating, Placement, Coords } from '../../UNSAFE_Floating';\nimport { Layer } from '../../UNSAFE_Layer';\nimport { useHover } from '../UNSAFE_useHover';\nimport { useFocus } from '../UNSAFE_useFocus';\nimport { useTouch } from '../UNSAFE_useTouch';\nimport { mergeProps } from '../../utils/UNSAFE_mergeProps';\nimport { TooltipContent } from './TooltipContent';\nimport { EnvironmentProvider } from '../../UNSAFE_Environment';\nimport { useColorScheme } from '../UNSAFE_useColorScheme';\nimport { TestIdProps } from '../UNSAFE_useTestId';\nimport { TooltipManager } from './TooltipManager';\n\n// Global TooltipManager singleton instance\nconst globalTooltipManager = new TooltipManager();\n\nexport const positions = [\n 'start',\n 'top-start',\n 'top',\n 'top-end',\n 'end',\n 'bottom-end',\n 'bottom',\n 'bottom-start'\n] as const;\ntype Position = (typeof positions)[number];\n\nconst positionToPlacement = (position: Position) => {\n let placement: Placement = 'bottom';\n\n switch (position) {\n case 'top':\n case 'end':\n case 'bottom':\n case 'start':\n placement = position as Placement;\n break;\n\n case 'top-end':\n placement = 'top-end-corner';\n break;\n\n case 'bottom-end':\n placement = 'bottom-end-corner';\n break;\n\n case 'bottom-start':\n placement = 'bottom-start-corner';\n break;\n\n case 'top-start':\n placement = 'top-start-corner';\n break;\n }\n\n return placement;\n};\n\nexport const anchorTos = ['element', 'pointer'] as const;\ntype AnchorTo = (typeof anchorTos)[number];\n\ntype AnchorModel = { x: AnchorTo; y: AnchorTo };\n\ntype Props = {\n text?: string;\n variant?: 'tooltip' | 'datatip';\n isOpen: boolean;\n position?: Position;\n isDisabled?: boolean;\n focusStrategy?: 'browser' | 'logical';\n anchor?: AnchorModel;\n offset?: { mainAxis?: number; crossAxis?: number };\n onToggle?: (details: { value: boolean }) => void;\n} & TestIdProps;\n\n/**\n * The 'mounting' and 'unmounting' states are related to the animation. The 'unmounted' state\n * is used for conditional rendering. In this state, the Tooltip content is completely removed\n * from the DOM. The 'mountPending' and 'unmountPending' are used when timeout is active.\n * The 'reposition' state is used to trigger a transition with new coordinates within\n * the same element.\n */\ntype Status =\n | 'unmounted'\n | 'mountPending'\n | 'mounting'\n | 'mounted'\n | 'unmountPending'\n | 'unmounting';\n\nexport const useTooltipControlled = ({\n text,\n isOpen = false,\n variant = 'tooltip',\n position = 'bottom',\n focusStrategy = 'browser',\n isDisabled = false,\n anchor = { x: 'element', y: 'element' },\n offset = { mainAxis: 0, crossAxis: 0 },\n onToggle,\n testId\n}: Props): {\n tooltipContent: ComponentChild;\n tooltipProps: Record<string, any>;\n} => {\n const disabled = isDisabled || !text;\n const isInitialRenderState = useRef<boolean>(true);\n\n const [state, _setState] = useState<Status>(!disabled && isOpen ? 'mounting' : 'unmounted');\n const stateRef = useRef<Status>(state);\n const setState = (newState: Status) => {\n stateRef.current = newState;\n _setState(newState);\n };\n\n // const tooltipId = useRef<string>(useId());\n\n const [needsUpdate, setNeedsUpdate] = useState<boolean>(false);\n setNeedsUpdate(false);\n\n const isDatatip = variant === 'datatip';\n\n const [isLogicalFocus, setLogicalFocus] = useState<boolean>(false);\n const isLogicalFocusStrategy = focusStrategy === 'logical';\n const isInitialRenderTrigger = useRef<boolean>(true);\n const { hoverProps, isHover } = useHover({});\n const { touchProps, isTouch } = useTouch({ isDisabled }); // TODO replace by useLongPress actionhook\n // we only care about keyboard focus, don't enable useFocus hook if isHover or isTouch are active\n const { focusProps, isFocus } = useFocus({\n isDisabled: isLogicalFocusStrategy\n });\n const { hoverProps: popoverHoverProps, isHover: popoverIsHover } = useHover({ isDisabled });\n\n const isPointer = anchor.x === 'pointer' || anchor.y === 'pointer';\n\n const uniqueIdRef = useRef<string>(useId());\n const targetRef = useRef<HTMLElement | null>(null);\n const coordsRef = useRef<Coords>({ x: -9999, y: -9999 });\n // if anchor is set to pointer and target does not have keyboard focus, use coords\n const usedRef = isPointer && !isFocus ? coordsRef : targetRef;\n const delay = isDatatip ? 0 : 250;\n const toggleTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const currentColorScheme = useColorScheme();\n const newColorScheme = !currentColorScheme || currentColorScheme === 'light' ? 'dark' : 'light';\n\n const focusActive = useRef<boolean>(false);\n const hoverActive = useRef<boolean>(false);\n\n const toggleTimeoutClear = () => {\n if (toggleTimeoutRef.current) {\n clearTimeout(toggleTimeoutRef.current);\n toggleTimeoutRef.current = null;\n }\n };\n\n /*\n * This effect executes when isFocus/isLogicalFocus changes\n * - focusActive ref is set if the focus change follows a Tab key\n * - hoverActive ref is reset, if focusActive becomes true\n */\n useEffect(() => {\n if (isLogicalFocusStrategy) {\n focusActive.current = isLogicalFocus;\n } else {\n focusActive.current = isFocus && globalTooltipManager.isTabKeyActive();\n }\n if (focusActive.current) {\n hoverActive.current = false;\n }\n }, [isFocus, isLogicalFocus, isLogicalFocusStrategy]);\n\n /*\n * This effect executes when isHover state changes\n * - focusActive ref is reset, if hoverActive becomes true\n */\n useEffect(() => {\n hoverActive.current = isHover;\n if (hoverActive.current) {\n focusActive.current = false;\n }\n }, [isHover]);\n\n useEffect(() => {\n // inner function for state transitions on various trigger changes\n const updateState = (open: boolean) => {\n if (open) {\n // At least one toggle event is set to true\n switch (state) {\n case 'unmounted':\n setState('mountPending'); // Set mount pending state if tooltip is unmounted\n break;\n case 'unmounting': // Switch back to mounting when unmounting was in progress and the tooltip should stay on\n setState('mounting');\n onToggle?.({ value: true });\n break;\n case 'unmountPending':\n toggleTimeoutClear();\n setState('mounted'); // Clear timers immediately and keep the tooltip mounted\n break;\n }\n } else {\n // No toggle events are set to true\n switch (state) {\n case 'mounting':\n case 'mounted':\n setState('unmountPending'); // Set unmount pending state if tooltip is mounted or in mounting transition\n break;\n case 'mountPending':\n toggleTimeoutClear();\n __resetCoords();\n setState('unmounted'); // Unmount tooltip immediately if mounting is pending\n break;\n }\n }\n };\n\n if (isInitialRenderTrigger.current) {\n // On onitial render do not trigger rerender\n isInitialRenderTrigger.current = false;\n return;\n }\n // When pointer is used, handleMouseMove method is responsible for state updates\n // until the tooltip is mounted\n if (isPointer && isHover && state === 'unmounted') {\n return;\n }\n updateState(\n (isHover && hoverActive.current) ||\n ((isFocus || isLogicalFocus) && focusActive.current) ||\n popoverIsHover ||\n isTouch\n );\n }, [isHover, isFocus, isLogicalFocus, popoverIsHover, isTouch, isPointer, state, onToggle]);\n\n const destroyCallback = useCallback(() => {\n focusActive.current = false;\n hoverActive.current = false;\n onToggle?.({ value: false });\n }, []); // cannot depend on the 'onToggle' prop as some clients tend to pass a new callback on each render\n\n useEffect(() => {\n if (isInitialRenderState.current) {\n // On onitial render do not trigger rerender\n isInitialRenderState.current = false;\n return;\n }\n setState(isOpen ? 'mounting' : 'unmounting');\n }, [isOpen]);\n\n useEffect(() => {\n return () => {\n // make sure to clear the toggle timeout on unmount\n toggleTimeoutClear();\n // reset focusActive and hoverActive refs\n focusActive.current = false;\n hoverActive.current = false;\n };\n }, []);\n\n /*\n * This effect executes when the component state changes.\n * On 'mounted' state, the tooltip registers itself with the global tooltip manager.\n * On 'unmounted', the tooltip unregisters from the global tooltip manager.\n */\n useEffect(() => {\n if (state === 'mounted') {\n globalTooltipManager.register(destroyCallback);\n } else if (state === 'unmounted') {\n globalTooltipManager.unregister(destroyCallback);\n }\n }, [state, destroyCallback]);\n\n /*\n * Set a timer to toggle the state afer the 'pending' period expires\n */\n useEffect(() => {\n if (!toggleTimeoutRef.current && (state === 'mountPending' || state === 'unmountPending')) {\n toggleTimeoutRef.current = setTimeout(() => {\n toggleTimeoutClear();\n // make sure the state has not changed in the mean time before onToggle\n if (\n (state === 'mountPending' || state === 'unmountPending') &&\n state === stateRef.current\n ) {\n onToggle?.({ value: state === 'mountPending' });\n }\n }, delay);\n }\n return () => {\n toggleTimeoutClear();\n };\n }, [state, delay, onToggle]);\n\n const handleMouseMove = (event: MouseEvent) => {\n // we only want track mouse move while the state is 'unmounted' or when moving a 'mounted' datatip\n if (state !== 'unmounted' && !(variant === 'datatip' && state === 'mounted')) {\n return;\n }\n const targetRect = targetRef?.current?.getBoundingClientRect();\n\n // Tooltip maintains static offset from left side of window\n const distanceX = document.body.scrollLeft + (targetRect?.left || 0) + (targetRect?.width || 0);\n\n // Tooltip maintains static offset from top side of the window\n const distanceY = document.body.scrollTop + (targetRect?.top || 0) + (targetRect?.height || 0);\n\n // Display tooltip at the mouse position if both anchors are set to pointer\n const x = anchor.x === 'pointer' ? event.clientX : distanceX;\n const y = anchor.y === 'pointer' ? event.clientY : distanceY;\n\n if (state === 'mounted') {\n coordsRef.current = { x, y };\n if (needsUpdate !== true) setNeedsUpdate(true);\n } else if (state === 'unmounted') {\n toggleTimeoutClear();\n toggleTimeoutRef.current = setTimeout(() => {\n if (state === 'unmounted') {\n coordsRef.current = { x, y };\n onToggle?.({ value: true });\n }\n }, delay);\n }\n };\n\n const onLogicalFocus = (target: HTMLElement) => {\n setLogicalFocus(true);\n targetRef.current = target;\n usedRef.current = target;\n };\n\n const onLogicalBlur = () => {\n setLogicalFocus(false);\n };\n\n const onFocusCallback = useCallback(\n (event: FocusEvent) => {\n if (\n event.eventPhase === Event.AT_TARGET ||\n (event.eventPhase === Event.BUBBLING_PHASE && isDatatip)\n ) {\n targetRef.current = event.target as HTMLElement;\n }\n },\n [isDatatip]\n );\n\n const onBlurCallback = useCallback((event: FocusEvent) => {\n if (event.eventPhase === Event.AT_TARGET) {\n // reset focusActive flag\n focusActive.current = false;\n }\n }, []);\n\n const focusInitProps = isLogicalFocusStrategy\n ? {}\n : {\n onFocus: onFocusCallback,\n onBlur: onBlurCallback\n };\n\n const hoverInitProps = {\n onMouseEnter: useCallback((event: MouseEvent) => {\n targetRef.current = event.target as HTMLElement;\n }, [])\n };\n\n const keyInitProps = {\n onKeyDown: useCallback(\n (event: KeyboardEvent) => {\n if (event.code === 'Escape' && focusActive.current) {\n event.preventDefault();\n // focus no longer active after Escape\n focusActive.current = false;\n onToggle?.({ value: false });\n }\n },\n [onToggle]\n )\n };\n\n let actionableProps;\n\n const __resetCoords = () => {\n coordsRef.current = { x: -9999, y: -9999 };\n };\n\n if (disabled) {\n actionableProps = mergeProps(hoverProps, focusProps, hoverInitProps, focusInitProps);\n } else {\n const anchorInitProps = {\n 'aria-describedby': uniqueIdRef.current,\n\n ...(isPointer && {\n onMouseLeave: () => {\n if (state === 'mounting') {\n return;\n }\n toggleTimeoutClear();\n },\n onMouseMove: (event: MouseEvent) => {\n handleMouseMove(event);\n }\n })\n };\n actionableProps = mergeProps(\n hoverProps,\n focusProps,\n touchProps,\n hoverInitProps,\n focusInitProps,\n anchorInitProps,\n keyInitProps,\n isLogicalFocusStrategy ? { onLogicalFocus, onLogicalBlur } : {}\n );\n }\n\n // No need to process tooltip if disabled or no text is provided\n // Include actionableProps to detect mouseenter in components\n // hovered state won't update unless actionableProps are already present in the component when mouse enters\n if (disabled) {\n toggleTimeoutClear();\n __resetCoords();\n return {\n tooltipContent: null,\n tooltipProps: actionableProps\n };\n }\n\n const placement = positionToPlacement(position);\n\n const handleTransitionEnd = () => {\n if (state === 'mounting') {\n setState('mounted');\n }\n if (state === 'unmounting') {\n __resetCoords();\n setState('unmounted');\n }\n };\n\n const renderRawContent = (\n <TooltipContent\n id={uniqueIdRef.current}\n testId={testId}\n isOpen={['mounting', 'mounted', 'unmountPending'].includes(state)}\n {...popoverHoverProps}\n isDatatip={isDatatip}\n onTransitionEnd={handleTransitionEnd}>\n {text}\n </TooltipContent>\n );\n\n const renderTooltipOrDatatip = () => {\n if (variant === 'tooltip') {\n return (\n <EnvironmentProvider environment={{ colorScheme: newColorScheme }}>\n {renderRawContent}\n </EnvironmentProvider>\n );\n } else {\n return <>{renderRawContent}</>;\n }\n };\n\n const renderContent = (\n <Layer>\n <Floating anchorRef={usedRef} placement={placement} offsetValue={offset}>\n {renderTooltipOrDatatip()}\n </Floating>\n </Layer>\n );\n\n return {\n tooltipContent: !['unmounted', 'mountPending'].includes(state) && renderContent,\n tooltipProps: actionableProps\n };\n};\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\nexport type TooltipManagerCallback = () => void;\n\n/**\n * A global tooltip manager that\n * - ensures that only one tooltip is shown at a time\n * - detects a Tab key press and allows tooltips to check if their target was focused via keyboard\n */\nexport class TooltipManager {\n private activeCallback: TooltipManagerCallback | null;\n\n private tabKeyActive: boolean;\n\n private keyDownHandler = (event: KeyboardEvent) => {\n if (event.key === 'Tab') {\n this.tabKeyActive = true;\n setTimeout(() => {\n this.tabKeyActive = false;\n }, 100);\n }\n };\n\n constructor() {\n this.activeCallback = null;\n this.tabKeyActive = false;\n window.addEventListener('keydown', this.keyDownHandler, true);\n }\n\n /**\n * notifies the previously registered active tooltip callback and registers a new one\n */\n public register = (callback: TooltipManagerCallback) => {\n if (this.activeCallback && this.activeCallback !== callback) {\n this.activeCallback();\n }\n this.activeCallback = callback;\n };\n\n /**\n * resets the registered active callback\n */\n public unregister = (callback: TooltipManagerCallback) => {\n if (this.activeCallback === callback) {\n this.activeCallback = null;\n }\n };\n\n /**\n * returns the active Tab key status ('active' means a Tab key press within the last 100ms)\n */\n public isTabKeyActive = () => {\n return this.tabKeyActive;\n };\n}\n"],"names":["TooltipContent","children","id","isOpen","isDatatip","onTransitionEnd","testId","props","wrapperRef","useRef","popoverRef","testIdProps","useTestId","baseTheme","variantClasses","styles","useComponentTheme","TooltipContentRedwoodTheme","variant","schemeClass","useThemeInterpolations","nodeRef","useAnimation","animationStates","mounted","_node","childNode","firstChild","from","maxHeight","opacity","to","offsetHeight","options","duration","easing","unmounted","isAnimatedOnMount","onAnimationEnd","useEffect","current","style","height","_jsx","jsx","ref","role","class","classNames","wrapper","inner","content","globalTooltipManager","constructor","this","keyDownHandler","event","key","tabKeyActive","setTimeout","register","callback","activeCallback","unregister","isTabKeyActive","window","addEventListener","text","position","focusStrategy","isDisabled","anchor","x","y","offset","mainAxis","crossAxis","onToggle","disabled","isInitialRenderState","state","_setState","useState","stateRef","setState","newState","needsUpdate","setNeedsUpdate","isLogicalFocus","setLogicalFocus","isLogicalFocusStrategy","isInitialRenderTrigger","hoverProps","isHover","useHover","touchProps","isTouch","useTouch","focusProps","isFocus","useFocus","popoverHoverProps","popoverIsHover","isPointer","uniqueIdRef","useId","targetRef","coordsRef","usedRef","delay","toggleTimeoutRef","currentColorScheme","useColorScheme","newColorScheme","focusActive","hoverActive","toggleTimeoutClear","clearTimeout","open","value","__resetCoords","updateState","destroyCallback","useCallback","onLogicalFocus","target","onLogicalBlur","onFocusCallback","eventPhase","Event","AT_TARGET","BUBBLING_PHASE","onBlurCallback","focusInitProps","onFocus","onBlur","hoverInitProps","onMouseEnter","keyInitProps","onKeyDown","code","preventDefault","actionableProps","mergeProps","anchorInitProps","onMouseLeave","onMouseMove","targetRect","getBoundingClientRect","distanceX","document","body","scrollLeft","left","width","distanceY","scrollTop","top","clientX","clientY","handleMouseMove","tooltipContent","tooltipProps","placement","positionToPlacement","renderRawContent","includes","renderContent","Layer","Floating","anchorRef","offsetValue","EnvironmentProvider","environment","colorScheme","_Fragment","Fragment"],"mappings":"4jBAyBO,MAAMA,EAAiB,EAC5BC,WACAC,KACAC,SACAC,YACAC,kBACA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CAKD,GAAIhD,EAGF,OAFAsC,KACAI,KACO,CACLyC,eAAgB,KAChBC,aAAcpB,IAIlB,MAAMqB,GAlZoB,CAAC/F,IAC3B,IAAI+F,EAAuB,SAE3B,OAAQ/F,GACN,IAAK,MACL,IAAK,MACL,IAAK,SACL,IAAK,QACH+F,EAAY/F,EACZ,MAEF,IAAK,UACH+F,EAAY,iBACZ,MAEF,IAAK,aACHA,EAAY,oBACZ,MAEF,IAAK,eACHA,EAAY,sBACZ,MAEF,IAAK,YACHA,EAAY,mBAIhB,OAAOA,CAAS,EAsXEC,CAAoBhG,GAYhCiG,GACJ1H,EAAAA,IAAC3C,EACC,CAAAE,GAAIsG,EAAYhE,QAChBlC,OAAQA,EACRH,OAAQ,CAAC,WAAY,UAAW,kBAAkBmK,SAAStF,MACvDqB,EACJjG,UAAWA,EACXC,gBAjBwB,KACZ,aAAV2E,GACFI,EAAS,WAEG,eAAVJ,IACFwC,KACApC,EAAS,aACV,WAWEjB,IAgBCoG,GACJ5H,EAACC,IAAA4H,QACC,CAAAvK,SAAA0C,MAAC8H,EAAAA,SAAQ,CAACC,UAAW9D,EAASuD,UAAWA,GAAWQ,YAAajG,EAC9DzE,SAdW,YAAZiB,EAEAyB,EAAAC,IAACgI,sBAAmB,CAACC,YAAa,CAAEC,YAAa7D,GAAgBhH,SAC9DoK,KAIE1H,EAAAC,IAAAmI,EAAAC,SAAA,CAAA/K,SAAGoK,SAYd,MAAO,CACLJ,gBAAiB,CAAC,YAAa,gBAAgBK,SAAStF,IAAUuF,GAClEL,aAAcpB,GACf"}
|
|
1
|
+
{"version":3,"file":"useTooltipControlled-18271c7a.js","sources":["../../src/hooks/UNSAFE_useTooltip/TooltipContent.tsx","../../src/hooks/UNSAFE_useTooltip/useTooltipControlled.tsx","../../src/hooks/UNSAFE_useTooltip/TooltipManager.ts"],"sourcesContent":["import { useAnimation } from '../UNSAFE_useAnimation';\nimport { useComponentTheme } from '../UNSAFE_useComponentTheme';\nimport { useEffect, useRef } from 'preact/hooks';\nimport { HTMLAttributesSignalExcluded } from '../../utils/UNSAFE_attributeUtils';\nimport {\n TooltipContentVariantOptions,\n TooltipContentStyles\n} from './themes/TooltipContentStyles.css';\n\nimport { useTestId, TestIdProps } from '../UNSAFE_useTestId';\nimport { useThemeInterpolations } from '../UNSAFE_useThemeInterpolations';\nimport { classNames } from '../../utils/UNSAFE_classNames';\nimport { TooltipContentRedwoodTheme } from './themes/redwood/TooltipContentTheme';\n\ntype IntrinsicProps = Pick<HTMLAttributesSignalExcluded<HTMLDivElement>, 'children'>;\n\ntype Status = 'mounted' | 'unmounted';\n\ntype ContentProps = IntrinsicProps & {\n id: string;\n isOpen: boolean;\n isDatatip: boolean;\n onTransitionEnd: () => void;\n} & TestIdProps;\n\nexport const TooltipContent = ({\n children,\n id,\n isOpen,\n isDatatip,\n onTransitionEnd,\n testId,\n ...props\n}: ContentProps) => {\n const wrapperRef = useRef<HTMLDivElement>(null);\n const popoverRef = useRef<HTMLDivElement>(null);\n\n const testIdProps = useTestId(testId);\n\n const { baseTheme, variantClasses, styles } = useComponentTheme<\n TooltipContentVariantOptions,\n TooltipContentStyles\n >(TooltipContentRedwoodTheme, {\n variant: isDatatip ? 'datatip' : 'tooltip'\n });\n\n const schemeClass = useThemeInterpolations();\n\n const { nodeRef } = useAnimation<Status, HTMLDivElement>(isOpen ? 'mounted' : 'unmounted', {\n animationStates: {\n mounted: (_node) => {\n const childNode = _node.firstChild as HTMLDivElement;\n return {\n from: {\n maxHeight: '0',\n opacity: '0%'\n },\n to: {\n maxHeight: `${childNode?.offsetHeight}px`,\n opacity: isDatatip ? '100%' : '95%'\n },\n options: {\n duration: isDatatip ? 1 : 100,\n easing: [0.0, 0.0, 0.2, 1]\n }\n };\n },\n unmounted: (_node) => {\n return {\n from: {\n opacity: isDatatip ? '100%' : '95%'\n },\n to: {\n maxHeight: '0',\n opacity: '0%'\n },\n options: {\n duration: isDatatip ? 1 : 100,\n easing: [0.0, 0.0, 0.2, 1]\n }\n };\n }\n },\n isAnimatedOnMount: true,\n onAnimationEnd: () => onTransitionEnd?.()\n });\n\n // Set up initial wrapper height so Tooltip can animate from the bottom to the top\n useEffect(() => {\n if (wrapperRef.current && popoverRef.current?.offsetHeight) {\n wrapperRef.current.style.height = `${popoverRef.current?.offsetHeight}px`;\n }\n }, []);\n\n return (\n <div\n ref={wrapperRef}\n id={id}\n role=\"tooltip\"\n class={classNames([styles.wrapper, schemeClass, baseTheme])}\n {...testIdProps}>\n <div ref={nodeRef} class={styles.inner} {...props}>\n <div ref={popoverRef} class={classNames([variantClasses, styles.content])}>\n {children}\n </div>\n </div>\n </div>\n );\n};\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 { ComponentChild } from 'preact';\nimport { useState, useRef, useEffect, useCallback } from 'preact/hooks';\nimport { useId } from '../UNSAFE_useId';\nimport { Floating, Placement, Coords } from '../../UNSAFE_Floating';\nimport { Layer } from '../../UNSAFE_Layer';\nimport { useHover } from '../UNSAFE_useHover';\nimport { useFocus } from '../UNSAFE_useFocus';\nimport { useTouch } from '../UNSAFE_useTouch';\nimport { mergeProps } from '../../utils/UNSAFE_mergeProps';\nimport { TooltipContent } from './TooltipContent';\nimport { EnvironmentProvider } from '../../UNSAFE_Environment';\nimport { useColorScheme } from '../UNSAFE_useColorScheme';\nimport { TestIdProps } from '../UNSAFE_useTestId';\nimport { TooltipManager } from './TooltipManager';\n\n// Global TooltipManager singleton instance\nconst globalTooltipManager = new TooltipManager();\n\nexport const positions = [\n 'start',\n 'top-start',\n 'top',\n 'top-end',\n 'end',\n 'bottom-end',\n 'bottom',\n 'bottom-start'\n] as const;\ntype Position = (typeof positions)[number];\n\nconst positionToPlacement = (position: Position) => {\n let placement: Placement = 'bottom';\n\n switch (position) {\n case 'top':\n case 'end':\n case 'bottom':\n case 'start':\n placement = position as Placement;\n break;\n\n case 'top-end':\n placement = 'top-end-corner';\n break;\n\n case 'bottom-end':\n placement = 'bottom-end-corner';\n break;\n\n case 'bottom-start':\n placement = 'bottom-start-corner';\n break;\n\n case 'top-start':\n placement = 'top-start-corner';\n break;\n }\n\n return placement;\n};\n\nexport const anchorTos = ['element', 'pointer'] as const;\ntype AnchorTo = (typeof anchorTos)[number];\n\ntype AnchorModel = { x: AnchorTo; y: AnchorTo };\n\ntype Props = {\n text?: string;\n variant?: 'tooltip' | 'datatip';\n isOpen: boolean;\n position?: Position;\n isDisabled?: boolean;\n focusStrategy?: 'browser' | 'logical';\n anchor?: AnchorModel;\n offset?: { mainAxis?: number; crossAxis?: number };\n onToggle?: (details: { value: boolean }) => void;\n} & TestIdProps;\n\n/**\n * The 'mounting' and 'unmounting' states are related to the animation. The 'unmounted' state\n * is used for conditional rendering. In this state, the Tooltip content is completely removed\n * from the DOM. The 'mountPending' and 'unmountPending' are used when timeout is active.\n * The 'reposition' state is used to trigger a transition with new coordinates within\n * the same element.\n */\ntype Status =\n | 'unmounted'\n | 'mountPending'\n | 'mounting'\n | 'mounted'\n | 'unmountPending'\n | 'unmounting';\n\nexport const useTooltipControlled = ({\n text,\n isOpen = false,\n variant = 'tooltip',\n position = 'bottom',\n focusStrategy = 'browser',\n isDisabled = false,\n anchor = { x: 'element', y: 'element' },\n offset = { mainAxis: 0, crossAxis: 0 },\n onToggle,\n testId\n}: Props): {\n tooltipContent: ComponentChild;\n tooltipProps: Record<string, any>;\n} => {\n const disabled = isDisabled || !text;\n const isInitialRenderState = useRef<boolean>(true);\n\n const [state, _setState] = useState<Status>(!disabled && isOpen ? 'mounting' : 'unmounted');\n const stateRef = useRef<Status>(state);\n const setState = (newState: Status) => {\n stateRef.current = newState;\n _setState(newState);\n };\n\n // const tooltipId = useRef<string>(useId());\n\n const [needsUpdate, setNeedsUpdate] = useState<boolean>(false);\n setNeedsUpdate(false);\n\n const isDatatip = variant === 'datatip';\n\n const [isLogicalFocus, setLogicalFocus] = useState<boolean>(false);\n const isLogicalFocusStrategy = focusStrategy === 'logical';\n const isInitialRenderTrigger = useRef<boolean>(true);\n const { hoverProps, isHover } = useHover({});\n const { touchProps, isTouch } = useTouch({ isDisabled }); // TODO replace by useLongPress actionhook\n // we only care about keyboard focus, don't enable useFocus hook if isHover or isTouch are active\n const { focusProps, isFocus } = useFocus({\n isDisabled: isLogicalFocusStrategy\n });\n const { hoverProps: popoverHoverProps, isHover: popoverIsHover } = useHover({ isDisabled });\n\n const isPointer = anchor.x === 'pointer' || anchor.y === 'pointer';\n\n const uniqueIdRef = useRef<string>(useId());\n const targetRef = useRef<HTMLElement | null>(null);\n const coordsRef = useRef<Coords>({ x: -9999, y: -9999 });\n // if anchor is set to pointer and target does not have keyboard focus, use coords\n const usedRef = isPointer && !isFocus ? coordsRef : targetRef;\n const delay = isDatatip ? 0 : 250;\n const toggleTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const currentColorScheme = useColorScheme();\n const newColorScheme = !currentColorScheme || currentColorScheme === 'light' ? 'dark' : 'light';\n\n const focusActive = useRef<boolean>(false);\n const hoverActive = useRef<boolean>(false);\n\n const toggleTimeoutClear = () => {\n if (toggleTimeoutRef.current) {\n clearTimeout(toggleTimeoutRef.current);\n toggleTimeoutRef.current = null;\n }\n };\n\n /*\n * This effect executes when isFocus/isLogicalFocus changes\n * - focusActive ref is set if the focus change follows a Tab key\n * - hoverActive ref is reset, if focusActive becomes true\n */\n useEffect(() => {\n if (isLogicalFocusStrategy) {\n focusActive.current = isLogicalFocus;\n } else {\n focusActive.current = isFocus && globalTooltipManager.isTabKeyActive();\n }\n if (focusActive.current) {\n hoverActive.current = false;\n }\n }, [isFocus, isLogicalFocus, isLogicalFocusStrategy]);\n\n /*\n * This effect executes when isHover state changes\n * - focusActive ref is reset, if hoverActive becomes true\n */\n useEffect(() => {\n hoverActive.current = isHover;\n if (hoverActive.current) {\n focusActive.current = false;\n }\n }, [isHover]);\n\n useEffect(() => {\n // inner function for state transitions on various trigger changes\n const updateState = (open: boolean) => {\n if (open) {\n // At least one toggle event is set to true\n switch (state) {\n case 'unmounted':\n setState('mountPending'); // Set mount pending state if tooltip is unmounted\n break;\n case 'unmounting': // Switch back to mounting when unmounting was in progress and the tooltip should stay on\n setState('mounting');\n onToggle?.({ value: true });\n break;\n case 'unmountPending':\n toggleTimeoutClear();\n setState('mounted'); // Clear timers immediately and keep the tooltip mounted\n break;\n }\n } else {\n // No toggle events are set to true\n switch (state) {\n case 'mounting':\n case 'mounted':\n setState('unmountPending'); // Set unmount pending state if tooltip is mounted or in mounting transition\n break;\n case 'mountPending':\n toggleTimeoutClear();\n __resetCoords();\n setState('unmounted'); // Unmount tooltip immediately if mounting is pending\n break;\n }\n }\n };\n\n if (isInitialRenderTrigger.current) {\n // On onitial render do not trigger rerender\n isInitialRenderTrigger.current = false;\n return;\n }\n // When pointer is used, handleMouseMove method is responsible for state updates\n // until the tooltip is mounted\n if (isPointer && isHover && state === 'unmounted') {\n return;\n }\n updateState(\n (isHover && hoverActive.current) ||\n ((isFocus || isLogicalFocus) && focusActive.current) ||\n popoverIsHover ||\n isTouch\n );\n }, [isHover, isFocus, isLogicalFocus, popoverIsHover, isTouch, isPointer, state, onToggle]);\n\n const destroyCallback = useCallback(() => {\n focusActive.current = false;\n hoverActive.current = false;\n onToggle?.({ value: false });\n }, []); // cannot depend on the 'onToggle' prop as some clients tend to pass a new callback on each render\n\n useEffect(() => {\n if (isInitialRenderState.current) {\n // On onitial render do not trigger rerender\n isInitialRenderState.current = false;\n return;\n }\n setState(isOpen ? 'mounting' : 'unmounting');\n }, [isOpen]);\n\n useEffect(() => {\n return () => {\n // make sure to clear the toggle timeout on unmount\n toggleTimeoutClear();\n // reset focusActive and hoverActive refs\n focusActive.current = false;\n hoverActive.current = false;\n };\n }, []);\n\n /*\n * This effect executes when the component state changes.\n * On 'mounted' state, the tooltip registers itself with the global tooltip manager.\n * On 'unmounted', the tooltip unregisters from the global tooltip manager.\n */\n useEffect(() => {\n if (state === 'mounted') {\n globalTooltipManager.register(destroyCallback);\n } else if (state === 'unmounted') {\n globalTooltipManager.unregister(destroyCallback);\n }\n }, [state, destroyCallback]);\n\n /*\n * Set a timer to toggle the state afer the 'pending' period expires\n */\n useEffect(() => {\n if (!toggleTimeoutRef.current && (state === 'mountPending' || state === 'unmountPending')) {\n toggleTimeoutRef.current = setTimeout(() => {\n toggleTimeoutClear();\n // make sure the state has not changed in the mean time before onToggle\n if (\n (state === 'mountPending' || state === 'unmountPending') &&\n state === stateRef.current\n ) {\n onToggle?.({ value: state === 'mountPending' });\n }\n }, delay);\n }\n return () => {\n toggleTimeoutClear();\n };\n }, [state, delay, onToggle]);\n\n const handleMouseMove = (event: MouseEvent) => {\n // we only want track mouse move while the state is 'unmounted' or when moving a 'mounted' datatip\n if (state !== 'unmounted' && !(variant === 'datatip' && state === 'mounted')) {\n return;\n }\n const targetRect = targetRef?.current?.getBoundingClientRect();\n\n // Tooltip maintains static offset from left side of window\n const distanceX = document.body.scrollLeft + (targetRect?.left || 0) + (targetRect?.width || 0);\n\n // Tooltip maintains static offset from top side of the window\n const distanceY = document.body.scrollTop + (targetRect?.top || 0) + (targetRect?.height || 0);\n\n // Display tooltip at the mouse position if both anchors are set to pointer\n const x = anchor.x === 'pointer' ? event.clientX : distanceX;\n const y = anchor.y === 'pointer' ? event.clientY : distanceY;\n\n if (state === 'mounted') {\n coordsRef.current = { x, y };\n if (needsUpdate !== true) setNeedsUpdate(true);\n } else if (state === 'unmounted') {\n toggleTimeoutClear();\n toggleTimeoutRef.current = setTimeout(() => {\n if (state === 'unmounted') {\n coordsRef.current = { x, y };\n onToggle?.({ value: true });\n }\n }, delay);\n }\n };\n\n const onLogicalFocus = (target: HTMLElement) => {\n setLogicalFocus(true);\n targetRef.current = target;\n usedRef.current = target;\n };\n\n const onLogicalBlur = () => {\n setLogicalFocus(false);\n };\n\n const onFocusCallback = useCallback(\n (event: FocusEvent) => {\n if (\n event.eventPhase === Event.AT_TARGET ||\n (event.eventPhase === Event.BUBBLING_PHASE && isDatatip)\n ) {\n targetRef.current = event.target as HTMLElement;\n }\n },\n [isDatatip]\n );\n\n const onBlurCallback = useCallback((event: FocusEvent) => {\n if (event.eventPhase === Event.AT_TARGET) {\n // reset focusActive flag\n focusActive.current = false;\n }\n }, []);\n\n const focusInitProps = isLogicalFocusStrategy\n ? {}\n : {\n onFocus: onFocusCallback,\n onBlur: onBlurCallback\n };\n\n const hoverInitProps = {\n onMouseEnter: useCallback((event: MouseEvent) => {\n targetRef.current = event.target as HTMLElement;\n }, [])\n };\n\n const keyInitProps = {\n onKeyDown: useCallback(\n (event: KeyboardEvent) => {\n if (event.code === 'Escape' && focusActive.current) {\n event.preventDefault();\n // focus no longer active after Escape\n focusActive.current = false;\n onToggle?.({ value: false });\n }\n },\n [onToggle]\n )\n };\n\n let actionableProps;\n\n const __resetCoords = () => {\n coordsRef.current = { x: -9999, y: -9999 };\n };\n\n if (disabled) {\n actionableProps = mergeProps(hoverProps, focusProps, hoverInitProps, focusInitProps);\n } else {\n const anchorInitProps = {\n 'aria-describedby': uniqueIdRef.current,\n\n ...(isPointer && {\n onMouseLeave: () => {\n if (state === 'mounting') {\n return;\n }\n toggleTimeoutClear();\n },\n onMouseMove: (event: MouseEvent) => {\n handleMouseMove(event);\n }\n })\n };\n actionableProps = mergeProps(\n hoverProps,\n focusProps,\n touchProps,\n hoverInitProps,\n focusInitProps,\n anchorInitProps,\n keyInitProps,\n isLogicalFocusStrategy ? { onLogicalFocus, onLogicalBlur } : {}\n );\n }\n\n // No need to process tooltip if disabled or no text is provided\n // Include actionableProps to detect mouseenter in components\n // hovered state won't update unless actionableProps are already present in the component when mouse enters\n if (disabled) {\n toggleTimeoutClear();\n __resetCoords();\n return {\n tooltipContent: null,\n tooltipProps: actionableProps\n };\n }\n\n const placement = positionToPlacement(position);\n\n const handleTransitionEnd = () => {\n if (state === 'mounting') {\n setState('mounted');\n }\n if (state === 'unmounting') {\n __resetCoords();\n setState('unmounted');\n }\n };\n\n const renderRawContent = (\n <TooltipContent\n id={uniqueIdRef.current}\n testId={testId}\n isOpen={['mounting', 'mounted', 'unmountPending'].includes(state)}\n {...popoverHoverProps}\n isDatatip={isDatatip}\n onTransitionEnd={handleTransitionEnd}>\n {text}\n </TooltipContent>\n );\n\n const renderTooltipOrDatatip = () => {\n if (variant === 'tooltip') {\n return (\n <EnvironmentProvider environment={{ colorScheme: newColorScheme }}>\n {renderRawContent}\n </EnvironmentProvider>\n );\n } else {\n return <>{renderRawContent}</>;\n }\n };\n\n const renderContent = (\n <Layer>\n <Floating anchorRef={usedRef} placement={placement} offsetValue={offset}>\n {renderTooltipOrDatatip()}\n </Floating>\n </Layer>\n );\n\n return {\n tooltipContent: !['unmounted', 'mountPending'].includes(state) && renderContent,\n tooltipProps: actionableProps\n };\n};\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\nexport type TooltipManagerCallback = () => void;\n\n/**\n * A global tooltip manager that\n * - ensures that only one tooltip is shown at a time\n * - detects a Tab key press and allows tooltips to check if their target was focused via keyboard\n */\nexport class TooltipManager {\n private activeCallback: TooltipManagerCallback | null;\n\n private tabKeyActive: boolean;\n\n private keyDownHandler = (event: KeyboardEvent) => {\n if (event.key === 'Tab') {\n this.tabKeyActive = true;\n setTimeout(() => {\n this.tabKeyActive = false;\n }, 100);\n }\n };\n\n constructor() {\n this.activeCallback = null;\n this.tabKeyActive = false;\n window.addEventListener('keydown', this.keyDownHandler, true);\n }\n\n /**\n * notifies the previously registered active tooltip callback and registers a new one\n */\n public register = (callback: TooltipManagerCallback) => {\n if (this.activeCallback && this.activeCallback !== callback) {\n this.activeCallback();\n }\n this.activeCallback = callback;\n };\n\n /**\n * resets the registered active callback\n */\n public unregister = (callback: TooltipManagerCallback) => {\n if (this.activeCallback === callback) {\n this.activeCallback = null;\n }\n };\n\n /**\n * returns the active Tab key status ('active' means a Tab key press within the last 100ms)\n */\n public isTabKeyActive = () => {\n return this.tabKeyActive;\n };\n}\n"],"names":["TooltipContent","children","id","isOpen","isDatatip","onTransitionEnd","testId","props","wrapperRef","useRef","popoverRef","testIdProps","useTestId","baseTheme","variantClasses","styles","useComponentTheme","TooltipContentRedwoodTheme","variant","schemeClass","useThemeInterpolations","nodeRef","useAnimation","animationStates","mounted","_node","childNode","firstChild","from","maxHeight","opacity","to","offsetHeight","options","duration","easing","unmounted","isAnimatedOnMount","onAnimationEnd","useEffect","current","style","height","_jsx","jsx","ref","role","class","classNames","wrapper","inner","content","globalTooltipManager","constructor","this","keyDownHandler","event","key","tabKeyActive","setTimeout","register","callback","activeCallback","unregister","isTabKeyActive","window","addEventListener","text","position","focusStrategy","isDisabled","anchor","x","y","offset","mainAxis","crossAxis","onToggle","disabled","isInitialRenderState","state","_setState","useState","stateRef","setState","newState","needsUpdate","setNeedsUpdate","isLogicalFocus","setLogicalFocus","isLogicalFocusStrategy","isInitialRenderTrigger","hoverProps","isHover","useHover","touchProps","isTouch","useTouch","focusProps","isFocus","useFocus","popoverHoverProps","popoverIsHover","isPointer","uniqueIdRef","useId","targetRef","coordsRef","usedRef","delay","toggleTimeoutRef","currentColorScheme","useColorScheme","newColorScheme","focusActive","hoverActive","toggleTimeoutClear","clearTimeout","open","value","__resetCoords","updateState","destroyCallback","useCallback","onLogicalFocus","target","onLogicalBlur","onFocusCallback","eventPhase","Event","AT_TARGET","BUBBLING_PHASE","onBlurCallback","focusInitProps","onFocus","onBlur","hoverInitProps","onMouseEnter","keyInitProps","onKeyDown","code","preventDefault","actionableProps","mergeProps","anchorInitProps","onMouseLeave","onMouseMove","targetRect","getBoundingClientRect","distanceX","document","body","scrollLeft","left","width","distanceY","scrollTop","top","clientX","clientY","handleMouseMove","tooltipContent","tooltipProps","placement","positionToPlacement","renderRawContent","includes","renderContent","Layer","Floating","anchorRef","offs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BC,EAAUA,WAC1BnD,EACAM,EACAH,EACAyC,GACAH,GACAW,EACAN,GACAhD,EAAyB,CAAEkC,kBAAgBE,kBAAkB,CAAE,EAElE,CAKD,GAAIhD,EAGF,OAFAsC,KACAI,KACO,CACLyC,eAAgB,KAChBC,aAAcpB,IAIlB,MAAMqB,GAlZoB,CAAC/F,IAC3B,IAAI+F,EAAuB,SAE3B,OAAQ/F,GACN,IAAK,MACL,IAAK,MACL,IAAK,SACL,IAAK,QACH+F,EAAY/F,EACZ,MAEF,IAAK,UACH+F,EAAY,iBACZ,MAEF,IAAK,aACHA,EAAY,oBACZ,MAEF,IAAK,eACHA,EAAY,sBACZ,MAEF,IAAK,YACHA,EAAY,mBAIhB,OAAOA,CAAS,EAsXEC,CAAoBhG,GAYhCiG,GACJ1H,EAAAA,IAAC3C,EACC,CAAAE,GAAIsG,EAAYhE,QAChBlC,OAAQA,EACRH,OAAQ,CAAC,WAAY,UAAW,kBAAkBmK,SAAStF,MACvDqB,EACJjG,UAAWA,EACXC,gBAjBwB,KACZ,aAAV2E,GACFI,EAAS,WAEG,eAAVJ,IACFwC,KACApC,EAAS,aACV,WAWEjB,IAgBCoG,GACJ5H,EAACC,IAAA4H,QACC,CAAAvK,SAAA0C,MAAC8H,EAAAA,SAAQ,CAACC,UAAW9D,EAASuD,UAAWA,GAAWQ,YAAajG,EAC9DzE,SAdW,YAAZiB,EAEAyB,EAAAC,IAACgI,sBAAmB,CAACC,YAAa,CAAEC,YAAa7D,GAAgBhH,SAC9DoK,KAIE1H,EAAAC,IAAAmI,EAAAC,SAAA,CAAA/K,SAAGoK,SAYd,MAAO,CACLJ,gBAAiB,CAAC,YAAa,gBAAgBK,SAAStF,IAAUuF,GAClEL,aAAcpB,GACf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(['exports', 'preact/hooks', './LayerHost-
|
|
2
|
-
//# sourceMappingURL=useTranslationBundle-
|
|
1
|
+
define(['exports', 'preact/hooks', './LayerHost-0a244de8', 'preact/jsx-runtime', 'preact/compat'], (function(t,n,e,o,r){"use strict";t.useTranslationBundle=function(t){const o=n.useContext(e.EnvironmentContext).translations,r=o?.[t];if(!r)throw new Error(`Translation bundle ${t} is not loaded.`);return r}}));
|
|
2
|
+
//# sourceMappingURL=useTranslationBundle-20bfc0f3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTranslationBundle-
|
|
1
|
+
{"version":3,"file":"useTranslationBundle-20bfc0f3.js","sources":["../../src/hooks/UNSAFE_useTranslationBundle/useTranslationBundle.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 */\nimport { useContext } from 'preact/hooks';\nimport { EnvironmentContext } from '../../UNSAFE_Environment';\nimport type { TranslationBundle } from '../../UNSAFE_Environment';\n\n/**\n * useTranslationBundle is a hook to get a translation bundle from the EnvironmentProvider\n * @param bundleId\n * @returns a translation bundle of type T\n */\nexport function useTranslationBundle<T extends TranslationBundle>(bundleId: string) {\n const translations = useContext(EnvironmentContext).translations;\n const bundle = translations?.[bundleId];\n if (!bundle) {\n throw new Error(`Translation bundle ${bundleId} is not loaded.`);\n }\n return bundle as T;\n}\n"],"names":["bundleId","translations","useContext","EnvironmentContext","bundle","Error"],"mappings":"uJAgBM,SAA4DA,GAChE,MAAMC,EAAeC,EAAAA,WAAWC,EAAkBA,oBAAEF,aAC9CG,EAASH,IAAeD,GAC9B,IAAKI,EACH,MAAM,IAAIC,MAAM,sBAAsBL,oBAExC,OAAOI,CACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(['exports', 'preact/hooks', './LayerHost-
|
|
2
|
-
//# sourceMappingURL=useUser-
|
|
1
|
+
define(['exports', 'preact/hooks', './LayerHost-0a244de8', 'preact/jsx-runtime', 'preact/compat'], (function(e,t,n,r,o){"use strict";e.useUser=function(){return t.useContext(n.EnvironmentContext).user}}));
|
|
2
|
+
//# sourceMappingURL=useUser-9b166ca3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUser-
|
|
1
|
+
{"version":3,"file":"useUser-9b166ca3.js","sources":["../../src/hooks/UNSAFE_useUser/useUser.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 */\nimport { useContext } from 'preact/hooks';\nimport { EnvironmentContext } from '../../UNSAFE_Environment';\n\nexport function useUser() {\n return useContext(EnvironmentContext).user;\n}\n"],"names":["useContext","EnvironmentContext","user"],"mappings":"qJAWE,OAAOA,EAAUA,WAACC,sBAAoBC,IACxC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(['exports', 'preact/hooks', './useUser-
|
|
2
|
-
//# sourceMappingURL=useVisEvents-
|
|
1
|
+
define(['exports', 'preact/hooks', './useUser-9b166ca3', './layoutUtils-3c2d340e', './eventsUtils-5d567a9d', './useVisHover-28319fef', './mergeProps-bcfa6a92'], (function(e,t,n,r,s,o,c){"use strict";e.useVisEvent=function(e,i,u,a,d,v,f,I,l,m,b,g,p,C){const k=t.useRef(),[w,U]=t.useState(p),[R,V]=t.useState(),h=o.useVisHover((e=>{const t=g(e.target);b(t,R)||(V(t&&{...t,isCurrent:!0}),k.current=r.getRandomId(),i&&(w&&U({...w,isCurrent:!1}),l?.(d(t))))}),void 0,(()=>{V(void 0),k.current=void 0,i&&l?.(d())}),e),{direction:y}=n.useUser(),A="rtl"===y;if(!i)return{isInteractive:!1,focusedItemInfo:w,hoveredItemInfo:R,eventsProps:h};const E=e=>{m?.(d(e)),k.current=r.getRandomId(),U(e)},P=e=>{b(e,w)||(e.isCurrent=!0,e.isFocusVisible=!0,R&&V({...R,isCurrent:!1}),E(e))},D=()=>{const e=d(w);e&&e.data&&u(w)&&(I?.(e),k.current=r.getRandomId())},F=a(D,E,w,C);return{isInteractive:!0,focusedItemInfo:w,hoveredItemInfo:R,activeId:k.current,triggerOnAction:D,updatefocusedItemInfo:E,onContextMenuDismissed:e=>{"keyboard"===e&&E({...w,isCurrent:!0,isFocusVisible:!0})},eventsProps:c.mergeProps(h,{onPointerUp:e=>{const t=g(e.target);if(null!=t&&u(t)){U(t);const e=d(t);e&&u(t)&&(I?.(e),k.current=r.getRandomId())}},onKeyUp:F,onKeyDown:e=>{switch(e.key){case"Tab":return;case"ArrowDown":{const t=f(w);P(t),s.cancelEvent(e);break}case"ArrowUp":{const t=v(w);P(t),s.cancelEvent(e);break}case"ArrowRight":{const t=A?v(w):f(w);P(t),s.cancelEvent(e);break}case"ArrowLeft":{const t=A?f(w):v(w);P(t),s.cancelEvent(e);break}}},onBlur:()=>{const e={...w,isCurrent:!1,isFocusVisible:!1};(null!=R||w.isCurrent)&&m?.(d(void 0)),U(e)}})}}}));
|
|
2
|
+
//# sourceMappingURL=useVisEvents-ac97d087.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVisEvents-
|
|
1
|
+
{"version":3,"file":"useVisEvents-ac97d087.js","sources":["../../src/hooks/PRIVATE_useVisEvents/useVisEvents.ts"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { useRef, useState } from 'preact/hooks';\nimport { useUser } from '#hooks/UNSAFE_useUser';\nimport type { gestureTypes } from '#hooks/PRIVATE_useVisContextMenu';\nimport { getRandomId } from '#utils/PRIVATE_visLayoutUtils/layoutUtils';\nimport { cancelEvent } from '../../utils/UNSAFE_visUtils/eventsUtils';\nimport { useVisHover } from '#hooks/PRIVATE_useVisHover';\nimport { mergeProps } from '#utils/UNSAFE_mergeProps';\n\ntype ItemInfo = { isCurrent?: boolean; isFocusVisible?: boolean };\n\ntype EventDetail<D> = { data?: D };\n\nexport function useVisEvent<\n I extends ItemInfo,\n J extends EventDetail<D>,\n L extends EventDetail<D>,\n D\n>(\n touchResponse: 'touchStart' | 'touchHold',\n isInteractive: boolean,\n isItemActionable: (itemInfo: I) => boolean,\n getKeyUpHandler: (\n triggerOnAction: () => void,\n updatefocusedItemInfo: (itemInfo: I) => void,\n focusedItemInfo: I,\n isHideShow?: boolean\n ) => (event: KeyboardEvent) => void,\n getDetailFromInfo: (info?: I) => J | L,\n getPrevItemInfo: (info: I) => I,\n getNextItemInfo: (info: I) => I,\n onItemAction: ((detail: J) => void) | undefined,\n onItemHover: ((detail: L) => void) | undefined,\n onItemFocus: ((detail: L) => void) | undefined,\n isEqualItem: (item1?: I, item2?: I) => boolean,\n getItemInfo: (element: HTMLElement) => I | undefined,\n initItemInfo: I,\n isHideShow?: boolean\n) {\n const activeIdRef = useRef<string>();\n\n const [focusedItemInfo, setfocusedItemInfo] = useState<I>(initItemInfo);\n const [hoveredItemInfo, sethoveredItemInfo] = useState<I>();\n\n const onHover = (event: PointerEvent) => {\n const itemInfo = getItemInfo(event.target as HTMLElement);\n if (!isEqualItem(itemInfo, hoveredItemInfo)) {\n sethoveredItemInfo(itemInfo && { ...itemInfo, isCurrent: true });\n activeIdRef.current = getRandomId();\n if (isInteractive) {\n focusedItemInfo ? setfocusedItemInfo({ ...focusedItemInfo, isCurrent: false }) : '';\n onItemHover?.(getDetailFromInfo(itemInfo) as L);\n }\n }\n };\n\n const onHoverLeave = () => {\n sethoveredItemInfo(undefined);\n activeIdRef.current = undefined;\n if (isInteractive) {\n onItemHover?.(getDetailFromInfo() as L);\n }\n };\n\n const hoverHandlers = useVisHover(onHover, undefined, onHoverLeave, touchResponse);\n\n const { direction } = useUser();\n const isRtl = direction === 'rtl';\n if (!isInteractive) {\n return {\n isInteractive: false,\n focusedItemInfo,\n hoveredItemInfo,\n // include relevant hover handlers for datatip\n eventsProps: hoverHandlers\n };\n }\n\n const updatefocusedItemInfo = (itemInfo: I) => {\n onItemFocus?.(getDetailFromInfo(itemInfo) as L);\n activeIdRef.current = getRandomId();\n setfocusedItemInfo(itemInfo);\n };\n\n const handleKeyboardInput = (item: I) => {\n if (!isEqualItem(item, focusedItemInfo)) {\n item.isCurrent = true;\n item.isFocusVisible = true;\n if (hoveredItemInfo) {\n sethoveredItemInfo({ ...hoveredItemInfo, isCurrent: false });\n }\n updatefocusedItemInfo(item);\n }\n };\n\n const triggerOnAction = () => {\n const detail = getDetailFromInfo(focusedItemInfo) as J;\n if (detail && detail.data && isItemActionable(focusedItemInfo)) {\n onItemAction?.(detail);\n activeIdRef.current = getRandomId();\n }\n };\n\n const onPointerUp = (event: PointerEvent) => {\n const itemInfo = getItemInfo(event.target as HTMLElement);\n if (itemInfo != null && isItemActionable(itemInfo)) {\n setfocusedItemInfo(itemInfo);\n const detail = getDetailFromInfo(itemInfo);\n if (detail && isItemActionable(itemInfo)) {\n onItemAction?.(detail as J);\n activeIdRef.current = getRandomId();\n }\n }\n };\n\n const onKeyDown = (event: KeyboardEvent) => {\n const key = event.key;\n switch (key) {\n case 'Tab':\n return;\n case 'ArrowDown': {\n const nextItemInfo = getNextItemInfo(focusedItemInfo);\n handleKeyboardInput(nextItemInfo);\n cancelEvent(event);\n break;\n }\n case 'ArrowUp': {\n const nextItemInfo = getPrevItemInfo(focusedItemInfo);\n handleKeyboardInput(nextItemInfo);\n cancelEvent(event);\n break;\n }\n case 'ArrowRight': {\n const nextItemInfo = isRtl\n ? getPrevItemInfo(focusedItemInfo)\n : getNextItemInfo(focusedItemInfo);\n handleKeyboardInput(nextItemInfo);\n cancelEvent(event);\n break;\n }\n case 'ArrowLeft': {\n const nextItemInfo = isRtl\n ? getNextItemInfo(focusedItemInfo)\n : getPrevItemInfo(focusedItemInfo);\n handleKeyboardInput(nextItemInfo);\n cancelEvent(event);\n break;\n }\n }\n };\n\n const onKeyUp = getKeyUpHandler(\n triggerOnAction,\n updatefocusedItemInfo,\n focusedItemInfo,\n isHideShow\n );\n\n const onContextMenuDismissed = (gesture: gestureTypes) => {\n if (gesture === 'keyboard') {\n updatefocusedItemInfo({\n ...focusedItemInfo,\n isCurrent: true,\n isFocusVisible: true\n });\n }\n };\n\n const onBlur = () => {\n const itemInfo = { ...focusedItemInfo, isCurrent: false, isFocusVisible: false } as I;\n if (hoveredItemInfo != null || focusedItemInfo.isCurrent) {\n onItemFocus?.(getDetailFromInfo(undefined) as L);\n }\n setfocusedItemInfo(itemInfo);\n };\n\n return {\n isInteractive: true,\n focusedItemInfo,\n hoveredItemInfo,\n activeId: activeIdRef.current,\n triggerOnAction,\n updatefocusedItemInfo,\n onContextMenuDismissed,\n eventsProps: mergeProps(hoverHandlers, {\n onPointerUp,\n onKeyUp,\n onKeyDown,\n onBlur\n })\n };\n}\n"],"names":["touchResponse","isInteractive","isItemActionable","getKeyUpHandler","getDetailFromInfo","getPrevItemInfo","getNextItemInfo","onItemAction","onItemHover","onItemFocus","isEqualItem","getItemInfo","initItemInfo","isHideShow","activeIdRef","useRef","focusedItemInfo","setfocusedItemInfo","useState","hoveredItemInfo","sethoveredItemInfo","hoverHandlers","useVisHover","event","itemInfo","target","isCurrent","current","getRandomId","undefined","direction","useUser","isRtl","eventsProps","updatefocusedItemInfo","handleKeyboardInput","item","isFocusVisible","triggerOnAction","detail","data","onKeyUp","activeId","onContextMenuDismissed","gesture","mergeProps","onPointerUp","onKeyDown","key","nextItemInfo","cancelEvent","onBlur"],"mappings":"8MAoBgB,SAMdA,EACAC,EACAC,EACAC,EAMAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,EAAcC,EAAAA,UAEbC,EAAiBC,GAAsBC,EAAQA,SAAIN,IACnDO,EAAiBC,GAAsBF,EAAQA,WAsBhDG,EAAgBC,EAAAA,aApBLC,IACf,MAAMC,EAAWb,EAAYY,EAAME,QAC9Bf,EAAYc,EAAU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a,UACAM,UAxEexB,IAEjB,OADYA,EAAMyB,KAEhB,IAAK,MACH,OACF,IAAK,YAAa,CAChB,MAAMC,EAAe3C,EAAgBU,GACrCmB,EAAoBc,GACpBC,EAAWA,YAAC3B,GACZ,KACD,CACD,IAAK,UAAW,CACd,MAAM0B,EAAe5C,EAAgBW,GACrCmB,EAAoBc,GACpBC,EAAWA,YAAC3B,GACZ,KACD,CACD,IAAK,aAAc,CACjB,MAAM0B,EAAejB,EACjB3B,EAAgBW,GAChBV,EAAgBU,GACpBmB,EAAoBc,GACpBC,EAAWA,YAAC3B,GACZ,KACD,CACD,IAAK,YAAa,CAChB,MAAM0B,EAAejB,EACjB1B,EAAgBU,GAChBX,EAAgBW,GACpBmB,EAAoBc,GACpBC,EAAWA,YAAC3B,GACZ,KACD,EACF,EAwCC4B,OApBW,KACb,MAAM3B,EAAW,IAAKR,EAAiBU,WAAW,EAAOW,gBAAgB,IAClD,MAAnBlB,GAA2BH,EAAgBU,YAC7CjB,IAAcL,OAAkByB,IAElCZ,EAAmBO,EAAS,IAkBhC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(['exports', '../tabbableUtils-
|
|
1
|
+
define(['exports', '../tabbableUtils-78cc49fd', '../domUtil-b56997de', 'preact/jsx-runtime', '@testing-library/preact', '../matchTranslationBundle-e243f90d', '../LayerHost-0a244de8', '../Common/themes/redwood/theme', '../Common/themes/themeContract.css', 'preact', 'preact/compat', '../EnvironmentProvider-9e71b5c2', 'preact/hooks', '../LayerManager-00983765', '../TabbableModeContext-a9c97640', 'chai'], (function(e,t,o,a,r,c,n,l,d,i,s,m,b,p,u,y){"use strict";e.default=t.setupTabbableComponent,e.checkTooltipText=o.checkTooltipText,e.queryAllBy=o.queryAllBy,e.queryById=o.queryById,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=PRIVATE_visTestUtils.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define(['exports', 'preact/jsx-runtime', './useUser-
|
|
2
|
-
//# sourceMappingURL=withDirectionIcon-
|
|
1
|
+
define(['exports', 'preact/jsx-runtime', './useUser-9b166ca3'], (function(e,t,r){"use strict";e.withDirectionIcon=(e,s)=>i=>{const{direction:n}=r.useUser();return"ltr"===n?t.jsx(e,{...i}):t.jsx(s,{...i})}}));
|
|
2
|
+
//# sourceMappingURL=withDirectionIcon-9e4dae53.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withDirectionIcon-
|
|
1
|
+
{"version":3,"file":"withDirectionIcon-9e4dae53.js","sources":["../../src/hoc/PRIVATE_withDirectionIcon/withDirectionIcon.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\nimport { ComponentProps } from 'preact';\nimport { Icon } from '../../UNSAFE_Icon/Icon';\nimport { useUser } from '../../hooks/UNSAFE_useUser';\n\ntype Props = Omit<ComponentProps<typeof Icon>, 'viewBox'>;\n\n// Returns a component that renders one of the given icon components based on reading direction\nexport const withDirectionIcon = (LtrIcon: typeof Icon, RtlIcon: typeof Icon) => {\n return (props: Props) => {\n const { direction } = useUser();\n return direction === 'ltr' ? <LtrIcon {...props} /> : <RtlIcon {...props} />;\n };\n};\n"],"names":["LtrIcon","RtlIcon","props","direction","useUser","_jsx","jsx"],"mappings":"+GAciC,CAACA,EAAsBC,IAC9CC,IACN,MAAMC,UAAEA,GAAcC,EAAAA,UACtB,MAAqB,QAAdD,EAAsBE,MAACL,EAAO,IAAKE,IAAYG,EAAAC,IAACL,EAAY,IAAAC,GAAS"}
|
|
@@ -11,7 +11,7 @@ var useTranslationBundle = require('./useTranslationBundle-9da032d6.js');
|
|
|
11
11
|
var dataStyleUtils = require('./dataStyleUtils-e72725fe.js');
|
|
12
12
|
var accUtils = require('./accUtils-50f26093.js');
|
|
13
13
|
var colorUtils = require('./colorUtils-fe6f2fbf.js');
|
|
14
|
-
var Chart = require('./Chart-
|
|
14
|
+
var Chart = require('./Chart-6684fa6d.js');
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* @license
|
|
@@ -566,4 +566,4 @@ function BarChart({ width, height, selectedIds = [], hiddenIds = [], highlighted
|
|
|
566
566
|
}
|
|
567
567
|
|
|
568
568
|
exports.BarChart = BarChart;
|
|
569
|
-
//# sourceMappingURL=BarChart-
|
|
569
|
+
//# sourceMappingURL=BarChart-11c56b6a.js.map
|