@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,4 +1,4 @@
|
|
|
1
|
-
.
|
|
1
|
+
.SegmentStyles_base__51w8ze0 {
|
|
2
2
|
caret-color: transparent;
|
|
3
3
|
text-align: end;
|
|
4
4
|
-webkit-tap-highlight-color: transparent;
|
|
@@ -6,32 +6,35 @@
|
|
|
6
6
|
user-select: none;
|
|
7
7
|
-webkit-user-select: none;
|
|
8
8
|
}
|
|
9
|
-
.
|
|
9
|
+
.SegmentStyles_base__51w8ze0:focus-visible {
|
|
10
10
|
outline: none;
|
|
11
11
|
}
|
|
12
|
-
.
|
|
12
|
+
.SegmentStyles_literalBase__51w8ze1 {
|
|
13
13
|
white-space: pre;
|
|
14
14
|
-webkit-user-select: none;
|
|
15
15
|
-moz-user-select: none;
|
|
16
16
|
user-select: none;
|
|
17
17
|
}
|
|
18
|
-
.
|
|
18
|
+
.SegmentStyles_placeholder__51w8ze2 {
|
|
19
19
|
color: var(--oj-c-text-icon-secondary);
|
|
20
20
|
text-align: start;
|
|
21
21
|
}
|
|
22
|
-
.
|
|
22
|
+
.SegmentStyles_space__51w8ze3 {
|
|
23
|
+
width: 4px;
|
|
24
|
+
}
|
|
25
|
+
.SegmentStyles_selected__51w8ze4 {
|
|
23
26
|
background-color: var(--oj-c-surface-selected);
|
|
24
27
|
border-color: var(--oj-c-border-selected);
|
|
25
28
|
}
|
|
26
|
-
.
|
|
29
|
+
.SegmentStyles_highlighted__51w8ze5 {
|
|
27
30
|
background-color: var(--oj-c-surface-selected);
|
|
28
31
|
}
|
|
29
|
-
.
|
|
32
|
+
.SegmentStyles_hidden__51w8ze6 {
|
|
30
33
|
display: none;
|
|
31
34
|
}
|
|
32
|
-
.
|
|
35
|
+
.SegmentStyles_notHidden__51w8ze7 {
|
|
33
36
|
display: block;
|
|
34
37
|
}
|
|
35
|
-
.
|
|
38
|
+
.SegmentStyles_accessibleTouchTarget__51w8ze8 {
|
|
36
39
|
min-width: 24px;
|
|
37
40
|
}
|
|
@@ -6,7 +6,7 @@ import { L as Layer } from './Layer-535577b5.js';
|
|
|
6
6
|
import { forwardRef } from 'preact/compat';
|
|
7
7
|
import './LayerHost-7931b424.js';
|
|
8
8
|
import { i as isControlOrFunctionKey, K as KEYS } from './keyboardUtils-986fe923.js';
|
|
9
|
-
import { c as preventDefaultForCurrentTarget } from './useSelectCommon-
|
|
9
|
+
import { c as preventDefaultForCurrentTarget } from './useSelectCommon-a3c69d60.js';
|
|
10
10
|
import { dropdownStyles } from './PRIVATE_SelectCommon/themes/dropdownStyles.css.js';
|
|
11
11
|
import { u as useOutsideMousedown } from './useOutsideMousedown-c45c22c0.js';
|
|
12
12
|
import { F as FormFieldContext } from './FormFieldContext-47ca0c20.js';
|
|
@@ -238,4 +238,4 @@ const SelectMobileFieldInput = forwardRef(({ 'aria-controls': ariaControls, 'ari
|
|
|
238
238
|
});
|
|
239
239
|
|
|
240
240
|
export { Dropdown as D, LinkItem as L, MobileDropdown as M, SelectMobileDropdown as S, DropdownUserAssistance as a, SelectMobileFieldInput as b };
|
|
241
|
-
//# sourceMappingURL=SelectMobileFieldInput-
|
|
241
|
+
//# sourceMappingURL=SelectMobileFieldInput-345c4d45.js.map
|
package/es/{SelectMobileFieldInput-0a7c968c.js.map → SelectMobileFieldInput-345c4d45.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectMobileFieldInput-0a7c968c.js","sources":["../../src/PRIVATE_SelectCommon/Dropdown.tsx","../../src/PRIVATE_SelectCommon/DropdownUserAssistance.tsx","../../src/PRIVATE_SelectCommon/LinkItem.tsx","../../src/PRIVATE_SelectCommon/MobileDropdown.tsx","../../src/PRIVATE_SelectCommon/SelectMobileDropdown.tsx","../../src/PRIVATE_SelectCommon/SelectMobileFieldInput.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { ComponentChildren, ComponentProps } from 'preact';\nimport { MutableRef, useCallback, useState } from 'preact/hooks';\nimport { Floating, PositionData } from '../UNSAFE_Floating';\nimport { Layer } from '../UNSAFE_Layer';\nimport { isControlOrFunctionKey, KEYS } from '../utils/PRIVATE_keyboardUtils';\nimport { preventDefaultForCurrentTarget } from './eventUtils';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n//Once Dropdown is consumed this will be removed\nimport { useOutsideMousedown } from '../hooks/PRIVATE_useOutsideMousedown';\n\ntype FloatingProps = ComponentProps<typeof Floating>;\n\ntype Props = {\n anchorRef: MutableRef<HTMLElement | null>;\n children?: ComponentChildren;\n dropdownRef: MutableRef<HTMLElement | null>;\n id?: string;\n isOpen?: boolean;\n onAutoDismiss?: (event?: Event) => void;\n onPosition?: FloatingProps['onPosition'];\n};\n\nconst DEFAULT_PLACEMENT = 'bottom-start';\n// TODO: get dropdown y (mainAxis) offset from --oj-c-PRIVATE-DO-NOT-USE-private-core-global-dropdown-offset\nconst DROPDOWN_OFFSET: FloatingProps['offsetValue'] = { mainAxis: 4, crossAxis: 0 };\nconst DROPDOWN_SIZE_OPTIONS: FloatingProps['sizeOptions'] = {\n isMaxHeightAdjusted: true,\n maxHeightCeiling: 400\n};\nconst DROPDOWN_SHIFT_OPTIONS: FloatingProps['shiftOptions'] = {\n mainAxis: false\n};\n\n//TODO: Start consuming PRIVATE_Dropdown. JET-62565\nexport function Dropdown({\n anchorRef,\n children,\n dropdownRef,\n id,\n isOpen,\n onAutoDismiss,\n onPosition\n}: Props) {\n const [placement, setPlacement] = useState<FloatingProps['placement']>(DEFAULT_PLACEMENT);\n const [prevIsOpen, setPrevIsOpen] = useState(isOpen);\n\n if (prevIsOpen !== isOpen) {\n // reset the placement to the default when the dropdown closes, not opens, so that it doesn't\n // initially open in the previous position and then move to the default position on the\n // rerender after the state is updated\n if (!isOpen) {\n setPlacement(DEFAULT_PLACEMENT);\n }\n setPrevIsOpen(isOpen);\n }\n\n const handlePosition = useCallback(\n (positionData: PositionData) => {\n // update the placement so that the dropdown stays where it is until there is a collision,\n // i.e. it no longer fits, instead of letting it try to move back to the default position\n // on every render\n setPlacement(positionData.placement);\n\n // call the callback that was passed in through props\n onPosition?.(positionData);\n },\n [onPosition, setPlacement]\n );\n\n const handleAutoDismiss = useCallback(\n (event: Event) => {\n onAutoDismiss?.(event);\n },\n [onAutoDismiss]\n );\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (event.defaultPrevented || isControlOrFunctionKey(event)) {\n return;\n }\n\n switch (event.code) {\n case KEYS.ESC:\n case KEYS.TAB:\n handleAutoDismiss(event);\n break;\n }\n },\n [handleAutoDismiss]\n );\n\n // use the mousedown event to be consistent with legacy JET and so that we're hiding the dropdown\n // on the same event where focus will transfer\n useOutsideMousedown({\n isDisabled: !isOpen,\n ref: [anchorRef, dropdownRef],\n handler: handleAutoDismiss\n });\n\n const inlineStyle = isOpen\n ? {\n minWidth: `${anchorRef.current?.offsetWidth}px`\n }\n : {};\n\n return !isOpen ? null : (\n <Layer logicalParentRef={anchorRef}>\n <Floating\n anchorRef={anchorRef}\n sizeOptions={DROPDOWN_SIZE_OPTIONS}\n shiftOptions={DROPDOWN_SHIFT_OPTIONS}\n ref={dropdownRef}\n placement={placement}\n offsetValue={DROPDOWN_OFFSET}\n onPosition={handlePosition}>\n <div\n class={dropdownStyles.base}\n id={id}\n style={inlineStyle}\n onKeyDown={handleKeyDown}\n onMouseDown={preventDefaultForCurrentTarget}>\n {children}\n </div>\n </Floating>\n </Layer>\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 { ComponentProps } from 'preact';\nimport { useCallback } from 'preact/hooks';\nimport { FormFieldContext } from '../hooks/UNSAFE_useFormFieldContext';\nimport { InlineUserAssistance } from '../UNSAFE_UserAssistance';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype InlineUserAssistanceProps = Pick<\n ComponentProps<typeof InlineUserAssistance>,\n | 'assistiveText'\n | 'fieldLabel'\n | 'helpSourceLink'\n | 'helpSourceText'\n | 'id'\n | 'userAssistanceDensity'\n>;\n\nexport function DropdownUserAssistance(props: InlineUserAssistanceProps) {\n // Prevent the focus from transferring when the user clicks on an empty/non-clickable area\n // of the user assistance\n const handleMouseDown = useCallback((event: MouseEvent) => {\n // Don't call preventDefault when the user clicks on the help source link, so that the\n // focus is allowed to transfer in that case.\n if ((event.target as Element)?.tagName !== 'A') {\n event.preventDefault();\n }\n }, []);\n\n return (\n <FormFieldContext.Provider value={{ isFocused: true }}>\n <div class={dropdownStyles.userAssistance} onMouseDown={handleMouseDown}>\n <InlineUserAssistance {...props} />\n </div>\n </FormFieldContext.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 { useCallback } from 'preact/hooks';\nimport { Link } from '#UNSAFE_Link';\nimport { useFocusWithin } from '#hooks/UNSAFE_useFocusWithin';\nimport { useHover } from '#hooks/UNSAFE_useHover';\nimport { classNames } from '#utils/UNSAFE_classNames';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype Props = {\n /**\n * Child content of the item.\n */\n children: string;\n /**\n * Specifies whether to highlight the item.\n */\n isHighlighted?: boolean;\n /**\n * Callback invoked when the user triggers the link, for example by clicking or pressing Enter.\n */\n onAction?: () => void;\n};\n\n/**\n * This component renders a link that looks like a list item in a Select* component dropdown.\n * It fires an action when the user triggers it, and is intended to be used for launching\n * external application UI from within the dropdown, for example to provide advanced search or\n * add to list functionality.\n * The LinkItem would typically be shown in a fixed position above or below the list itself.\n */\nconst LinkItem = ({ children, isHighlighted, onAction }: Props) => {\n const { isHover, hoverProps } = useHover();\n const { isFocused, focusProps } = useFocusWithin();\n\n const handleClick = useCallback(\n (e: Event) => {\n // prevent the link from actually navigating by preventing default and returning false\n e.preventDefault();\n onAction?.();\n return false;\n },\n [onAction]\n );\n\n const rootClasses = classNames([\n dropdownStyles.results.linkItemRoot,\n isFocused ? dropdownStyles.results.linkItemFocus : undefined\n ]);\n\n const linkClasses = classNames([\n dropdownStyles.results.extraItem,\n isHover || isFocused || isHighlighted ? dropdownStyles.results.linkItemHighlight : undefined\n ]);\n\n return (\n <div class={rootClasses} {...focusProps}>\n <Link href=\"#\" onClick={handleClick}>\n <div class={linkClasses} {...hoverProps}>\n {children}\n </div>\n </Link>\n </div>\n );\n};\n\nexport { LinkItem };\n","import type { ComponentChildren, JSX } from 'preact';\nimport { Flex } from '../UNSAFE_Flex';\nimport { Layer } from '../UNSAFE_Layer';\nimport { WindowOverlay } from '../UNSAFE_WindowOverlay';\nimport type { UnpackSignals } from '@oracle/oraclejet-internal-utilities/attributeUtils';\nimport { mobileDropdownStyles } from './themes/mobileDropdownStyles.css';\n\ntype Props = {\n /**\n * Id of the label to associate with the dropdown (e.g. the label of the filter field).\n */\n 'aria-labelledby'?: UnpackSignals<JSX.AriaAttributes>['aria-labelledby'];\n\n /**\n * The dropdown content\n */\n children?: ComponentChildren;\n\n /**\n * The id for the top level element\n */\n id?: string;\n\n /**\n * Specifies whether the dropdown is being shown\n */\n isOpen?: boolean;\n};\n\nexport function MobileDropdown({ 'aria-labelledby': ariaLabelledBy, children, id, isOpen }: Props) {\n return !isOpen ? null : (\n <Layer>\n <WindowOverlay>\n <div\n id={id}\n class={mobileDropdownStyles.base}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={ariaLabelledBy}>\n <Flex width=\"100%\" height=\"100%\" maxHeight=\"100%\" direction=\"column\">\n {children}\n </Flex>\n </div>\n </WindowOverlay>\n </Layer>\n );\n}\n","import { ComponentChildren, ComponentProps } from 'preact';\nimport { Separator } from '../UNSAFE_Separator';\nimport { MobileDropdown } from './MobileDropdown';\nimport { selectMobileDropdownStyles } from './themes/selectMobileDropdownStyles.css';\n\ntype MobileDropdownProps = ComponentProps<typeof MobileDropdown>;\ntype PassThroughMobileDropdownProps = Pick<MobileDropdownProps, 'id' | 'isOpen'>;\n\ntype Props = PassThroughMobileDropdownProps & {\n /**\n * The main dropdown content\n */\n children?: ComponentChildren;\n\n /**\n * The components to be placed in the end of the dropdown\n */\n footer?: ComponentChildren;\n\n /**\n * The components to be placed in the beginning of the dropdown\n */\n header?: ComponentChildren;\n\n /**\n * Specifies whether to have a separator between header and content\n */\n hasHeaderSeparator?: boolean;\n\n /**\n * Id of the label for the filter field.\n */\n labelId?: string;\n};\n\nexport function SelectMobileDropdown({\n children,\n footer,\n hasHeaderSeparator = true,\n header,\n id,\n isOpen,\n labelId\n}: Props) {\n return (\n <MobileDropdown id={id} isOpen={isOpen} aria-labelledby={labelId}>\n {header}\n {hasHeaderSeparator && <Separator />}\n {/* TODO: Add overflow support to View and use it here */}\n {/* */}\n <div class={selectMobileDropdownStyles.content}>{children}</div>\n <Separator />\n {footer}\n </MobileDropdown>\n );\n}\n","import type { ContextType, Ref, JSX } from 'preact';\nimport { forwardRef } from 'preact/compat';\n\nimport type { UnpackSignals } from '@oracle/oraclejet-internal-utilities/attributeUtils';\nimport { merge } from '@oracle/oraclejet-internal-utilities/stringUtils';\n\nimport { Text } from '#UNSAFE_Text';\nimport { isInputPlaceholderShown } from '#UNSAFE_TextField/TextFieldUtils';\nimport { formControlInheritTextAlign } from '#UNSAFE_TextField/themes/FormControlUtilsStyles.css';\nimport type { TextFieldInputVariantOptions } from '#UNSAFE_TextField/themes/TextFieldInputStyles.css';\nimport { TextFieldInputRedwoodTheme } from '#UNSAFE_TextField/themes/redwood/TextFieldInputTheme';\nimport { useAccessibleContext } from '#hooks/UNSAFE_useAccessibleContext';\nimport { useComponentTheme } from '#hooks/UNSAFE_useComponentTheme';\nimport { useFormFieldContext } from '#hooks/UNSAFE_useFormFieldContext';\nimport { FormVariantContext } from '#hooks/UNSAFE_useFormVariantContext';\nimport { useTabbableMode } from '#hooks/UNSAFE_useTabbableMode';\nimport { isEmbeddedVariant } from '#utils/PRIVATE_formControlUtils';\nimport { classNames } from '#utils/UNSAFE_classNames';\nimport { type TextProps, textInterpolations } from '#utils/UNSAFE_interpolations/text';\nimport { mergeInterpolations } from '#utils/UNSAFE_mergeInterpolations';\nimport { selectMobileFieldInputStyles } from './themes/SelectMobileFieldInputStyles.css';\n\ntype AriaProps = Pick<\n UnpackSignals<JSX.AriaAttributes>,\n | 'aria-controls'\n | 'aria-describedby'\n | 'aria-expanded'\n | 'aria-invalid'\n | 'aria-label'\n | 'aria-labelledby'\n>;\n\ntype EventProps = Pick<UnpackSignals<JSX.IntrinsicElements['div']>, 'onBlur' | 'onFocus'>;\n\ntype Props = AriaProps &\n EventProps &\n TextProps & {\n displayValue?: string;\n hasEmptyLabel?: boolean;\n hasInsideLabel?: boolean;\n isRequired?: boolean;\n placeholder?: string;\n variant?: ContextType<typeof FormVariantContext>;\n };\n\nconst interpolations = [...Object.values(textInterpolations)];\nconst styleInterpolations = mergeInterpolations<Props>(interpolations);\n\n/**\n * This component is used for rendering the main field in mobile phones. This is a bit different from the\n * normal main field (TextFieldInput) that we use for desktop & tablet devices in the way that\n * a user will not be able to edit the value of this field. But, one can still have other functionalities\n * of having a placeholder, tab in & out of it, and other such functionalities of an enabled field.\n *\n * This also differs from ReadonlyTextFieldInput in the following ways:\n * 1. This will be rendered as div as well, but has a role of combobox set on it\n * 2. This will not be read as readonly input by the screen readers\n * 3. This has the stylings much similar to the TextFieldInput component\n * 4. This supports the use of placeholder and shows it when there is no value present\n * 5. This supports having the variant property and styles accordingly\n *\n * As such, this is very similar to the TextFieldInput except that this does not allow user input.\n * Note: we cannot use TextFieldInput with readonly set on it; even though it might provide us the\n * behavior we need, it will make the field as readonly and screen readers read the same about this\n * field. This will be an incorrect representation contextually as one can still edit the value by opening\n * the dropdown and changing the selection.\n */\nexport const SelectMobileFieldInput = forwardRef(\n (\n {\n 'aria-controls': ariaControls,\n 'aria-describedby': ariaDescribedBy,\n 'aria-expanded': ariaExpanded,\n 'aria-invalid': ariaInvalid,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n displayValue,\n hasEmptyLabel,\n hasInsideLabel = false,\n isRequired,\n onBlur,\n onFocus,\n placeholder,\n textAlign,\n variant = 'default'\n }: Props,\n ref?: Ref<HTMLDivElement>\n ) => {\n // consume required contexts\n const { isDisabled, isFocused, hasValue = false } = useFormFieldContext();\n const { isTabbable, tabbableModeProps } = useTabbableMode();\n\n // setup properties\n const myPlaceholder = isInputPlaceholderShown(hasInsideLabel, hasValue, isFocused)\n ? placeholder\n : undefined;\n\n // Add unsafe API for specifying an external label which is added to ariaLabelledBy on the input,\n // only when labelEdge is 'none' and label is ''. Since ariaLabelledBy takes precedence over all other\n // kinds of labels, this helps to ensure we don't override a meaningful label.\n const { UNSAFE_ariaLabelledBy } = useAccessibleContext();\n const mergedAriaLabelledBy = hasEmptyLabel\n ? merge([ariaLabelledBy, UNSAFE_ariaLabelledBy])\n : ariaLabelledBy;\n\n // setup style classes\n const { class: styleInterpolationClasses } = styleInterpolations({ textAlign });\n const { classes: themeClasses } = useComponentTheme<TextFieldInputVariantOptions>(\n TextFieldInputRedwoodTheme,\n {\n type: 'notPassword',\n styleVariant: isEmbeddedVariant(variant) ? 'embedded' : 'default',\n textarea: 'notTextArea',\n input: 'isInput',\n prefix: 'noPrefix',\n suffix: 'noSuffix',\n startContent: 'noStartContent',\n endContent: 'hasEndContent',\n insideLabel: hasInsideLabel ? 'hasInsideLabel' : 'noInsideLabel',\n value: hasValue ? 'hasValue' : 'noValue',\n focused: isFocused ? 'isFocused' : 'notFocused',\n disabled: isDisabled ? 'isDisabled' : 'notDisabled'\n }\n );\n const rootDivStyleClasses = classNames([\n selectMobileFieldInputStyles.base,\n styleInterpolationClasses,\n themeClasses,\n // JET-72775 - Form control alignment in tables\n // When we are in legacy collection components, we want to inherit the text align\n // when it is not set explicitly.\n variant === 'legacyEmbedded' && textAlign === undefined && formControlInheritTextAlign\n ]);\n\n return (\n <div\n aria-autocomplete=\"list\"\n aria-controls={ariaControls}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-invalid={ariaInvalid}\n aria-label={ariaLabel}\n aria-labelledby={mergedAriaLabelledBy}\n aria-required={isRequired ? 'true' : undefined}\n class={rootDivStyleClasses}\n onBlur={onBlur}\n onFocus={onFocus}\n ref={ref}\n role=\"combobox\"\n {...(isTabbable && tabbableModeProps)}>\n <div class={selectMobileFieldInputStyles.content}>\n <Text variant={displayValue ? 'inherit' : 'secondary'}>\n {displayValue || myPlaceholder}\n </Text>\n </div>\n </div>\n );\n }\n);\n"],"names":["_jsx","_jsxs","merge"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAM,iBAAiB,GAAG,cAAc,CAAC;AACzC;AACA,MAAM,eAAe,GAAiC,EAAE,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;AACpF,MAAM,qBAAqB,GAAiC;AAC1D,IAAA,mBAAmB,EAAE,IAAI;AACzB,IAAA,gBAAgB,EAAE,GAAG;CACtB,CAAC;AACF,MAAM,sBAAsB,GAAkC;AAC5D,IAAA,QAAQ,EAAE,KAAK;CAChB,CAAC;AAEF;SACgB,QAAQ,CAAC,EACvB,SAAS,EACT,QAAQ,EACR,WAAW,EACX,EAAE,EACF,MAAM,EACN,aAAa,EACb,UAAU,EACJ,EAAA;IACN,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAA6B,iBAAiB,CAAC,CAAC;IAC1F,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;AAErD,IAAA,IAAI,UAAU,KAAK,MAAM,EAAE;;;;QAIzB,IAAI,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ACpD,KAAA,CACF,CAAC;IACF,MAAM,mBAAmB,GAAG,UAAU,CAAC;AACrC,QAAA,4BAA4B,CAAC,IAAI;QACjC,yBAAyB;QACzB,YAAY;;;;AAIZ,QAAA,OAAO,KAAK,gBAAgB,IAAI,SAAS,KAAK,SAAS,IAAI,2BAA2B;AACvF,KAAA,CAAC,CAAC;AAEH,IAAA,QACEF,GACoB,CAAA,KAAA,EAAA,EAAA,mBAAA,EAAA,MAAM,EACT,eAAA,EAAA,YAAY,sBACT,eAAe,EAAA,eAAA,EAClB,YAAY,EAAA,cAAA,EACb,WAAW,EACb,YAAA,EAAA,SAAS,qBACJ,oBAAoB,EAAA,eAAA,EACtB,UAAU,GAAG,MAAM,GAAG,SAAS,EAC9C,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,UAAU,EACX,IAAC,UAAU,IAAI,iBAAiB,CAAC,EAAA,QAAA,EACrCA,aAAK,KAAK,EAAE,4BAA4B,CAAC,OAAO,YAC9CA,GAAC,CAAA,IAAI,EAAC,EAAA,OAAO,EAAE,YAAY,GAAG,SAAS,GAAG,WAAW,EAAA,QAAA,EAClD,YAAY,IAAI,aAAa,GACzB,EACH,CAAA,EAAA,CACF,EACN;AACJ,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"SelectMobileFieldInput-345c4d45.js","sources":["../../src/PRIVATE_SelectCommon/Dropdown.tsx","../../src/PRIVATE_SelectCommon/DropdownUserAssistance.tsx","../../src/PRIVATE_SelectCommon/LinkItem.tsx","../../src/PRIVATE_SelectCommon/MobileDropdown.tsx","../../src/PRIVATE_SelectCommon/SelectMobileDropdown.tsx","../../src/PRIVATE_SelectCommon/SelectMobileFieldInput.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { ComponentChildren, ComponentProps } from 'preact';\nimport { MutableRef, useCallback, useState } from 'preact/hooks';\nimport { Floating, PositionData } from '../UNSAFE_Floating';\nimport { Layer } from '../UNSAFE_Layer';\nimport { isControlOrFunctionKey, KEYS } from '../utils/PRIVATE_keyboardUtils';\nimport { preventDefaultForCurrentTarget } from './eventUtils';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n//Once Dropdown is consumed this will be removed\nimport { useOutsideMousedown } from '../hooks/PRIVATE_useOutsideMousedown';\n\ntype FloatingProps = ComponentProps<typeof Floating>;\n\ntype Props = {\n anchorRef: MutableRef<HTMLElement | null>;\n children?: ComponentChildren;\n dropdownRef: MutableRef<HTMLElement | null>;\n id?: string;\n isOpen?: boolean;\n onAutoDismiss?: (event?: Event) => void;\n onPosition?: FloatingProps['onPosition'];\n};\n\nconst DEFAULT_PLACEMENT = 'bottom-start';\n// TODO: get dropdown y (mainAxis) offset from --oj-c-PRIVATE-DO-NOT-USE-private-core-global-dropdown-offset\nconst DROPDOWN_OFFSET: FloatingProps['offsetValue'] = { mainAxis: 4, crossAxis: 0 };\nconst DROPDOWN_SIZE_OPTIONS: FloatingProps['sizeOptions'] = {\n isMaxHeightAdjusted: true,\n maxHeightCeiling: 400\n};\nconst DROPDOWN_SHIFT_OPTIONS: FloatingProps['shiftOptions'] = {\n mainAxis: false\n};\n\n//TODO: Start consuming PRIVATE_Dropdown. JET-62565\nexport function Dropdown({\n anchorRef,\n children,\n dropdownRef,\n id,\n isOpen,\n onAutoDismiss,\n onPosition\n}: Props) {\n const [placement, setPlacement] = useState<FloatingProps['placement']>(DEFAULT_PLACEMENT);\n const [prevIsOpen, setPrevIsOpen] = useState(isOpen);\n\n if (prevIsOpen !== isOpen) {\n // reset the placement to the default when the dropdown closes, not opens, so that it doesn't\n // initially open in the previous position and then move to the default position on the\n // rerender after the state is updated\n if (!isOpen) {\n setPlacement(DEFAULT_PLACEMENT);\n }\n setPrevIsOpen(isOpen);\n }\n\n const handlePosition = useCallback(\n (positionData: PositionData) => {\n // update the placement so that the dropdown stays where it is until there is a collision,\n // i.e. it no longer fits, instead of letting it try to move back to the default position\n // on every render\n setPlacement(positionData.placement);\n\n // call the callback that was passed in through props\n onPosition?.(positionData);\n },\n [onPosition, setPlacement]\n );\n\n const handleAutoDismiss = useCallback(\n (event: Event) => {\n onAutoDismiss?.(event);\n },\n [onAutoDismiss]\n );\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n if (event.defaultPrevented || isControlOrFunctionKey(event)) {\n return;\n }\n\n switch (event.code) {\n case KEYS.ESC:\n case KEYS.TAB:\n handleAutoDismiss(event);\n break;\n }\n },\n [handleAutoDismiss]\n );\n\n // use the mousedown event to be consistent with legacy JET and so that we're hiding the dropdown\n // on the same event where focus will transfer\n useOutsideMousedown({\n isDisabled: !isOpen,\n ref: [anchorRef, dropdownRef],\n handler: handleAutoDismiss\n });\n\n const inlineStyle = isOpen\n ? {\n minWidth: `${anchorRef.current?.offsetWidth}px`\n }\n : {};\n\n return !isOpen ? null : (\n <Layer logicalParentRef={anchorRef}>\n <Floating\n anchorRef={anchorRef}\n sizeOptions={DROPDOWN_SIZE_OPTIONS}\n shiftOptions={DROPDOWN_SHIFT_OPTIONS}\n ref={dropdownRef}\n placement={placement}\n offsetValue={DROPDOWN_OFFSET}\n onPosition={handlePosition}>\n <div\n class={dropdownStyles.base}\n id={id}\n style={inlineStyle}\n onKeyDown={handleKeyDown}\n onMouseDown={preventDefaultForCurrentTarget}>\n {children}\n </div>\n </Floating>\n </Layer>\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 { ComponentProps } from 'preact';\nimport { useCallback } from 'preact/hooks';\nimport { FormFieldContext } from '../hooks/UNSAFE_useFormFieldContext';\nimport { InlineUserAssistance } from '../UNSAFE_UserAssistance';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype InlineUserAssistanceProps = Pick<\n ComponentProps<typeof InlineUserAssistance>,\n | 'assistiveText'\n | 'fieldLabel'\n | 'helpSourceLink'\n | 'helpSourceText'\n | 'id'\n | 'userAssistanceDensity'\n>;\n\nexport function DropdownUserAssistance(props: InlineUserAssistanceProps) {\n // Prevent the focus from transferring when the user clicks on an empty/non-clickable area\n // of the user assistance\n const handleMouseDown = useCallback((event: MouseEvent) => {\n // Don't call preventDefault when the user clicks on the help source link, so that the\n // focus is allowed to transfer in that case.\n if ((event.target as Element)?.tagName !== 'A') {\n event.preventDefault();\n }\n }, []);\n\n return (\n <FormFieldContext.Provider value={{ isFocused: true }}>\n <div class={dropdownStyles.userAssistance} onMouseDown={handleMouseDown}>\n <InlineUserAssistance {...props} />\n </div>\n </FormFieldContext.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 { useCallback } from 'preact/hooks';\nimport { Link } from '#UNSAFE_Link';\nimport { useFocusWithin } from '#hooks/UNSAFE_useFocusWithin';\nimport { useHover } from '#hooks/UNSAFE_useHover';\nimport { classNames } from '#utils/UNSAFE_classNames';\nimport { dropdownStyles } from './themes/dropdownStyles.css';\n\ntype Props = {\n /**\n * Child content of the item.\n */\n children: string;\n /**\n * Specifies whether to highlight the item.\n */\n isHighlighted?: boolean;\n /**\n * Callback invoked when the user triggers the link, for example by clicking or pressing Enter.\n */\n onAction?: () => void;\n};\n\n/**\n * This component renders a link that looks like a list item in a Select* component dropdown.\n * It fires an action when the user triggers it, and is intended to be used for launching\n * external application UI from within the dropdown, for example to provide advanced search or\n * add to list functionality.\n * The LinkItem would typically be shown in a fixed position above or below the list itself.\n */\nconst LinkItem = ({ children, isHighlighted, onAction }: Props) => {\n const { isHover, hoverProps } = useHover();\n const { isFocused, focusProps } = useFocusWithin();\n\n const handleClick = useCallback(\n (e: Event) => {\n // prevent the link from actually navigating by preventing default and returning false\n e.preventDefault();\n onAction?.();\n return false;\n },\n [onAction]\n );\n\n const rootClasses = classNames([\n dropdownStyles.results.linkItemRoot,\n isFocused ? dropdownStyles.results.linkItemFocus : undefined\n ]);\n\n const linkClasses = classNames([\n dropdownStyles.results.extraItem,\n isHover || isFocused || isHighlighted ? dropdownStyles.results.linkItemHighlight : undefined\n ]);\n\n return (\n <div class={rootClasses} {...focusProps}>\n <Link href=\"#\" onClick={handleClick}>\n <div class={linkClasses} {...hoverProps}>\n {children}\n </div>\n </Link>\n </div>\n );\n};\n\nexport { LinkItem };\n","import type { ComponentChildren, JSX } from 'preact';\nimport { Flex } from '../UNSAFE_Flex';\nimport { Layer } from '../UNSAFE_Layer';\nimport { WindowOverlay } from '../UNSAFE_WindowOverlay';\nimport type { UnpackSignals } from '@oracle/oraclejet-internal-utilities/attributeUtils';\nimport { mobileDropdownStyles } from './themes/mobileDropdownStyles.css';\n\ntype Props = {\n /**\n * Id of the label to associate with the dropdown (e.g. the label of the filter field).\n */\n 'aria-labelledby'?: UnpackSignals<JSX.AriaAttributes>['aria-labelledby'];\n\n /**\n * The dropdown content\n */\n children?: ComponentChildren;\n\n /**\n * The id for the top level element\n */\n id?: string;\n\n /**\n * Specifies whether the dropdown is being shown\n */\n isOpen?: boolean;\n};\n\nexport function MobileDropdown({ 'aria-labelledby': ariaLabelledBy, children, id, isOpen }: Props) {\n return !isOpen ? null : (\n <Layer>\n <WindowOverlay>\n <div\n id={id}\n class={mobileDropdownStyles.base}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={ariaLabelledBy}>\n <Flex width=\"100%\" height=\"100%\" maxHeight=\"100%\" direction=\"column\">\n {children}\n </Flex>\n </div>\n </WindowOverlay>\n </Layer>\n );\n}\n","import { ComponentChildren, ComponentProps } from 'preact';\nimport { Separator } from '../UNSAFE_Separator';\nimport { MobileDropdown } from './MobileDropdown';\nimport { selectMobileDropdownStyles } from './themes/selectMobileDropdownStyles.css';\n\ntype MobileDropdownProps = ComponentProps<typeof MobileDropdown>;\ntype PassThroughMobileDropdownProps = Pick<MobileDropdownProps, 'id' | 'isOpen'>;\n\ntype Props = PassThroughMobileDropdownProps & {\n /**\n * The main dropdown content\n */\n children?: ComponentChildren;\n\n /**\n * The components to be placed in the end of the dropdown\n */\n footer?: ComponentChildren;\n\n /**\n * The components to be placed in the beginning of the dropdown\n */\n header?: ComponentChildren;\n\n /**\n * Specifies whether to have a separator between header and content\n */\n hasHeaderSeparator?: boolean;\n\n /**\n * Id of the label for the filter field.\n */\n labelId?: string;\n};\n\nexport function SelectMobileDropdown({\n children,\n footer,\n hasHeaderSeparator = true,\n header,\n id,\n isOpen,\n labelId\n}: Props) {\n return (\n <MobileDropdown id={id} isOpen={isOpen} aria-labelledby={labelId}>\n {header}\n {hasHeaderSeparator && <Separator />}\n {/* TODO: Add overflow support to View and use it here */}\n {/* */}\n <div class={selectMobileDropdownStyles.content}>{children}</div>\n <Separator />\n {footer}\n </MobileDropdown>\n );\n}\n","import type { ContextType, Ref, JSX } from 'preact';\nimport { forwardRef } from 'preact/compat';\n\nimport type { UnpackSignals } from '@oracle/oraclejet-internal-utilities/attributeUtils';\nimport { merge } from '@oracle/oraclejet-internal-utilities/stringUtils';\n\nimport { Text } from '#UNSAFE_Text';\nimport { isInputPlaceholderShown } from '#UNSAFE_TextField/TextFieldUtils';\nimport { formControlInheritTextAlign } from '#UNSAFE_TextField/themes/FormControlUtilsStyles.css';\nimport type { TextFieldInputVariantOptions } from '#UNSAFE_TextField/themes/TextFieldInputStyles.css';\nimport { TextFieldInputRedwoodTheme } from '#UNSAFE_TextField/themes/redwood/TextFieldInputTheme';\nimport { useAccessibleContext } from '#hooks/UNSAFE_useAccessibleContext';\nimport { useComponentTheme } from '#hooks/UNSAFE_useComponentTheme';\nimport { useFormFieldContext } from '#hooks/UNSAFE_useFormFieldContext';\nimport { FormVariantContext } from '#hooks/UNSAFE_useFormVariantContext';\nimport { useTabbableMode } from '#hooks/UNSAFE_useTabbableMode';\nimport { isEmbeddedVariant } from '#utils/PRIVATE_formControlUtils';\nimport { classNames } from '#utils/UNSAFE_classNames';\nimport { type TextProps, textInterpolations } from '#utils/UNSAFE_interpolations/text';\nimport { mergeInterpolations } from '#utils/UNSAFE_mergeInterpolations';\nimport { selectMobileFieldInputStyles } from './themes/SelectMobileFieldInputStyles.css';\n\ntype AriaProps = Pick<\n UnpackSignals<JSX.AriaAttributes>,\n | 'aria-controls'\n | 'aria-describedby'\n | 'aria-expanded'\n | 'aria-invalid'\n | 'aria-label'\n | 'aria-labelledby'\n>;\n\ntype EventProps = Pick<UnpackSignals<JSX.IntrinsicElements['div']>, 'onBlur' | 'onFocus'>;\n\ntype Props = AriaProps &\n EventProps &\n TextProps & {\n displayValue?: string;\n hasEmptyLabel?: boolean;\n hasInsideLabel?: boolean;\n isRequired?: boolean;\n placeholder?: string;\n variant?: ContextType<typeof FormVariantContext>;\n };\n\nconst interpolations = [...Object.values(textInterpolations)];\nconst styleInterpolations = mergeInterpolations<Props>(interpolations);\n\n/**\n * This component is used for rendering the main field in mobile phones. This is a bit different from the\n * normal main field (TextFieldInput) that we use for desktop & tablet devices in the way that\n * a user will not be able to edit the value of this field. But, one can still have other functionalities\n * of having a placeholder, tab in & out of it, and other such functionalities of an enabled field.\n *\n * This also differs from ReadonlyTextFieldInput in the following ways:\n * 1. This will be rendered as div as well, but has a role of combobox set on it\n * 2. This will not be read as readonly input by the screen readers\n * 3. This has the stylings much similar to the TextFieldInput component\n * 4. This supports the use of placeholder and shows it when there is no value present\n * 5. This supports having the variant property and styles accordingly\n *\n * As such, this is very similar to the TextFieldInput except that this does not allow user input.\n * Note: we cannot use TextFieldInput with readonly set on it; even though it might provide us the\n * behavior we need, it will make the field as readonly and screen readers read the same about this\n * field. This will be an incorrect representation contextually as one can still edit the value by opening\n * the dropdown and changing the selection.\n */\nexport const SelectMobileFieldInput = forwardRef(\n (\n {\n 'aria-controls': ariaControls,\n 'aria-describedby': ariaDescribedBy,\n 'aria-expanded': ariaExpanded,\n 'aria-invalid': ariaInvalid,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n displayValue,\n hasEmptyLabel,\n hasInsideLabel = false,\n isRequired,\n onBlur,\n onFocus,\n placeholder,\n textAlign,\n variant = 'default'\n }: Props,\n ref?: Ref<HTMLDivElement>\n ) => {\n // consume required contexts\n const { isDisabled, isFocused, hasValue = false } = useFormFieldContext();\n const { isTabbable, tabbableModeProps } = useTabbableMode();\n\n // setup properties\n const myPlaceholder = isInputPlaceholderShown(hasInsideLabel, hasValue, isFocused)\n ? placeholder\n : undefined;\n\n // Add unsafe API for specifying an external label which is added to ariaLabelledBy on the input,\n // only when labelEdge is 'none' and label is ''. Since ariaLabelledBy takes precedence over all other\n // kinds of labels, this helps to ensure we don't override a meaningful label.\n const { UNSAFE_ariaLabelledBy } = useAccessibleContext();\n const mergedAriaLabelledBy = hasEmptyLabel\n ? merge([ariaLabelledBy, UNSAFE_ariaLabelledBy])\n : ariaLabelledBy;\n\n // setup style classes\n const { class: styleInterpolationClasses } = styleInterpolations({ textAlign });\n const { classes: themeClasses } = useComponentTheme<TextFieldInputVariantOptions>(\n TextFieldInputRedwoodTheme,\n {\n type: 'notPassword',\n styleVariant: isEmbeddedVariant(variant) ? 'embedded' : 'default',\n textarea: 'notTextArea',\n input: 'isInput',\n prefix: 'noPrefix',\n suffix: 'noSuffix',\n startContent: 'noStartContent',\n endContent: 'hasEndContent',\n insideLabel: hasInsideLabel ? 'hasInsideLabel' : 'noInsideLabel',\n value: hasValue ? 'hasValue' : 'noValue',\n focused: isFocused ? 'isFocused' : 'notFocused',\n disabled: isDisabled ? 'isDisabled' : 'notDisabled'\n }\n );\n const rootDivStyleClasses = classNames([\n selectMobileFieldInputStyles.base,\n styleInterpolationClasses,\n themeClasses,\n // JET-72775 - Form control alignment in tables\n // When we are in legacy collection components, we want to inherit the text align\n // when it is not set explicitly.\n variant === 'legacyEmbedded' && textAlign === undefined && formControlInheritTextAlign\n ]);\n\n return (\n <div\n aria-autocomplete=\"list\"\n aria-controls={ariaControls}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-invalid={ariaInvalid}\n aria-label={ariaLabel}\n aria-labelledby={mergedAriaLabelledBy}\n aria-required={isRequired ? 'true' : undefined}\n class={rootDivStyleClasses}\n onBlur={onBlur}\n onFocus={onFocus}\n ref={ref}\n role=\"combobox\"\n {...(isTabbable && tabbableModeProps)}>\n <div class={selectMobileFieldInputStyles.content}>\n <Text variant={displayValue ? 'inherit' : 'secondary'}>\n {displayValue || myPlaceholder}\n </Text>\n </div>\n </div>\n );\n }\n);\n"],"names":["_jsx","_jsxs","merge"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAM,iBAAiB,GAAG,cAAc,CAAC;AACzC;AACA,MAAM,eAAe,GAAiC,EAAE,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;AACpF,MAAM,qBAAqB,GAAiC;AAC1D,IAAA,mBAAmB,EAAE,IAAI;AACzB,IAAA,gBAAgB,EAAE,GAAG;CACtB,CAAC;AACF,MAAM,sBAAsB,GAAkC;AAC5D,IAAA,QAAQ,EAAE,KAAK;CAChB,CAAC;AAEF;SACgB,QAAQ,CAAC,EACvB,SAAS,EACT,QAAQ,EACR,WAAW,EACX,EAAE,EACF,MAAM,EACN,aAAa,EACb,UAAU,EACJ,EAAA;IACN,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAA6B,iBAAiB,CAAC,CAAC;IAC1F,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;AAErD,IAAA,IAAI,UAAU,KAAK,M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U,GAAG,YAAY,GAAG,aAAa;AACpD,KAAA,CACF,CAAC;IACF,MAAM,mBAAmB,GAAG,UAAU,CAAC;AACrC,QAAA,4BAA4B,CAAC,IAAI;QACjC,yBAAyB;QACzB,YAAY;;;;AAIZ,QAAA,OAAO,KAAK,gBAAgB,IAAI,SAAS,KAAK,SAAS,IAAI,2BAA2B;AACvF,KAAA,CAAC,CAAC;AAEH,IAAA,QACEF,GACoB,CAAA,KAAA,EAAA,EAAA,mBAAA,EAAA,MAAM,EACT,eAAA,EAAA,YAAY,sBACT,eAAe,EAAA,eAAA,EAClB,YAAY,EAAA,cAAA,EACb,WAAW,EACb,YAAA,EAAA,SAAS,qBACJ,oBAAoB,EAAA,eAAA,EACtB,UAAU,GAAG,MAAM,GAAG,SAAS,EAC9C,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,UAAU,EACX,IAAC,UAAU,IAAI,iBAAiB,CAAC,EAAA,QAAA,EACrCA,aAAK,KAAK,EAAE,4BAA4B,CAAC,OAAO,YAC9CA,GAAC,CAAA,IAAI,EAAC,EAAA,OAAO,EAAE,YAAY,GAAG,SAAS,GAAG,WAAW,EAAA,QAAA,EAClD,YAAY,IAAI,aAAa,GACzB,EACH,CAAA,EAAA,CACF,EACN;AACJ,CAAC;;;;"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* @oracle/oraclejet-preact: undefined */
|
|
2
2
|
import { jsx } from 'preact/jsx-runtime';
|
|
3
3
|
import { multiVariantStyles } from './PRIVATE_StyledDatePickerButton/themes/StyledDatePickerButtonStyles.css.js';
|
|
4
|
-
import { styles } from './UNSAFE_BaseButton/themes/BaseButtonStyles.css.js';
|
|
5
4
|
import { c as classNames } from './classNames-4e12b00d.js';
|
|
6
5
|
import { forwardRef } from 'preact/compat';
|
|
7
6
|
|
|
@@ -24,14 +23,9 @@ const StyledDatePickerButton = forwardRef(({ isActivable = false, isReadonly = f
|
|
|
24
23
|
today: isToday ? 'isToday' : 'notToday',
|
|
25
24
|
variant
|
|
26
25
|
});
|
|
27
|
-
const classes = classNames([
|
|
28
|
-
styles.base,
|
|
29
|
-
styles.sizes.sm,
|
|
30
|
-
styles.styled,
|
|
31
|
-
variantClasses
|
|
32
|
-
]);
|
|
26
|
+
const classes = classNames([variantClasses]);
|
|
33
27
|
return (jsx("span", { role: !isReadonly ? 'button' : undefined, class: classes, ref: ref, tabIndex: tabIndex, ...props, children: label }));
|
|
34
28
|
});
|
|
35
29
|
|
|
36
30
|
export { StyledDatePickerButton as S };
|
|
37
|
-
//# sourceMappingURL=StyledDatePickerButton-
|
|
31
|
+
//# sourceMappingURL=StyledDatePickerButton-78f2f6e8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StyledDatePickerButton-78f2f6e8.js","sources":["../../src/PRIVATE_StyledDatePickerButton/StyledDatePickerButton.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * Licensed under The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { multiVariantStyles } from './themes/StyledDatePickerButtonStyles.css';\nimport { classNames } from '../utils/UNSAFE_classNames';\nimport { forwardRef } from 'preact/compat';\nimport type { Ref, JSX } from 'preact';\nimport type { UnpackSignals } from '@oracle/oraclejet-internal-utilities/attributeUtils';\n\ntype IntrinsicProps = Pick<UnpackSignals<JSX.HTMLAttributes<HTMLElement>>, 'onClick' | 'onKeyDown'>;\n\ntype AriaProps = {\n 'aria-label'?: UnpackSignals<JSX.AriaAttributes>['aria-label'];\n 'aria-disabled'?: UnpackSignals<JSX.AriaAttributes>['aria-disabled'];\n};\n\ntype Props = IntrinsicProps &\n AriaProps & {\n /**\n * Specifies that the button appears activated when the user activates the StyledDatePickerButton.\n * When true, adds the :active selector to the button so that it can show active styling.\n * Combine this property with the other properties to get the styling you want.\n */\n isActivable?: boolean;\n /**\n * Specifies the styling of the button to look dimmed.\n * Combine this property with the other properties to get the styling you want.\n */\n isDimmed?: boolean;\n /**\n * Specifies the styling of the button to look hidden, that is, visibility: hidden.\n */\n isHidden?: boolean;\n /**\n * Specifies that the button appears hovered when the user hovers over the StyledDatePickerButton.\n * When true, adds the :hover selector to the button so that it can show hover styling.\n * Combine this property with the other properties to get the styling you want.\n */\n isHoverable?: boolean;\n /**\n * Specifies the styling of the button to look like a day that is adjacent to the current month.\n * Combine this property with the other properties to get the styling you want.\n */\n isAdjacentMonth?: boolean;\n /**\n * Specifies the role of the day cell to be 'button' when isReadonly is false, or no role when isReadonly is true.\n * This helps the screenreader.\n */\n isReadonly?: boolean;\n /**\n * Specifies the styling of the button to look like it is restricted.\n * Combine this property with the other properties to get the styling you want.\n */\n isRestricted?: boolean;\n /**\n * Specifies the styling of the button to look like it is selected.\n * Combine this property with the other properties to get the styling you want.\n */\n isSelected?: boolean;\n /**\n * Specifies the styling of the button to look like it is today.\n * Combine this property with the other properties to get the styling you want.\n */\n isToday?: boolean;\n /**\n * Specifies the label of the day button. This will be the day of the month.\n */\n label: string;\n /**\n * Specifies the tabIndex.\n */\n tabIndex?: 0 | -1;\n /**\n * Specifies the visual variant for the StyledDatePickerButton.\n */\n variant?: 'day' | 'month' | 'year';\n };\n\n/**\n * StyledDatePickerButton is a controlled component that displays a stylized span for a button that goes into a DatePicker.\n */\nconst StyledDatePickerButton = forwardRef(\n (\n {\n isActivable = false,\n isReadonly = false,\n isAdjacentMonth = false,\n isDimmed = false,\n isHidden = false,\n isHoverable = false,\n isRestricted = false,\n isSelected = false,\n isToday = false,\n tabIndex,\n label,\n variant,\n ...props\n }: Props,\n ref: Ref<HTMLSpanElement> = null\n ) => {\n // The multiVariantStyles function is defined in StyledDatePickerButtonStyles.css.ts,\n // using the recipe utility provided by @vanilla-extract/recipes.\n // This function is used to merge the base styles, variants, and compound variants\n // into a single set of styles for components based on the component's properties.\n const variantClasses = multiVariantStyles({\n active: isActivable ? 'isActivable' : 'notActiveable',\n dimmed: isDimmed ? 'isDimmed' : 'notDimmed',\n hidden: isHidden ? 'isHidden' : 'notHidden',\n hover: isHoverable ? 'isHoverable' : 'notHoverable',\n adjacentMonth: isAdjacentMonth ? 'isAdjacentMonth' : 'notAdjacentMonth',\n restricted: isRestricted ? 'isRestricted' : 'notRestricted',\n selected: isSelected ? 'isSelected' : 'notSelected',\n today: isToday ? 'isToday' : 'notToday',\n variant\n });\n\n const classes = classNames([variantClasses]);\n return (\n <span\n role={!isReadonly ? 'button' : undefined}\n class={classes}\n ref={ref}\n tabIndex={tabIndex}\n {...props}>\n {label}\n </span>\n );\n }\n);\n\nexport { StyledDatePickerButton };\n"],"names":["_jsx"],"mappings":";;;;;;AAmFA;;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,CAAC,cAAc,CAAC,CAAC,CAAC;AAC7C,IAAA,QACEA,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;;;;"}
|
|
@@ -8,6 +8,23 @@
|
|
|
8
8
|
width: var(--oj-c-base-button-sizes-sm-height);
|
|
9
9
|
font-weight: var(--oj-c-body-md-font-weight-regular);
|
|
10
10
|
font-size: var(--oj-c-body-md-font-size);
|
|
11
|
+
cursor: var(--oj-c-cursor-clickable);
|
|
12
|
+
border-style: solid;
|
|
13
|
+
border-width: 1px;
|
|
14
|
+
overflow-x: hidden;
|
|
15
|
+
overflow-y: hidden;
|
|
16
|
+
text-overflow: ellipsis;
|
|
17
|
+
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
border-radius: var(--oj-c-base-button-border-radius);
|
|
20
|
+
height: var(--oj-c-base-button-sizes-sm-height);
|
|
21
|
+
min-width: var(--oj-c-base-button-sizes-sm-height);
|
|
22
|
+
}
|
|
23
|
+
.StyledDatePickerButtonStyles_baseStyle__38ano0:focus-visible {
|
|
24
|
+
outline-style: dotted;
|
|
25
|
+
outline-offset: 1px;
|
|
26
|
+
outline-width: 1px;
|
|
27
|
+
outline-color: var(--oj-c-border-keyboard-focus);
|
|
11
28
|
}
|
|
12
29
|
.StyledDatePickerButtonStyles_multiVariantStyles_hidden_isHidden__38ano7 {
|
|
13
30
|
visibility: hidden;
|
|
@@ -37,6 +37,8 @@ import './CollectionInteractionContext-7cf19abc.js';
|
|
|
37
37
|
import './dropdownStyles.styles.css';
|
|
38
38
|
import './Sheet-f9f8a4a4.js';
|
|
39
39
|
import './OverflowTabBarItemStyles.styles.css';
|
|
40
|
+
import './StyledCheckbox-d6c8f557.js';
|
|
41
|
+
import './SelectorStyles.styles.css';
|
|
40
42
|
import { styles } from './UNSAFE_TabBar/themes/TabBarStyles.css.js';
|
|
41
43
|
import { u as useTabBar } from './useTabBar-c5558e77.js';
|
|
42
44
|
import { T as TabBarContextMenu } from './TabBarContextMenu-c3326d67.js';
|
|
@@ -66,4 +68,4 @@ const TabBar = forwardRef(({ children, layout = 'stretch', display = 'standard',
|
|
|
66
68
|
});
|
|
67
69
|
|
|
68
70
|
export { TabBar as T };
|
|
69
|
-
//# sourceMappingURL=TabBar-
|
|
71
|
+
//# sourceMappingURL=TabBar-67ca442c.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabBar-
|
|
1
|
+
{"version":3,"file":"TabBar-67ca442c.js","sources":["../../src/UNSAFE_TabBar/TabBar.tsx"],"sourcesContent":["import type { ComponentChildren, Ref, RefObject } from 'preact';\nimport { HiddenAccessible } from '../UNSAFE_HiddenAccessible';\nimport { LiveRegion } from '../UNSAFE_LiveRegion';\nimport { TabBarContext, TabBarLayout, TabBarContextMenuConfig } from '../UNSAFE_TabBarCommon';\nimport { styles } from './themes/TabBarStyles.css';\nimport { TestIdProps } from '../hooks/UNSAFE_useTestId';\nimport { useTabBar } from '../hooks/PRIVATE_useTabBar';\nimport { forwardRef } from 'preact/compat';\nimport { TabBarContextMenu } from './TabBarContextMenu';\nexport {\n TabBarItem,\n RemovableTabBarItem,\n OverflowTabBarItem,\n TabBarContext,\n useTabBarContext,\n TabBarLayout,\n useProgressiveTruncation,\n TabBarLinkItem\n} from '../UNSAFE_TabBarCommon';\n\n/**\n * type for payload of current key change event handler\n */\nexport type CurrentKeyDetail<K> = {\n value: K;\n};\n\n/**\n * type for payload of selection change event handler\n */\ntype SelectionDetail<K> = {\n value: K;\n};\n\n/**\n * type for payload of remove event handler\n */\ntype RemoveDetail<K> = {\n value: K;\n};\n\ntype DisplayProps =\n | {\n /**\n * Controls the content layout of the TabBarItem: 'standard' lays out the contents horizontally,\n *'icons' hides the label,\n */\n display?: 'standard' | 'icons';\n /**\n * The size indicates how tall the TabBarItem is rendered.\n * Note: It is not possible to specify 'size' when 'display=\"stacked\".\n */\n size?: 'md' | 'lg';\n }\n | {\n /**\n *'stacked' stacks the icon on top of the label.\n * Note: It is not possible to specify 'size' when 'display=\"stacked\".\n */\n display?: 'stacked';\n size?: 'never';\n };\n\nexport type TabBarProps<K extends string | number> = DisplayProps & {\n /**\n * A set of TabBarItem(s) that TabBar will hold\n */\n children: ComponentChildren;\n /**\n * Whether to stretch the tab bar items to occupy available space or to condense items\n */\n layout?: 'stretch' | 'condense';\n /**\n * The position of the TabBar. Valid Values: top and bottom.\n * 'top' is used when TabBar is placed on top of content section and the selection\n * indicator would be placed below the TabBarItem.\n * 'bottom' is used when TabBar is placed on bottom of content section and the selection\n * indicator would be placed above the TabBarItem.\n */\n edge?: 'top' | 'bottom';\n /**\n * Key of the selected item.\n */\n selection?: K;\n /**\n * Callback function to handle when user selects a tab.\n * The callback is also invoked when a user selects a tab that is already selected.\n */\n onSelect?: <K extends string | number>(detail: SelectionDetail<K>) => void;\n /**\n * Callback function to handle remove\n */\n onRemove?: <K extends string | number>(detail: RemoveDetail<K>) => void;\n /**\n * Accepts the ID of an element that provides instructions for interaction with the TabBar.\n */\n 'aria-describedby'?: string;\n /**\n * An aria-label which defines a string value that labels this TabBar.\n * Either aria-label or aria-labelledby should be specified in order to make TabBar accessible.\n */\n 'aria-label'?: string;\n\n /**\n * An aria-labelledby which identifies the element(s) that labels this TabBar.\n * Either aria-label or aria-labelledby should be specified in order to make TabBar accessible.\n */\n 'aria-labelledby'?: string;\n\n /**\n * Configuration used to specify a context menu.\n */\n contextMenuConfig?: TabBarContextMenuConfig<K>;\n};\n/**\n * A tab bar allows navigation between different content sections.\n */\nexport const TabBar = forwardRef(\n <K extends string | number>(\n {\n children,\n layout = 'stretch',\n display = 'standard',\n size = 'md',\n edge = 'top',\n selection,\n onSelect,\n onRemove,\n 'aria-describedby': ariaDescribedBy,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n contextMenuConfig\n }: TabBarProps<K> & TestIdProps,\n ref?: Ref<HTMLDivElement>\n ) => {\n const rootRef = ref as RefObject<HTMLDivElement>;\n\n const {\n rootProps,\n tabBarContext,\n menuProps,\n contextMenuContext,\n contextMenuDescription,\n contextMenuDescriptionId,\n accStatusInfo\n } = useTabBar({\n class: styles.tabBarBase,\n edge: edge,\n onRemove,\n onSelect,\n ref: rootRef,\n selection,\n size,\n children,\n contextMenuConfig\n });\n\n const isContextMenuAvailable = contextMenuConfig != null;\n\n return (\n <>\n <TabBarContext.Provider value={tabBarContext}>\n <div\n {...rootProps}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n aria-haspopup={contextMenuConfig != null ? true : false}\n aria-describedby={\n isContextMenuAvailable && contextMenuDescriptionId\n ? ariaDescribedBy\n ? `${ariaDescribedBy} ${contextMenuDescriptionId}`\n : contextMenuDescriptionId\n : ariaDescribedBy\n }>\n <TabBarLayout layout={layout} display={display}>\n {children}\n </TabBarLayout>\n </div>\n </TabBarContext.Provider>\n {isContextMenuAvailable && contextMenuDescriptionId && (\n <span id={contextMenuDescriptionId}>\n <HiddenAccessible>{contextMenuDescription}</HiddenAccessible>\n </span>\n )}\n {isContextMenuAvailable && accStatusInfo && <LiveRegion>{accStatusInfo}</LiveRegion>}\n {isContextMenuAvailable && (\n <TabBarContextMenu\n {...menuProps}\n contextMenuConfig={contextMenuConfig}\n contextMenuContext={contextMenuContext!}\n />\n )}\n </>\n );\n }\n);\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA;;AAEG;M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,MAAM,EAAE,OAAO,EAAE,OAAO,EAC3C,QAAA,EAAA,QAAQ,EACI,CAAA,EAAA,CACX,EACiB,CAAA,EACxB,sBAAsB,IAAI,wBAAwB,KACjDA,GAAM,CAAA,MAAA,EAAA,EAAA,EAAE,EAAE,wBAAwB,EAChC,QAAA,EAAAA,GAAA,CAAC,gBAAgB,EAAE,EAAA,QAAA,EAAA,sBAAsB,EAAoB,CAAA,EAAA,CACxD,CACR,EACA,sBAAsB,IAAI,aAAa,IAAIA,GAAC,CAAA,UAAU,EAAE,EAAA,QAAA,EAAA,aAAa,EAAc,CAAA,EACnF,sBAAsB,KACrBA,GAAC,CAAA,iBAAiB,EACZ,EAAA,GAAA,SAAS,EACb,iBAAiB,EAAE,iBAAiB,EACpC,kBAAkB,EAAE,kBAAmB,EAAA,CACvC,CACH,CAAA,EAAA,CACA,EACH;AACJ,CAAC;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* @oracle/oraclejet-preact: undefined */
|
|
2
2
|
import { jsx } from 'preact/jsx-runtime';
|
|
3
|
-
import { B as BaseTabBarItem } from './OverflowTabBarItem-
|
|
3
|
+
import { B as BaseTabBarItem } from './OverflowTabBarItem-aa0ce915.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* TabBarLinkItem is used to render links in a TabBar. It allows to view the browser's built in link context menu to open the link in new browser tab.
|
|
@@ -10,4 +10,4 @@ function TabBarLinkItem({ itemKey, icon, badge, metadata, severity, labelMaxWidt
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export { TabBarLinkItem as T };
|
|
13
|
-
//# sourceMappingURL=TabBarLinkItem-
|
|
13
|
+
//# sourceMappingURL=TabBarLinkItem-e7be54fa.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabBarLinkItem-
|
|
1
|
+
{"version":3,"file":"TabBarLinkItem-e7be54fa.js","sources":["../../src/UNSAFE_TabBarCommon/TabBarLinkItem.tsx"],"sourcesContent":["import { BaseTabBarItem, BaseTabBarItemProps } from './BaseTabBarItem';\n\ntype Link = {\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 /**\n * Label of the TabBarLinkItem. For truncated labels this is the content\n * for tooltip text of the Tab.\n */\n label: string;\n};\nexport type TabBarLinkItemProps<K extends string | number> = Link &\n Pick<\n BaseTabBarItemProps<K>,\n 'itemKey' | 'icon' | 'badge' | 'metadata' | 'severity' | 'aria-controls' | 'labelMaxWidth'\n >;\n/**\n * TabBarLinkItem is used to render links in a TabBar. It allows to view the browser's built in link context menu to open the link in new browser tab.\n */\nexport function TabBarLinkItem<K extends string | number>({\n itemKey,\n icon,\n badge,\n metadata,\n severity,\n labelMaxWidth,\n href,\n label,\n 'aria-controls': ariaControls\n}: TabBarLinkItemProps<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 href={href}></BaseTabBarItem>\n );\n}\n"],"names":["_jsx"],"mappings":";;;;AAkBA;;AAEG;AACG,SAAU,cAAc,CAA4B,EACxD,OAAO,EACP,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,IAAI,EACJ,KAAK,EACL,eAAe,EAAE,YAAY,EACN,EAAA;AACvB,IAAA,QACEA,GAAC,CAAA,cAAc,EACE,EAAA,eAAA,EAAA,YAAY,EAC3B,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,EAC5B,IAAI,EAAE,IAAI,EAAA,CAAmB,EAC/B;AACJ;;;;"}
|