@oracle/oraclejet-preact 20.0.3 → 20.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/amd/{BarChart-f429b382.js → BarChart-994cb8f0.js} +2 -2
  2. package/amd/{BarChart-f429b382.js.map → BarChart-994cb8f0.js.map} +1 -1
  3. package/amd/BaseCardView-16fda4c3.js +2 -0
  4. package/amd/{BaseCardView-b8119561.js.map → BaseCardView-16fda4c3.js.map} +1 -1
  5. package/amd/CardFlexView-d3eb7373.js +2 -0
  6. package/amd/{CardFlexView-aa2f3de8.js.map → CardFlexView-d3eb7373.js.map} +1 -1
  7. package/amd/CardGridView-842f70cd.js +2 -0
  8. package/amd/{CardGridView-85f90c75.js.map → CardGridView-842f70cd.js.map} +1 -1
  9. package/amd/{Chart-57965de4.js → Chart-d9eafc7a.js} +2 -2
  10. package/amd/{Chart-57965de4.js.map → Chart-d9eafc7a.js.map} +1 -1
  11. package/amd/CheckboxSetContext-2e486ea8.js +2 -0
  12. package/amd/CheckboxSetContext-2e486ea8.js.map +1 -0
  13. package/amd/{ComboChart-c42ed049.js → ComboChart-5a6f6c8a.js} +2 -2
  14. package/amd/{ComboChart-c42ed049.js.map → ComboChart-5a6f6c8a.js.map} +1 -1
  15. package/amd/{LineAreaChart-48efb7f7.js → LineAreaChart-47fc17d2.js} +2 -2
  16. package/amd/{LineAreaChart-48efb7f7.js.map → LineAreaChart-47fc17d2.js.map} +1 -1
  17. package/amd/ListView-02a92d18.js +2 -0
  18. package/amd/{ListView-2678b2af.js.map → ListView-02a92d18.js.map} +1 -1
  19. package/amd/NavigationListItem-9df5446c.js +2 -0
  20. package/amd/NavigationListItem-9df5446c.js.map +1 -0
  21. package/amd/NavigationListLinkItem-161049bb.js +2 -0
  22. package/amd/NavigationListLinkItem-161049bb.js.map +1 -0
  23. package/amd/{OverflowTabBar-f8bf9356.js → OverflowTabBar-5ff68da7.js} +2 -2
  24. package/amd/{OverflowTabBar-f8bf9356.js.map → OverflowTabBar-5ff68da7.js.map} +1 -1
  25. package/amd/OverflowTabBarItem-926b0c8a.js +2 -0
  26. package/amd/{OverflowTabBarItem-0aa39512.js.map → OverflowTabBarItem-926b0c8a.js.map} +1 -1
  27. package/amd/PRIVATE_BaseCardView.js +1 -1
  28. package/amd/PRIVATE_Chart.js +1 -1
  29. package/amd/PRIVATE_TableList.js +1 -1
  30. package/amd/RemovableNavigationListItem-e298c5de.js +2 -0
  31. package/amd/{RemovableNavigationListItem-60593d4c.js.map → RemovableNavigationListItem-e298c5de.js.map} +1 -1
  32. package/amd/ReorderableTabBar-0c69bfd4.js +2 -0
  33. package/amd/{ReorderableTabBar-19a503c7.js.map → ReorderableTabBar-0c69bfd4.js.map} +1 -1
  34. package/amd/{ScatterChart-6427e7ec.js → ScatterChart-7bd0f601.js} +2 -2
  35. package/amd/{ScatterChart-6427e7ec.js.map → ScatterChart-7bd0f601.js.map} +1 -1
  36. package/amd/TabBar-de723fbc.js +2 -0
  37. package/amd/{TabBar-92bac52f.js.map → TabBar-de723fbc.js.map} +1 -1
  38. package/amd/TabBarMixed-cfd346bf.js +2 -0
  39. package/amd/{TabBarMixed-5b5a5047.js.map → TabBarMixed-cfd346bf.js.map} +1 -1
  40. package/amd/TextArea-4a3b8b56.js +2 -0
  41. package/amd/TextArea-4a3b8b56.js.map +1 -0
  42. package/amd/TextAreaAutosize-3a13ebb2.js +2 -0
  43. package/amd/{TextAreaAutosize-01dfd98e.js.map → TextAreaAutosize-3a13ebb2.js.map} +1 -1
  44. package/amd/Theme-redwood/theme.css +181 -181
  45. package/amd/Theme-stable/theme.css +182 -182
  46. package/amd/UNSAFE_BarChart/__test__/BarChart.spec.js +1 -1
  47. package/amd/UNSAFE_BarChart.js +1 -1
  48. package/amd/UNSAFE_CardFlexView.js +1 -1
  49. package/amd/UNSAFE_CardGridView.js +1 -1
  50. package/amd/UNSAFE_CheckboxItem.js +1 -1
  51. package/amd/UNSAFE_CheckboxItem.js.map +1 -1
  52. package/amd/UNSAFE_CheckboxSet.js +1 -1
  53. package/amd/UNSAFE_CheckboxSet.js.map +1 -1
  54. package/amd/UNSAFE_ComboChart.js +1 -1
  55. package/amd/UNSAFE_LineAreaChart.js +1 -1
  56. package/amd/UNSAFE_ListView.js +1 -1
  57. package/amd/UNSAFE_NavigationList.js +1 -1
  58. package/amd/UNSAFE_NavigationListCommon.js +1 -1
  59. package/amd/UNSAFE_OverflowTabBar.js +1 -1
  60. package/amd/UNSAFE_ReorderableTabBar.js +1 -1
  61. package/amd/UNSAFE_RichCheckboxSet.js +1 -1
  62. package/amd/UNSAFE_RichCheckboxSet.js.map +1 -1
  63. package/amd/UNSAFE_RichSelectionItem.js +1 -1
  64. package/amd/UNSAFE_RichSelectionItem.js.map +1 -1
  65. package/amd/UNSAFE_ScatterChart.js +1 -1
  66. package/amd/UNSAFE_TabBar.js +1 -1
  67. package/amd/UNSAFE_TabBarCommon.js +1 -1
  68. package/amd/UNSAFE_TabBarMixed.js +1 -1
  69. package/amd/UNSAFE_TextArea.js +1 -1
  70. package/amd/UNSAFE_TextAreaAutosize.js +1 -1
  71. package/amd/useTextAreaAltEnter-32272da6.js +2 -0
  72. package/amd/useTextAreaAltEnter-32272da6.js.map +1 -0
  73. package/cjs/{NavigationList-d0d74565.js → NavigationListItem-3b9eb0fb.js} +8 -21
  74. package/cjs/NavigationListItem-3b9eb0fb.js.map +1 -0
  75. package/cjs/{NavigationListLinkItem-317a5200.js → NavigationListLinkItem-62c3912e.js} +99 -8
  76. package/cjs/NavigationListLinkItem-62c3912e.js.map +1 -0
  77. package/cjs/{OverflowTabBarItem-19ad4971.js → OverflowTabBarItem-abcd2327.js} +4 -6
  78. package/cjs/{OverflowTabBarItem-19ad4971.js.map → OverflowTabBarItem-abcd2327.js.map} +1 -1
  79. package/cjs/{TabBar-d84e222e.js → TabBar-4bc753a9.js} +1 -7
  80. package/{es/TabBar-67ca442c.js.map → cjs/TabBar-4bc753a9.js.map} +1 -1
  81. package/cjs/{TabBarLinkItem-e924f83b.js → TabBarLinkItem-b0c4b100.js} +2 -2
  82. package/cjs/{TabBarLinkItem-e924f83b.js.map → TabBarLinkItem-b0c4b100.js.map} +1 -1
  83. package/cjs/Theme-redwood/theme.css +130 -130
  84. package/cjs/Theme-stable/theme.css +220 -220
  85. package/cjs/UNSAFE_NavigationList.js +15 -17
  86. package/cjs/UNSAFE_NavigationList.js.map +1 -1
  87. package/cjs/UNSAFE_NavigationListCommon.js +13 -14
  88. package/cjs/UNSAFE_NavigationListCommon.js.map +1 -1
  89. package/cjs/UNSAFE_OverflowTabBar.js +59 -62
  90. package/cjs/UNSAFE_OverflowTabBar.js.map +1 -1
  91. package/cjs/UNSAFE_ReorderableTabBar.js +19 -32
  92. package/cjs/UNSAFE_ReorderableTabBar.js.map +1 -1
  93. package/cjs/UNSAFE_TabBar.js +60 -63
  94. package/cjs/UNSAFE_TabBar.js.map +1 -1
  95. package/cjs/UNSAFE_TabBarCommon.js +75 -78
  96. package/cjs/UNSAFE_TabBarCommon.js.map +1 -1
  97. package/cjs/UNSAFE_TabBarMixed.js +33 -36
  98. package/cjs/UNSAFE_TabBarMixed.js.map +1 -1
  99. package/es/{BaseCardView-b3d8bae0.js → BaseCardView-85b9a71e.js} +1 -4
  100. package/es/{BaseCardView-b3d8bae0.js.map → BaseCardView-85b9a71e.js.map} +1 -1
  101. package/es/ButtonLayoutVariants.styles.css +2 -2
  102. package/es/ButtonLayoutVariants.styles2.css +2 -2
  103. package/es/CheckboxSetContext-1be56556.js +9 -0
  104. package/es/CheckboxSetContext-1be56556.js.map +1 -0
  105. package/es/{ColorPicker-ae648c4c.js → ColorPicker-fa103067.js} +2 -2
  106. package/es/{ColorPicker-ae648c4c.js.map → ColorPicker-fa103067.js.map} +1 -1
  107. package/es/PRIVATE_BaseCardView.js +1 -1
  108. package/es/PRIVATE_CollapsibleNavigationList.js +25 -25
  109. package/es/PRIVATE_TableList.js +4 -4
  110. package/es/SegmentStyles.styles.css +12 -9
  111. package/es/SegmentStyles.styles2.css +9 -12
  112. package/es/{TabBar-67ca442c.js → TabBar-10488830.js} +1 -3
  113. package/{cjs/TabBar-d84e222e.js.map → es/TabBar-10488830.js.map} +1 -1
  114. package/es/Theme-redwood/theme.css +401 -401
  115. package/es/Theme-stable/theme.css +451 -451
  116. package/es/UNSAFE_ButtonLayout/themes/redwood/ButtonLayoutTheme.js +1 -1
  117. package/es/UNSAFE_ButtonLayout/themes/redwood/ButtonLayoutVariants.css.js +1 -1
  118. package/es/UNSAFE_ButtonLayout/themes/stable/ButtonLayoutTheme.js +1 -1
  119. package/es/UNSAFE_ButtonLayout/themes/stable/ButtonLayoutVariants.css.js +1 -1
  120. package/es/UNSAFE_ButtonLayout.js +1 -1
  121. package/es/UNSAFE_CardFlexView.js +1 -1
  122. package/es/UNSAFE_CardGridView.js +1 -1
  123. package/es/UNSAFE_CheckboxItem.js +61 -122
  124. package/es/UNSAFE_CheckboxItem.js.map +1 -1
  125. package/es/UNSAFE_CheckboxSet.js +49 -15
  126. package/es/UNSAFE_CheckboxSet.js.map +1 -1
  127. package/es/UNSAFE_ColorPicker.js +25 -25
  128. package/es/UNSAFE_FlatTreeView.js +14 -14
  129. package/es/UNSAFE_InputColor.js +2 -2
  130. package/es/UNSAFE_InputDateMask/themes/SegmentStyles.css.js +1 -1
  131. package/es/UNSAFE_InputDateMask.js +1 -1
  132. package/es/UNSAFE_InputDatePicker.js +1 -1
  133. package/es/UNSAFE_InputTimeMask/themes/SegmentStyles.css.js +1 -1
  134. package/es/UNSAFE_InputTimeMask.js +1 -1
  135. package/es/UNSAFE_ListView.js +53 -53
  136. package/es/UNSAFE_OverflowTabBar.js +10 -10
  137. package/es/UNSAFE_ReorderableTabBar.js +12 -12
  138. package/es/UNSAFE_RichCheckboxSet.js +42 -46
  139. package/es/UNSAFE_RichCheckboxSet.js.map +1 -1
  140. package/es/UNSAFE_RichSelectionItem.js +89 -152
  141. package/es/UNSAFE_RichSelectionItem.js.map +1 -1
  142. package/es/UNSAFE_TabBar.js +10 -10
  143. package/es/UNSAFE_TabBarMixed.js +8 -8
  144. package/es/UNSAFE_TextArea.js +226 -106
  145. package/es/UNSAFE_TextArea.js.map +1 -1
  146. package/es/UNSAFE_TextAreaAutosize.js +1 -1
  147. package/es/UNSAFE_Toolbar.js +1 -1
  148. package/es/useTextAreaAltEnter-ac460f4c.js +61 -0
  149. package/es/useTextAreaAltEnter-ac460f4c.js.map +1 -0
  150. package/package.json +2 -2
  151. package/amd/BaseCardView-b8119561.js +0 -2
  152. package/amd/CardFlexView-aa2f3de8.js +0 -2
  153. package/amd/CardGridView-85f90c75.js +0 -2
  154. package/amd/CheckboxSet-f000e5c2.js +0 -2
  155. package/amd/CheckboxSet-f000e5c2.js.map +0 -1
  156. package/amd/ListView-2678b2af.js +0 -2
  157. package/amd/NavigationList-a6bb123d.js +0 -2
  158. package/amd/NavigationList-a6bb123d.js.map +0 -1
  159. package/amd/NavigationListItem-10bf6656.js +0 -2
  160. package/amd/NavigationListItem-10bf6656.js.map +0 -1
  161. package/amd/NavigationListLinkItem-df1826e6.js +0 -2
  162. package/amd/NavigationListLinkItem-df1826e6.js.map +0 -1
  163. package/amd/OverflowTabBarItem-0aa39512.js +0 -2
  164. package/amd/RemovableNavigationListItem-60593d4c.js +0 -2
  165. package/amd/ReorderableTabBar-19a503c7.js +0 -2
  166. package/amd/TabBar-92bac52f.js +0 -2
  167. package/amd/TabBarMixed-5b5a5047.js +0 -2
  168. package/amd/TextArea-345f89d4.js +0 -2
  169. package/amd/TextArea-345f89d4.js.map +0 -1
  170. package/amd/TextAreaAutosize-01dfd98e.js +0 -2
  171. package/amd/useNavigationListItem-582f5564.js +0 -2
  172. package/amd/useNavigationListItem-582f5564.js.map +0 -1
  173. package/cjs/NavigationList-d0d74565.js.map +0 -1
  174. package/cjs/NavigationListItem-b0b03089.js +0 -12
  175. package/cjs/NavigationListItem-b0b03089.js.map +0 -1
  176. package/cjs/NavigationListLinkItem-317a5200.js.map +0 -1
  177. package/cjs/useNavigationListItem-b97e76d5.js +0 -104
  178. package/cjs/useNavigationListItem-b97e76d5.js.map +0 -1
  179. package/es/CheckboxSet-3aab5935.js +0 -51
  180. package/es/CheckboxSet-3aab5935.js.map +0 -1
  181. package/es/TextArea-93ce78a7.js +0 -225
  182. package/es/TextArea-93ce78a7.js.map +0 -1
