@oracle/oraclejet-preact 20.0.0 → 20.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/amd/BaseCardView-16fda4c3.js +2 -0
- package/amd/{BaseCardView-b8119561.js.map → BaseCardView-16fda4c3.js.map} +1 -1
- package/amd/BaseTabBarItem-d7c2922b.js +2 -0
- package/amd/BaseTabBarItem-d7c2922b.js.map +1 -0
- package/amd/CardFlexView-d3eb7373.js +2 -0
- package/amd/{CardFlexView-aa2f3de8.js.map → CardFlexView-d3eb7373.js.map} +1 -1
- package/amd/CardGridView-842f70cd.js +2 -0
- package/amd/{CardGridView-85f90c75.js.map → CardGridView-842f70cd.js.map} +1 -1
- package/amd/CheckboxSetContext-2e486ea8.js +2 -0
- package/{cjs/CheckboxSetContext-c62db26d.js.map → amd/CheckboxSetContext-2e486ea8.js.map} +1 -1
- package/amd/{CollapsibleNavigationList-f0072c90.js → CollapsibleNavigationList-fdeccbfb.js} +2 -2
- package/amd/{CollapsibleNavigationList-f0072c90.js.map → CollapsibleNavigationList-fdeccbfb.js.map} +1 -1
- package/amd/{DatePicker-88c5bbcd.js → DatePicker-bf521b1c.js} +2 -2
- package/amd/{DatePicker-88c5bbcd.js.map → DatePicker-bf521b1c.js.map} +1 -1
- package/amd/ExpandableList-a9a86ad8.js +2 -0
- package/amd/{ExpandableList-233c279e.js.map → ExpandableList-a9a86ad8.js.map} +1 -1
- package/amd/{FlatTreeView-9ecf2be6.js → FlatTreeView-15edd439.js} +2 -2
- package/amd/{FlatTreeView-9ecf2be6.js.map → FlatTreeView-15edd439.js.map} +1 -1
- package/amd/{InlineSelectSingle-f4438110.js → InlineSelectSingle-7c1cc5b5.js} +2 -2
- package/amd/{InlineSelectSingle-f4438110.js.map → InlineSelectSingle-7c1cc5b5.js.map} +1 -1
- package/amd/InputDatePicker-7227a858.js +2 -0
- package/amd/{InputDatePicker-48633486.js.map → InputDatePicker-7227a858.js.map} +1 -1
- package/amd/ListView-6d21e8f9.js +2 -0
- package/amd/{ListView-2678b2af.js.map → ListView-6d21e8f9.js.map} +1 -1
- package/amd/{MonthView-ea883c49.js → MonthView-96fafba4.js} +2 -2
- package/amd/{MonthView-ea883c49.js.map → MonthView-96fafba4.js.map} +1 -1
- package/amd/{OverflowTabBar-b142f8d4.js → OverflowTabBar-5ff68da7.js} +2 -2
- package/amd/{OverflowTabBar-b142f8d4.js.map → OverflowTabBar-5ff68da7.js.map} +1 -1
- package/amd/{OverflowTabBarItem-49a82149.js → OverflowTabBarItem-926b0c8a.js} +2 -2
- package/amd/{OverflowTabBarItem-49a82149.js.map → OverflowTabBarItem-926b0c8a.js.map} +1 -1
- package/amd/PRIVATE_BaseCardView.js +1 -1
- package/amd/PRIVATE_CollapsibleNavigationList.js +1 -1
- package/amd/PRIVATE_MonthView.js +1 -1
- package/amd/PRIVATE_MonthYearGridView.js +1 -1
- package/amd/PRIVATE_SelectCommon.js +1 -1
- package/amd/PRIVATE_StyledDatePickerButton.js +1 -1
- package/amd/PRIVATE_TableList.js +1 -1
- package/amd/{RemovableTabBarItem-e1bee7fa.js → RemovableTabBarItem-9ae273fe.js} +2 -2
- package/amd/{RemovableTabBarItem-e1bee7fa.js.map → RemovableTabBarItem-9ae273fe.js.map} +1 -1
- package/amd/ReorderableTabBar-0c69bfd4.js +2 -0
- package/amd/{ReorderableTabBar-46683bcb.js.map → ReorderableTabBar-0c69bfd4.js.map} +1 -1
- package/amd/{SelectMobileFieldInput-83f56b22.js → SelectMobileFieldInput-d499ef86.js} +2 -2
- package/amd/{SelectMobileFieldInput-83f56b22.js.map → SelectMobileFieldInput-d499ef86.js.map} +1 -1
- package/amd/{SelectMultiple-cb5fdd20.js → SelectMultiple-cc9bffc6.js} +2 -2
- package/amd/{SelectMultiple-cb5fdd20.js.map → SelectMultiple-cc9bffc6.js.map} +1 -1
- package/amd/{SelectSingle-02e85b6e.js → SelectSingle-2bb35b67.js} +2 -2
- package/amd/{SelectSingle-02e85b6e.js.map → SelectSingle-2bb35b67.js.map} +1 -1
- package/amd/StyledDatePickerButton-bceb62e1.js +2 -0
- package/amd/StyledDatePickerButton-bceb62e1.js.map +1 -0
- package/amd/StyledDatePickerButtonStyles.styles.css +17 -0
- package/amd/TabBar-de723fbc.js +2 -0
- package/amd/{TabBar-fcebb560.js.map → TabBar-de723fbc.js.map} +1 -1
- package/amd/TabBarItem-a39c5de3.js +2 -0
- package/amd/{TabBarItem-224bc6b3.js.map → TabBarItem-a39c5de3.js.map} +1 -1
- package/amd/TabBarLinkItem-944b1e8d.js +2 -0
- package/amd/{TabBarLinkItem-57587dbd.js.map → TabBarLinkItem-944b1e8d.js.map} +1 -1
- package/amd/TabBarMixed-cfd346bf.js +2 -0
- package/amd/{TabBarMixed-8cc4b4ed.js.map → TabBarMixed-cfd346bf.js.map} +1 -1
- package/amd/Theme-redwood/theme.css +201 -201
- package/amd/Theme-stable/theme.css +218 -218
- package/amd/UNSAFE_CardFlexView.js +1 -1
- package/amd/UNSAFE_CardGridView.js +1 -1
- package/amd/UNSAFE_CheckboxItem.js +1 -1
- package/amd/UNSAFE_CheckboxItem.js.map +1 -1
- package/amd/UNSAFE_CheckboxSet.js +1 -1
- package/amd/UNSAFE_CheckboxSet.js.map +1 -1
- package/amd/UNSAFE_DatePicker.js +1 -1
- package/amd/UNSAFE_ExpandableList.js +1 -1
- package/amd/UNSAFE_FlatTreeView.js +1 -1
- package/amd/UNSAFE_InlineSelectSingle.js +1 -1
- package/amd/UNSAFE_InputDatePicker.js +1 -1
- package/amd/UNSAFE_ListView.js +1 -1
- package/amd/UNSAFE_OverflowTabBar.js +1 -1
- package/amd/UNSAFE_ReorderableTabBar.js +1 -1
- package/amd/UNSAFE_RichCheckboxSet.js +1 -1
- package/amd/UNSAFE_RichCheckboxSet.js.map +1 -1
- package/amd/UNSAFE_RichSelectionItem.js +1 -1
- package/amd/UNSAFE_RichSelectionItem.js.map +1 -1
- package/amd/UNSAFE_SelectMultiple.js +1 -1
- package/amd/UNSAFE_SelectSingle.js +1 -1
- package/amd/UNSAFE_TabBar.js +1 -1
- package/amd/UNSAFE_TabBarCommon.js +1 -1
- package/amd/UNSAFE_TabBarMixed.js +1 -1
- package/amd/UNSAFE_VirtualizedListView.js +1 -1
- package/amd/VirtualizedListView-1ae7151d.js +2 -0
- package/amd/{VirtualizedListView-a0f338c2.js.map → VirtualizedListView-1ae7151d.js.map} +1 -1
- package/amd/{YearsGridView-4aa7bc66.js → YearsGridView-561c3074.js} +2 -2
- package/amd/{YearsGridView-4aa7bc66.js.map → YearsGridView-561c3074.js.map} +1 -1
- package/amd/{useDisplayValue-e70c76d8.js → useDisplayValue-0e90bf4c.js} +2 -2
- package/amd/{useDisplayValue-e70c76d8.js.map → useDisplayValue-0e90bf4c.js.map} +1 -1
- package/amd/useSelectCommon-a02ddf3c.js +2 -0
- package/amd/useSelectCommon-a02ddf3c.js.map +1 -0
- package/cjs/{Chart-13a198f3.js → Chart-966da017.js} +2 -2
- package/cjs/{Chart-13a198f3.js.map → Chart-966da017.js.map} +1 -1
- package/cjs/CheckboxSet-6865f4fd.js +55 -0
- package/{amd/CheckboxSet-f000e5c2.js.map → cjs/CheckboxSet-6865f4fd.js.map} +1 -1
- package/cjs/{ColorPalette-9f041744.js → ColorPalette-b14114d8.js} +2 -2
- package/cjs/{ColorPalette-9f041744.js.map → ColorPalette-b14114d8.js.map} +1 -1
- package/cjs/{ColorPicker-9af6707c.js → ColorPicker-8f0b6000.js} +2 -2
- package/cjs/{ColorPicker-9af6707c.js.map → ColorPicker-8f0b6000.js.map} +1 -1
- package/cjs/{DatePicker-48c602ff.js → DatePicker-b60f8a7e.js} +3 -3
- package/cjs/{DatePicker-48c602ff.js.map → DatePicker-b60f8a7e.js.map} +1 -1
- package/cjs/{MonthView-59452edc.js → MonthView-a2661a58.js} +2 -2
- package/cjs/{MonthView-59452edc.js.map → MonthView-a2661a58.js.map} +1 -1
- package/cjs/{OverflowTabBarItem-2c967a89.js → OverflowTabBarItem-abcd2327.js} +6 -3
- package/cjs/OverflowTabBarItem-abcd2327.js.map +1 -0
- package/cjs/PRIVATE_Chart.js +4 -4
- package/cjs/PRIVATE_MonthView.js +2 -3
- package/cjs/PRIVATE_MonthView.js.map +1 -1
- package/cjs/PRIVATE_MonthYearGridView.js +2 -3
- package/cjs/PRIVATE_MonthYearGridView.js.map +1 -1
- package/cjs/PRIVATE_SelectCommon.js +2 -2
- package/cjs/PRIVATE_StyledDatePickerButton.js +1 -2
- package/cjs/PRIVATE_StyledDatePickerButton.js.map +1 -1
- package/cjs/SegmentStyles.styles.css +12 -9
- package/cjs/SegmentStyles.styles2.css +9 -12
- package/cjs/{SelectMobileFieldInput-111a95a5.js → SelectMobileFieldInput-cbf57541.js} +2 -2
- package/cjs/{SelectMobileFieldInput-111a95a5.js.map → SelectMobileFieldInput-cbf57541.js.map} +1 -1
- package/cjs/{StyledDatePickerButton-cf4e4dc0.js → StyledDatePickerButton-becd2a7d.js} +2 -8
- package/cjs/StyledDatePickerButton-becd2a7d.js.map +1 -0
- package/cjs/StyledDatePickerButtonStyles.styles.css +17 -0
- package/cjs/{TabBarLinkItem-42785eb3.js → TabBarLinkItem-b0c4b100.js} +2 -2
- package/cjs/{TabBarLinkItem-42785eb3.js.map → TabBarLinkItem-b0c4b100.js.map} +1 -1
- package/cjs/Theme-redwood/theme.css +117 -117
- package/cjs/Theme-stable/theme.css +224 -224
- package/cjs/UNSAFE_BarChart.js +4 -4
- package/cjs/UNSAFE_CheckboxItem.js +117 -56
- package/cjs/UNSAFE_CheckboxItem.js.map +1 -1
- package/cjs/UNSAFE_CheckboxSet.js +21 -50
- package/cjs/UNSAFE_CheckboxSet.js.map +1 -1
- package/cjs/UNSAFE_ColorPalette.js +80 -80
- package/cjs/UNSAFE_ColorPicker.js +60 -60
- package/cjs/UNSAFE_ComboChart.js +4 -4
- package/cjs/UNSAFE_DatePicker.js +4 -4
- package/cjs/UNSAFE_InlineSelectSingle.js +2 -2
- package/cjs/UNSAFE_InputColor.js +11 -11
- package/cjs/UNSAFE_InputDatePicker.js +96 -96
- package/cjs/UNSAFE_LineAreaChart.js +4 -4
- package/cjs/UNSAFE_OverflowTabBar.js +2 -2
- package/cjs/UNSAFE_RichCheckboxSet.js +46 -42
- package/cjs/UNSAFE_RichCheckboxSet.js.map +1 -1
- package/cjs/UNSAFE_RichSelectionItem.js +154 -91
- package/cjs/UNSAFE_RichSelectionItem.js.map +1 -1
- package/cjs/UNSAFE_ScatterChart.js +4 -4
- package/cjs/UNSAFE_SelectMultiple.js +2 -2
- package/cjs/UNSAFE_SelectSingle.js +3 -3
- package/cjs/UNSAFE_TabBar.js +2 -2
- package/cjs/UNSAFE_TabBarCommon.js +4 -4
- package/cjs/UNSAFE_TabBarMixed.js +3 -3
- package/cjs/{YearsGridView-b56f7f42.js → YearsGridView-d0d4e8e1.js} +2 -2
- package/cjs/{YearsGridView-b56f7f42.js.map → YearsGridView-d0d4e8e1.js.map} +1 -1
- package/cjs/{useDisplayValue-60dbe1c3.js → useDisplayValue-4ace417c.js} +2 -2
- package/cjs/{useDisplayValue-60dbe1c3.js.map → useDisplayValue-4ace417c.js.map} +1 -1
- package/cjs/{useSelectCommon-b0d7feb3.js → useSelectCommon-27afecfa.js} +8 -3
- package/cjs/useSelectCommon-27afecfa.js.map +1 -0
- package/es/{BaseCardView-85b9a71e.js → BaseCardView-b3d8bae0.js} +4 -1
- package/es/{BaseCardView-85b9a71e.js.map → BaseCardView-b3d8bae0.js.map} +1 -1
- package/es/{DatePicker-2ab05fbe.js → DatePicker-7287f0f9.js} +3 -3
- package/es/{DatePicker-2ab05fbe.js.map → DatePicker-7287f0f9.js.map} +1 -1
- package/es/{MonthView-097171eb.js → MonthView-4b2b483a.js} +2 -2
- package/es/{MonthView-097171eb.js.map → MonthView-4b2b483a.js.map} +1 -1
- package/es/{NavigationListItem-dbd29973.js → NavigationListItem-340ab770.js} +19 -1
- package/es/{NavigationListItem-dbd29973.js.map → NavigationListItem-340ab770.js.map} +1 -1
- package/es/{OverflowTabBarItem-6966fbc7.js → OverflowTabBarItem-aa0ce915.js} +7 -4
- package/es/OverflowTabBarItem-aa0ce915.js.map +1 -0
- package/es/PRIVATE_BaseCardView.js +1 -1
- package/es/PRIVATE_CollapsibleNavigationList.js +25 -25
- package/es/PRIVATE_MonthView.js +2 -3
- package/es/PRIVATE_MonthView.js.map +1 -1
- package/es/PRIVATE_MonthYearGridView.js +2 -3
- package/es/PRIVATE_MonthYearGridView.js.map +1 -1
- package/es/PRIVATE_SelectCommon.js +2 -2
- package/es/PRIVATE_StyledDatePickerButton.js +1 -2
- package/es/PRIVATE_StyledDatePickerButton.js.map +1 -1
- package/es/PRIVATE_TableList.js +4 -4
- package/es/RadioIconVariants.styles.css +3 -3
- package/es/RadioIconVariants.styles2.css +3 -3
- package/es/SegmentStyles.styles.css +9 -12
- package/es/SegmentStyles.styles2.css +12 -9
- package/es/{SelectMobileFieldInput-0a7c968c.js → SelectMobileFieldInput-345c4d45.js} +2 -2
- package/es/{SelectMobileFieldInput-0a7c968c.js.map → SelectMobileFieldInput-345c4d45.js.map} +1 -1
- package/es/{StyledDatePickerButton-f3971567.js → StyledDatePickerButton-78f2f6e8.js} +2 -8
- package/es/StyledDatePickerButton-78f2f6e8.js.map +1 -0
- package/es/StyledDatePickerButtonStyles.styles.css +17 -0
- package/es/{TabBar-10488830.js → TabBar-67ca442c.js} +3 -1
- package/es/{TabBar-10488830.js.map → TabBar-67ca442c.js.map} +1 -1
- package/es/{TabBarLinkItem-a9c1072b.js → TabBarLinkItem-e7be54fa.js} +2 -2
- package/es/{TabBarLinkItem-a9c1072b.js.map → TabBarLinkItem-e7be54fa.js.map} +1 -1
- package/es/Theme-redwood/theme.css +442 -442
- package/es/Theme-stable/theme.css +507 -507
- package/es/TrainVariants.styles.css +6 -6
- package/es/TrainVariants.styles2.css +6 -6
- package/es/UNSAFE_CardFlexView.js +1 -1
- package/es/UNSAFE_CardGridView.js +1 -1
- package/es/UNSAFE_DatePicker.js +4 -4
- package/es/UNSAFE_FlatTreeView.js +14 -14
- package/es/UNSAFE_InlineSelectSingle.js +2 -2
- package/es/UNSAFE_InputDateMask/themes/SegmentStyles.css.js +1 -1
- package/es/UNSAFE_InputDateMask.js +1 -1
- package/es/UNSAFE_InputDatePicker.js +5 -5
- package/es/UNSAFE_InputTimeMask/themes/SegmentStyles.css.js +1 -1
- package/es/UNSAFE_InputTimeMask.js +1 -1
- package/es/UNSAFE_ListView.js +53 -53
- package/es/UNSAFE_NavigationList.js +13 -13
- package/es/UNSAFE_OverflowTabBar.js +13 -13
- package/es/UNSAFE_RadioItem/themes/redwood/RadioIconTheme.js +1 -1
- package/es/UNSAFE_RadioItem/themes/redwood/RadioIconVariants.css.js +1 -1
- package/es/UNSAFE_RadioItem/themes/stable/RadioIconTheme.js +1 -1
- package/es/UNSAFE_RadioItem/themes/stable/RadioIconVariants.css.js +1 -1
- package/es/UNSAFE_RadioItem.js +1 -1
- package/es/UNSAFE_ReorderableTabBar.js +12 -12
- package/es/UNSAFE_RichSelectionItem.js +1 -1
- package/es/UNSAFE_SelectMultiple.js +2 -2
- package/es/UNSAFE_SelectSingle.js +3 -3
- package/es/UNSAFE_TabBar.js +13 -13
- package/es/UNSAFE_TabBarCommon.js +5 -5
- package/es/UNSAFE_TabBarMixed.js +12 -12
- package/es/UNSAFE_TextArea.js +226 -106
- package/es/UNSAFE_TextArea.js.map +1 -1
- package/es/UNSAFE_TextAreaAutosize.js +1 -1
- package/es/UNSAFE_Train/themes/redwood/TrainTheme.js +1 -1
- package/es/UNSAFE_Train/themes/redwood/TrainVariants.css.js +1 -1
- package/es/UNSAFE_Train/themes/stable/TrainTheme.js +1 -1
- package/es/UNSAFE_Train/themes/stable/TrainVariants.css.js +1 -1
- package/es/UNSAFE_Train.js +1 -1
- package/es/{YearsGridView-cac4710a.js → YearsGridView-6c18094a.js} +2 -2
- package/es/{YearsGridView-cac4710a.js.map → YearsGridView-6c18094a.js.map} +1 -1
- package/es/{useDisplayValue-5bbf2830.js → useDisplayValue-65bbc74e.js} +2 -2
- package/es/{useDisplayValue-5bbf2830.js.map → useDisplayValue-65bbc74e.js.map} +1 -1
- package/es/{useSelectCommon-309d0f07.js → useSelectCommon-a3c69d60.js} +8 -3
- package/es/useSelectCommon-a3c69d60.js.map +1 -0
- package/es/useTextAreaAltEnter-ac460f4c.js +61 -0
- package/es/useTextAreaAltEnter-ac460f4c.js.map +1 -0
- package/package.json +2 -2
- package/amd/BaseCardView-b8119561.js +0 -2
- package/amd/BaseTabBarItem-03c91d3f.js +0 -2
- package/amd/BaseTabBarItem-03c91d3f.js.map +0 -1
- package/amd/CardFlexView-aa2f3de8.js +0 -2
- package/amd/CardGridView-85f90c75.js +0 -2
- package/amd/CheckboxSet-f000e5c2.js +0 -2
- package/amd/ExpandableList-233c279e.js +0 -2
- package/amd/InputDatePicker-48633486.js +0 -2
- package/amd/ListView-2678b2af.js +0 -2
- package/amd/ReorderableTabBar-46683bcb.js +0 -2
- package/amd/StyledDatePickerButton-b664f4f0.js +0 -2
- package/amd/StyledDatePickerButton-b664f4f0.js.map +0 -1
- package/amd/TabBar-fcebb560.js +0 -2
- package/amd/TabBarItem-224bc6b3.js +0 -2
- package/amd/TabBarLinkItem-57587dbd.js +0 -2
- package/amd/TabBarMixed-8cc4b4ed.js +0 -2
- package/amd/VirtualizedListView-a0f338c2.js +0 -2
- package/amd/useSelectCommon-28307b63.js +0 -2
- package/amd/useSelectCommon-28307b63.js.map +0 -1
- package/cjs/CheckboxSetContext-c62db26d.js +0 -12
- package/cjs/OverflowTabBarItem-2c967a89.js.map +0 -1
- package/cjs/StyledDatePickerButton-cf4e4dc0.js.map +0 -1
- package/cjs/useSelectCommon-b0d7feb3.js.map +0 -1
- package/es/OverflowTabBarItem-6966fbc7.js.map +0 -1
- package/es/StyledDatePickerButton-f3971567.js.map +0 -1
- package/es/TextArea-93ce78a7.js +0 -225
- package/es/TextArea-93ce78a7.js.map +0 -1
- package/es/useSelectCommon-309d0f07.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OverflowTabBarItem-6966fbc7.js","sources":["../../src/UNSAFE_TabBarCommon/BaseTabBarItem.tsx","../../src/UNSAFE_TabBarCommon/TabBarItem.tsx","../../src/UNSAFE_TabBarCommon/RemovableTabBarItem.tsx","../../src/UNSAFE_RedwoodIcons/OverflowH/OverflowH.tsx","../../src/UNSAFE_TabBarCommon/OverflowTabBarItem.tsx"],"sourcesContent":["import { ComponentChildren, ComponentChild } from 'preact';\nimport { useCallback } from 'preact/hooks';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { usePress } from '../hooks/UNSAFE_usePress';\nimport { useUser } from '../hooks/UNSAFE_useUser';\nimport { Text } from '../UNSAFE_Text';\nimport { Flex } from '../UNSAFE_Flex';\nimport { useTabBarContext } from './useTabBarContext';\nimport { Size } from '../utils/UNSAFE_size';\nimport { mergeInterpolations } from '../utils/UNSAFE_mergeInterpolations';\nimport { flexitemInterpolations } from '../utils/UNSAFE_interpolations/flexitem';\nimport { dimensionInterpolations } from '../utils/UNSAFE_interpolations/dimensions';\nimport type { FlexitemProps } from '../utils/UNSAFE_interpolations/flexitem';\nimport type { DimensionProps } from '../utils/UNSAFE_interpolations/dimensions';\nimport type { BoxAlignmentProps } from '../utils/UNSAFE_interpolations/boxalignment';\nimport { boxAlignmentInterpolations } from '../utils/UNSAFE_interpolations/boxalignment';\nimport { useComponentTheme } from '../hooks/UNSAFE_useComponentTheme';\nimport { useTranslationBundle } from '../hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '../resources/nls/bundle';\nimport { TabBarItemVariantOptions } from './themes/TabBarItemStyles.css';\nimport { TabBarItemRedwoodTheme } from './themes/redwood/TabBarItemTheme';\nimport { Badge } from '../UNSAFE_Badge';\nimport { useConveyorBeltItem } from '../UNSAFE_ConveyorBelt/useConveyorBeltItem';\nimport { useDetectTruncation } from '../hooks/PRIVATE_useDetectTruncation';\nimport { WarningS } from '../UNSAFE_RedwoodIcons/WarningS';\nimport { ErrorS } from '../UNSAFE_RedwoodIcons/ErrorS';\nimport { InformationS } from '../UNSAFE_RedwoodIcons/InformationS';\nimport { SuccessS } from '../UNSAFE_RedwoodIcons/SuccessS';\nimport { mergeProps } from '../utils/UNSAFE_mergeProps';\nimport { useTabBarItemTooltip } from './useTabBarItemTooltip';\nimport { tabBarItemVars } from './themes/TabBarItemContract.css';\n\ntype Severity = 'warning' | 'info' | 'none' | 'error' | 'confirmation';\n\ntype AriaProps = {\n /**\n * Accepts the tabpanel element's ID associated with the tab item\n **/\n 'aria-controls'?: string;\n /**\n * Used by an item that renders an interactive popup\n */\n 'aria-haspopup'?: boolean;\n};\n\nexport type BaseTabBarItemProps<K extends string | number> = {\n /**\n * Key of the TabBarItem\n */\n itemKey: K;\n /**\n * Label of the TabBarItem. For icon only display this label is the content\n * for aria-label and tooltip text of the Tab.\n */\n label: string;\n /**\n * The icon before the label in non-stack case, icon above the label in\n * stacked case or the stand alone icon when no label is specified.\n */\n icon?: ComponentChild;\n /**\n * The content to be rendered inside the Badge component.\n */\n badge?: string;\n /**\n * The content to be rendered inside the Text component as a metadata,\n * that appears after the label in non stack case only.\n */\n metadata?: string;\n /**\n * The status icon to be rendered after the label in non stack case only.\n */\n severity?: Severity;\n /**\n * The content to be rendered for remove icon\n */\n removeIcon?: ComponentChildren;\n /**\n * The control for enabling and disabling focusRing\n */\n showFocusRingOverride?: boolean;\n /**\n * The control for enabling and disabling selection indicator\n */\n selectionOverride?: boolean;\n /**\n * The control for overriding display value.\n */\n displayOverride?: string;\n /**\n * Maximum width tabbar item label can have\n */\n labelMaxWidth?: Size;\n /**\n * Sets the URL that the hyperlink points to. If there is no valid URL use \"#\" for href value to navigate to the top of the page.\n */\n href?: string;\n} & AriaProps;\n\nconst onClickLink = (event: MouseEvent) => {\n event.preventDefault();\n};\n\nexport function BaseTabBarItem<K extends string | number>({\n itemKey,\n label,\n icon,\n badge,\n metadata,\n severity = 'none',\n removeIcon,\n showFocusRingOverride,\n selectionOverride,\n displayOverride,\n labelMaxWidth,\n href,\n 'aria-controls': ariaControls,\n 'aria-haspopup': ariaHasPopup\n}: BaseTabBarItemProps<K>) {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const {\n onSelect,\n selection,\n currentKey,\n showFocusRing,\n hideTooltip,\n layout,\n display,\n size,\n isEdgeBottom,\n tabItemPrefix\n } = useTabBarContext();\n\n const isCurrent = currentKey === itemKey;\n\n const { ref, ...conveyorBeltProps } = useConveyorBeltItem({ isCurrent });\n\n //Selection\n //Dependency on currentKey because upon removal selectionChange does not change hence no re render\n //and it is still holding the deleted key as selection\n const handlePress = useCallback(() => {\n onSelect?.({ value: itemKey as K });\n }, [itemKey, onSelect]);\n\n const { pressProps } = usePress(handlePress);\n\n const isSelected = selection === itemKey;\n\n const isStacked = display === 'stacked' ? true : false;\n const isIconOnly =\n display === 'icons' || (displayOverride && displayOverride === 'icons') ? true : false;\n const isTall = size === 'lg' ? true : false;\n const labelRequirement = label && !(label === ' ' && label === undefined);\n const severityRequirement = !(severity === 'none' || severity === undefined);\n\n const IconComponent = (severityValue: Severity) => {\n switch (severityValue) {\n case 'error':\n // As per spec acc label is required only for error severity icon.\n return <ErrorS color=\"danger\" accessibleLabel={translations.tabBar_tabContainsErrors()} />;\n case 'warning':\n return <WarningS color=\"warning\" />;\n case 'info':\n return <InformationS color=\"info\" />;\n case 'confirmation':\n return <SuccessS color=\"success\" />;\n default:\n return null;\n }\n };\n\n const { direction } = useUser();\n const makeFocusRingVisible =\n showFocusRingOverride !== undefined ? showFocusRingOverride : showFocusRing;\n const makeSelectionVisible = selectionOverride !== undefined ? selectionOverride : isSelected;\n const {\n classes,\n styles: {\n tabBarItemIcon,\n tabBarItemIconStacked,\n tabBarItemMetadata,\n tabBarItemStackedBadge,\n tabBarItemStackedBadgeRtl,\n tabBarItemRemoveIcon,\n tabBarItemLabel,\n tabBarItemLabelTruncated,\n tabBarItemLink\n }\n } = useComponentTheme<TabBarItemVariantOptions>(TabBarItemRedwoodTheme, {\n selection: makeSelectionVisible ? 'isSelected' : 'notSelected',\n current: isCurrent ? 'isCurrent' : 'notCurrent',\n focusRing: makeFocusRingVisible ? 'showFocusRing' : 'noFocusRing',\n edgeBottom: isEdgeBottom ? 'isBottom' : 'notBottom'\n });\n\n const tabBarItem = classNames([classes]);\n const tabBarItemLabelClasses = classNames([\n tabBarItemLabel,\n labelMaxWidth !== undefined && tabBarItemLabelTruncated\n ]);\n const tabBarItemIconClasses = classNames([\n tabBarItemIcon,\n (isStacked || isIconOnly || !labelRequirement) && tabBarItemIconStacked\n ]);\n const tabBarItemMetadataClasses = classNames([tabBarItemMetadata]);\n const tabBarItemStackedBadgeClasses = classNames([\n tabBarItemStackedBadge,\n direction === 'rtl' && tabBarItemStackedBadgeRtl\n ]);\n const removeClass = classNames([tabBarItemRemoveIcon]);\n const tabBarItemLinkClasses = classNames([tabBarItemLink]);\n\n const styleInterpolations = mergeInterpolations<\n FlexitemProps & DimensionProps & BoxAlignmentProps\n >([\n ...Object.values(flexitemInterpolations),\n ...Object.values(dimensionInterpolations),\n ...Object.values(boxAlignmentInterpolations)\n ]);\n\n //This is for simple item where height and width need to be specified on the main div.\n const tabDimensions = styleInterpolations({\n flex: layout === 'stretch' ? '1 0 auto' : '0 0 auto',\n minWidth: '10.5x',\n height: isTall ? tabBarItemVars.lgHeight : tabBarItemVars.mdHeight,\n //This is needed for gap between icon/ label and remove icon in labelIconRenderer\n gap: '2x'\n });\n\n //This is for complex item, where only flex dimensions needs to be applied as height and width comes from child Flex component.\n const flexDimensions = styleInterpolations({\n flex: layout === 'stretch' ? '1 0 auto' : '0 0 auto'\n });\n\n const maxWithInterpolation = mergeInterpolations<DimensionProps>([\n ...Object.values(dimensionInterpolations)\n ]);\n\n //The threshold for truncation is labelMinWidth: 96px as per spec.\n const labelMinWidth = '96px';\n const maxWidthDimensions = maxWithInterpolation({\n maxWidth: labelMaxWidth !== undefined ? `calc(max(${labelMinWidth},${labelMaxWidth}))` : '100%'\n });\n\n const { detectTruncationProps, isTextTruncated } = useDetectTruncation(\n labelMaxWidth === undefined\n );\n const showTooltip = isIconOnly || isTextTruncated;\n const { tooltipContent, tooltipEventHandlerProps, onLogicalFocus, onLogicalBlur } =\n useTabBarItemTooltip({ label, isDisabled: !showTooltip });\n if (showTooltip) {\n if (isCurrent && showFocusRing && !hideTooltip) {\n onLogicalFocus(ref.current as HTMLElement);\n } else if (!isCurrent || (isCurrent && !showFocusRing) || hideTooltip) {\n onLogicalBlur();\n }\n }\n\n const isComplexItem = badge || metadata || severity !== 'none' || isStacked || isIconOnly;\n const isLinkItem = href != null;\n\n const labelIconRenderer = () => {\n return (\n <>\n <Flex align=\"center\" justify=\"center\" flex=\"1 1 auto\" gap=\"2x\">\n {!isIconOnly && !isStacked && icon && labelRequirement && (\n <span class={tabBarItemIconClasses} data-oj-tab-icon=\"startIcon\">\n {icon}\n </span>\n )}\n {!isIconOnly && labelRequirement && (\n <span\n class={tabBarItemLabelClasses}\n style={maxWidthDimensions}\n {...detectTruncationProps}>\n {\n <Text size=\"md\" weight=\"semiBold\">\n {label}\n </Text>\n }\n </span>\n )}\n </Flex>\n {!isLinkItem && removeIcon && <span class={removeClass}>{removeIcon}</span>}\n </>\n );\n };\n\n const complexItemRenderer = () => {\n return (\n <Flex flex=\"1 1 auto\">\n <Flex\n minWidth=\"10.5x\"\n minHeight={isTall ? tabBarItemVars.lgHeight : '100%'}\n height={\n isStacked && labelRequirement ? tabBarItemVars.stackedHeight : tabBarItemVars.mdHeight\n }\n direction={isStacked && labelRequirement ? 'column' : 'row'}\n gap=\"2x\"\n align=\"center\"\n justify=\"center\"\n alignSelf=\"center\"\n flex=\"1 1 auto\">\n {(isStacked || isIconOnly) && (\n <div class={tabBarItemIconClasses}>\n {icon}\n <span class={tabBarItemStackedBadgeClasses}>\n {badge ? (\n <Badge size=\"xs\" variant=\"neutral\">\n {badge}\n </Badge>\n ) : null}\n </span>\n </div>\n )}\n {!isIconOnly && !isStacked && icon && labelRequirement && (\n <span class={tabBarItemIconClasses} data-oj-tab-icon=\"startIcon\">\n {icon}\n </span>\n )}\n {!isIconOnly && labelRequirement && (\n <span\n class={tabBarItemLabelClasses}\n style={maxWidthDimensions}\n {...detectTruncationProps}>\n {\n <Text size=\"md\" weight=\"semiBold\">\n {label}\n </Text>\n }\n </span>\n )}\n {!isStacked && !isIconOnly && badge && labelRequirement && (\n <span data-oj-tab-badge={badge}>\n <Badge size=\"md\" variant=\"neutralSubtle\">\n {badge}\n </Badge>\n </span>\n )}\n {metadata && (\n <span class={tabBarItemMetadataClasses} data-oj-tab-metadata={metadata}>\n <Text size=\"md\" weight=\"normal\">\n {'( ' + metadata + ' )'}\n </Text>\n </span>\n )}\n {severityRequirement && (\n <span class={tabBarItemIconClasses} data-oj-tab-severity={severity}>\n {IconComponent(severity)}\n </span>\n )}\n </Flex>\n {!isLinkItem && removeIcon && <span class={removeClass}>{removeIcon}</span>}\n </Flex>\n );\n };\n\n const tabBarItemRenderer = () => {\n return (\n <div\n data-oj-key={itemKey}\n data-oj-removable={removeIcon ? 'true' : undefined}\n id={tabItemPrefix + itemKey}\n class={tabBarItem}\n role=\"tab\"\n aria-label={isIconOnly ? label : undefined}\n aria-controls={ariaControls}\n aria-selected={isSelected}\n aria-haspopup={ariaHasPopup}\n {...mergeProps(pressProps, tooltipEventHandlerProps, conveyorBeltProps)}\n ref={ref}\n style={isComplexItem ? flexDimensions : tabDimensions}>\n {isComplexItem ? complexItemRenderer() : labelIconRenderer()}\n {tooltipContent}\n </div>\n );\n };\n\n const tabBarLinkItemRenderer = () => {\n return (\n <span\n ref={ref}\n class={tabBarItem}\n {...mergeProps(pressProps, tooltipEventHandlerProps, conveyorBeltProps)}\n style={isComplexItem ? flexDimensions : tabDimensions}>\n <a\n onClick={onClickLink}\n class={tabBarItemLinkClasses}\n href={href}\n data-oj-key={itemKey}\n data-oj-removable={removeIcon ? 'true' : undefined}\n id={tabItemPrefix + itemKey}\n role=\"tab\"\n tabindex={-1}\n aria-controls={ariaControls}\n aria-selected={isSelected}\n aria-haspopup={ariaHasPopup}>\n {isComplexItem ? complexItemRenderer() : labelIconRenderer()}\n </a>\n {tooltipContent}\n </span>\n );\n };\n return isLinkItem ? tabBarLinkItemRenderer() : tabBarItemRenderer();\n}\n","import { BaseTabBarItem, BaseTabBarItemProps } from './BaseTabBarItem';\n\nexport type TabBarItemProps<K extends string | number> = Pick<\n BaseTabBarItemProps<K>,\n | 'itemKey'\n | 'label'\n | 'icon'\n | 'badge'\n | 'metadata'\n | 'severity'\n | 'aria-controls'\n | 'labelMaxWidth'\n>;\n/**\n * TabBarItem content can be created by using labels or icons or both.\n */\nexport function TabBarItem<K extends string | number>({\n itemKey,\n label,\n icon,\n badge,\n metadata,\n severity,\n labelMaxWidth,\n 'aria-controls': ariaControls\n}: TabBarItemProps<K>) {\n return (\n <BaseTabBarItem\n aria-controls={ariaControls}\n itemKey={itemKey}\n label={label}\n icon={icon}\n badge={badge}\n metadata={metadata}\n severity={severity}\n labelMaxWidth={labelMaxWidth}\n />\n );\n}\n","import { useCallback } from 'preact/hooks';\nimport { useHover } from '../hooks/UNSAFE_useHover';\nimport { EmbeddedIconButton } from '../PRIVATE_EmbeddedIconButton';\nimport { Close } from '../UNSAFE_RedwoodIcons/Close';\nimport { Flex } from '../UNSAFE_Flex';\nimport { mergeInterpolations } from '../utils/UNSAFE_mergeInterpolations';\nimport { flexitemInterpolations } from '../utils/UNSAFE_interpolations/flexitem';\nimport type { FlexitemProps } from '../utils/UNSAFE_interpolations/flexitem';\nimport { useTabBarContext } from './useTabBarContext';\nimport { BaseTabBarItem, BaseTabBarItemProps } from './BaseTabBarItem';\nimport { useTranslationBundle } from '../hooks/UNSAFE_useTranslationBundle';\nimport type { BundleType } from '../resources/nls/bundle';\n\ntype RemovableTabBarItemProps<K extends string | number> = Pick<\n BaseTabBarItemProps<K>,\n | 'itemKey'\n | 'label'\n | 'icon'\n | 'badge'\n | 'metadata'\n | 'severity'\n | 'aria-controls'\n | 'labelMaxWidth'\n>;\n\nexport function RemovableTabBarItem<K extends string | number>({\n itemKey,\n label,\n icon,\n badge,\n metadata,\n severity,\n labelMaxWidth,\n 'aria-controls': ariaControls\n}: RemovableTabBarItemProps<K>) {\n const { selection, currentKey, layout, onRemove } = useTabBarContext();\n const isSelected = selection === itemKey;\n const isCurrent = currentKey === itemKey;\n\n const handleRemove = useCallback(() => {\n onRemove?.({ value: itemKey as K });\n }, [onRemove, itemKey]);\n\n const { hoverProps, isHover } = useHover({});\n\n //instead of specifying flex: '1 0 auto' in cssProps var\n const styleInterpolations = mergeInterpolations<FlexitemProps>([\n ...Object.values(flexitemInterpolations)\n ]);\n const flexDimensions = styleInterpolations({\n flex: layout === 'stretch' ? '1 0 auto' : '0 0 auto'\n });\n\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n //TODO: In addition to aria-label a genric instruction is required for keyboard deletion\n //common to al tabs,after feedback from Curt's investigations.\n return (\n <div {...hoverProps} style={flexDimensions}>\n <Flex>\n <BaseTabBarItem\n aria-controls={ariaControls}\n itemKey={itemKey}\n label={label}\n icon={icon}\n badge={badge}\n metadata={metadata}\n severity={severity}\n labelMaxWidth={labelMaxWidth}\n removeIcon={\n <span data-oj-tabbar-item-remove-icon=\"true\">\n <EmbeddedIconButton\n aria-label={translations.tabBarNavigationList_removeCueText()}\n size=\"xs\"\n onAction={handleRemove}>\n {(isHover || isSelected || isCurrent) && <Close />}\n </EmbeddedIconButton>\n </span>\n }\n />\n </Flex>\n </div>\n );\n}\n","/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates. All rights reserved.\n * https://www.oracle.com/contracts/docs/cloud_csa_online_v062223_us_eng.pdf?download=false&er=221886\n * @ignore\n */\n// DO NOT MODIFY THIS FILE MANUALLY!\n// This file is automatically generated based on the corresponding SVG image in\n// the packages/oraclejet-preact/resources/icons folder.\nimport { ComponentProps } from 'preact';\nimport { Icon } from '../../UNSAFE_Icon';\ntype Props = Omit<ComponentProps<typeof Icon>, 'viewBox' | 'children'>;\nconst SvgOverflowH = (props: Props) => (\n <Icon viewBox=\"0 0 24 24\" {...props}>\n <g fill=\"none\">\n <path\n d=\"M6 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm8 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm8 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0z\"\n fill=\"currentcolor\"\n />\n </g>\n </Icon>\n);\nexport { SvgOverflowH as OverflowH };\n","import { ComponentChild, ComponentProps, createRef } from 'preact';\nimport { useCallback, useRef, useEffect } from 'preact/hooks';\nimport type { BundleType } from '../resources/nls/bundle';\nimport { useTranslationBundle } from '../hooks/UNSAFE_useTranslationBundle';\nimport { getClientHints } from '../utils/PRIVATE_clientHints';\nimport { mergeInterpolations } from '../utils/UNSAFE_mergeInterpolations';\nimport { flexitemInterpolations } from '../utils/UNSAFE_interpolations/flexitem';\nimport type { FlexitemProps } from '../utils/UNSAFE_interpolations/flexitem';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport {\n NavigationListItem,\n NavigationList,\n RemovableNavigationListItem,\n FocusableHandle,\n NavigationListLinkItem\n} from '../UNSAFE_NavigationList';\nimport { OverflowH } from '../UNSAFE_RedwoodIcons/OverflowH';\nimport { useTabBarContext } from './useTabBarContext';\nimport { Dropdown } from '../UNSAFE_Dropdown';\nimport { Sheet } from '../UNSAFE_Sheet';\nimport { BaseTabBarItem } from './BaseTabBarItem';\nimport { styles } from './themes/OverflowTabBarItemStyles.css';\nimport { TabBarItem } from './TabBarItem';\n\nexport type OverflowSelectionDetail<K> = {\n value: K;\n};\n\nexport type CloseDetail = {\n /**\n * dismissed represents dismissing the DropDown\n */\n reason: 'dismissed' | 'itemAction' | 'outsideMousedown';\n};\n\nexport type Item<K extends string | number> = Omit<\n ComponentProps<typeof TabBarItem<K>>,\n 'testId' | 'aria-controls'\n> & {\n isRemovable?: boolean;\n /**\n * Accepts the tabpanel element's ID associated with the tab item\n **/\n tabPanelId?: string;\n /**\n * Sets the URL that the hyperlink points to.\n */\n href?: string;\n};\n\nexport type OverflowTabBarItemProps<K extends string | number> = {\n /**\n * Key of the TabBarItem\n */\n overflowItemKey: K;\n /**\n * Whether to open the popup\n */\n isOpen: boolean;\n /**\n * Property that triggers a callback when DropDown is supposed to be closed.\n */\n onClose?: (detail: CloseDetail) => void;\n /**\n * The icon of the OverflowTabBarItem\n */\n icon?: ComponentChild;\n /**\n * The content to be rendered inside the Badge component.\n */\n badge?: string;\n /**\n * An array of data used by NavigationList to render individual overflow items.\n */\n overflowItems?: Item<K>[];\n};\n\n/**\n * An OverflowTabBarItem renders TabBarItems in a device appropriate popup. OverflowTabBarItem is used internally in an OverflowTabBar.\n */\n\nexport function OverflowTabBarItem<K extends string | number>({\n overflowItemKey,\n icon,\n badge,\n overflowItems,\n isOpen,\n onClose\n}: OverflowTabBarItemProps<K>) {\n const { selection, showFocusRing, isEdgeBottom, onSelect, onRemove, layout } = useTabBarContext();\n\n const isPointerSelection = useRef<boolean>(false);\n\n // Reset pointer selection flag when the popup closes so keyboard navigation\n // restores focus-visible on the overflow trigger.\n useEffect(() => {\n if (!isOpen) {\n isPointerSelection.current = false;\n }\n }, [isOpen]);\n\n const overflowTabBarItemRef = useRef<HTMLDivElement>(null);\n const navigationListRef = createRef<FocusableHandle>();\n\n const handleSelectionChange = useCallback<\n Required<ComponentProps<typeof NavigationList>>['onSelectionChange']\n >(\n (detail: { value: string | number; reason?: 'pointer' | 'keyboard' }) => {\n if (detail.reason === 'pointer') {\n isPointerSelection.current = true;\n }\n onSelect?.({ value: detail.value });\n onClose?.({ reason: 'itemAction' });\n },\n [onSelect, onClose]\n );\n\n const handleDropdownClose = useCallback(\n (e: CloseDetail) => {\n onClose?.({ reason: e.reason });\n },\n [onClose]\n );\n\n const handleSheetClose = useCallback(() => {\n onClose?.({ reason: 'dismissed' });\n }, [onClose]);\n\n //When NavigationList steals focus the app resets it. Not always would it be reset to\n //parent of OverflowTabBarItem. Though currentKey would be correct, but focusRing would would not be visible\n //Hence we check for isPointerSelection.current\n\n const focusRingRequirement = showFocusRing && !isPointerSelection.current && !getIsMobile();\n\n const overflowContainsKey = (searchKey: K) => {\n return overflowItems?.find((item) => item.itemKey === searchKey) != null;\n };\n\n const currentPanelId = overflowItems?.find((item) => item.itemKey === selection)?.tabPanelId;\n\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n const isSelected = selection !== undefined && overflowContainsKey(selection as K);\n\n //instead of specifying flex: '1 0 auto' in cssProps var\n const styleInterpolations = mergeInterpolations<FlexitemProps>([\n ...Object.values(flexitemInterpolations)\n ]);\n const flexDimensions = styleInterpolations({\n flex: layout === 'stretch' ? '1 0 auto' : '0 0 auto'\n });\n\n const navContainerClasses = classNames([styles.navContainerBase]);\n\n const navContainerRef = useRef<HTMLDivElement>(null);\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n navigationListRef.current?.focus();\n }\n },\n [navigationListRef]\n );\n const getNavigationList = useCallback(() => {\n return (\n <div onKeyDown={handleKeyDown} tabIndex={0} ref={navContainerRef} class={navContainerClasses}>\n <NavigationList\n ref={navigationListRef}\n selection={selection}\n onSelectionChange={handleSelectionChange}\n onRemove={onRemove}>\n {overflowItems?.map((item) =>\n item.href != null ? (\n <NavigationListLinkItem\n href={item.href}\n itemKey={item.itemKey}\n label={item.label}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n />\n ) : item.isRemovable ? (\n <RemovableNavigationListItem\n itemKey={item.itemKey}\n label={item.label}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n />\n ) : (\n <NavigationListItem\n itemKey={item.itemKey}\n label={item.label}\n badge={item.badge}\n metadata={item.metadata}\n severity={item.severity}\n />\n )\n )}\n </NavigationList>\n </div>\n );\n }, [\n handleKeyDown,\n navContainerClasses,\n navigationListRef,\n selection,\n handleSelectionChange,\n onRemove,\n overflowItems\n ]);\n\n return (\n <>\n {overflowItems && overflowItems.length > 0 && (\n <div ref={overflowTabBarItemRef} style={flexDimensions}>\n <BaseTabBarItem\n aria-controls={currentPanelId}\n itemKey={overflowItemKey}\n label={translations.overflowItemLabel()}\n icon={icon ? icon : <OverflowH />}\n badge={badge}\n showFocusRingOverride={focusRingRequirement}\n selectionOverride={isSelected}\n displayOverride={'icons'}\n aria-haspopup={true}\n />\n </div>\n )}\n {getIsMobile() ? (\n <Sheet isOpen={isOpen} onClose={handleSheetClose} initialFocus=\"firstFocusable\">\n {getNavigationList()}\n </Sheet>\n ) : (\n <Dropdown\n initialFocus=\"firstFocusable\"\n isOpen={isOpen}\n onClose={handleDropdownClose}\n placement={isEdgeBottom ? 'top-end' : 'bottom-end'}\n anchorRef={overflowTabBarItemRef}>\n {getNavigationList()}\n </Dropdown>\n )}\n </>\n );\n}\n\nconst getIsMobile = () => {\n const { deviceRenderMode } = getClientHints();\n return deviceRenderMode === 'phone';\n};\n"],"names":["_jsx","ErrorS","WarningS","InformationS","SuccessS","_jsxs","_Fragment","Close","OverflowH"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmGA,MAAM,WAAW,GAAG,CAAC,KAAiB,KAAI;IACxC,KAAK,CAAC,cAAc,EAAE,CAAC;AACzB,CAAC,CAAC;SAEc,cAAc,CAA4B,EACxD,OAAO,EACP,KAAK,EACL,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,GAAG,MAAM,EACjB,UAAU,EACV,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,IAAI,EACJ,eAAe,EAAE,YAAY,EAC7B,eAAe,EAAE,YAAY,EACN,EAAA;AACvB,IAAA,MAAM,YAAY,GAAG,oBAAoB,CAAa,0BAA0B,CAAC,CAAC;IAClF,MAAM,EACJ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,aAAa,EACb,WAAW,EACX,MAAM,EACN,O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EAAA,CACX,CACZ,CAAA,EAAA,CACA,EACH;AACJ,CAAC;AAED,MAAM,WAAW,GAAG,MAAK;AACvB,IAAA,MAAM,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,CAAC;IAC9C,OAAO,gBAAgB,KAAK,OAAO,CAAC;AACtC,CAAC;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StyledDatePickerButton-f3971567.js","sources":["../../src/PRIVATE_StyledDatePickerButton/StyledDatePickerButton.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { multiVariantStyles } from './themes/StyledDatePickerButtonStyles.css';\nimport { styles as baseButtonStyles } from '../UNSAFE_BaseButton/themes/BaseButtonStyles.css';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { forwardRef } from 'preact/compat';\nimport type { Ref, JSX } from 'preact';\nimport type { UnpackSignals } from '@oracle/oraclejet-internal-utilities/attributeUtils';\n\ntype IntrinsicProps = Pick<UnpackSignals<JSX.HTMLAttributes<HTMLElement>>, 'onClick' | 'onKeyDown'>;\n\ntype AriaProps = {\n 'aria-label'?: UnpackSignals<JSX.AriaAttributes>['aria-label'];\n 'aria-disabled'?: UnpackSignals<JSX.AriaAttributes>['aria-disabled'];\n};\n\ntype Props = IntrinsicProps &\n AriaProps & {\n /**\n * Specifies that the button appears activated when the user activates the StyledDatePickerButton.\n * When true, adds the :active selector to the button so that it can show active styling.\n * Combine this property with the other properties to get the styling you want.\n */\n isActivable?: boolean;\n /**\n * Specifies the styling of the button to look dimmed.\n * Combine this property with the other properties to get the styling you want.\n */\n isDimmed?: boolean;\n /**\n * Specifies the styling of the button to look hidden, that is, visibility: hidden.\n */\n isHidden?: boolean;\n /**\n * Specifies that the button appears hovered when the user hovers over the StyledDatePickerButton.\n * When true, adds the :hover selector to the button so that it can show hover styling.\n * Combine this property with the other properties to get the styling you want.\n */\n isHoverable?: boolean;\n /**\n * Specifies the styling of the button to look like a day that is adjacent to the current month.\n * Combine this property with the other properties to get the styling you want.\n */\n isAdjacentMonth?: boolean;\n /**\n * Specifies the role of the day cell to be 'button' when isReadonly is false, or no role when isReadonly is true.\n * This helps the screenreader.\n */\n isReadonly?: boolean;\n /**\n * Specifies the styling of the button to look like it is restricted.\n * Combine this property with the other properties to get the styling you want.\n */\n isRestricted?: boolean;\n /**\n * Specifies the styling of the button to look like it is selected.\n * Combine this property with the other properties to get the styling you want.\n */\n isSelected?: boolean;\n /**\n * Specifies the styling of the button to look like it is today.\n * Combine this property with the other properties to get the styling you want.\n */\n isToday?: boolean;\n /**\n * Specifies the label of the day button. This will be the day of the month.\n */\n label: string;\n /**\n * Specifies the tabIndex.\n */\n tabIndex?: 0 | -1;\n /**\n * Specifies the visual variant for the StyledDatePickerButton.\n */\n variant?: 'day' | 'month' | 'year';\n };\n\n/**\n * StyledDatePickerButton is a controlled component that displays a stylized span for a button that goes into a DatePicker.\n */\nconst StyledDatePickerButton = forwardRef(\n (\n {\n isActivable = false,\n isReadonly = false,\n isAdjacentMonth = false,\n isDimmed = false,\n isHidden = false,\n isHoverable = false,\n isRestricted = false,\n isSelected = false,\n isToday = false,\n tabIndex,\n label,\n variant,\n ...props\n }: Props,\n ref: Ref<HTMLSpanElement> = null\n ) => {\n // The multiVariantStyles function is defined in StyledDatePickerButtonStyles.css.ts,\n // using the recipe utility provided by @vanilla-extract/recipes.\n // This function is used to merge the base styles, variants, and compound variants\n // into a single set of styles for components based on the component's properties.\n const variantClasses = multiVariantStyles({\n active: isActivable ? 'isActivable' : 'notActiveable',\n dimmed: isDimmed ? 'isDimmed' : 'notDimmed',\n hidden: isHidden ? 'isHidden' : 'notHidden',\n hover: isHoverable ? 'isHoverable' : 'notHoverable',\n adjacentMonth: isAdjacentMonth ? 'isAdjacentMonth' : 'notAdjacentMonth',\n restricted: isRestricted ? 'isRestricted' : 'notRestricted',\n selected: isSelected ? 'isSelected' : 'notSelected',\n today: isToday ? 'isToday' : 'notToday',\n variant\n });\n\n const classes = classNames([\n baseButtonStyles.base,\n baseButtonStyles.sizes.sm,\n baseButtonStyles.styled,\n variantClasses\n ]);\n return (\n <span\n role={!isReadonly ? 'button' : undefined}\n class={classes}\n ref={ref}\n tabIndex={tabIndex}\n {...props}>\n {label}\n </span>\n );\n }\n);\n\nexport { StyledDatePickerButton };\n"],"names":["baseButtonStyles","_jsx"],"mappings":";;;;;;;AAoFA;;AAEG;AACG,MAAA,sBAAsB,GAAG,UAAU,CACvC,CACE,EACE,WAAW,GAAG,KAAK,EACnB,UAAU,GAAG,KAAK,EAClB,eAAe,GAAG,KAAK,EACvB,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,WAAW,GAAG,KAAK,EACnB,YAAY,GAAG,KAAK,EACpB,UAAU,GAAG,KAAK,EAClB,OAAO,GAAG,KAAK,EACf,QAAQ,EACR,KAAK,EACL,OAAO,EACP,GAAG,KAAK,EACF,EACR,GAAA,GAA4B,IAAI,KAC9B;;;;;IAKF,MAAM,cAAc,GAAG,kBAAkB,CAAC;QACxC,MAAM,EAAE,WAAW,GAAG,aAAa,GAAG,eAAe;QACrD,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,WAAW;QAC3C,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,WAAW;QAC3C,KAAK,EAAE,WAAW,GAAG,aAAa,GAAG,cAAc;QACnD,aAAa,EAAE,eAAe,GAAG,iBAAiB,GAAG,kBAAkB;QACvE,UAAU,EAAE,YAAY,GAAG,cAAc,GAAG,eAAe;QAC3D,QAAQ,EAAE,UAAU,GAAG,YAAY,GAAG,aAAa;QACnD,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,UAAU;QACvC,OAAO;AACR,KAAA,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,UAAU,CAAC;AACzB,QAAAA,MAAgB,CAAC,IAAI;QACrBA,MAAgB,CAAC,KAAK,CAAC,EAAE;AACzB,QAAAA,MAAgB,CAAC,MAAM;QACvB,cAAc;AACf,KAAA,CAAC,CAAC;AACH,IAAA,QACEC,GAAA,CAAA,MAAA,EAAA,EACE,IAAI,EAAE,CAAC,UAAU,GAAG,QAAQ,GAAG,SAAS,EACxC,KAAK,EAAE,OAAO,EACd,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAQ,EAAA,GACd,KAAK,EAAA,QAAA,EACR,KAAK,EAAA,CACD,EACP;AACJ,CAAC;;;;"}
|
package/es/TextArea-93ce78a7.js
DELETED
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
/* @oracle/oraclejet-preact: undefined */
|
|
2
|
-
import { jsx, jsxs, Fragment } from 'preact/jsx-runtime';
|
|
3
|
-
import { forwardRef, useCallback as useCallback$1, useRef, useImperativeHandle } from 'preact/compat';
|
|
4
|
-
import { u as useCurrentValueReducer } from './useCurrentValueReducer-bdf796fa.js';
|
|
5
|
-
import { u as useFocusableTextField } from './useFocusableTextField-8fe41cd4.js';
|
|
6
|
-
import './FormContext-55fb8000.js';
|
|
7
|
-
import { u as useFormContext } from './useFormContext-bb9dc478.js';
|
|
8
|
-
import { F as FormFieldContext } from './FormFieldContext-47ca0c20.js';
|
|
9
|
-
import { useCallback, useState, useLayoutEffect } from 'preact/hooks';
|
|
10
|
-
import { u as useId } from './useId-03dbfdf0.js';
|
|
11
|
-
import { u as useLengthFilter } from './useLengthFilter-955a0ad5.js';
|
|
12
|
-
import { u as useSelectableTextField } from './useSelectableTextField-949184a5.js';
|
|
13
|
-
import { u as useTextField } from './useTextField-eb9db737.js';
|
|
14
|
-
import { u as useTranslationBundle } from './useTranslationBundle-4822502f.js';
|
|
15
|
-
import { H as HiddenAccessible } from './HiddenAccessible-61197e7c.js';
|
|
16
|
-
import { L as Label } from './Label-5d1ae8d7.js';
|
|
17
|
-
import './keyboardUtils-986fe923.js';
|
|
18
|
-
import { R as ReadonlyTextField, T as TextFieldInput } from './StyledTextField-7605d76a.js';
|
|
19
|
-
import './ObfuscatedTextFieldInputStyles.styles.css';
|
|
20
|
-
import { R as ReadonlyTextFieldInput } from './ReadonlyTextFieldInput-106ce959.js';
|
|
21
|
-
import { T as TextField } from './TextField-7884fcd7.js';
|
|
22
|
-
import { M as MaxLengthLiveRegion } from './MaxLengthLiveRegion-8099fde5.js';
|
|
23
|
-
import './UNSAFE_TextField/themes/TextFieldStyles.css.js';
|
|
24
|
-
import './SkeletonStyles.styles.css';
|
|
25
|
-
import './TextFieldLoadingStyles.styles.css';
|
|
26
|
-
import './TextFieldStyles.styles.css';
|
|
27
|
-
import './UNSAFE_TextField/themes/redwood/TextFieldBaseTheme.styles.css';
|
|
28
|
-
import './UNSAFE_TextField/themes/redwood/TextFieldVariants.css.js';
|
|
29
|
-
import './logger-c92f309c.js';
|
|
30
|
-
import './TabbableModeContext-7d8ad946.js';
|
|
31
|
-
import './UserAssistanceStyles.styles.css';
|
|
32
|
-
import './UNSAFE_UserAssistance/themes/redwood/UserAssistanceBaseTheme.styles.css';
|
|
33
|
-
import './UNSAFE_UserAssistance/themes/redwood/UserAssistanceVariants.css.js';
|
|
34
|
-
import { a as InlineUserAssistance } from './InlineUserAssistance-890293dd.js';
|
|
35
|
-
import { C as CompactUserAssistance } from './CompactUserAssistance-6aa8894b.js';
|
|
36
|
-
import { m as mergeProps } from './mergeProps-88ea8306.js';
|
|
37
|
-
import './LayerHost-7931b424.js';
|
|
38
|
-
import './TooltipContentStyles.styles.css';
|
|
39
|
-
import './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentBaseTheme.styles.css';
|
|
40
|
-
import './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css.js';
|
|
41
|
-
import './tooltipUtils-af0abd38.js';
|
|
42
|
-
import 'preact';
|
|
43
|
-
import './IconStyle.styles.css';
|
|
44
|
-
import './Popup-992b6c27.js';
|
|
45
|
-
import './LabelStyles.styles.css';
|
|
46
|
-
import './UNSAFE_Label/themes/redwood/LabelBaseTheme.styles.css';
|
|
47
|
-
import './UNSAFE_Label/themes/redwood/LabelVariants.css.js';
|
|
48
|
-
import './InputGroupContext-20bdbd6e.js';
|
|
49
|
-
import './UNSAFE_Popup/themes/redwood/PopupBaseTheme.styles.css';
|
|
50
|
-
import './UNSAFE_Popup/themes/redwood/PopupVariants.css.js';
|
|
51
|
-
import { d as defaultTextAlignForVariant } from './formControlUtils-84e2af0e.js';
|
|
52
|
-
import { c as classNames } from './classNames-4e12b00d.js';
|
|
53
|
-
import { u as usePress } from './usePress-051f5adb.js';
|
|
54
|
-
import { u as useFormFieldContext } from './useFormFieldContext-daf7a676.js';
|
|
55
|
-
import './MaxLengthCounterStyles.styles.css';
|
|
56
|
-
|
|
57
|
-
var hide = 'MaxLengthCounterStyles_hide__7dy9j71';
|
|
58
|
-
var maxLengthCounterBase = 'MaxLengthCounterStyles_maxLengthCounterBase__7dy9j70';
|
|
59
|
-
var spanStyles = 'MaxLengthCounterStyles_spanStyles__7dy9j72';
|
|
60
|
-
|
|
61
|
-
const noop = () => { };
|
|
62
|
-
function MaxLengthCounter({ maxLength, valueLength = 0, onClick }) {
|
|
63
|
-
const { isFocused } = useFormFieldContext();
|
|
64
|
-
// We don't want mousedown on this component to do anything, so prevent the default behavior.
|
|
65
|
-
const killEvent = useCallback((event) => event.preventDefault(), []);
|
|
66
|
-
const textClasses = classNames([!isFocused && hide]);
|
|
67
|
-
const { pressProps } = usePress(onClick ?? noop);
|
|
68
|
-
return (jsx("div", { class: maxLengthCounterBase, onMouseDown: killEvent, ...pressProps, children: jsxs("span", { class: textClasses, children: [jsx("span", { class: spanStyles, children: valueLength }), jsx("span", { class: spanStyles, children: "/" }), jsx("span", { class: spanStyles, children: maxLength })] }) }));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* A custom hook to enable an alternate way for entering a new line in the TextArea components using
|
|
73
|
-
* Alt + Enter (or option + return in MacOS). This is particularly useful in scenarios where pressing Enter
|
|
74
|
-
* could mean a different action, like exiting from edit mode in a Table/DataGrid containing a TextArea.
|
|
75
|
-
*/
|
|
76
|
-
const useTextAreaAltEnter = ({ onInput, textAreaRef }) => {
|
|
77
|
-
// We want to have alt/option+Enter to insert a newline like Enter does.
|
|
78
|
-
const [selectionStart, setSelectionStart] = useState();
|
|
79
|
-
const handleKeyDown = useCallback((event) => {
|
|
80
|
-
// If we see an alt+enter (or option+return on a Mac), we insert a newline and call onInputAndDispatch
|
|
81
|
-
// since that is what is called any time the input value changes.
|
|
82
|
-
if (event.altKey && event.key === 'Enter') {
|
|
83
|
-
event.preventDefault(); // Prevent default Enter behavior
|
|
84
|
-
const textarea = event.target;
|
|
85
|
-
const { selectionStart: start, selectionEnd: end, value: previousValue } = textarea;
|
|
86
|
-
const newValue = previousValue.substring(0, start) + '\n' + previousValue.substring(end);
|
|
87
|
-
const valueUpdateDetail = {
|
|
88
|
-
previousValue: previousValue,
|
|
89
|
-
value: newValue
|
|
90
|
-
};
|
|
91
|
-
setSelectionStart(start + 1);
|
|
92
|
-
onInput(valueUpdateDetail);
|
|
93
|
-
}
|
|
94
|
-
}, [onInput]);
|
|
95
|
-
useLayoutEffect(() => {
|
|
96
|
-
if (selectionStart) {
|
|
97
|
-
textAreaRef.current?.setSelectionRange(selectionStart, selectionStart);
|
|
98
|
-
// reset to undefined, so the next selectionStart will trigger the useLayoutEffect
|
|
99
|
-
// even if it is the same as the previous selectionStart that was set. This is
|
|
100
|
-
// because we are only setting selectionStart for alt+enter.
|
|
101
|
-
setSelectionStart(undefined);
|
|
102
|
-
}
|
|
103
|
-
}, [selectionStart, textAreaRef]);
|
|
104
|
-
return { handleKeyDown };
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* A text area displays a field that allows a user to enter a multi-line text value.
|
|
109
|
-
*/
|
|
110
|
-
const TextArea = forwardRef(({ 'aria-describedby': ariaDescribedBy, assistiveText, autoComplete = 'off', autoFocus = false, columnSpan, helpSourceLink, helpSourceText, isDisabled: propIsDisabled, isReadonly: propIsReadonly, isRequired = false, isRequiredShown, label, labelEdge: propLabelEdge, labelStartWidth: propLabelStartWidth, maxLength, maxLengthCounter = 'remaining', maxLengthUnit, messages, placeholder, resize, role, rows, textAlign: propTextAlign, userAssistanceDensity: propUserAssistanceDensity, value, variant = 'default', onInput, onCommit, testId }, ref) => {
|
|
111
|
-
const translations = useTranslationBundle('@oracle/oraclejet-preact');
|
|
112
|
-
const formControl_limitReached = maxLength
|
|
113
|
-
? translations.formControl_limitReached({
|
|
114
|
-
CHARACTER_LIMIT: maxLength
|
|
115
|
-
})
|
|
116
|
-
: '';
|
|
117
|
-
const { currentCommitValue, dispatch } = useCurrentValueReducer({ value });
|
|
118
|
-
const onInputAndDispatch = useCallback$1((detail) => {
|
|
119
|
-
// Should dispatch happen first? This will queue up a re-render, ordering should not cause issues (this is async)
|
|
120
|
-
dispatch({ type: 'input', payload: detail.value });
|
|
121
|
-
onInput?.(detail);
|
|
122
|
-
}, [onInput, dispatch]);
|
|
123
|
-
const onCommitAndDispatch = useCallback$1((detail) => {
|
|
124
|
-
// Should dispatch happen first? This will queue up a re-render, ordering should not cause issues (this is async)
|
|
125
|
-
dispatch({ type: 'commit', payload: detail.value });
|
|
126
|
-
onCommit?.(detail);
|
|
127
|
-
}, [onCommit, dispatch]);
|
|
128
|
-
const { isDisabled: isFormDisabled, isReadonly: isFormReadonly, labelEdge: formLabelEdge, labelStartWidth: formLabelStartWidth, textAlign: formTextAlign, userAssistanceDensity: formUserAssistanceDensity } = useFormContext();
|
|
129
|
-
// default to FormContext values if component properties are not specified
|
|
130
|
-
const isDisabled = propIsDisabled ?? isFormDisabled;
|
|
131
|
-
const isReadonly = propIsReadonly ?? isFormReadonly;
|
|
132
|
-
const labelEdge = propLabelEdge ?? formLabelEdge;
|
|
133
|
-
const labelStartWidth = propLabelStartWidth ?? formLabelStartWidth;
|
|
134
|
-
const textAlign = propTextAlign ?? formTextAlign ?? defaultTextAlignForVariant(variant);
|
|
135
|
-
const userAssistanceDensity = propUserAssistanceDensity ?? formUserAssistanceDensity;
|
|
136
|
-
const maxLengthDescribedByIdRef = useRef(useId());
|
|
137
|
-
// The enabledAriaDescribedBy includes the maxLengthDescribedById in addition to what was passed in to aria-describedby.
|
|
138
|
-
// We don't need to announce the max length message for readonly, as it only applies when editing the value.
|
|
139
|
-
const enabledAriaDescribedBy = ariaDescribedBy
|
|
140
|
-
? `${ariaDescribedBy} ${maxLengthDescribedByIdRef.current}`
|
|
141
|
-
: maxLengthDescribedByIdRef.current;
|
|
142
|
-
const enabledElementRef = useRef(null);
|
|
143
|
-
const readonlyElementRef = useRef(null);
|
|
144
|
-
// We want to have alt/option+Enter to insert a newline like Enter does.
|
|
145
|
-
const { handleKeyDown } = useTextAreaAltEnter({
|
|
146
|
-
onInput: onInputAndDispatch,
|
|
147
|
-
textAreaRef: enabledElementRef
|
|
148
|
-
});
|
|
149
|
-
const { focusProps, isFocused, methods: focusMethods } = useFocusableTextField({
|
|
150
|
-
isDisabled,
|
|
151
|
-
isReadonly,
|
|
152
|
-
enabledElementRef,
|
|
153
|
-
readonlyElementRef
|
|
154
|
-
});
|
|
155
|
-
const { methods: selectMethods } = useSelectableTextField(enabledElementRef);
|
|
156
|
-
useImperativeHandle(ref, () => mergeProps(focusMethods, selectMethods), [
|
|
157
|
-
focusMethods,
|
|
158
|
-
selectMethods
|
|
159
|
-
]);
|
|
160
|
-
// Handle length filter for user-typed inputs and controlled inputs
|
|
161
|
-
const { isMaxLengthExceeded, isMaxLengthReached, valueLength, onFilteredInput } = useLengthFilter({
|
|
162
|
-
maxLength,
|
|
163
|
-
maxLengthUnit,
|
|
164
|
-
value,
|
|
165
|
-
onInput: onInputAndDispatch,
|
|
166
|
-
onCommit: onCommitAndDispatch
|
|
167
|
-
});
|
|
168
|
-
const limitMessage = [{ detail: formControl_limitReached, severity: 'info' }];
|
|
169
|
-
const allMessages = [
|
|
170
|
-
...(messages ?? []),
|
|
171
|
-
...(isMaxLengthReached ? limitMessage : [])
|
|
172
|
-
];
|
|
173
|
-
const { formFieldContext, inputProps, labelProps, textFieldProps, userAssistanceProps } = useTextField({
|
|
174
|
-
ariaDescribedBy: isReadonly || isDisabled ? ariaDescribedBy : enabledAriaDescribedBy,
|
|
175
|
-
contentVariant: 'textarea',
|
|
176
|
-
helpSourceLink,
|
|
177
|
-
helpSourceText,
|
|
178
|
-
isDisabled,
|
|
179
|
-
isFocused,
|
|
180
|
-
isReadonly,
|
|
181
|
-
isRequiredShown,
|
|
182
|
-
labelEdge,
|
|
183
|
-
messages: allMessages,
|
|
184
|
-
styleVariant: variant,
|
|
185
|
-
userAssistanceDensity,
|
|
186
|
-
value
|
|
187
|
-
});
|
|
188
|
-
const onClickCounter = useCallback$1(() => {
|
|
189
|
-
const elm = enabledElementRef.current;
|
|
190
|
-
// for setSelectionRange(), len needs to be a number or null.
|
|
191
|
-
const len = elm ? elm.value.length : null;
|
|
192
|
-
// Since the counter element is after the text, clicking in this
|
|
193
|
-
// should put the selection at the end of the text
|
|
194
|
-
enabledElementRef.current?.setSelectionRange(len, len);
|
|
195
|
-
// Clicking the counter should put the focus on the input field
|
|
196
|
-
enabledElementRef.current?.focus();
|
|
197
|
-
}, [enabledElementRef]);
|
|
198
|
-
const labelComp = labelEdge !== 'none' ? jsx(Label, { ...labelProps, children: label }) : undefined;
|
|
199
|
-
const fieldLabelProps = {
|
|
200
|
-
label: labelEdge !== 'none' ? labelComp : undefined,
|
|
201
|
-
labelEdge: labelEdge !== 'none' ? labelEdge : undefined,
|
|
202
|
-
labelStartWidth: labelEdge !== 'none' ? labelStartWidth : undefined,
|
|
203
|
-
labelText: labelEdge === 'inside' && !isDisabled ? label : undefined
|
|
204
|
-
};
|
|
205
|
-
const ariaLabel = labelEdge === 'none' ? label : undefined;
|
|
206
|
-
const isInlineDensity = userAssistanceDensity === 'efficient' || userAssistanceDensity === 'reflow';
|
|
207
|
-
const inlineUserAssistance = isInlineDensity ? (isDisabled ? (
|
|
208
|
-
// save space for user assistance if density is 'efficient', even though we don't
|
|
209
|
-
// render user assistance for disabled fields
|
|
210
|
-
userAssistanceDensity !== 'efficient' ? undefined : (jsx(InlineUserAssistance, { userAssistanceDensity: userAssistanceDensity, ...userAssistanceProps }))) : isReadonly ? (jsx(InlineUserAssistance, { fieldLabel: label, messages: messages, userAssistanceDensity: userAssistanceDensity, ...userAssistanceProps })) : (jsx(InlineUserAssistance, { assistiveText: assistiveText, fieldLabel: label, helpSourceLink: helpSourceLink, helpSourceText: helpSourceText, messages: allMessages, isRequiredShown: isRequiredShown, userAssistanceDensity: userAssistanceDensity, ...userAssistanceProps }))) : undefined;
|
|
211
|
-
const anchorRef = useRef(null);
|
|
212
|
-
const compactUserAssistance = userAssistanceDensity === 'compact' ? (jsx(CompactUserAssistance, { anchorRef: anchorRef, messages: allMessages, assistiveText: assistiveText, ...userAssistanceProps })) : undefined;
|
|
213
|
-
if (isReadonly) {
|
|
214
|
-
const mainContent = (jsx(ReadonlyTextFieldInput, { "aria-describedby": inputProps['aria-describedby'], "aria-label": ariaLabel, "aria-labelledby": labelProps.id, as: "textarea", elementRef: readonlyElementRef, formVariant: variant, rows: rows, autoFocus: autoFocus, textAlign: textAlign, value: value, variant: "textarea", hasEmptyLabel: label === '' && labelEdge === 'none', hasInsideLabel: label !== undefined && labelEdge === 'inside', onBlur: inputProps.onBlur, onFocus: inputProps.onFocus }));
|
|
215
|
-
return (jsx(FormFieldContext.Provider, { value: formFieldContext, children: jsx(ReadonlyTextField, { role: "presentation", columnSpan: columnSpan, compactUserAssistance: compactUserAssistance, inlineUserAssistance: inlineUserAssistance, ref: anchorRef, testId: testId, variant: "textarea", mainContent: mainContent, resize: resize, ...fieldLabelProps }) }));
|
|
216
|
-
}
|
|
217
|
-
const hasMaxLength = maxLength !== undefined;
|
|
218
|
-
const mainContent = (jsxs(Fragment, { children: [jsx(TextFieldInput, { as: "textarea", "aria-label": ariaLabel, autoComplete: autoComplete, autoFocus: autoFocus, currentCommitValue: currentCommitValue, hasEmptyLabel: label === '' && labelEdge === 'none', hasInsideLabel: labelComp !== undefined && labelEdge === 'inside', isRequired: isRequired, inputRef: enabledElementRef, onCommit: onCommitAndDispatch, onInput: onFilteredInput, onKeyDown: handleKeyDown, placeholder: placeholder, role: role, rows: rows, textAlign: textAlign, value: value, ...inputProps }), maxLengthCounter === 'remaining' && hasMaxLength && (jsx(MaxLengthCounter, { maxLength: maxLength, valueLength: valueLength, onClick: onClickCounter })), hasMaxLength && (jsx(HiddenAccessible, { id: maxLengthDescribedByIdRef.current, isHidden: true, children: translations.formControl_maxLength({
|
|
219
|
-
MAX_LENGTH: `${maxLength}`
|
|
220
|
-
}) })), hasMaxLength && isFocused && (jsx(MaxLengthLiveRegion, { isMaxLengthExceeded: isMaxLengthExceeded, maxLength: maxLength, valueLength: valueLength, testId: testId ? testId + '_maxLength' : undefined }))] }));
|
|
221
|
-
return (jsx(FormFieldContext.Provider, { value: formFieldContext, children: jsx(TextField, { mainContent: mainContent, columnSpan: columnSpan, compactUserAssistance: compactUserAssistance, inlineUserAssistance: inlineUserAssistance, onBlur: focusProps?.onFocusOut, onFocus: focusProps?.onFocusIn, mainFieldRef: anchorRef, resize: resize, testId: testId, ...textFieldProps, ...fieldLabelProps }) }));
|
|
222
|
-
});
|
|
223
|
-
|
|
224
|
-
export { MaxLengthCounter as M, TextArea as T, useTextAreaAltEnter as u };
|
|
225
|
-
//# sourceMappingURL=TextArea-93ce78a7.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea-93ce78a7.js","sources":["../../src/UNSAFE_TextArea/MaxLengthCounter.tsx","../../src/UNSAFE_TextArea/useTextAreaAltEnter.ts","../../src/UNSAFE_TextArea/TextArea.tsx"],"sourcesContent":["import { useCallback } from 'preact/hooks';\n\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { usePress } from '../hooks/UNSAFE_usePress';\nimport { useFormFieldContext } from '../hooks/UNSAFE_useFormFieldContext';\nimport { hide, maxLengthCounterBase, spanStyles } from './MaxLengthCounterStyles.css';\n\ntype Props = {\n maxLength: number;\n valueLength?: number;\n onClick?: () => void; // the calling component should focus on the appropriate element when clicked.\n};\n\nconst noop = () => {};\n\nexport function MaxLengthCounter({ maxLength, valueLength = 0, onClick }: Props) {\n const { isFocused } = useFormFieldContext();\n // We don't want mousedown on this component to do anything, so prevent the default behavior.\n const killEvent = useCallback((event: Event) => event.preventDefault(), []);\n const textClasses = classNames([!isFocused && hide]);\n const { pressProps } = usePress(onClick ?? noop);\n return (\n <div class={maxLengthCounterBase} onMouseDown={killEvent} {...pressProps}>\n <span class={textClasses}>\n <span class={spanStyles}>{valueLength}</span>\n <span class={spanStyles}>/</span>\n <span class={spanStyles}>{maxLength}</span>\n </span>\n </div>\n );\n}\n","import { ComponentProps, RefObject } from 'preact';\nimport { useCallback, useLayoutEffect, useState } from 'preact/hooks';\n\nimport { TextFieldInput } from '#UNSAFE_TextField';\nimport { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\n\ntype UseTextAreaAltEnterOptions = {\n /**\n * The onInput of the TextFieldInput\n */\n onInput: NonNullable<ComponentProps<typeof TextFieldInput>['onInput']>;\n /**\n * The ref to the textarea element\n */\n textAreaRef: RefObject<HTMLTextAreaElement>;\n};\n\n/**\n * A custom hook to enable an alternate way for entering a new line in the TextArea components using\n * Alt + Enter (or option + return in MacOS). This is particularly useful in scenarios where pressing Enter\n * could mean a different action, like exiting from edit mode in a Table/DataGrid containing a TextArea.\n */\nexport const useTextAreaAltEnter = ({ onInput, textAreaRef }: UseTextAreaAltEnterOptions) => {\n // We want to have alt/option+Enter to insert a newline like Enter does.\n const [selectionStart, setSelectionStart] = useState<number>();\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n // If we see an alt+enter (or option+return on a Mac), we insert a newline and call onInputAndDispatch\n // since that is what is called any time the input value changes.\n if (event.altKey && event.key === 'Enter') {\n event.preventDefault(); // Prevent default Enter behavior\n const textarea = event.target as HTMLTextAreaElement;\n const { selectionStart: start, selectionEnd: end, value: previousValue } = textarea;\n const newValue = previousValue.substring(0, start) + '\\n' + previousValue.substring(end);\n\n const valueUpdateDetail: ValueUpdateDetail<string> = {\n previousValue: previousValue,\n value: newValue\n };\n setSelectionStart(start + 1);\n onInput(valueUpdateDetail);\n }\n },\n [onInput]\n );\n\n useLayoutEffect(() => {\n if (selectionStart) {\n textAreaRef.current?.setSelectionRange(selectionStart, selectionStart);\n // reset to undefined, so the next selectionStart will trigger the useLayoutEffect\n // even if it is the same as the previous selectionStart that was set. This is\n // because we are only setting selectionStart for alt+enter.\n setSelectionStart(undefined);\n }\n }, [selectionStart, textAreaRef]);\n\n return { handleKeyDown };\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 { ComponentProps, Ref } from 'preact';\nimport { forwardRef, useCallback, useImperativeHandle, useRef } from 'preact/compat';\n\nimport { useCurrentValueReducer } from '#hooks/UNSAFE_useCurrentValueReducer';\nimport { FocusableHandle, useFocusableTextField } from '#hooks/UNSAFE_useFocusableTextField';\nimport { useFormContext } from '#hooks/UNSAFE_useFormContext';\nimport { FormFieldContext } from '#hooks/UNSAFE_useFormFieldContext';\nimport { useId } from '#hooks/UNSAFE_useId';\nimport { CountUnit, useLengthFilter } from '#hooks/UNSAFE_useLengthFilter';\nimport { SelectableHandle, useSelectableTextField } from '#hooks/UNSAFE_useSelectableTextField';\nimport type { TestIdProps } from '#hooks/UNSAFE_useTestId';\nimport { useTextField } from '#hooks/UNSAFE_useTextField';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport { ComponentMessageItem } from '#UNSAFE_ComponentMessage';\nimport { HiddenAccessible } from '#UNSAFE_HiddenAccessible';\nimport { Label } from '#UNSAFE_Label';\nimport {\n MaxLengthLiveRegion,\n ReadonlyTextField,\n ReadonlyTextFieldInput,\n TextField,\n TextFieldInput\n} from '#UNSAFE_TextField';\nimport {\n CompactUserAssistance,\n InlineUserAssistance,\n UserAssistanceDensityType\n} from '#UNSAFE_UserAssistance';\nimport { defaultTextAlignForVariant } from '#utils/PRIVATE_formControlUtils';\nimport { mergeProps } from '#utils/UNSAFE_mergeProps';\nimport { Size } from '#utils/UNSAFE_size';\nimport { LayoutColumnSpan } from '#utils/UNSAFE_styles/Layout';\nimport { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport { MaxLengthCounter } from './MaxLengthCounter';\nimport { useTextAreaAltEnter } from './useTextAreaAltEnter';\n\ntype TextFieldProps = ComponentProps<typeof TextField>;\ntype TextFieldInputProps = ComponentProps<typeof TextFieldInput>;\ntype InlineUserAssistanceProps = ComponentProps<typeof InlineUserAssistance>;\n\ntype Props = TestIdProps & {\n /**\n * The ID of an element (or space separated IDs of multiple elements) that\n * describes the input.\n */\n 'aria-describedby'?: TextFieldInputProps['aria-describedby'];\n\n /**\n * Text to provide guidance to help the user understand what to enter.\n */\n assistiveText?: InlineUserAssistanceProps['assistiveText'];\n /**\n * Dictates component's autocomplete state.\n * This attribute indicates whether the value of the control can be automatically completed by the browser.\n * The common values are \"on\" and \"off\".\n */\n autoComplete?: TextFieldInputProps['autoComplete'];\n /**\n * Autofocus specifies whether the component will get focus when the page is loaded.\n * If it is set to true then the associated component will get input focus when the page is loaded.\n * Setting this property doesn't set the focus to the component; it tells the browser to focus\n * to it when the element is inserted in the document.\n */\n autoFocus?: TextFieldInputProps['autoFocus'];\n /**\n * Specifies how many columns to span in a FormLayout with direction === 'row'\n */\n columnSpan?: LayoutColumnSpan;\n /**\n * Help source URL associated with the component.\n */\n helpSourceLink?: InlineUserAssistanceProps['helpSourceLink'];\n /**\n * Custom text to be rendered for the <code>helpSourceLink</code>.\n */\n helpSourceText?: InlineUserAssistanceProps['helpSourceText'];\n /**\n * Specifies whether the component is disabled.\n */\n isDisabled?: boolean;\n /**\n * Specifies whether the component is readonly.\n */\n isReadonly?: boolean;\n /**\n * Specifies for accessibility purposes whether a value is required.\n *\n * Setting this property to <code>false</code> means that a value is not required to be\n * committed by the user. Setting this property to <code>true</code> means that a value\n * is required to be committed by the user.\n */\n isRequired?: TextFieldInputProps['isRequired'];\n /**\n * Specifies whether to show an indicator on screen that a value is required, for example\n * before the user has committed a value.\n */\n isRequiredShown?: InlineUserAssistanceProps['isRequiredShown'];\n /**\n * Specifies the label associated with the field.\n */\n label: string;\n /**\n * Specifies where the label is positioned relative to the field.\n */\n labelEdge?: 'inside' | 'start' | 'top' | 'none';\n /**\n * Specifies the width of the label when <code>labelEdge</code> is <code>\"start\"</code>\n */\n labelStartWidth?: Size;\n /**\n * Specifies the maximum number of characters that can be entered in the input field.\n */\n maxLength?: number;\n /**\n * Determines whether the remaining number of characters that can be entered is shown or not.\n */\n maxLengthCounter?: 'none' | 'remaining';\n /**\n * Specifies how the input text characters are to be counted when maxLength is specified.\n */\n maxLengthUnit?: CountUnit;\n /**\n * Messages to show on screen that are associated with the component.\n */\n messages?: InlineUserAssistanceProps['messages'];\n /**\n * A short hint to display before the user enters a value.\n */\n placeholder?: TextFieldInputProps['placeholder'];\n /**\n * Specifies how the user is allowed to manually resize the TextArea component.\n */\n resize?: TextFieldProps['resize'];\n /**\n * Specifies the ARIA role type.\n */\n role?: TextFieldInputProps['role'];\n /**\n * Specifies the number of rows to display\n */\n rows?: TextFieldInputProps['rows'];\n /**\n * Specifies how to align text within the field.\n */\n textAlign?: TextFieldInputProps['textAlign'];\n /**\n * Specifies the density of the user assistance presentation. It can be set to:\n * <ul>\n * <li><code>'efficient'</code>: Show inline and reserve space to prevent layout reflow when user\n * assistance text is displayed.</li>\n * <li><code>'reflow'</code>: Show inline. Layout will reflow when text is displayed.</li>\n * <li><code>'compact'</code>: Messages, help, hints, and required will not be shown inline; they will show in a mode that keeps the screen more compact, like a popup for the messages, and a required icon to indicate Required. </li>\n * </ul>\n */\n userAssistanceDensity?: UserAssistanceDensityType;\n /**\n * The current display value of the component.\n */\n value?: TextFieldInputProps['value'];\n /**\n * The style variant of the component.\n */\n variant?: TextFieldInputProps['variant'];\n /**\n * Callback invoked when the user commits the entered value by blurring out of the field.\n */\n onCommit?: TextFieldInputProps['onCommit'];\n /**\n * Callback invoked each time the user changes the value of the field. For example, if the user\n * types 'abcd', this callback will be called four times with the value as 'a', 'ab', 'abc' and 'abcd'\n * respectively.\n */\n onInput: TextFieldInputProps['onInput'];\n};\n\ntype FocusSelectHandle = FocusableHandle & SelectableHandle;\n\n/**\n * A text area displays a field that allows a user to enter a multi-line text value.\n */\nexport const TextArea = forwardRef(\n (\n {\n 'aria-describedby': ariaDescribedBy,\n assistiveText,\n autoComplete = 'off',\n autoFocus = false,\n columnSpan,\n helpSourceLink,\n helpSourceText,\n isDisabled: propIsDisabled,\n isReadonly: propIsReadonly,\n isRequired = false,\n isRequiredShown,\n label,\n labelEdge: propLabelEdge,\n labelStartWidth: propLabelStartWidth,\n maxLength,\n maxLengthCounter = 'remaining',\n maxLengthUnit,\n messages,\n placeholder,\n resize,\n role,\n rows,\n textAlign: propTextAlign,\n userAssistanceDensity: propUserAssistanceDensity,\n value,\n variant = 'default',\n onInput,\n onCommit,\n testId\n }: Props,\n ref?: Ref<FocusSelectHandle>\n ) => {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n const formControl_limitReached = maxLength\n ? translations.formControl_limitReached({\n CHARACTER_LIMIT: maxLength\n })\n : '';\n\n const { currentCommitValue, dispatch } = useCurrentValueReducer({ value });\n const onInputAndDispatch = useCallback(\n (detail: ValueUpdateDetail<string>) => {\n // Should dispatch happen first? This will queue up a re-render, ordering should not cause issues (this is async)\n dispatch({ type: 'input', payload: detail.value });\n onInput?.(detail);\n },\n [onInput, dispatch]\n );\n const onCommitAndDispatch = useCallback(\n (detail: ValueUpdateDetail<string>) => {\n // Should dispatch happen first? This will queue up a re-render, ordering should not cause issues (this is async)\n dispatch({ type: 'commit', payload: detail.value });\n onCommit?.(detail);\n },\n [onCommit, dispatch]\n );\n\n const {\n isDisabled: isFormDisabled,\n isReadonly: isFormReadonly,\n labelEdge: formLabelEdge,\n labelStartWidth: formLabelStartWidth,\n textAlign: formTextAlign,\n userAssistanceDensity: formUserAssistanceDensity\n } = useFormContext();\n\n // default to FormContext values if component properties are not specified\n const isDisabled = propIsDisabled ?? isFormDisabled;\n const isReadonly = propIsReadonly ?? isFormReadonly;\n const labelEdge = propLabelEdge ?? formLabelEdge;\n const labelStartWidth = propLabelStartWidth ?? formLabelStartWidth;\n const textAlign = propTextAlign ?? formTextAlign ?? defaultTextAlignForVariant(variant);\n const userAssistanceDensity = propUserAssistanceDensity ?? formUserAssistanceDensity;\n const maxLengthDescribedByIdRef = useRef<string>(useId());\n // The enabledAriaDescribedBy includes the maxLengthDescribedById in addition to what was passed in to aria-describedby.\n // We don't need to announce the max length message for readonly, as it only applies when editing the value.\n const enabledAriaDescribedBy = ariaDescribedBy\n ? `${ariaDescribedBy} ${maxLengthDescribedByIdRef.current}`\n : maxLengthDescribedByIdRef.current;\n\n const enabledElementRef = useRef<HTMLTextAreaElement>(null);\n const readonlyElementRef = useRef<HTMLTextAreaElement>(null);\n\n // We want to have alt/option+Enter to insert a newline like Enter does.\n const { handleKeyDown } = useTextAreaAltEnter({\n onInput: onInputAndDispatch,\n textAreaRef: enabledElementRef\n });\n\n const {\n focusProps,\n isFocused,\n methods: focusMethods\n } = useFocusableTextField<HTMLTextAreaElement, HTMLTextAreaElement>({\n isDisabled,\n isReadonly,\n enabledElementRef,\n readonlyElementRef\n });\n\n const { methods: selectMethods } =\n useSelectableTextField<HTMLTextAreaElement>(enabledElementRef);\n\n useImperativeHandle(ref!, () => mergeProps(focusMethods, selectMethods), [\n focusMethods,\n selectMethods\n ]);\n\n // Handle length filter for user-typed inputs and controlled inputs\n const { isMaxLengthExceeded, isMaxLengthReached, valueLength, onFilteredInput } =\n useLengthFilter({\n maxLength,\n maxLengthUnit,\n value,\n onInput: onInputAndDispatch,\n onCommit: onCommitAndDispatch\n });\n\n const limitMessage = [{ detail: formControl_limitReached, severity: 'info' }];\n const allMessages = [\n ...(messages ?? []),\n ...(isMaxLengthReached ? limitMessage : [])\n ] as ComponentMessageItem[];\n\n const { formFieldContext, inputProps, labelProps, textFieldProps, userAssistanceProps } =\n useTextField({\n ariaDescribedBy: isReadonly || isDisabled ? ariaDescribedBy : enabledAriaDescribedBy,\n contentVariant: 'textarea',\n helpSourceLink,\n helpSourceText,\n isDisabled,\n isFocused,\n isReadonly,\n isRequiredShown,\n labelEdge,\n messages: allMessages,\n styleVariant: variant,\n userAssistanceDensity,\n value\n });\n\n const onClickCounter = useCallback(() => {\n const elm = enabledElementRef.current;\n // for setSelectionRange(), len needs to be a number or null.\n const len = elm ? elm.value.length : null;\n // Since the counter element is after the text, clicking in this\n // should put the selection at the end of the text\n enabledElementRef.current?.setSelectionRange(len, len);\n // Clicking the counter should put the focus on the input field\n enabledElementRef.current?.focus();\n }, [enabledElementRef]);\n\n const labelComp = labelEdge !== 'none' ? <Label {...labelProps}>{label}</Label> : undefined;\n\n const fieldLabelProps = {\n label: labelEdge !== 'none' ? labelComp : undefined,\n labelEdge: labelEdge !== 'none' ? labelEdge : undefined,\n labelStartWidth: labelEdge !== 'none' ? labelStartWidth : undefined,\n labelText: labelEdge === 'inside' && !isDisabled ? label : undefined\n };\n\n const ariaLabel = labelEdge === 'none' ? label : undefined;\n const isInlineDensity =\n userAssistanceDensity === 'efficient' || userAssistanceDensity === 'reflow';\n\n const inlineUserAssistance = isInlineDensity ? (\n isDisabled ? (\n // save space for user assistance if density is 'efficient', even though we don't\n // render user assistance for disabled fields\n userAssistanceDensity !== 'efficient' ? undefined : (\n <InlineUserAssistance\n userAssistanceDensity={userAssistanceDensity}\n {...userAssistanceProps}\n />\n )\n ) : isReadonly ? (\n <InlineUserAssistance\n fieldLabel={label}\n messages={messages}\n userAssistanceDensity={userAssistanceDensity}\n {...userAssistanceProps}\n />\n ) : (\n <InlineUserAssistance\n assistiveText={assistiveText}\n fieldLabel={label}\n helpSourceLink={helpSourceLink}\n helpSourceText={helpSourceText}\n messages={allMessages}\n isRequiredShown={isRequiredShown}\n userAssistanceDensity={userAssistanceDensity}\n {...userAssistanceProps}\n />\n )\n ) : undefined;\n\n const anchorRef = useRef<HTMLDivElement>(null);\n\n const compactUserAssistance =\n userAssistanceDensity === 'compact' ? (\n <CompactUserAssistance\n anchorRef={anchorRef}\n messages={allMessages}\n assistiveText={assistiveText}\n {...userAssistanceProps}\n />\n ) : undefined;\n\n if (isReadonly) {\n const mainContent = (\n <ReadonlyTextFieldInput\n aria-describedby={inputProps['aria-describedby']}\n aria-label={ariaLabel}\n aria-labelledby={labelProps.id}\n as=\"textarea\"\n elementRef={readonlyElementRef}\n formVariant={variant}\n rows={rows}\n autoFocus={autoFocus}\n textAlign={textAlign}\n value={value}\n variant=\"textarea\"\n hasEmptyLabel={label === '' && labelEdge === 'none'}\n hasInsideLabel={label !== undefined && labelEdge === 'inside'}\n onBlur={inputProps.onBlur}\n onFocus={inputProps.onFocus}\n />\n );\n return (\n <FormFieldContext.Provider value={formFieldContext}>\n <ReadonlyTextField\n role=\"presentation\"\n columnSpan={columnSpan}\n compactUserAssistance={compactUserAssistance}\n inlineUserAssistance={inlineUserAssistance}\n ref={anchorRef}\n testId={testId}\n variant=\"textarea\"\n mainContent={mainContent}\n resize={resize}\n {...fieldLabelProps}\n />\n </FormFieldContext.Provider>\n );\n }\n const hasMaxLength = maxLength !== undefined;\n const mainContent = (\n <>\n <TextFieldInput\n as=\"textarea\"\n aria-label={ariaLabel}\n autoComplete={autoComplete}\n autoFocus={autoFocus}\n currentCommitValue={currentCommitValue}\n hasEmptyLabel={label === '' && labelEdge === 'none'}\n hasInsideLabel={labelComp !== undefined && labelEdge === 'inside'}\n isRequired={isRequired}\n inputRef={enabledElementRef}\n onCommit={onCommitAndDispatch}\n onInput={onFilteredInput}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n role={role}\n rows={rows}\n textAlign={textAlign}\n value={value}\n {...inputProps}\n />\n {maxLengthCounter === 'remaining' && hasMaxLength && (\n <MaxLengthCounter\n maxLength={maxLength}\n valueLength={valueLength}\n onClick={onClickCounter}\n />\n )}\n {hasMaxLength && (\n <HiddenAccessible id={maxLengthDescribedByIdRef.current} isHidden={true}>\n {translations.formControl_maxLength({\n MAX_LENGTH: `${maxLength}`\n })}\n </HiddenAccessible>\n )}\n {hasMaxLength && isFocused && (\n <MaxLengthLiveRegion\n isMaxLengthExceeded={isMaxLengthExceeded}\n maxLength={maxLength}\n valueLength={valueLength}\n testId={testId ? testId + '_maxLength' : undefined}\n />\n )}\n </>\n );\n\n return (\n <FormFieldContext.Provider value={formFieldContext}>\n <TextField\n mainContent={mainContent}\n columnSpan={columnSpan}\n compactUserAssistance={compactUserAssistance}\n inlineUserAssistance={inlineUserAssistance}\n onBlur={focusProps?.onFocusOut}\n onFocus={focusProps?.onFocusIn}\n mainFieldRef={anchorRef}\n resize={resize}\n testId={testId}\n {...textFieldProps}\n {...fieldLabelProps}></TextField>\n </FormFieldContext.Provider>\n );\n }\n);\n"],"names":["_jsx","_jsxs","useCallback","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,MAAM,IAAI,GAAG,MAAK,GAAG,CAAC;AAEhB,SAAU,gBAAgB,CAAC,EAAE,SAAS,EAAE,WAAW,GAAG,CAAC,EAAE,OAAO,EAAS,EAAA;AAC7E,IAAA,MAAM,EAAE,SAAS,EAAE,GAAG,mBAAmB,EAAE,CAAC;;AAE5C,IAAA,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,KAAY,KAAK,KAAK,CAAC,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC;IAC5E,MAAM,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,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AC9B,YAAY,EAAE,SAAS,EACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EAAA,GACV,cAAc,EAAA,GACd,eAAe,EAAA,CAAc,EACT,CAAA,EAC5B;AACJ,CAAC;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSelectCommon-309d0f07.js","sources":["../../src/PRIVATE_SelectCommon/itemTextUtils.ts","../../src/PRIVATE_SelectCommon/DefaultList.tsx","../../src/PRIVATE_SelectCommon/eventUtils.ts","../../src/PRIVATE_SelectCommon/DropdownArrow.tsx","../../src/PRIVATE_SelectCommon/DropdownList.tsx","../../src/PRIVATE_SelectCommon/EmptyResults.tsx","../../src/PRIVATE_SelectCommon/selectUtils.ts","../../src/PRIVATE_SelectCommon/useCollectionRenderer.ts","../../src/PRIVATE_SelectCommon/useSelectCommon.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 { Item } from '#utils/UNSAFE_dataProvider';\nimport { error } from '#utils/UNSAFE_logger';\nimport { ItemTextFunctionType, ItemTextType } from '#utils/UNSAFE_selectUtils';\n\nexport type ComponentName = 'InlineSelectSingle' | 'SelectSingle' | 'SelectMultiple';\n\nexport function renderItemText<K, D>(\n item: Item<K, D>,\n itemText: ItemTextType<K, D>,\n componentName: ComponentName\n) {\n // if item-text is a string and the data has the specified field, return it;\n // otherwise log an error\n if (typeof itemText === 'string') {\n if (Object.prototype.hasOwnProperty.call(item.data, itemText)) {\n const retData = item.data[itemText];\n return String(retData);\n }\n error(`${componentName}: itemText specifies field that does not exist: ${itemText}`);\n // return undefined if the field doesn't exist\n return undefined;\n }\n // if item-text is a function, call it to create a display label\n return (itemText as ItemTextFunctionType<K, D>)(item);\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 type { ComponentChildren, ComponentProps } from 'preact';\n\nimport { List } from '#PRIVATE_List';\nimport type { DataState, ListItemRendererContext, Metadata } from '#UNSAFE_Collection';\nimport { Flex } from '#UNSAFE_Flex';\nimport { HighlightText } from '#UNSAFE_HighlightText';\nimport { ListItemText } from '#UNSAFE_ListItemLayout';\nimport type { Item } from '#utils/UNSAFE_dataProvider';\nimport type { Keys } from '#utils/UNSAFE_keys';\nimport type { ItemTextType } from '#utils/UNSAFE_selectUtils';\nimport { useCallback, useMemo } from 'preact/hooks';\nimport { type ComponentName, renderItemText } from './itemTextUtils';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype ListProps<K extends string | number, D> = ComponentProps<typeof List<K, D>>;\ntype PickedPropsFromList = Pick<\n ComponentProps<typeof List>,\n 'aria-label' | 'currentItemVariant' | 'selectionMode'\n>;\n\n// pick the props from the ListItemContext instead of extending it directly so that we\n// don't automatically expose any new props that may be added to it\ntype PickedPropsFromListItemContext<K, D> = Pick<\n ListItemRendererContext<K, D>,\n 'data' | 'index' | 'selector'\n>;\ntype ItemRendererSelectionDetail<K> = {\n value: Set<K>;\n target: EventTarget | null;\n};\ntype ItemRendererMetadata<K> = Pick<Metadata<K>, 'key' | 'suggestion'>;\ntype ItemRendererProps<K, D> = PickedPropsFromListItemContext<K, D> & {\n metadata: ItemRendererMetadata<K>;\n searchText?: string;\n selectedKeys?: Set<K>;\n onSelectionChange: (detail: ItemRendererSelectionDetail<K>) => void;\n};\n\ntype DefaultListCurrentKeyDetail<K> = { value: K };\ntype DefaultListItemActionDetail<K, D> = { context: Item<K, D> };\ntype DefaultListSelectionDetail<K> = { value: Set<K> };\n\ntype Props<K extends string | number, D extends Record<string, any>> = PickedPropsFromList & {\n itemRenderer?: (itemRendererProps: ItemRendererProps<K, D>) => ComponentChildren;\n itemText: ItemTextType<K, D>;\n // props from List that we constrain or unconstrain\n currentKey?: K;\n data?: DataState<K, D> | null;\n onCurrentKeyChange: (detail: DefaultListCurrentKeyDetail<K>) => void;\n onItemAction?: (detail: DefaultListItemActionDetail<K, D>) => void;\n onLoadRange?: ComponentProps<typeof List>['onLoadRange'];\n onSelectionChange?: (detail: DefaultListSelectionDetail<K>) => void;\n searchText?: string;\n selectedKeys?: Set<K>;\n // props for logging purposes\n componentName: ComponentName;\n};\n\nconst noOp = () => {};\n\nexport function DefaultList<K extends string | number, D extends Record<string, any>>({\n 'aria-label': ariaLabel,\n componentName,\n currentItemVariant,\n currentKey,\n data,\n itemRenderer,\n itemText,\n onCurrentKeyChange,\n onItemAction,\n onLoadRange = noOp,\n onSelectionChange,\n searchText,\n selectedKeys,\n selectionMode\n}: Props<K, D>) {\n const listItemRenderer = useCallback(\n (listItemContext: ListItemRendererContext<K, D>) => {\n // specify the listItemContext props that we want to expose individually instead of\n // spreading the whole object so that we don't automatically include any new props that\n // may be added to it\n const itemRendererProps: ItemRendererProps<K, D> = {\n data: listItemContext.data,\n index: listItemContext.index,\n metadata: listItemContext.metadata,\n selector: listItemContext.selector,\n searchText,\n selectedKeys,\n onSelectionChange: ({ value }) => {\n onSelectionChange?.({ value });\n }\n };\n const itemContext = {\n data: listItemContext.data,\n key: listItemContext.metadata.key,\n metadata: listItemContext.metadata\n };\n return itemRenderer ? (\n itemRenderer(itemRendererProps)\n ) : (\n <Flex align=\"center\">\n {listItemContext.selector && (\n <div class={dropdownStyles.selectorWrapper}>{listItemContext.selector()}</div>\n )}\n <div\n class={\n selectionMode === 'single'\n ? dropdownStyles.singleSelectItem\n : dropdownStyles.multiSelectItem\n }>\n <ListItemText variant=\"primary\">\n <HighlightText matchText={searchText}>\n {renderItemText(itemContext, itemText, componentName) as string}\n </HighlightText>\n </ListItemText>\n </div>\n </Flex>\n );\n },\n [\n componentName,\n itemRenderer,\n itemText,\n onSelectionChange,\n searchText,\n selectedKeys,\n selectionMode\n ]\n );\n\n const keys = useMemo(() => {\n return { all: false, keys: selectedKeys ?? new Set<K>() };\n }, [selectedKeys]) as Keys<K>;\n\n const currentItemOverride = useMemo(\n () => (currentKey !== undefined ? { rowKey: currentKey } : undefined),\n [currentKey]\n );\n const handleItemAction = useCallback<NonNullable<ListProps<K, D>['onItemAction']>>(\n ({ context: { data, metadata } }) => {\n onItemAction?.({ context: { data, key: metadata.key, metadata } });\n },\n [onItemAction]\n );\n const handleSelectionChange = useCallback<NonNullable<ListProps<K, D>['onSelectionChange']>>(\n ({ value }) => {\n onSelectionChange?.({ value: new Set(value.keys?.values()) });\n },\n [onSelectionChange]\n );\n\n return (\n <List<K, D>\n aria-label={ariaLabel}\n allowTabbableMode={false}\n currentItemVariant={currentItemVariant}\n currentItemOverride={currentItemOverride}\n data={data ?? null}\n onPersistCurrentItem={onCurrentKeyChange}\n onItemAction={handleItemAction}\n onLoadRange={onLoadRange}\n onSelectionChange={handleSelectionChange}\n role=\"listbox\"\n selectedKeys={keys}\n selectionMode={selectionMode}>\n {(context: ListItemRendererContext<K, D>) => listItemRenderer(context)}\n </List>\n );\n}\n","export const isSimpleClick = (event: MouseEvent) => {\n return event.button === 0 && !event.ctrlKey;\n};\n\nexport const preventDefault = (event: Event) => {\n event.preventDefault();\n};\n\nexport const preventDefaultForCurrentTarget = (event: MouseEvent) => {\n if (event.currentTarget === event.target) {\n event.preventDefault();\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 } from 'preact/hooks';\nimport { usePress } from '../hooks/UNSAFE_usePress';\nimport { DropdownArrowIcon } from '../PRIVATE_ThemedIcons/DropdownArrowIcon';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\nimport { useComponentTheme } from '#hooks/UNSAFE_useComponentTheme';\nimport { ButtonLabelLayoutRedwoodTheme } from '#UNSAFE_ButtonLabelLayout/themes/redwood/ButtonLabelLayoutTheme';\nimport type { ButtonLabelLayoutVariantOptions } from '#UNSAFE_ButtonLabelLayout/themes/ButtonLabelLayoutStyles.css';\nimport { TestIdProps, useTestId } from '#hooks/UNSAFE_useTestId';\nimport { BaseButtonRedwoodTheme } from '#UNSAFE_BaseButton/themes/redwood/BaseButtonTheme';\n\ntype Props = TestIdProps & {\n isDisabled?: boolean;\n onClick?: () => void;\n};\n\nconst noop = () => {};\n\nexport function DropdownArrow({ isDisabled = false, onClick, testId }: Props) {\n const { classes } = useComponentTheme<ButtonLabelLayoutVariantOptions>(\n ButtonLabelLayoutRedwoodTheme,\n { size: 'sm' }\n );\n const { baseTheme } = useComponentTheme(BaseButtonRedwoodTheme);\n\n const preventDefault = useCallback((event: Event) => {\n event.preventDefault();\n }, []);\n const { pressProps } = usePress(onClick ?? noop, { isDisabled });\n\n // TODO: JET-67410 replace this with a icon button\n const styleClasses = classNames([\n classes,\n baseTheme,\n dropdownStyles.arrow.base,\n isDisabled ? dropdownStyles.arrow.disabled : dropdownStyles.arrow.enabled\n ]);\n\n const testIdProps = useTestId(testId);\n\n return (\n <span\n aria-hidden=\"true\"\n class={styleClasses}\n tabIndex={-1}\n onMouseDown={preventDefault}\n {...testIdProps}\n {...pressProps}>\n <DropdownArrowIcon />\n </span>\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 type { ComponentChildren, ComponentProps, Ref } from 'preact';\n\nimport { CollectionInteractionContext } from '#hooks/UNSAFE_useCollectionInteractionContext';\nimport { classNames } from '#utils/UNSAFE_classNames';\nimport { preventDefaultForCurrentTarget } from './eventUtils';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype Props = Pick<ComponentProps<'div'>, 'id' | 'onKeyDown'> & {\n children?: ComponentChildren;\n dropdownListRef?: Ref<HTMLDivElement>;\n hasTopGap?: boolean;\n hasBottomGap?: boolean;\n isLoading?: boolean;\n};\n\nexport function DropdownList({\n children,\n id,\n dropdownListRef,\n hasTopGap = true,\n hasBottomGap = true,\n isLoading = false,\n onKeyDown\n}: Props) {\n const styleClasses = classNames([\n dropdownStyles.list.base,\n hasTopGap && dropdownStyles.list.topGap,\n hasBottomGap && dropdownStyles.list.bottomGap,\n isLoading && dropdownStyles.list.loading\n ]);\n return (\n <CollectionInteractionContext.Provider value={'embedded'}>\n <div\n ref={dropdownListRef}\n class={styleClasses}\n id={id}\n onMouseDown={preventDefaultForCurrentTarget}\n onKeyDown={onKeyDown}>\n {children}\n </div>\n </CollectionInteractionContext.Provider>\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 { Text } from '#UNSAFE_Text';\nimport { useTranslationBundle } from '#hooks/UNSAFE_useTranslationBundle';\nimport { BundleType } from '#resources/nls/bundle';\nimport { preventDefaultForCurrentTarget } from './eventUtils';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\nexport function EmptyResults() {\n const translations = useTranslationBundle<BundleType>('@oracle/oraclejet-preact');\n\n // call preventDefault for mousedown on this div so that focus does not transfer from\n // the input\n return (\n <div class={dropdownStyles.results.extraItem} onMouseDown={preventDefaultForCurrentTarget}>\n <Text variant=\"primary\">{translations.select_noMatchesFound()}</Text>\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 type { DataState } from '#UNSAFE_Collection';\nimport { getClientHints } from '#utils/PRIVATE_clientHints';\nimport type { Item } from '#utils/UNSAFE_dataProvider';\n\n/**\n * Helper function to determine whether the current device is a mobile device\n * @returns true if running on a mobile device, false otherwise\n */\nexport function isMobile() {\n const deviceType = getClientHints().deviceType;\n return deviceType === 'phone' || deviceType === 'tablet';\n}\n\n/**\n * Helper function to determine whether the current device is a phone\n * @returns true if running on a phone, false otherwise\n */\nexport function isPhone() {\n return getClientHints().deviceType === 'phone';\n}\n\n/**\n * Helper function to determine whether the current device is a tablet\n * @returns true if running on a tablet, false otherwise\n */\nexport function isTablet() {\n return getClientHints().deviceType === 'tablet';\n}\n\nexport function isBeforeDataFetch<K, D>(data: DataState<K, D>) {\n return data.sizePrecision === 'atLeast' && data.totalSize === 0;\n}\n\nexport function isSearchTextEmptyOrUndefined(searchText?: string) {\n return searchText === undefined || searchText.length === 0;\n}\n\nexport function isSearchClearedFirstTime(prevSearchText?: string, searchText?: string) {\n return prevSearchText === undefined && searchText === '';\n}\n\n/**\n * Extract keys from a value items array.\n *\n * @param valueItems The value items from which the keys are to be extracted\n * @returns The set of keys\n */\nexport function createKeysFromValueItems<K, D>(valueItems?: Item<K, D>[]) {\n const keys = valueItems?.reduce((accumKeys, currentItem) => {\n accumKeys.add(currentItem.key);\n return accumKeys;\n }, new Set<K>());\n return keys;\n}\n","import type { DataState } from '#UNSAFE_Collection';\nimport type { Item } from '#utils/UNSAFE_dataProvider';\nimport { useMemo } from 'preact/compat';\n\ntype Key = string | number;\ntype Data = Record<string, any>;\n\ntype UseCollectionRendererCommonParams<K> = {\n currentKey?: K;\n searchText?: string;\n selectedKeys?: Set<K>;\n onCurrentKeyChange: (detail: { value?: K }) => void;\n};\n\nexport type UseCollectionRendererSelectSingleParams<K, D> = UseCollectionRendererCommonParams<K> & {\n onItemAction: (detail: { context: Item<K, D> }) => void;\n onSelectedKeysChange?: never;\n selectedOnlyData?: never;\n};\n\nexport type UseCollectionRendererSelectMultipleParams<K, D> =\n UseCollectionRendererCommonParams<K> & {\n onItemAction?: never;\n onSelectedKeysChange: (detail: { value: Set<K> }) => void;\n selectedOnlyData?: DataState<K, D>;\n };\n\ntype UseCollectionRendererParams<K, D> =\n | UseCollectionRendererSelectSingleParams<K, D>\n | UseCollectionRendererSelectMultipleParams<K, D>;\n\ntype CommonCollectionRendererContext<K extends Key> = {\n searchText?: string;\n currentRowKeyOverride?: K;\n onPersistCurrentRowKey: (detail: { value?: K }) => void;\n selected?: Set<K>;\n};\n\nexport type SelectSingleCollectionRendererContext<\n K extends Key,\n D extends Data\n> = CommonCollectionRendererContext<K> & {\n onRowAction: (detail: { context: Item<K, D> }) => void;\n};\n\nexport type SelectMultipleCollectionRendererContext<\n K extends Key,\n D extends Data\n> = CommonCollectionRendererContext<K> & {\n onSelectedChange: (detail: { value: Set<K> }) => void;\n selectedOnlyData?: DataState<K, D>;\n};\n\ntype CollectionRendererContext<K extends Key, D extends Data> =\n | SelectSingleCollectionRendererContext<K, D>\n | SelectMultipleCollectionRendererContext<K, D>;\n\n// NOTE: We will using a single hook that constructs the collection renderer context for both select single and\n// select multiple. This is ok as they both share most of the properties and differ only in a few areas. So, we will\n// be using function overloading to determine which component is calling the hook (based on the args) and return the\n// correct context.\n\n/**\n * A custom hook that constructs the context for SelectSingle's collectionRenderer.\n * @param params Parameters for constructing the collection renderer context\n * @returns the CollectionRendererContext object\n */\nexport function useCollectionRenderer<K extends Key, D extends Data>(\n params: UseCollectionRendererSelectSingleParams<K, D>\n): SelectSingleCollectionRendererContext<K, D>;\n\n/**\n * A custom hook that constructs the context for SelectMultiple's collectionRenderer.\n * @param params Parameters for constructing the collection renderer context\n * @returns the CollectionRendererContext object\n */\nexport function useCollectionRenderer<K extends Key, D extends Data>(\n params: UseCollectionRendererSelectMultipleParams<K, D>\n): SelectMultipleCollectionRendererContext<K, D>;\n\n/**\n * A custom hook that constructs the context for SelectSingle/SelectMultiple's collectionRenderer.\n * @param param0 Parameters for constructing the collection renderer context\n * @returns the CollectionRendererContext object\n */\nexport function useCollectionRenderer<K extends Key, D extends Data>({\n currentKey,\n onCurrentKeyChange,\n onItemAction,\n onSelectedKeysChange,\n searchText,\n selectedKeys,\n selectedOnlyData\n}: UseCollectionRendererParams<K, D>) {\n return useMemo<CollectionRendererContext<K, D>>(() => {\n const common = {\n searchText,\n currentRowKeyOverride: currentKey,\n onPersistCurrentRowKey: onCurrentKeyChange,\n selected: selectedKeys\n } satisfies CommonCollectionRendererContext<K>;\n\n // If onItemAction is present, then we are constructing context for SelectSingle. So,\n // return the context satisfying SelectSingleCollectionRendererContext type.\n if (onItemAction !== undefined)\n return {\n ...common,\n onRowAction: onItemAction\n } satisfies SelectSingleCollectionRendererContext<K, D>;\n\n // If onItemAction is not present, then we are constructing context for SelectMultiple. So,\n // return the context satisfying SelectMultipleCollectionRendererContext type.\n return {\n ...common,\n onSelectedChange: onSelectedKeysChange,\n selectedOnlyData\n } satisfies SelectMultipleCollectionRendererContext<K, D>;\n }, [\n currentKey,\n onCurrentKeyChange,\n onItemAction,\n onSelectedKeysChange,\n searchText,\n selectedKeys,\n selectedOnlyData\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 type { RefObject } from 'preact';\nimport { useCallback, useEffect, useRef, useState } from 'preact/hooks';\n\nimport type { DataState } from '#UNSAFE_Collection';\nimport type { PositionData } from '#UNSAFE_Floating';\nimport { KEYS, isControlOrFunctionKey } from '#utils/PRIVATE_keyboardUtils';\nimport { allTabbableElements } from '#utils/PRIVATE_tabbableUtils';\nimport type { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport { isSimpleClick } from './eventUtils';\n\ntype UseSelectCommonProps<K, D> = {\n data?: DataState<K, D> | null;\n inputRef: RefObject<HTMLElement>;\n isFocused?: boolean;\n onFilter?: ({ searchText }: { searchText?: string }) => void;\n};\n\nexport type CurrentKeyDetail<K> = {\n value?: K;\n};\n\n/**\n * Hook that manages state and behavior for a Select* component. This hook creates state\n * variables and event listeners, returning properties to apply to components internally\n * rendered by a Select* component, as well as state information.\n *\n * @param data Specifies data for the dropdown list.\n * @param inputRef Ref to the input element.\n * @param isFocused Specifies whether the component has focus.\n * @param onFilter Callback function to trigger loading data for the dropdown list,\n * which may or may not be filtered by user entered text.\n *\n * @returns Component state and event listeners.\n */\nexport function useSelectCommon<K, D>({\n data,\n inputRef,\n isFocused,\n onFilter\n}: UseSelectCommonProps<K, D>) {\n const mainFieldRef = useRef<HTMLDivElement>(null);\n const dropdownRef = useRef<HTMLDivElement>(null);\n const [isDropdownOpen, setDropdownOpen] = useState(false);\n const [isDropdownAbove, setDropdownAbove] = useState(false);\n\n // We only need to push currentRow when we need to override the\n // current row, like when the dropdown is opened and we want to set the initial\n // focused row or when filtering and we want to focus the first row.\n const [currentRowOverride, _setCurrentRowOverride] = useState<{ rowKey?: K }>({\n rowKey: undefined\n });\n // We still need information on what the current row actually is, but we do not need\n // to react to it until certain scenarios like pressing Tab from the dropdown. So, we\n // just store this in a ref.\n const currentRowKeyRef = useRef<K>();\n // When we want to update the currentRowOverride, we also want to keep the currentRowKeyRef\n // in sync as the collection will not call onChanged for this change.\n const setCurrentRowOverride = useCallback((currentRow: { rowKey?: K }) => {\n currentRowKeyRef.current = currentRow.rowKey;\n _setCurrentRowOverride(currentRow);\n }, []);\n const [isUserFiltering, setUserFiltering] = useState(false);\n const [userInput, setUserInput] = useState<string>();\n const [searchText, setSearchText] = useState<string>();\n\n const [prevIsDropdownOpen, setPrevIsDropdownOpen] = useState(isDropdownOpen);\n const [prevIsFocused, setPrevIsFocused] = useState(isFocused);\n const [prevIsUserFiltering, setPrevIsUserFiltering] = useState(isUserFiltering);\n\n const onMouseDown = useCallback(\n (event: MouseEvent) => {\n // const target = event.target as HTMLElement;\n if (event.defaultPrevented || !isSimpleClick(event)) {\n return;\n }\n if (!isDropdownOpen) {\n setDropdownOpen(true);\n }\n // this is needed to focus the input when clicking on the inside label when there is no\n // value; otherwise the component looks focused but doesn't actually have physical focus\n setTimeout(function () {\n inputRef.current?.focus();\n }, 0);\n },\n [inputRef, isDropdownOpen]\n );\n\n const handleDropdownArrowClick = useCallback(() => {\n setDropdownOpen(!isDropdownOpen);\n\n // focus the input so that if the user Tabs afterwards, it loses focus and the dropdown closes\n inputRef.current?.focus();\n }, [inputRef, isDropdownOpen]);\n\n const handleDropdownAutoDismiss = useCallback(\n (event?: Event) => {\n if (isDropdownOpen) {\n setDropdownOpen(false);\n\n switch (event?.type) {\n case 'keydown': {\n const keyboardEvent = event as KeyboardEvent;\n switch (keyboardEvent.code) {\n case KEYS.ESC:\n // focus the input when the user cancels out of the dropdown\n inputRef.current?.focus();\n break;\n default:\n break;\n }\n break;\n }\n case 'mousedown':\n // if focus is in the dropdown, focus the input before the dropdown is hidden so that\n // focus will transfer correctly when the target is not focusable;\n // otherwise the text cursor appears in the input again\n if (dropdownRef.current?.contains(document.activeElement)) {\n inputRef.current?.focus();\n }\n break;\n default:\n break;\n }\n }\n },\n [inputRef, isDropdownOpen]\n );\n\n const handleDropdownPosition = useCallback((data: PositionData) => {\n setDropdownAbove(data.placement.startsWith('top'));\n }, []);\n\n const getDropdownTabbableElems = useCallback(() => {\n return isDropdownOpen && dropdownRef.current\n ? allTabbableElements(dropdownRef.current)\n : undefined;\n }, [isDropdownOpen]);\n\n const handleUpDownArrowKeys = useCallback(\n (event: KeyboardEvent) => {\n if (!isDropdownOpen) {\n setDropdownOpen(true);\n } else {\n // JET-64909 - focus / 'current' dropped when arrow keying during loading\n // Transfer physical focus into the dropdown only if the data is present and the dropdown\n // has rendered the data. Otherwise, keep the focus in the field.\n if (data != null) {\n const tabbableElems = getDropdownTabbableElems();\n tabbableElems?.[0]?.focus();\n\n // if there is no current item set, make the first item current\n if (currentRowOverride.rowKey === undefined) {\n setCurrentRowOverride({ rowKey: data.data[0]?.metadata?.key });\n }\n }\n }\n\n // prevent the page from scrolling\n event.preventDefault();\n },\n [currentRowOverride, data, getDropdownTabbableElems, isDropdownOpen, setCurrentRowOverride]\n );\n\n const handleMainFieldKeyDown = useCallback(\n (event: KeyboardEvent) => {\n // const target = event.target as HTMLElement;\n // ignore control key and function key\n if (isControlOrFunctionKey(event)) {\n return;\n }\n\n switch (event.code) {\n case KEYS.PAGE_UP:\n case KEYS.PAGE_DOWN:\n // prevent the page from scrolling\n event.preventDefault();\n\n return;\n\n case KEYS.UP:\n case KEYS.DOWN:\n // prevent the page from scrolling\n event.preventDefault();\n break;\n\n case KEYS.ESC:\n if (isDropdownOpen) {\n setDropdownOpen(false);\n\n event.preventDefault();\n\n // JET-53183 - core pack compat: stop propagation of handled events\n // we don't want a parent collection component to stop editing the row when we close\n // the dropdown\n event.stopPropagation();\n }\n break;\n\n default:\n break;\n }\n },\n [isDropdownOpen]\n );\n\n const handleMainFieldKeyUp = useCallback(\n (event: KeyboardEvent) => {\n // ignore control key and function key\n if (isControlOrFunctionKey(event)) {\n return;\n }\n\n switch (event.code) {\n case KEYS.UP:\n case KEYS.DOWN:\n handleUpDownArrowKeys(event);\n break;\n\n default:\n break;\n }\n },\n [handleUpDownArrowKeys]\n );\n\n const handleInput = useCallback(\n (detail: ValueUpdateDetail<string>) => {\n if (!isDropdownOpen) {\n setDropdownOpen(true);\n }\n setUserFiltering(true);\n setUserInput(detail.value);\n const str = detail.value;\n setSearchText(str);\n onFilter?.({ searchText: str });\n },\n [isDropdownOpen, onFilter]\n );\n\n const onCurrentKeyChange = useCallback((detail: CurrentKeyDetail<K>) => {\n // when the collection changes the current key, we only want to store the information\n // and not do anything.\n currentRowKeyRef.current = detail.value;\n }, []);\n\n const stopFiltering = useCallback(() => {\n setUserFiltering(false);\n setUserInput('');\n // Set this to `undefined` as this represents the initial state.\n // We need to do this for select-single as we need to highlight different\n // rows based on whether it is the initial dropdown navigation or empty filter navigation.\n setSearchText(undefined);\n }, []);\n\n const updateFiltering = useCallback((value?: string) => {\n setUserFiltering(true);\n setUserInput(value);\n setSearchText(value);\n }, []);\n\n // the user is not actively filtering if the dropdown is closed and the component doesn't\n // have focus\n if (\n prevIsDropdownOpen !== isDropdownOpen ||\n prevIsFocused !== isFocused ||\n prevIsUserFiltering !== isUserFiltering\n ) {\n if (!isDropdownOpen && !isFocused && isUserFiltering) {\n stopFiltering();\n }\n }\n\n // need to call onFilter with undefined searchText when the dropdown opens and the\n // user is NOT filtering\n useEffect(() => {\n if (isDropdownOpen && !isUserFiltering) {\n onFilter?.({ searchText: undefined });\n }\n }, [isDropdownOpen, isUserFiltering, onFilter]);\n\n // when the dropdown closes, reset the isDropdownAbove flag\n if (prevIsDropdownOpen !== isDropdownOpen) {\n if (!isDropdownOpen) {\n setDropdownAbove(false);\n }\n setPrevIsDropdownOpen(isDropdownOpen);\n }\n\n if (prevIsFocused !== isFocused) {\n setPrevIsFocused(isFocused);\n }\n if (prevIsUserFiltering !== isUserFiltering) {\n setPrevIsUserFiltering(isUserFiltering);\n }\n\n return {\n currentRowKeyRef,\n currentRowOverride,\n dropdownRef,\n getDropdownTabbableElems,\n handleDropdownArrowClick,\n handleDropdownAutoDismiss,\n handleDropdownPosition,\n handleInput,\n handleMainFieldKeyDown,\n handleMainFieldKeyUp,\n handleUpDownArrowKeys,\n isDropdownAbove,\n isDropdownOpen,\n // the field should remain to look focused while the dropdown is open,\n // in case physical focus is in the dropdown\n isFocused: isFocused || isDropdownOpen,\n isUserFiltering,\n mainFieldRef,\n onCurrentKeyChange,\n onMouseDown,\n searchText,\n setCurrentRowOverride,\n setDropdownOpen,\n setUserInput,\n stopFiltering,\n updateFiltering,\n userInput\n };\n}\n"],"names":["_jsxs","_jsx","DropdownArrowIcon","useMemo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAMG;SAQa,cAAc,CAC5B,IAAgB,EAChB,QAA4B,EAC5B,aAA4B,EAAA;;;AAI5B,IAAA,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;AAChC,QAAA,IAAI,MAAM,CAAC,SAAS,C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