@oracle/oraclejet-preact 20.0.6 → 20.0.7
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/{BarChart-ac13883f.js → BarChart-54a0a7e6.js} +2 -2
- package/amd/{BarChart-ac13883f.js.map → BarChart-54a0a7e6.js.map} +1 -1
- package/amd/{Chart-44c6404b.js → Chart-18ff7280.js} +2 -2
- package/amd/{Chart-44c6404b.js.map → Chart-18ff7280.js.map} +1 -1
- package/amd/{ComboChart-71b78e7f.js → ComboChart-bed13144.js} +2 -2
- package/amd/{ComboChart-71b78e7f.js.map → ComboChart-bed13144.js.map} +1 -1
- package/amd/{LineAreaChart-565c2a3c.js → LineAreaChart-39766a4b.js} +2 -2
- package/amd/{LineAreaChart-565c2a3c.js.map → LineAreaChart-39766a4b.js.map} +1 -1
- package/amd/NavigationListItem-672b4363.js +2 -0
- package/amd/{NavigationListItem-e59797c5.js.map → NavigationListItem-672b4363.js.map} +1 -1
- package/amd/{OverflowTabBar-6264d822.js → OverflowTabBar-fd567fb3.js} +2 -2
- package/amd/{OverflowTabBar-6264d822.js.map → OverflowTabBar-fd567fb3.js.map} +1 -1
- package/amd/{OverflowTabBarItem-551bc390.js → OverflowTabBarItem-ca1e2612.js} +2 -2
- package/amd/{OverflowTabBarItem-551bc390.js.map → OverflowTabBarItem-ca1e2612.js.map} +1 -1
- package/amd/PRIVATE_Chart.js +1 -1
- package/amd/{ScatterChart-86dc0c59.js → ScatterChart-568ef9fa.js} +2 -2
- package/amd/{ScatterChart-86dc0c59.js.map → ScatterChart-568ef9fa.js.map} +1 -1
- package/amd/Theme-redwood/theme.css +200 -200
- package/amd/Theme-stable/theme.css +229 -229
- package/amd/UNSAFE_BarChart/__test__/BarChart.spec.js +1 -1
- package/amd/UNSAFE_BarChart.js +1 -1
- package/amd/UNSAFE_ComboChart.js +1 -1
- package/amd/UNSAFE_LineAreaChart.js +1 -1
- package/amd/UNSAFE_NavigationList.js +1 -1
- package/amd/UNSAFE_OverflowTabBar.js +1 -1
- package/amd/UNSAFE_ScatterChart.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/cjs/{ColorPalette-158446ef.js → ColorPalette-975a3476.js} +2 -2
- package/cjs/{ColorPalette-158446ef.js.map → ColorPalette-975a3476.js.map} +1 -1
- package/cjs/{ColorPicker-d36881eb.js → ColorPicker-9608b09c.js} +2 -2
- package/cjs/{ColorPicker-d36881eb.js.map → ColorPicker-9608b09c.js.map} +1 -1
- package/cjs/Theme-redwood/theme.css +201 -201
- package/cjs/Theme-stable/theme.css +233 -233
- package/cjs/UNSAFE_BaseButton/themes/stable/BaseButtonTheme.js +0 -1
- package/cjs/UNSAFE_BaseButton/themes/stable/BaseButtonTheme.js.map +1 -1
- package/cjs/UNSAFE_ColorPalette.js +80 -80
- package/cjs/UNSAFE_ColorPicker.js +77 -77
- package/cjs/UNSAFE_InputColor.js +11 -11
- package/cjs/UNSAFE_TextArea.js +224 -109
- package/cjs/UNSAFE_TextArea.js.map +1 -1
- package/cjs/UNSAFE_TextAreaAutosize.js +3 -3
- package/cjs/UNSAFE_TextAreaAutosize.js.map +1 -1
- package/cjs/useTextAreaAltEnter-11424062.js +64 -0
- package/cjs/useTextAreaAltEnter-11424062.js.map +1 -0
- package/es/{BaseCardView-35315f78.js → BaseCardView-f262a5b4.js} +1 -4
- package/es/{BaseCardView-35315f78.js.map → BaseCardView-f262a5b4.js.map} +1 -1
- package/es/{Chart-74ef9942.js → Chart-b1338ecd.js} +2 -2
- package/es/{Chart-74ef9942.js.map → Chart-b1338ecd.js.map} +1 -1
- package/es/CheckboxSet-87ef81e2.js +51 -0
- package/es/CheckboxSet-87ef81e2.js.map +1 -0
- package/es/ConveyorBeltVariants.styles.css +6 -6
- package/es/ConveyorBeltVariants.styles2.css +6 -6
- package/es/DiagramStyles.styles2.css +16 -10
- package/es/DiagramStyles.styles3.css +10 -16
- package/es/PRIVATE_BaseCardView.js +1 -1
- package/es/PRIVATE_Chart.js +4 -4
- package/es/PRIVATE_CollapsibleNavigationList.js +25 -25
- package/es/PRIVATE_TableList.js +4 -4
- package/es/{TabBar-8672dd9f.js → TabBar-0105b4a0.js} +1 -3
- package/es/{TabBar-8672dd9f.js.map → TabBar-0105b4a0.js.map} +1 -1
- package/es/Theme-redwood/theme.css +540 -545
- package/es/Theme-stable/theme.css +444 -439
- package/es/UNSAFE_BarChart.js +4 -4
- package/es/UNSAFE_CardFlexView.js +1 -1
- package/es/UNSAFE_CardGridView.js +1 -1
- package/es/UNSAFE_CheckboxItem.js +123 -62
- package/es/UNSAFE_CheckboxItem.js.map +1 -1
- package/es/UNSAFE_CheckboxSet.js +15 -49
- package/es/UNSAFE_CheckboxSet.js.map +1 -1
- package/es/UNSAFE_ComboChart.js +4 -4
- package/es/UNSAFE_ContainerDiagram/themes/DiagramStyles.css.js +1 -1
- package/es/UNSAFE_ConveyorBelt/themes/redwood/ConveyorBeltTheme.js +1 -1
- package/es/UNSAFE_ConveyorBelt/themes/redwood/ConveyorBeltVariants.css.js +1 -1
- package/es/UNSAFE_ConveyorBelt/themes/stable/ConveyorBeltTheme.js +1 -1
- package/es/UNSAFE_ConveyorBelt/themes/stable/ConveyorBeltVariants.css.js +1 -1
- package/es/UNSAFE_ConveyorBelt.js +1 -1
- package/es/UNSAFE_Diagram/themes/DiagramStyles.css.js +1 -1
- package/es/UNSAFE_FlatTreeView.js +14 -14
- package/es/UNSAFE_LineAreaChart.js +4 -4
- package/es/UNSAFE_ListView.js +53 -53
- package/es/UNSAFE_OverflowTabBar.js +10 -10
- package/es/UNSAFE_ReorderableTabBar.js +12 -12
- package/es/UNSAFE_RichCheckboxSet.js +46 -42
- package/es/UNSAFE_RichCheckboxSet.js.map +1 -1
- package/es/UNSAFE_RichSelectionItem.js +153 -90
- package/es/UNSAFE_RichSelectionItem.js.map +1 -1
- package/es/UNSAFE_ScatterChart.js +4 -4
- package/es/UNSAFE_Switch/themes/redwood/SwitchBaseTheme.css.js +1 -1
- package/es/UNSAFE_Switch/themes/redwood/SwitchTheme.js +1 -1
- package/es/UNSAFE_Switch/themes/stable/SwitchBaseTheme.css.js +1 -1
- package/es/UNSAFE_Switch/themes/stable/SwitchTheme.js +1 -1
- package/es/UNSAFE_Switch.js +1 -1
- package/es/UNSAFE_TabBar.js +10 -10
- package/es/UNSAFE_TabBarMixed.js +8 -8
- package/es/UNSAFE_TextArea.js +227 -107
- package/es/UNSAFE_TextArea.js.map +1 -1
- package/es/UNSAFE_TextAreaAutosize.js +1 -1
- package/es/useTextAreaAltEnter-ac460f4c.js +61 -0
- package/es/useTextAreaAltEnter-ac460f4c.js.map +1 -0
- package/package.json +2 -2
- package/amd/NavigationListItem-e59797c5.js +0 -2
- package/cjs/TextArea-4d2df019.js +0 -230
- package/cjs/TextArea-4d2df019.js.map +0 -1
- package/es/CheckboxSetContext-1be56556.js +0 -9
- package/es/CheckboxSetContext-1be56556.js.map +0 -1
- package/es/TextArea-1d78b5d8.js +0 -226
- package/es/TextArea-1d78b5d8.js.map +0 -1
- /package/es/UNSAFE_Switch/themes/{redwood → stable}/SwitchBaseTheme.styles.css +0 -0
package/cjs/UNSAFE_TextArea.js
CHANGED
|
@@ -3,44 +3,68 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var
|
|
7
|
-
require('preact/
|
|
8
|
-
require('
|
|
9
|
-
require('./
|
|
10
|
-
require('preact/hooks');
|
|
11
|
-
require('./useFocusableTextField-2c36840d.js');
|
|
12
|
-
require('./useFocusWithin-eb7f956a.js');
|
|
6
|
+
var jsxRuntime = require('preact/jsx-runtime');
|
|
7
|
+
var compat = require('preact/compat');
|
|
8
|
+
var useCurrentValueReducer = require('./useCurrentValueReducer-f37ac024.js');
|
|
9
|
+
var useFocusableTextField = require('./useFocusableTextField-2c36840d.js');
|
|
13
10
|
require('./FormContext-d1d05967.js');
|
|
11
|
+
var useFormContext = require('./useFormContext-a794f7b6.js');
|
|
12
|
+
var FormFieldContext = require('./FormFieldContext-69fe83d2.js');
|
|
13
|
+
require('preact/hooks');
|
|
14
|
+
var useId = require('./useId-6c0eeb27.js');
|
|
15
|
+
var useLengthFilter = require('./useLengthFilter-d860b411.js');
|
|
16
|
+
var useSelectableTextField = require('./useSelectableTextField-892b62db.js');
|
|
17
|
+
var useTextField = require('./useTextField-6ecf97b7.js');
|
|
18
|
+
var useTranslationBundle = require('./useTranslationBundle-12dd087d.js');
|
|
19
|
+
var HiddenAccessible = require('./HiddenAccessible-087eb49a.js');
|
|
20
|
+
var Label = require('./Label-3b08d4f6.js');
|
|
21
|
+
require('./keyboardUtils-b42fe7d5.js');
|
|
22
|
+
var StyledTextField = require('./StyledTextField-1e8fded8.js');
|
|
23
|
+
|
|
24
|
+
var ReadonlyTextFieldInput = require('./ReadonlyTextFieldInput-5ce6b5d2.js');
|
|
25
|
+
var TextField = require('./TextField-8da0a9f4.js');
|
|
26
|
+
var MaxLengthLiveRegion = require('./MaxLengthLiveRegion-0a6ba765.js');
|
|
27
|
+
require('./UNSAFE_TextField/themes/TextFieldStyles.css.js');
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
require('./UNSAFE_TextField/themes/redwood/TextFieldVariants.css.js');
|
|
33
|
+
require('./logger-2c9401cc.js');
|
|
34
|
+
require('./TabbableModeContext-e99d527e.js');
|
|
35
|
+
require('./safeHref-c478be73.js');
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
require('./UNSAFE_UserAssistance/themes/redwood/UserAssistanceVariants.css.js');
|
|
39
|
+
var InlineUserAssistance = require('./InlineUserAssistance-ca15d165.js');
|
|
40
|
+
var CompactUserAssistance = require('./CompactUserAssistance-8672b4d2.js');
|
|
41
|
+
var mergeProps = require('./mergeProps-e3da7237.js');
|
|
42
|
+
require('./LayerHost-3cd73603.js');
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
require('./hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css.js');
|
|
46
|
+
require('./tooltipUtils-08f65b56.js');
|
|
14
47
|
require('preact');
|
|
15
|
-
|
|
16
|
-
require('./
|
|
17
|
-
|
|
18
|
-
|
|
48
|
+
|
|
49
|
+
require('./Popup-d9afc79c.js');
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
require('./UNSAFE_Label/themes/redwood/LabelVariants.css.js');
|
|
53
|
+
require('./InputGroupContext-05f2a46f.js');
|
|
54
|
+
|
|
55
|
+
require('./UNSAFE_Popup/themes/redwood/PopupVariants.css.js');
|
|
56
|
+
var formControlUtils = require('./formControlUtils-596c9dc3.js');
|
|
57
|
+
var useTextAreaAltEnter = require('./useTextAreaAltEnter-11424062.js');
|
|
58
|
+
require('./useFocusWithin-eb7f956a.js');
|
|
19
59
|
require('./lengthFilter-ed66c092.js');
|
|
20
|
-
require('./useSelectableTextField-892b62db.js');
|
|
21
|
-
require('./useTextField-6ecf97b7.js');
|
|
22
60
|
require('./stringUtils-3e19c8af.js');
|
|
23
61
|
require('./truncationUtils-2d44b04b.js');
|
|
24
62
|
require('./useMessageSeverity-cfc4ae9d.js');
|
|
25
63
|
require('./useFormFieldContextProps-0fa67f6c.js');
|
|
26
|
-
require('./useTranslationBundle-12dd087d.js');
|
|
27
|
-
require('./LayerHost-3cd73603.js');
|
|
28
|
-
require('./index-0aa99b92.js');
|
|
29
|
-
require('./UNSAFE_Layer/themes/LayerHostStyles.css.js');
|
|
30
|
-
|
|
31
|
-
require('./HiddenAccessible-087eb49a.js');
|
|
32
64
|
|
|
33
|
-
require('./Label-3b08d4f6.js');
|
|
34
65
|
require('./useFormFieldContext-4632eb73.js');
|
|
35
66
|
require('./classNames-c14c6ef3.js');
|
|
36
67
|
require('./useComponentTheme-181c58a1.js');
|
|
37
|
-
require('./logger-2c9401cc.js');
|
|
38
|
-
require('./TabbableModeContext-e99d527e.js');
|
|
39
|
-
require('./safeHref-c478be73.js');
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
require('./UNSAFE_UserAssistance/themes/redwood/UserAssistanceVariants.css.js');
|
|
43
|
-
require('./vanilla-extract-recipes-createRuntimeFn.esm-d1301b2d.js');
|
|
44
68
|
require('./Flex-3a257bc3.js');
|
|
45
69
|
require('./useTestId-4f53d561.js');
|
|
46
70
|
require('./boxalignment-e287d370.js');
|
|
@@ -67,13 +91,13 @@ require('./_isObject-28636267.js');
|
|
|
67
91
|
|
|
68
92
|
require('./UNSAFE_MessageBanner/themes/redwood/MessageBannerVariants.css.js');
|
|
69
93
|
|
|
94
|
+
require('./vanilla-extract-recipes-createRuntimeFn.esm-d1301b2d.js');
|
|
70
95
|
require('./useTooltip-1a9ae4fb.js');
|
|
71
96
|
require('./useTooltipControlled-eca322a7.js');
|
|
72
97
|
require('./useHover-49b0430d.js');
|
|
73
98
|
require('./useToggle-3ebba7d8.js');
|
|
74
99
|
require('./useFocus-1b288fb9.js');
|
|
75
100
|
require('./useTouch-4dec8729.js');
|
|
76
|
-
require('./mergeProps-e3da7237.js');
|
|
77
101
|
require('./useAnimation-65c0e455.js');
|
|
78
102
|
require('./useThemeInterpolations-a37b37d9.js');
|
|
79
103
|
require('./useColorScheme-f8b1447d.js');
|
|
@@ -84,34 +108,8 @@ require('./useDensity-0b9fd9ca.js');
|
|
|
84
108
|
require('./unsafeDomAccess-c3a492f0.js');
|
|
85
109
|
require('./hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentTheme.js');
|
|
86
110
|
require('./hooks/UNSAFE_useTooltip/themes/TooltipContentStyles.css.js');
|
|
87
|
-
|
|
88
111
|
require('./hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentBaseTheme.css.js');
|
|
89
112
|
|
|
90
|
-
require('./hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css.js');
|
|
91
|
-
|
|
92
|
-
require('./tooltipUtils-08f65b56.js');
|
|
93
|
-
require('./EnvironmentProvider-5f2435e6.js');
|
|
94
|
-
require('./LayerManager-c535d963.js');
|
|
95
|
-
require('./Floating-0af5d7b2.js');
|
|
96
|
-
require('./useFloating-c753a7f9.js');
|
|
97
|
-
require('./useUser-1295b5cb.js');
|
|
98
|
-
require('./positionUtils-a780137e.js');
|
|
99
|
-
require('./refUtils-a9872e75.js');
|
|
100
|
-
require('./useOutsideClick-370ed9cb.js');
|
|
101
|
-
require('./Layer-b60deb1b.js');
|
|
102
|
-
require('./UNSAFE_Layer/themes/LayerStyles.css.js');
|
|
103
|
-
|
|
104
|
-
require('./useModal-0739a528.js');
|
|
105
|
-
require('./UNSAFE_Floating/themes/redwood/FloatingTheme.js');
|
|
106
|
-
require('./UNSAFE_Floating/themes/FloatingStyles.css.js');
|
|
107
|
-
|
|
108
|
-
require('./UNSAFE_Floating/themes/redwood/FloatingBaseTheme.css.js');
|
|
109
|
-
|
|
110
|
-
require('./UNSAFE_Floating/themes/redwood/FloatingVariants.css.js');
|
|
111
|
-
require('./vanilla-extract-dynamic.esm-2e1b7c25.js');
|
|
112
|
-
require('./UNSAFE_Floating/themes/FloatingContract.css.js');
|
|
113
|
-
require('./useUnsafeDomElementRef-f22a2f0c.js');
|
|
114
|
-
|
|
115
113
|
require('./clientHints-c40c5250.js');
|
|
116
114
|
require('./IconButton-d753d39b.js');
|
|
117
115
|
require('./BaseButton-51014bfb.js');
|
|
@@ -148,41 +146,6 @@ require('./MessagesContext-4e939750.js');
|
|
|
148
146
|
|
|
149
147
|
|
|
150
148
|
require('./UNSAFE_ComponentMessage/themes/redwood/ComponentMessageVariants.css.js');
|
|
151
|
-
require('./InputGroupContext-05f2a46f.js');
|
|
152
|
-
require('./Popup-d9afc79c.js');
|
|
153
|
-
require('./tabbableUtils-22a50472.js');
|
|
154
|
-
require('./head-68d0992f.js');
|
|
155
|
-
require('./_arity-c228159c.js');
|
|
156
|
-
require('./_isArray-73160ad5.js');
|
|
157
|
-
require('./_isString-f4443c9e.js');
|
|
158
|
-
require('./FocusTrap-4873a3f2.js');
|
|
159
|
-
require('./FocusTracker-e2ea43c3.js');
|
|
160
|
-
require('./PRIVATE_FocusTracker/themes/FocusTrackerStyles.css.js');
|
|
161
|
-
|
|
162
|
-
require('./Modal-b751b643.js');
|
|
163
|
-
require('./UNSAFE_Modal/themes/ModalStyles.css.js');
|
|
164
|
-
|
|
165
|
-
require('./popupUtils-1d123cbe.js');
|
|
166
|
-
require('./WindowOverlay-c61e4ab1.js');
|
|
167
|
-
require('./UNSAFE_WindowOverlay/themes/WindowOverlayStyles.css.js');
|
|
168
|
-
|
|
169
|
-
require('./UNSAFE_WindowOverlay/themes/WindowOverlayContract.css.js');
|
|
170
|
-
require('./UNSAFE_WindowOverlay/themes/redwood/WindowOverlayTheme.js');
|
|
171
|
-
require('./UNSAFE_WindowOverlay/themes/redwood/WindowOverlayBaseTheme.css.js');
|
|
172
|
-
|
|
173
|
-
require('./UNSAFE_WindowOverlay/themes/redwood/WindowOverlayVariants.css.js');
|
|
174
|
-
require('./usePopupAnimation-f3b34413.js');
|
|
175
|
-
require('./useAnimationStatus-8075dc19.js');
|
|
176
|
-
require('./popupAnimationUtils-dcace427.js');
|
|
177
|
-
require('./LiveRegion-62ce9ac7.js');
|
|
178
|
-
|
|
179
|
-
require('./UNSAFE_Popup/themes/PopupContract.css.js');
|
|
180
|
-
require('./UNSAFE_Popup/themes/redwood/PopupTheme.js');
|
|
181
|
-
require('./UNSAFE_Popup/themes/redwood/PopupBaseTheme.css.js');
|
|
182
|
-
|
|
183
|
-
require('./UNSAFE_Popup/themes/redwood/PopupVariants.css.js');
|
|
184
|
-
|
|
185
|
-
require('./colors-f3ce979a.js');
|
|
186
149
|
require('./UNSAFE_Separator/themes/SeparatorStyles.css.js');
|
|
187
150
|
|
|
188
151
|
require('./CompactLabelAssistance-2274aa4c.js');
|
|
@@ -192,24 +155,12 @@ require('./UNSAFE_Icon/themes/IconStyle.css.js');
|
|
|
192
155
|
require('./UNSAFE_UserAssistance/themes/UserAssistanceStyles.css.js');
|
|
193
156
|
require('./UNSAFE_Label/themes/redwood/LabelTheme.js');
|
|
194
157
|
require('./UNSAFE_Label/themes/LabelStyles.css.js');
|
|
195
|
-
|
|
196
158
|
require('./UNSAFE_Label/themes/redwood/LabelBaseTheme.css.js');
|
|
197
|
-
|
|
198
|
-
require('./UNSAFE_Label/themes/redwood/LabelVariants.css.js');
|
|
199
159
|
require('./UNSAFE_TextField/themes/redwood/TextFieldTheme.js');
|
|
200
|
-
require('./UNSAFE_TextField/themes/TextFieldStyles.css.js');
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
160
|
require('./UNSAFE_TextField/themes/redwood/TextFieldBaseTheme.css.js');
|
|
205
161
|
|
|
206
|
-
require('./UNSAFE_TextField/themes/redwood/TextFieldVariants.css.js');
|
|
207
|
-
|
|
208
|
-
require('./keyboardUtils-b42fe7d5.js');
|
|
209
|
-
require('./StyledTextField-1e8fded8.js');
|
|
210
162
|
require('./useAccessibleContext-c49d8d1b.js');
|
|
211
163
|
require('./useTextFieldInputHandlers-850d395c.js');
|
|
212
|
-
require('./formControlUtils-596c9dc3.js');
|
|
213
164
|
require('./textAlign-f41f49db.js');
|
|
214
165
|
|
|
215
166
|
require('./TextFieldUtils-96baac38.js');
|
|
@@ -236,21 +187,19 @@ require('./UNSAFE_Skeleton/themes/redwood/SkeletonBaseTheme.css.js');
|
|
|
236
187
|
|
|
237
188
|
require('./UNSAFE_Skeleton/themes/redwood/SkeletonVariants.css.js');
|
|
238
189
|
require('./useInputGroupContext-4c10bd57.js');
|
|
190
|
+
require('./useUser-1295b5cb.js');
|
|
239
191
|
require('./UNSAFE_TextField/themes/redwood/ReadonlyTextFieldTheme.js');
|
|
240
192
|
require('./UNSAFE_TextField/themes/ReadonlyTextFieldStyles.css.js');
|
|
241
193
|
|
|
242
194
|
require('./UNSAFE_TextField/themes/redwood/ReadonlyTextFieldVariants.css.js');
|
|
243
195
|
|
|
244
|
-
|
|
245
|
-
require('./ReadonlyTextFieldInput-5ce6b5d2.js');
|
|
246
196
|
require('./UNSAFE_TextField/themes/redwood/ReadonlyTextFieldInputTheme.js');
|
|
247
197
|
require('./UNSAFE_TextField/themes/ReadonlyTextFieldInputStyles.css.js');
|
|
248
198
|
|
|
249
199
|
require('./UNSAFE_TextField/themes/redwood/ReadonlyTextFieldInputVariants.css.js');
|
|
250
|
-
require('./TextField-8da0a9f4.js');
|
|
251
|
-
require('./MaxLengthLiveRegion-0a6ba765.js');
|
|
252
200
|
require('./useDebounce-4304cfbd.js');
|
|
253
|
-
require('./
|
|
201
|
+
require('./LiveRegion-62ce9ac7.js');
|
|
202
|
+
|
|
254
203
|
require('./ComponentMessageContainer-6b294191.js');
|
|
255
204
|
require('./MessagesManager-15a79f13.js');
|
|
256
205
|
require('./SuccessS-25f5a319.js');
|
|
@@ -267,12 +216,178 @@ require('./UNSAFE_ComponentMessage/themes/redwood/ComponentMessageBaseTheme.css.
|
|
|
267
216
|
require('./UNSAFE_UserAssistance/themes/redwood/UserAssistanceTheme.js');
|
|
268
217
|
require('./UNSAFE_UserAssistance/themes/redwood/UserAssistanceBaseTheme.css.js');
|
|
269
218
|
require('./InlineHelp-0bbda3d9.js');
|
|
270
|
-
require('./CompactUserAssistance-8672b4d2.js');
|
|
271
219
|
require('./Separator-85962472.js');
|
|
220
|
+
require('./index-0aa99b92.js');
|
|
221
|
+
require('./UNSAFE_Layer/themes/LayerHostStyles.css.js');
|
|
222
|
+
|
|
223
|
+
require('./EnvironmentProvider-5f2435e6.js');
|
|
224
|
+
require('./LayerManager-c535d963.js');
|
|
225
|
+
require('./Floating-0af5d7b2.js');
|
|
226
|
+
require('./useFloating-c753a7f9.js');
|
|
227
|
+
require('./positionUtils-a780137e.js');
|
|
228
|
+
require('./refUtils-a9872e75.js');
|
|
229
|
+
require('./useOutsideClick-370ed9cb.js');
|
|
230
|
+
require('./Layer-b60deb1b.js');
|
|
231
|
+
require('./UNSAFE_Layer/themes/LayerStyles.css.js');
|
|
232
|
+
|
|
233
|
+
require('./useModal-0739a528.js');
|
|
234
|
+
require('./UNSAFE_Floating/themes/redwood/FloatingTheme.js');
|
|
235
|
+
require('./UNSAFE_Floating/themes/FloatingStyles.css.js');
|
|
236
|
+
|
|
237
|
+
require('./UNSAFE_Floating/themes/redwood/FloatingBaseTheme.css.js');
|
|
238
|
+
|
|
239
|
+
require('./UNSAFE_Floating/themes/redwood/FloatingVariants.css.js');
|
|
240
|
+
require('./vanilla-extract-dynamic.esm-2e1b7c25.js');
|
|
241
|
+
require('./UNSAFE_Floating/themes/FloatingContract.css.js');
|
|
242
|
+
require('./useUnsafeDomElementRef-f22a2f0c.js');
|
|
243
|
+
require('./tabbableUtils-22a50472.js');
|
|
244
|
+
require('./head-68d0992f.js');
|
|
245
|
+
require('./_arity-c228159c.js');
|
|
246
|
+
require('./_isArray-73160ad5.js');
|
|
247
|
+
require('./_isString-f4443c9e.js');
|
|
248
|
+
require('./FocusTrap-4873a3f2.js');
|
|
249
|
+
require('./FocusTracker-e2ea43c3.js');
|
|
250
|
+
require('./PRIVATE_FocusTracker/themes/FocusTrackerStyles.css.js');
|
|
272
251
|
|
|
252
|
+
require('./Modal-b751b643.js');
|
|
253
|
+
require('./UNSAFE_Modal/themes/ModalStyles.css.js');
|
|
273
254
|
|
|
255
|
+
require('./popupUtils-1d123cbe.js');
|
|
256
|
+
require('./WindowOverlay-c61e4ab1.js');
|
|
257
|
+
require('./UNSAFE_WindowOverlay/themes/WindowOverlayStyles.css.js');
|
|
258
|
+
|
|
259
|
+
require('./UNSAFE_WindowOverlay/themes/WindowOverlayContract.css.js');
|
|
260
|
+
require('./UNSAFE_WindowOverlay/themes/redwood/WindowOverlayTheme.js');
|
|
261
|
+
require('./UNSAFE_WindowOverlay/themes/redwood/WindowOverlayBaseTheme.css.js');
|
|
262
|
+
|
|
263
|
+
require('./UNSAFE_WindowOverlay/themes/redwood/WindowOverlayVariants.css.js');
|
|
264
|
+
require('./usePopupAnimation-f3b34413.js');
|
|
265
|
+
require('./useAnimationStatus-8075dc19.js');
|
|
266
|
+
require('./popupAnimationUtils-dcace427.js');
|
|
267
|
+
require('./UNSAFE_Popup/themes/PopupContract.css.js');
|
|
268
|
+
require('./UNSAFE_Popup/themes/redwood/PopupTheme.js');
|
|
269
|
+
require('./UNSAFE_Popup/themes/redwood/PopupBaseTheme.css.js');
|
|
270
|
+
|
|
271
|
+
require('./colors-f3ce979a.js');
|
|
274
272
|
|
|
275
273
|
|
|
276
|
-
|
|
277
|
-
|
|
274
|
+
/**
|
|
275
|
+
* A text area displays a field that allows a user to enter a multi-line text value.
|
|
276
|
+
*/
|
|
277
|
+
const TextArea = compat.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) => {
|
|
278
|
+
const translations = useTranslationBundle.useTranslationBundle('@oracle/oraclejet-preact');
|
|
279
|
+
const formControl_limitReached = maxLength
|
|
280
|
+
? translations.formControl_limitReached({
|
|
281
|
+
CHARACTER_LIMIT: maxLength
|
|
282
|
+
})
|
|
283
|
+
: '';
|
|
284
|
+
const { currentCommitValue, dispatch } = useCurrentValueReducer.useCurrentValueReducer({ value });
|
|
285
|
+
const onInputAndDispatch = compat.useCallback((detail) => {
|
|
286
|
+
// Should dispatch happen first? This will queue up a re-render, ordering should not cause issues (this is async)
|
|
287
|
+
dispatch({ type: 'input', payload: detail.value });
|
|
288
|
+
onInput?.(detail);
|
|
289
|
+
}, [onInput, dispatch]);
|
|
290
|
+
const onCommitAndDispatch = compat.useCallback((detail) => {
|
|
291
|
+
// Should dispatch happen first? This will queue up a re-render, ordering should not cause issues (this is async)
|
|
292
|
+
dispatch({ type: 'commit', payload: detail.value });
|
|
293
|
+
onCommit?.(detail);
|
|
294
|
+
}, [onCommit, dispatch]);
|
|
295
|
+
const { isDisabled: isFormDisabled, isReadonly: isFormReadonly, labelEdge: formLabelEdge, labelStartWidth: formLabelStartWidth, textAlign: formTextAlign, userAssistanceDensity: formUserAssistanceDensity } = useFormContext.useFormContext();
|
|
296
|
+
// default to FormContext values if component properties are not specified
|
|
297
|
+
const isDisabled = propIsDisabled ?? isFormDisabled;
|
|
298
|
+
const isReadonly = propIsReadonly ?? isFormReadonly;
|
|
299
|
+
const labelEdge = propLabelEdge ?? formLabelEdge;
|
|
300
|
+
const labelStartWidth = propLabelStartWidth ?? formLabelStartWidth;
|
|
301
|
+
const textAlign = propTextAlign ?? formTextAlign ?? formControlUtils.defaultTextAlignForVariant(variant);
|
|
302
|
+
const userAssistanceDensity = propUserAssistanceDensity ?? formUserAssistanceDensity;
|
|
303
|
+
const maxLengthDescribedByIdRef = compat.useRef(useId.useId());
|
|
304
|
+
// The enabledAriaDescribedBy includes the maxLengthDescribedById in addition to what was passed in to aria-describedby.
|
|
305
|
+
// We don't need to announce the max length message for readonly, as it only applies when editing the value.
|
|
306
|
+
const enabledAriaDescribedBy = ariaDescribedBy
|
|
307
|
+
? `${ariaDescribedBy} ${maxLengthDescribedByIdRef.current}`
|
|
308
|
+
: maxLengthDescribedByIdRef.current;
|
|
309
|
+
const enabledElementRef = compat.useRef(null);
|
|
310
|
+
const readonlyElementRef = compat.useRef(null);
|
|
311
|
+
// We want to have alt/option+Enter to insert a newline like Enter does.
|
|
312
|
+
const { handleKeyDown } = useTextAreaAltEnter.useTextAreaAltEnter({
|
|
313
|
+
onInput: onInputAndDispatch,
|
|
314
|
+
textAreaRef: enabledElementRef
|
|
315
|
+
});
|
|
316
|
+
const { focusProps, isFocused, methods: focusMethods } = useFocusableTextField.useFocusableTextField({
|
|
317
|
+
isDisabled,
|
|
318
|
+
isReadonly,
|
|
319
|
+
enabledElementRef,
|
|
320
|
+
readonlyElementRef
|
|
321
|
+
});
|
|
322
|
+
const { methods: selectMethods } = useSelectableTextField.useSelectableTextField(enabledElementRef);
|
|
323
|
+
compat.useImperativeHandle(ref, () => mergeProps.mergeProps(focusMethods, selectMethods), [
|
|
324
|
+
focusMethods,
|
|
325
|
+
selectMethods
|
|
326
|
+
]);
|
|
327
|
+
// Handle length filter for user-typed inputs and controlled inputs
|
|
328
|
+
const { isMaxLengthExceeded, isMaxLengthReached, valueLength, onFilteredInput } = useLengthFilter.useLengthFilter({
|
|
329
|
+
maxLength,
|
|
330
|
+
maxLengthUnit,
|
|
331
|
+
value,
|
|
332
|
+
onInput: onInputAndDispatch,
|
|
333
|
+
onCommit: onCommitAndDispatch
|
|
334
|
+
});
|
|
335
|
+
const limitMessage = [{ detail: formControl_limitReached, severity: 'info' }];
|
|
336
|
+
const allMessages = [
|
|
337
|
+
...(messages ?? []),
|
|
338
|
+
...(isMaxLengthReached ? limitMessage : [])
|
|
339
|
+
];
|
|
340
|
+
const { formFieldContext, inputProps, labelProps, textFieldProps, userAssistanceProps } = useTextField.useTextField({
|
|
341
|
+
ariaDescribedBy: isReadonly || isDisabled ? ariaDescribedBy : enabledAriaDescribedBy,
|
|
342
|
+
contentVariant: 'textarea',
|
|
343
|
+
helpSourceLink,
|
|
344
|
+
helpSourceText,
|
|
345
|
+
isDisabled,
|
|
346
|
+
isFocused,
|
|
347
|
+
isReadonly,
|
|
348
|
+
isRequiredShown,
|
|
349
|
+
labelEdge,
|
|
350
|
+
messages: allMessages,
|
|
351
|
+
styleVariant: variant,
|
|
352
|
+
userAssistanceDensity,
|
|
353
|
+
value
|
|
354
|
+
});
|
|
355
|
+
const onClickCounter = compat.useCallback(() => {
|
|
356
|
+
const elm = enabledElementRef.current;
|
|
357
|
+
// for setSelectionRange(), len needs to be a number or null.
|
|
358
|
+
const len = elm ? elm.value.length : null;
|
|
359
|
+
// Since the counter element is after the text, clicking in this
|
|
360
|
+
// should put the selection at the end of the text
|
|
361
|
+
enabledElementRef.current?.setSelectionRange(len, len);
|
|
362
|
+
// Clicking the counter should put the focus on the input field
|
|
363
|
+
enabledElementRef.current?.focus();
|
|
364
|
+
}, [enabledElementRef]);
|
|
365
|
+
const labelComp = labelEdge !== 'none' ? jsxRuntime.jsx(Label.Label, { ...labelProps, children: label }) : undefined;
|
|
366
|
+
const fieldLabelProps = {
|
|
367
|
+
label: labelEdge !== 'none' ? labelComp : undefined,
|
|
368
|
+
labelEdge: labelEdge !== 'none' ? labelEdge : undefined,
|
|
369
|
+
labelStartWidth: labelEdge !== 'none' ? labelStartWidth : undefined,
|
|
370
|
+
labelText: labelEdge === 'inside' && !isDisabled ? label : undefined
|
|
371
|
+
};
|
|
372
|
+
const ariaLabel = labelEdge === 'none' ? label : undefined;
|
|
373
|
+
const isInlineDensity = userAssistanceDensity === 'efficient' || userAssistanceDensity === 'reflow';
|
|
374
|
+
const inlineUserAssistance = isInlineDensity ? (isDisabled ? (
|
|
375
|
+
// save space for user assistance if density is 'efficient', even though we don't
|
|
376
|
+
// render user assistance for disabled fields
|
|
377
|
+
userAssistanceDensity !== 'efficient' ? undefined : (jsxRuntime.jsx(InlineUserAssistance.InlineUserAssistance, { userAssistanceDensity: userAssistanceDensity, ...userAssistanceProps }))) : isReadonly ? (jsxRuntime.jsx(InlineUserAssistance.InlineUserAssistance, { fieldLabel: label, messages: messages, userAssistanceDensity: userAssistanceDensity, ...userAssistanceProps })) : (jsxRuntime.jsx(InlineUserAssistance.InlineUserAssistance, { assistiveText: assistiveText, fieldLabel: label, helpSourceLink: helpSourceLink, helpSourceText: helpSourceText, messages: allMessages, isRequiredShown: isRequiredShown, userAssistanceDensity: userAssistanceDensity, ...userAssistanceProps }))) : undefined;
|
|
378
|
+
const anchorRef = compat.useRef(null);
|
|
379
|
+
const compactUserAssistance = userAssistanceDensity === 'compact' ? (jsxRuntime.jsx(CompactUserAssistance.CompactUserAssistance, { anchorRef: anchorRef, messages: allMessages, assistiveText: assistiveText, ...userAssistanceProps })) : undefined;
|
|
380
|
+
if (isReadonly) {
|
|
381
|
+
const mainContent = (jsxRuntime.jsx(ReadonlyTextFieldInput.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 }));
|
|
382
|
+
return (jsxRuntime.jsx(FormFieldContext.FormFieldContext.Provider, { value: formFieldContext, children: jsxRuntime.jsx(StyledTextField.ReadonlyTextField, { role: "presentation", columnSpan: columnSpan, compactUserAssistance: compactUserAssistance, inlineUserAssistance: inlineUserAssistance, ref: anchorRef, testId: testId, variant: "textarea", mainContent: mainContent, resize: resize, ...fieldLabelProps }) }));
|
|
383
|
+
}
|
|
384
|
+
const hasMaxLength = maxLength !== undefined;
|
|
385
|
+
const mainContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(StyledTextField.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 && (jsxRuntime.jsx(useTextAreaAltEnter.MaxLengthCounter, { maxLength: maxLength, valueLength: valueLength, onClick: onClickCounter })), hasMaxLength && (jsxRuntime.jsx(HiddenAccessible.HiddenAccessible, { id: maxLengthDescribedByIdRef.current, isHidden: true, children: translations.formControl_maxLength({
|
|
386
|
+
MAX_LENGTH: `${maxLength}`
|
|
387
|
+
}) })), hasMaxLength && isFocused && (jsxRuntime.jsx(MaxLengthLiveRegion.MaxLengthLiveRegion, { isMaxLengthExceeded: isMaxLengthExceeded, maxLength: maxLength, valueLength: valueLength, testId: testId ? testId + '_maxLength' : undefined }))] }));
|
|
388
|
+
return (jsxRuntime.jsx(FormFieldContext.FormFieldContext.Provider, { value: formFieldContext, children: jsxRuntime.jsx(TextField.TextField, { mainContent: mainContent, columnSpan: columnSpan, compactUserAssistance: compactUserAssistance, inlineUserAssistance: inlineUserAssistance, onBlur: focusProps?.onFocusOut, onFocus: focusProps?.onFocusIn, mainFieldRef: anchorRef, resize: resize, testId: testId, ...textFieldProps, ...fieldLabelProps }) }));
|
|
389
|
+
});
|
|
390
|
+
|
|
391
|
+
exports.MaxLengthCounter = useTextAreaAltEnter.MaxLengthCounter;
|
|
392
|
+
exports.TextArea = TextArea;
|
|
278
393
|
//# 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":["forwardRef","useTranslationBundle","useCurrentValueReducer","useCallback","useFormContext","defaultTextAlignForVariant","useRef","useId","useTextAreaAltEnter","useFocusableTextField","useSelectableTextField","useImperativeHandle","mergeProps","useLengthFilter","useTextField","_jsx","Label","InlineUserAssistance","CompactUserAssistance","ReadonlyTextFieldInput","FormFieldContext","ReadonlyTextField","_jsxs","_Fragment","TextFieldInput","MaxLengthCounter","HiddenAccessible","MaxLengthLiveRegion","TextField"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0LA;;AAEG;MACU,QAAQ,GAAGA,iBAAU,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,IAA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Y,GAAG,SAAS,GAClD,CACH,CAAA,EAAA,CACA,CACJ,CAAC;IAEF,QACEZ,cAAC,CAAAK,iCAAgB,CAAC,QAAQ,EAAC,EAAA,KAAK,EAAE,gBAAgB,EAChD,QAAA,EAAAL,cAAA,CAACa,mBAAS,EAAA,EACR,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,EACtB,qBAAqB,EAAE,qBAAqB,EAC5C,oBAAoB,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;;;;;"}
|
|
@@ -18,7 +18,7 @@ var useTextField = require('./useTextField-6ecf97b7.js');
|
|
|
18
18
|
var useTranslationBundle = require('./useTranslationBundle-12dd087d.js');
|
|
19
19
|
var HiddenAccessible = require('./HiddenAccessible-087eb49a.js');
|
|
20
20
|
var Label = require('./Label-3b08d4f6.js');
|
|
21
|
-
var
|
|
21
|
+
var useTextAreaAltEnter = require('./useTextAreaAltEnter-11424062.js');
|
|
22
22
|
require('./keyboardUtils-b42fe7d5.js');
|
|
23
23
|
var StyledTextField = require('./StyledTextField-1e8fded8.js');
|
|
24
24
|
|
|
@@ -383,7 +383,7 @@ textAlign: propTextAlign, userAssistanceDensity: propUserAssistanceDensity, valu
|
|
|
383
383
|
const enabledElementRef = compat.useRef(null);
|
|
384
384
|
const readonlyElementRef = compat.useRef(null);
|
|
385
385
|
// We want to have alt/option+Enter to insert a newline like Enter does.
|
|
386
|
-
const { handleKeyDown } =
|
|
386
|
+
const { handleKeyDown } = useTextAreaAltEnter.useTextAreaAltEnter({
|
|
387
387
|
onInput: onInputAndDispatch,
|
|
388
388
|
textAreaRef: enabledElementRef
|
|
389
389
|
});
|
|
@@ -466,7 +466,7 @@ textAlign: propTextAlign, userAssistanceDensity: propUserAssistanceDensity, valu
|
|
|
466
466
|
return (jsxRuntime.jsx(FormFieldContext.FormFieldContext.Provider, { value: formFieldContext, children: jsxRuntime.jsx(StyledTextField.ReadonlyTextField, { role: "presentation", columnSpan: columnSpan, compactUserAssistance: compactUserAssistance, inlineUserAssistance: inlineUserAssistance, variant: "textarea", mainContent: mainContent, ref: anchorRef, testId: testId, ...fieldLabelProps }) }));
|
|
467
467
|
}
|
|
468
468
|
const hasMaxLength = maxLength !== undefined;
|
|
469
|
-
const mainContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(StyledTextField.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: minRows, textAlign: textAlign, value: value, ...inputProps }), maxLengthCounter === 'remaining' && hasMaxLength && (jsxRuntime.jsx(
|
|
469
|
+
const mainContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(StyledTextField.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: minRows, textAlign: textAlign, value: value, ...inputProps }), maxLengthCounter === 'remaining' && hasMaxLength && (jsxRuntime.jsx(useTextAreaAltEnter.MaxLengthCounter, { maxLength: maxLength, valueLength: valueLength, onClick: onClickCounter })), hasMaxLength && (jsxRuntime.jsx(HiddenAccessible.HiddenAccessible, { id: maxLengthDescribedByIdRef.current, children: translations.formControl_maxLength({
|
|
470
470
|
MAX_LENGTH: `${maxLength}`
|
|
471
471
|
}) })), hasMaxLength && isFocused && (jsxRuntime.jsx(MaxLengthLiveRegion.MaxLengthLiveRegion, { isMaxLengthExceeded: isMaxLengthExceeded, maxLength: maxLength, valueLength: valueLength, testId: testId ? testId + '_maxLength' : undefined }))] }));
|
|
472
472
|
return (jsxRuntime.jsx(FormFieldContext.FormFieldContext.Provider, { value: formFieldContext, children: jsxRuntime.jsx(TextField.TextField, { mainContent: mainContent, columnSpan: columnSpan, compactUserAssistance: compactUserAssistance, inlineUserAssistance: inlineUserAssistance, onBlur: focusProps?.onFocusOut, onFocus: focusProps?.onFocusIn, mainFieldRef: anchorRef, testId: testId, ...textFieldProps, ...fieldLabelProps }) }));
|