@@ -1,41 +1,66 @@
1
1
  /* @oracle/oraclejet-preact: undefined */
2
- export { M as MaxLengthCounter, T as TextArea } from './TextArea-93ce78a7.js';
3
- import 'preact/jsx-runtime';
4
- import 'preact/compat';
5
- import './useCurrentValueReducer-bdf796fa.js';
6
- import 'preact/hooks';
7
- import './useFocusableTextField-8fe41cd4.js';
8
- import './useFocusWithin-30b1e2d8.js';
2
+ import { jsx, jsxs, Fragment } from 'preact/jsx-runtime';
3
+ import { forwardRef, useCallback, useRef, useImperativeHandle } from 'preact/compat';
4
+ import { u as useCurrentValueReducer } from './useCurrentValueReducer-bdf796fa.js';
5
+ import { u as useFocusableTextField } from './useFocusableTextField-8fe41cd4.js';
9
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 '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';
10
42
  import 'preact';
11
- import './useFormContext-bb9dc478.js';
12
- import './FormFieldContext-47ca0c20.js';
13
- import './useId-03dbfdf0.js';
14
- import './useLengthFilter-955a0ad5.js';
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 { u as useTextAreaAltEnter, M as MaxLengthCounter } from './useTextAreaAltEnter-ac460f4c.js';
53
+ export { M as MaxLengthCounter } from './useTextAreaAltEnter-ac460f4c.js';
54
+ import './useFocusWithin-30b1e2d8.js';
15
55
  import './lengthFilter-1b2aeddb.js';
16
- import './useSelectableTextField-949184a5.js';
17
- import './useTextField-eb9db737.js';
18
56
  import './stringUtils-0fe25200.js';
19
57
  import './truncationUtils-e37f95ee.js';
20
58
  import './useMessageSeverity-65295e8f.js';
21
59
  import './useFormFieldContextProps-31bbc12f.js';
22
- import './useTranslationBundle-4822502f.js';
23
- import './LayerHost-7931b424.js';
24
- import './index-aec1cc7f.js';
25
- import './UNSAFE_Layer/themes/LayerHostStyles.css.js';
26
- import './LayerHostStyles.styles.css';
27
- import './HiddenAccessible-61197e7c.js';
28
60
  import './HiddenAccessibleStyles.styles.css';
29
- import './Label-5d1ae8d7.js';
30
61
  import './useFormFieldContext-daf7a676.js';
31
62
  import './classNames-4e12b00d.js';
32
63
  import './useComponentTheme-d2f9e47f.js';
33
- import './logger-c92f309c.js';
34
- import './TabbableModeContext-7d8ad946.js';
35
- import './UserAssistanceStyles.styles.css';
36
- import './UNSAFE_UserAssistance/themes/redwood/UserAssistanceBaseTheme.styles.css';
37
- import './UNSAFE_UserAssistance/themes/redwood/UserAssistanceVariants.css.js';
38
- import './vanilla-extract-recipes-createRuntimeFn.esm-2aaf8c98.js';
39
64
  import './Flex-03129963.js';
40
65
  import './useTestId-f24ac480.js';
41
66
  import './boxalignment-8980856d.js';
@@ -62,13 +87,13 @@ import './MessageBannerStyles.styles.css';
62
87
  import './UNSAFE_MessageBanner/themes/redwood/MessageBannerBaseTheme.styles.css';
63
88
  import './UNSAFE_MessageBanner/themes/redwood/MessageBannerVariants.css.js';
64
89
  import './MessageBannerVariants.styles.css';
90
+ import './vanilla-extract-recipes-createRuntimeFn.esm-2aaf8c98.js';
65
91
  import './useTooltip-94af94d4.js';
66
92
  import './useTooltipControlled-f2cfa454.js';
67
93
  import './useHover-85077adb.js';
68
94
  import './useToggle-8b7fcefe.js';
69
95
  import './useFocus-38c95977.js';
70
96
  import './useTouch-4828df25.js';
71
- import './mergeProps-88ea8306.js';
72
97
  import './useAnimation-fe39685e.js';
73
98
  import './useThemeInterpolations-e144e8ec.js';
74
99
  import './useColorScheme-c4f6caab.js';
@@ -79,34 +104,8 @@ import './useDensity-1acb0153.js';
79
104
  import './unsafeDomAccess-453eb74e.js';
80
105
  import './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentTheme.js';
81
106
  import './hooks/UNSAFE_useTooltip/themes/TooltipContentStyles.css.js';
82
- import './TooltipContentStyles.styles.css';
83
107
  import './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentBaseTheme.css.js';
84
- import './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentBaseTheme.styles.css';
85
- import './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css.js';
86
108
  import './TooltipContentVariants.styles.css';
87
- import './tooltipUtils-af0abd38.js';
88
- import './EnvironmentProvider-6a0a8212.js';
89
- import './LayerManager-52a26c55.js';
90
- import './Floating-4a82db94.js';
91
- import './useFloating-b9d680f7.js';
92
- import './useUser-06d34d19.js';
93
- import './positionUtils-f26caad9.js';
94
- import './refUtils-76275c69.js';
95
- import './useOutsideClick-b777a43e.js';
96
- import './Layer-535577b5.js';
97
- import './UNSAFE_Layer/themes/LayerStyles.css.js';
98
- import './LayerStyles.styles.css';
99
- import './useModal-953082f2.js';
100
- import './UNSAFE_Floating/themes/redwood/FloatingTheme.js';
101
- import './UNSAFE_Floating/themes/FloatingStyles.css.js';
102
- import './FloatingStyles.styles.css';
103
- import './UNSAFE_Floating/themes/redwood/FloatingBaseTheme.css.js';
104
- import './UNSAFE_Floating/themes/redwood/FloatingBaseTheme.styles.css';
105
- import './UNSAFE_Floating/themes/redwood/FloatingVariants.css.js';
106
- import './vanilla-extract-dynamic.esm-c909758c.js';
107
- import './UNSAFE_Floating/themes/FloatingContract.css.js';
108
- import './useUnsafeDomElementRef-32290273.js';
109
- import './IconStyle.styles.css';
110
109
  import './clientHints-a42b510c.js';
111
110
  import './IconButton-7f91481c.js';
112
111
  import './BaseButton-41068c85.js';
@@ -143,41 +142,6 @@ import './MessagesContext-76544845.js';
143
142
  import './ComponentMessageStyles.styles.css';
144
143
  import './UNSAFE_ComponentMessage/themes/redwood/ComponentMessageBaseTheme.styles.css';
145
144
  import './UNSAFE_ComponentMessage/themes/redwood/ComponentMessageVariants.css.js';
146
- import './InputGroupContext-20bdbd6e.js';
147
- import './Popup-992b6c27.js';
148
- import './tabbableUtils-c8311ec6.js';
149
- import './head-8f89fe66.js';
150
- import './_arity-be492b9e.js';
151
- import './_isArray-694cc52d.js';
152
- import './_isString-675f1de9.js';
153
- import './FocusTrap-b59d5752.js';
154
- import './FocusTracker-70300f1c.js';
155
- import './PRIVATE_FocusTracker/themes/FocusTrackerStyles.css.js';
156
- import './FocusTrackerStyles.styles.css';
157
- import './Modal-c0f730b8.js';
158
- import './UNSAFE_Modal/themes/ModalStyles.css.js';
159
- import './ModalStyles.styles.css';
160
- import './popupUtils-51366a29.js';
161
- import './WindowOverlay-7264c44a.js';
162
- import './UNSAFE_WindowOverlay/themes/WindowOverlayStyles.css.js';
163
- import './WindowOverlayStyles.styles.css';
164
- import './UNSAFE_WindowOverlay/themes/WindowOverlayContract.css.js';
165
- import './UNSAFE_WindowOverlay/themes/redwood/WindowOverlayTheme.js';
166
- import './UNSAFE_WindowOverlay/themes/redwood/WindowOverlayBaseTheme.css.js';
167
- import './UNSAFE_WindowOverlay/themes/redwood/WindowOverlayBaseTheme.styles.css';
168
- import './UNSAFE_WindowOverlay/themes/redwood/WindowOverlayVariants.css.js';
169
- import './usePopupAnimation-96d2bc83.js';
170
- import './useAnimationStatus-b881f39a.js';
171
- import './popupAnimationUtils-175151d9.js';
172
- import './LiveRegion-cebac18d.js';
173
- import './LiveRegionStyles.styles.css';
174
- import './UNSAFE_Popup/themes/PopupContract.css.js';
175
- import './UNSAFE_Popup/themes/redwood/PopupTheme.js';
176
- import './UNSAFE_Popup/themes/redwood/PopupBaseTheme.css.js';
177
- import './UNSAFE_Popup/themes/redwood/PopupBaseTheme.styles.css';
178
- import './UNSAFE_Popup/themes/redwood/PopupVariants.css.js';
179
- import './PopupStyles.styles.css';
180
- import './colors-03807160.js';
181
145
  import './UNSAFE_Separator/themes/SeparatorStyles.css.js';
182
146
  import './SeparatorStyles.styles.css';
183
147
  import './CompactLabelAssistance-e2fcfcab.js';
@@ -187,24 +151,12 @@ import './UNSAFE_Icon/themes/IconStyle.css.js';
187
151
  import './UNSAFE_UserAssistance/themes/UserAssistanceStyles.css.js';
188
152
  import './UNSAFE_Label/themes/redwood/LabelTheme.js';
189
153
  import './UNSAFE_Label/themes/LabelStyles.css.js';
190
- import './LabelStyles.styles.css';
191
154
  import './UNSAFE_Label/themes/redwood/LabelBaseTheme.css.js';
192
- import './UNSAFE_Label/themes/redwood/LabelBaseTheme.styles.css';
193
- import './UNSAFE_Label/themes/redwood/LabelVariants.css.js';
194
155
  import './UNSAFE_TextField/themes/redwood/TextFieldTheme.js';
195
- import './UNSAFE_TextField/themes/TextFieldStyles.css.js';
196
- import './SkeletonStyles.styles.css';
197
- import './TextFieldLoadingStyles.styles.css';
198
- import './TextFieldStyles.styles.css';
199
156
  import './UNSAFE_TextField/themes/redwood/TextFieldBaseTheme.css.js';
200
- import './UNSAFE_TextField/themes/redwood/TextFieldBaseTheme.styles.css';
201
- import './UNSAFE_TextField/themes/redwood/TextFieldVariants.css.js';
202
157
  import './TextFieldVariants.styles.css';
203
- import './keyboardUtils-986fe923.js';
204
- import './StyledTextField-7605d76a.js';
205
158
  import './useAccessibleContext-5744de8b.js';
206
159
  import './useTextFieldInputHandlers-8122048f.js';
207
- import './formControlUtils-84e2af0e.js';
208
160
  import './textAlign-ad252afa.js';
209
161
  import './text.styles.css';
210
162
  import './TextFieldUtils-8232bca7.js';
@@ -231,21 +183,19 @@ import './UNSAFE_Skeleton/themes/redwood/SkeletonBaseTheme.css.js';
231
183
  import './UNSAFE_Skeleton/themes/redwood/SkeletonBaseTheme.styles.css';
232
184
  import './UNSAFE_Skeleton/themes/redwood/SkeletonVariants.css.js';
233
185
  import './useInputGroupContext-1d19411e.js';
186
+ import './useUser-06d34d19.js';
234
187
  import './UNSAFE_TextField/themes/redwood/ReadonlyTextFieldTheme.js';
235
188
  import './UNSAFE_TextField/themes/ReadonlyTextFieldStyles.css.js';
236
189
  import './ReadonlyTextFieldStyles.styles.css';
237
190
  import './UNSAFE_TextField/themes/redwood/ReadonlyTextFieldVariants.css.js';
238
191
  import './ReadonlyTextFieldVariants.styles.css';
239
- import './ObfuscatedTextFieldInputStyles.styles.css';
240
- import './ReadonlyTextFieldInput-106ce959.js';
241
192
  import './UNSAFE_TextField/themes/redwood/ReadonlyTextFieldInputTheme.js';
242
193
  import './UNSAFE_TextField/themes/ReadonlyTextFieldInputStyles.css.js';
243
194
  import './ReadonlyTextFieldInputStyles.styles.css';
244
195
  import './UNSAFE_TextField/themes/redwood/ReadonlyTextFieldInputVariants.css.js';
245
- import './TextField-7884fcd7.js';
246
- import './MaxLengthLiveRegion-8099fde5.js';
247
196
  import './useDebounce-fa5a80e9.js';
248
- import './InlineUserAssistance-890293dd.js';
197
+ import './LiveRegion-cebac18d.js';
198
+ import './LiveRegionStyles.styles.css';
249
199
  import './ComponentMessageContainer-d16c8b1f.js';
250
200
  import './MessagesManager-47000438.js';
251
201
  import './SuccessS-b5192d40.js';
@@ -262,7 +212,177 @@ import './UNSAFE_ComponentMessage/themes/redwood/ComponentMessageBaseTheme.css.j
262
212
  import './UNSAFE_UserAssistance/themes/redwood/UserAssistanceTheme.js';
263
213
  import './UNSAFE_UserAssistance/themes/redwood/UserAssistanceBaseTheme.css.js';
264
214
  import './InlineHelp-9eaac91c.js';
265
- import './CompactUserAssistance-6aa8894b.js';
266
215
  import './Separator-93c70737.js';
216
+ import './index-aec1cc7f.js';
217
+ import './UNSAFE_Layer/themes/LayerHostStyles.css.js';
218
+ import './LayerHostStyles.styles.css';
219
+ import './EnvironmentProvider-6a0a8212.js';
220
+ import './LayerManager-52a26c55.js';
221
+ import './Floating-4a82db94.js';
222
+ import './useFloating-b9d680f7.js';
223
+ import './positionUtils-f26caad9.js';
224
+ import './refUtils-76275c69.js';
225
+ import './useOutsideClick-b777a43e.js';
226
+ import './Layer-535577b5.js';
227
+ import './UNSAFE_Layer/themes/LayerStyles.css.js';
228
+ import './LayerStyles.styles.css';
229
+ import './useModal-953082f2.js';
230
+ import './UNSAFE_Floating/themes/redwood/FloatingTheme.js';
231
+ import './UNSAFE_Floating/themes/FloatingStyles.css.js';
232
+ import './FloatingStyles.styles.css';
233
+ import './UNSAFE_Floating/themes/redwood/FloatingBaseTheme.css.js';
234
+ import './UNSAFE_Floating/themes/redwood/FloatingBaseTheme.styles.css';
235
+ import './UNSAFE_Floating/themes/redwood/FloatingVariants.css.js';
236
+ import './vanilla-extract-dynamic.esm-c909758c.js';
237
+ import './UNSAFE_Floating/themes/FloatingContract.css.js';
238
+ import './useUnsafeDomElementRef-32290273.js';
239
+ import './tabbableUtils-c8311ec6.js';
240
+ import './head-8f89fe66.js';
241
+ import './_arity-be492b9e.js';
242
+ import './_isArray-694cc52d.js';
243
+ import './_isString-675f1de9.js';
244
+ import './FocusTrap-b59d5752.js';
245
+ import './FocusTracker-70300f1c.js';
246
+ import './PRIVATE_FocusTracker/themes/FocusTrackerStyles.css.js';
247
+ import './FocusTrackerStyles.styles.css';
248
+ import './Modal-c0f730b8.js';
249
+ import './UNSAFE_Modal/themes/ModalStyles.css.js';
250
+ import './ModalStyles.styles.css';
251
+ import './popupUtils-51366a29.js';
252
+ import './WindowOverlay-7264c44a.js';
253
+ import './UNSAFE_WindowOverlay/themes/WindowOverlayStyles.css.js';
254
+ import './WindowOverlayStyles.styles.css';
255
+ import './UNSAFE_WindowOverlay/themes/WindowOverlayContract.css.js';
256
+ import './UNSAFE_WindowOverlay/themes/redwood/WindowOverlayTheme.js';
257
+ import './UNSAFE_WindowOverlay/themes/redwood/WindowOverlayBaseTheme.css.js';
258
+ import './UNSAFE_WindowOverlay/themes/redwood/WindowOverlayBaseTheme.styles.css';
259
+ import './UNSAFE_WindowOverlay/themes/redwood/WindowOverlayVariants.css.js';
260
+ import './usePopupAnimation-96d2bc83.js';
261
+ import './useAnimationStatus-b881f39a.js';
262
+ import './popupAnimationUtils-175151d9.js';
263
+ import './UNSAFE_Popup/themes/PopupContract.css.js';
264
+ import './UNSAFE_Popup/themes/redwood/PopupTheme.js';
265
+ import './UNSAFE_Popup/themes/redwood/PopupBaseTheme.css.js';
266
+ import './PopupStyles.styles.css';
267
+ import './colors-03807160.js';
267
268
  import './MaxLengthCounterStyles.styles.css';
269
+
270
+ /**
271
+ * A text area displays a field that allows a user to enter a multi-line text value.
272
+ */
273
+ 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) => {
274
+ const translations = useTranslationBundle('@oracle/oraclejet-preact');
275
+ const formControl_limitReached = maxLength
276
+ ? translations.formControl_limitReached({
277
+ CHARACTER_LIMIT: maxLength
278
+ })
279
+ : '';
280
+ const { currentCommitValue, dispatch } = useCurrentValueReducer({ value });
281
+ const onInputAndDispatch = useCallback((detail) => {
282
+ // Should dispatch happen first? This will queue up a re-render, ordering should not cause issues (this is async)
283
+ dispatch({ type: 'input', payload: detail.value });
284
+ onInput?.(detail);
285
+ }, [onInput, dispatch]);
286
+ const onCommitAndDispatch = useCallback((detail) => {
287
+ // Should dispatch happen first? This will queue up a re-render, ordering should not cause issues (this is async)
288
+ dispatch({ type: 'commit', payload: detail.value });
289
+ onCommit?.(detail);
290
+ }, [onCommit, dispatch]);
291
+ const { isDisabled: isFormDisabled, isReadonly: isFormReadonly, labelEdge: formLabelEdge, labelStartWidth: formLabelStartWidth, textAlign: formTextAlign, userAssistanceDensity: formUserAssistanceDensity } = useFormContext();
292
+ // default to FormContext values if component properties are not specified
293
+ const isDisabled = propIsDisabled ?? isFormDisabled;
294
+ const isReadonly = propIsReadonly ?? isFormReadonly;
295
+ const labelEdge = propLabelEdge ?? formLabelEdge;
296
+ const labelStartWidth = propLabelStartWidth ?? formLabelStartWidth;
297
+ const textAlign = propTextAlign ?? formTextAlign ?? defaultTextAlignForVariant(variant);
298
+ const userAssistanceDensity = propUserAssistanceDensity ?? formUserAssistanceDensity;
299
+ const maxLengthDescribedByIdRef = useRef(useId());
300
+ // The enabledAriaDescribedBy includes the maxLengthDescribedById in addition to what was passed in to aria-describedby.
301
+ // We don't need to announce the max length message for readonly, as it only applies when editing the value.
302
+ const enabledAriaDescribedBy = ariaDescribedBy
303
+ ? `${ariaDescribedBy} ${maxLengthDescribedByIdRef.current}`
304
+ : maxLengthDescribedByIdRef.current;
305
+ const enabledElementRef = useRef(null);
306
+ const readonlyElementRef = useRef(null);
307
+ // We want to have alt/option+Enter to insert a newline like Enter does.
308
+ const { handleKeyDown } = useTextAreaAltEnter({
309
+ onInput: onInputAndDispatch,
310
+ textAreaRef: enabledElementRef
311
+ });
312
+ const { focusProps, isFocused, methods: focusMethods } = useFocusableTextField({
313
+ isDisabled,
314
+ isReadonly,
315
+ enabledElementRef,
316
+ readonlyElementRef
317
+ });
318
+ const { methods: selectMethods } = useSelectableTextField(enabledElementRef);
319
+ useImperativeHandle(ref, () => mergeProps(focusMethods, selectMethods), [
320
+ focusMethods,
321
+ selectMethods
322
+ ]);
323
+ // Handle length filter for user-typed inputs and controlled inputs
324
+ const { isMaxLengthExceeded, isMaxLengthReached, valueLength, onFilteredInput } = useLengthFilter({
325
+ maxLength,
326
+ maxLengthUnit,
327
+ value,
328
+ onInput: onInputAndDispatch,
329
+ onCommit: onCommitAndDispatch
330
+ });
331
+ const limitMessage = [{ detail: formControl_limitReached, severity: 'info' }];
332
+ const allMessages = [
333
+ ...(messages ?? []),
334
+ ...(isMaxLengthReached ? limitMessage : [])
335
+ ];
336
+ const { formFieldContext, inputProps, labelProps, textFieldProps, userAssistanceProps } = useTextField({
337
+ ariaDescribedBy: isReadonly || isDisabled ? ariaDescribedBy : enabledAriaDescribedBy,
338
+ contentVariant: 'textarea',
339
+ helpSourceLink,
340
+ helpSourceText,
341
+ isDisabled,
342
+ isFocused,
343
+ isReadonly,
344
+ isRequiredShown,
345
+ labelEdge,
346
+ messages: allMessages,
347
+ styleVariant: variant,
348
+ userAssistanceDensity,
349
+ value
350
+ });
351
+ const onClickCounter = useCallback(() => {
352
+ const elm = enabledElementRef.current;
353
+ // for setSelectionRange(), len needs to be a number or null.
354
+ const len = elm ? elm.value.length : null;
355
+ // Since the counter element is after the text, clicking in this
356
+ // should put the selection at the end of the text
357
+ enabledElementRef.current?.setSelectionRange(len, len);
358
+ // Clicking the counter should put the focus on the input field
359
+ enabledElementRef.current?.focus();
360
+ }, [enabledElementRef]);
361
+ const labelComp = labelEdge !== 'none' ? jsx(Label, { ...labelProps, children: label }) : undefined;
362
+ const fieldLabelProps = {
363
+ label: labelEdge !== 'none' ? labelComp : undefined,
364
+ labelEdge: labelEdge !== 'none' ? labelEdge : undefined,
365
+ labelStartWidth: labelEdge !== 'none' ? labelStartWidth : undefined,
366
+ labelText: labelEdge === 'inside' && !isDisabled ? label : undefined
367
+ };
368
+ const ariaLabel = labelEdge === 'none' ? label : undefined;
369
+ const isInlineDensity = userAssistanceDensity === 'efficient' || userAssistanceDensity === 'reflow';
370
+ const inlineUserAssistance = isInlineDensity ? (isDisabled ? (
371
+ // save space for user assistance if density is 'efficient', even though we don't
372
+ // render user assistance for disabled fields
373
+ 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;
374
+ const anchorRef = useRef(null);
375
+ const compactUserAssistance = userAssistanceDensity === 'compact' ? (jsx(CompactUserAssistance, { anchorRef: anchorRef, messages: allMessages, assistiveText: assistiveText, ...userAssistanceProps })) : undefined;
376
+ if (isReadonly) {
377
+ 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 }));
378
+ 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 }) }));
379
+ }
380
+ const hasMaxLength = maxLength !== undefined;
381
+ 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({
382
+ MAX_LENGTH: `${maxLength}`
383
+ }) })), hasMaxLength && isFocused && (jsx(MaxLengthLiveRegion, { isMaxLengthExceeded: isMaxLengthExceeded, maxLength: maxLength, valueLength: valueLength, testId: testId ? testId + '_maxLength' : undefined }))] }));
384
+ 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 }) }));
385
+ });
386
+
387
+ export { TextArea };
268
388
  //# sourceMappingURL=UNSAFE_TextArea.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UNSAFE_TextArea.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"UNSAFE_TextArea.js","sources":["../../src/UNSAFE_TextArea/TextArea.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) %FIRST_YEAR% %CURRENT_YEAR%, Oracle and/or its affiliates.\n * The Universal Permissive License (UPL), Version 1.0\n * as shown at https://oss.oracle.com/licenses/upl/\n * @ignore\n */\n\nimport { ComponentProps, Ref } from 'preact';\nimport { forwardRef, useCallback, useImperativeHandle, useRef } from 'preact/compat';\n\nimport { 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","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0LA;;AAEG;MACU,QAAQ,GAAG,UAAU,CAChC,CACE,EACE,kBAAkB,EAAE,eAAe,EACnC,aAAa,EACb,YAAY,GAAG,KAAK,EACpB,SAAS,GAAG,KAAK,EACjB,UAAU,EACV,cAAc,EACd,cAAc,EACd,UAAU,EAAE,cAAc,EAC1B,UAAU,EAAE,cAAc,EAC1B,UAAU,GAAG,KAAK,EAClB,eAAe,EACf,KAAK,EACL,SAAS,EAAE,aAAa,EACxB,eAAe,EAAE,mBAAmB,EACpC,SAAS,EACT,gBAAgB,GAAG,WAAW,EAC9B,aAAa,EACb,QAAQ,EACR,WAAW,EACX,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,SAAS,EAAE,aAAa,EACxB,qBAAqB,EAAE,yBAAyB,EAChD,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,OAAO,EACP,QAAQ,EACR,MAAM,EACA,EACR,GAA4B,KAC1B;AACF,IAAA,MAAM,YAAY,GAAG,oBAAoB,CAAa,0BAA0B,CAAC,CAAC;IAClF,MAAM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oB,EAAE,oBAAoB,EAC1C,MAAM,EAAE,UAAU,EAAE,UAAU,EAC9B,OAAO,EAAE,UAAU,EAAE,SAAS,EAC9B,YAAY,EAAE,SAAS,EACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EAAA,GACV,cAAc,EAAA,GACd,eAAe,EAAA,CAAc,EACT,CAAA,EAC5B;AACJ,CAAC;;;;"}
@@ -14,7 +14,7 @@ import { u as useTextField } from './useTextField-eb9db737.js';
14
14
  import { u as useTranslationBundle } from './useTranslationBundle-4822502f.js';
15
15
  import { H as HiddenAccessible } from './HiddenAccessible-61197e7c.js';
16
16
  import { L as Label } from './Label-5d1ae8d7.js';
17
- import { u as useTextAreaAltEnter, M as MaxLengthCounter } from './TextArea-93ce78a7.js';
17
+ import { u as useTextAreaAltEnter, M as MaxLengthCounter } from './useTextAreaAltEnter-ac460f4c.js';
18
18
  import './keyboardUtils-986fe923.js';
19
19
  import { R as ReadonlyTextField, T as TextFieldInput } from './StyledTextField-7605d76a.js';
20
20
  import './ObfuscatedTextFieldInputStyles.styles.css';
@@ -22,7 +22,7 @@ import './ButtonLayoutStyles.styles.css';
22
22
  import './UNSAFE_ButtonLayout/themes/redwood/ButtonLayoutBaseTheme.css.js';
23
23
  import './UNSAFE_ButtonLayout/themes/redwood/ButtonLayoutBaseTheme.styles.css';
24
24
  import './UNSAFE_ButtonLayout/themes/redwood/ButtonLayoutVariants.css.js';
25
- import './ButtonLayoutVariants.styles.css';
25
+ import './ButtonLayoutVariants.styles2.css';
26
26
  import './vanilla-extract-recipes-createRuntimeFn.esm-2aaf8c98.js';
27
27
  import './useComponentTheme-d2f9e47f.js';
28
28
  import './logger-c92f309c.js';
@@ -0,0 +1,61 @@
1
+ /* @oracle/oraclejet-preact: undefined */
2
+ import { jsx, jsxs } from 'preact/jsx-runtime';
3
+ import { useCallback, useState, useLayoutEffect } from 'preact/hooks';
4
+ import { c as classNames } from './classNames-4e12b00d.js';
5
+ import { u as usePress } from './usePress-051f5adb.js';
6
+ import './FormFieldContext-47ca0c20.js';
7
+ import { u as useFormFieldContext } from './useFormFieldContext-daf7a676.js';
8
+ import './MaxLengthCounterStyles.styles.css';
9
+
10
+ var hide = 'MaxLengthCounterStyles_hide__7dy9j71';
11
+ var maxLengthCounterBase = 'MaxLengthCounterStyles_maxLengthCounterBase__7dy9j70';
12
+ var spanStyles = 'MaxLengthCounterStyles_spanStyles__7dy9j72';
13
+
14
+ const noop = () => { };
15
+ function MaxLengthCounter({ maxLength, valueLength = 0, onClick }) {
16
+ const { isFocused } = useFormFieldContext();
17
+ // We don't want mousedown on this component to do anything, so prevent the default behavior.
18
+ const killEvent = useCallback((event) => event.preventDefault(), []);
19
+ const textClasses = classNames([!isFocused && hide]);
20
+ const { pressProps } = usePress(onClick ?? noop);
21
+ 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 })] }) }));
22
+ }
23
+
24
+ /**
25
+ * A custom hook to enable an alternate way for entering a new line in the TextArea components using
26
+ * Alt + Enter (or option + return in MacOS). This is particularly useful in scenarios where pressing Enter
27
+ * could mean a different action, like exiting from edit mode in a Table/DataGrid containing a TextArea.
28
+ */
29
+ const useTextAreaAltEnter = ({ onInput, textAreaRef }) => {
30
+ // We want to have alt/option+Enter to insert a newline like Enter does.
31
+ const [selectionStart, setSelectionStart] = useState();
32
+ const handleKeyDown = useCallback((event) => {
33
+ // If we see an alt+enter (or option+return on a Mac), we insert a newline and call onInputAndDispatch
34
+ // since that is what is called any time the input value changes.
35
+ if (event.altKey && event.key === 'Enter') {
36
+ event.preventDefault(); // Prevent default Enter behavior
37
+ const textarea = event.target;
38
+ const { selectionStart: start, selectionEnd: end, value: previousValue } = textarea;
39
+ const newValue = previousValue.substring(0, start) + '\n' + previousValue.substring(end);
40
+ const valueUpdateDetail = {
41
+ previousValue: previousValue,
42
+ value: newValue
43
+ };
44
+ setSelectionStart(start + 1);
45
+ onInput(valueUpdateDetail);
46
+ }
47
+ }, [onInput]);
48
+ useLayoutEffect(() => {
49
+ if (selectionStart) {
50
+ textAreaRef.current?.setSelectionRange(selectionStart, selectionStart);
51
+ // reset to undefined, so the next selectionStart will trigger the useLayoutEffect
52
+ // even if it is the same as the previous selectionStart that was set. This is
53
+ // because we are only setting selectionStart for alt+enter.
54
+ setSelectionStart(undefined);
55
+ }
56
+ }, [selectionStart, textAreaRef]);
57
+ return { handleKeyDown };
58
+ };
59
+
60
+ export { MaxLengthCounter as M, useTextAreaAltEnter as u };
61
+ //# sourceMappingURL=useTextAreaAltEnter-ac460f4c.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTextAreaAltEnter-ac460f4c.js","sources":["../../src/UNSAFE_TextArea/MaxLengthCounter.tsx","../../src/UNSAFE_TextArea/useTextAreaAltEnter.ts"],"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"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;AAaA,MAA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A,MAAM,QAAQ,GAAG,KAAK,CAAC,MAA6B,CAAC;AACrD,YAAA,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,QAAQ,CAAC;AACpF,YAAA,MAAM,QAAQ,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,IAAI,GAAG,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AAEzF,YAAA,MAAM,iBAAiB,GAA8B;AACnD,gBAAA,aAAa,EAAE,aAAa;AAC5B,gBAAA,KAAK,EAAE,QAAQ;aAChB,CAAC;AACF,YAAA,iBAAiB,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YAC7B,OAAO,CAAC,iBAAiB,CAAC,CAAC;SAC5B;AACH,KAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,eAAe,CAAC,MAAK;QACnB,IAAI,cAAc,EAAE;YAClB,WAAW,CAAC,OAAO,EAAE,iBAAiB,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;;;;YAIvE,iBAAiB,CAAC,SAAS,CAAC,CAAC;SAC9B;AACH,KAAC,EAAE,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC,CAAC;IAElC,OAAO,EAAE,aAAa,EAAE,CAAC;AAC3B;;;;"}
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "scripts": {},
6
6
  "devDependencies": {},
7
7
  "dependencies": {
8
- "@oracle/oraclejet-testing": "20.0.3",
8
+ "@oracle/oraclejet-testing": "20.0.4",
9
9
  "csstype": "3.1.1"
10
10
  },
11
11
  "peerDependencies": {
@@ -49,5 +49,5 @@
49
49
  ]
50
50
  }
51
51
  },
52
- "version": "20.0.3"
52
+ "version": "20.0.4"
53
53
  }