@@ -22,7 +22,6 @@ import 'package:ouds_core/components/form_input/internal/modifier/ouds_form_inpu
2222import 'package:ouds_core/components/form_input/internal/ouds_form_input_control_state.dart' ;
2323import 'package:ouds_core/components/form_input/password_input/ouds_password_input_decoration.dart' ;
2424import 'package:ouds_core/components/utilities/app_assets.dart' ;
25- import 'package:ouds_core/components/utilities/input_utils.dart' ;
2625import 'package:ouds_core/l10n/gen/ouds_localizations.dart' ;
2726import 'package:ouds_theme_contract/ouds_theme.dart' ;
2827import 'package:ouds_theme_contract/ouds_theme_contract.dart' ;
@@ -242,64 +241,51 @@ class _OudsPasswordInputState extends State<OudsPasswordInput> {
242241 mainAxisSize: MainAxisSize .min,
243242 crossAxisAlignment: CrossAxisAlignment .start,
244243 children: [
245- SizedBox (
246- height: textInput.sizeMinHeight,
247- child: DecoratedBox (
248- decoration: BoxDecoration (
249- // Background color based on current state and error presence
250- color: inputTextBackgroundModifier.getBackgroundColor (
251- state,
252- isError,
253- widget.decoration.outlined,
254- ),
255-
256- /// Bottom border styling; full border if style is not default
257- border: inputTextBorderModifier.getBorder (
258- state,
259- isError,
260- widget.decoration.outlined,
261- ),
262-
263- // Border radius if enabled in theme configuration
264- borderRadius: inputTextBorderModifier.getBorderRadius (context),
244+ DecoratedBox (
245+ decoration: BoxDecoration (
246+ // Background color based on current state and error presence
247+ color: inputTextBackgroundModifier.getBackgroundColor (
248+ state,
249+ isError,
250+ widget.decoration.outlined,
265251 ),
266- child: Padding (
267- padding: EdgeInsetsGeometry .directional (
268- start: textInput.spacePaddingInlineDefault,
269- end: textInput.spacePaddingInlineTrailingAction,
270- top: textInput.spacePaddingBlockDefault,
271- bottom: textInput.spacePaddingBlockDefault,
272- ),
273- child: Row (
274- crossAxisAlignment: CrossAxisAlignment .center,
275- children: [
276- /// Left block: prefix icon container
277- Container (
278- alignment: Alignment .center,
279- child: _buildPrefixIcon (context, state),
280- ),
281252
282- /// Center block: main text input
283- Flexible (
284- fit: FlexFit .loose,
285- child: Semantics (
286- hint: helperText,
287- child:
288- widget.readOnly == true ||
289- (widget.decoration.loader == true && _isTyping)
290- ? IgnorePointer (
291- child: _buildTextField (
292- inputTextTextModifier,
293- state,
294- isError,
295- effectiveFocusNode,
296- theme,
297- context,
298- textInput,
299- effectiveIsFocused,
300- ),
301- )
302- : _buildTextField (
253+ /// Bottom border styling; full border if style is not default
254+ border: inputTextBorderModifier.getBorder (
255+ state,
256+ isError,
257+ widget.decoration.outlined,
258+ ),
259+
260+ // Border radius if enabled in theme configuration
261+ borderRadius: inputTextBorderModifier.getBorderRadius (context),
262+ ),
263+ child: Padding (
264+ padding: EdgeInsetsGeometry .directional (
265+ start: textInput.spacePaddingInlineDefault,
266+ end: textInput.spacePaddingInlineTrailingAction,
267+ top: textInput.spacePaddingBlockDefault,
268+ bottom: textInput.spacePaddingBlockDefault,
269+ ),
270+ child: Row (
271+ crossAxisAlignment: CrossAxisAlignment .center,
272+ children: [
273+ /// Left block: prefix icon container
274+ Container (
275+ alignment: Alignment .center,
276+ child: _buildPrefixIcon (context, state),
277+ ),
278+
279+ /// Center block: main text input
280+ Flexible (
281+ fit: FlexFit .loose,
282+ child: Semantics (
283+ hint: helperText,
284+ child:
285+ widget.readOnly == true ||
286+ (widget.decoration.loader == true && _isTyping)
287+ ? IgnorePointer (
288+ child: _buildTextField (
303289 inputTextTextModifier,
304290 state,
305291 isError,
@@ -309,16 +295,26 @@ class _OudsPasswordInputState extends State<OudsPasswordInput> {
309295 textInput,
310296 effectiveIsFocused,
311297 ),
312- ),
298+ )
299+ : _buildTextField (
300+ inputTextTextModifier,
301+ state,
302+ isError,
303+ effectiveFocusNode,
304+ theme,
305+ context,
306+ textInput,
307+ effectiveIsFocused,
308+ ),
313309 ),
310+ ),
314311
315- /// spacing between center container et suffic icon container
316- SizedBox (width: textInput.spaceColumnGapDefault),
312+ /// spacing between center container et suffic icon container
313+ SizedBox (width: textInput.spaceColumnGapDefault),
317314
318- /// Right block: suffix icon container
319- _buildSuffixIcon (context, state),
320- ],
321- ),
315+ /// Right block: suffix icon container
316+ _buildSuffixIcon (context, state),
317+ ],
322318 ),
323319 ),
324320 ),
@@ -377,7 +373,7 @@ class _OudsPasswordInputState extends State<OudsPasswordInput> {
377373 controller: widget.controller,
378374 keyboardType: widget.keyboardType,
379375 style: theme.typographyTokens
380- .typeLabelDefaultLarge (context)
376+ .typeLabelModerateLarge (context)
381377 .copyWith (
382378 color: inputTextTextModifier.getTextLabelColor (state, isError),
383379 ),
@@ -412,27 +408,14 @@ class _OudsPasswordInputState extends State<OudsPasswordInput> {
412408
413409 // Label text widget, shown if labelText is provided
414410 label: widget.decoration.labelText != null
415- ? Container (
416- constraints: BoxConstraints (
417- maxHeight: textInput.sizeLabelMaxHeight,
418- ),
419- child: Text (
420- maxLines: InputUtils .getLabelMaxLines (
421- hintText: widget.decoration.hintText,
422- controller: widget.controller,
423- isFocused: effectiveIsFocused,
424- ),
425- overflow: TextOverflow .ellipsis,
426- widget.decoration.labelText ?? "" ,
427- style: theme.typographyTokens
428- .typeLabelDefaultLarge (context)
429- .copyWith (
430- color: inputTextTextModifier.getTextColor (
431- state,
432- isError,
433- ),
434- ),
435- ),
411+ ? Text (
412+ widget.decoration.labelText ?? "" ,
413+ overflow: TextOverflow .ellipsis,
414+ style: theme.typographyTokens
415+ .typeLabelDefaultLarge (context)
416+ .copyWith (
417+ color: inputTextTextModifier.getTextColor (state, isError),
418+ ),
436419 )
437420 : null ,
438421
@@ -446,9 +429,8 @@ class _OudsPasswordInputState extends State<OudsPasswordInput> {
446429 // Hint text widget, shown if hintText is provided
447430 hint: widget.decoration.hintText != null
448431 ? Text (
449- maxLines: 1 ,
450- overflow: TextOverflow .ellipsis,
451432 widget.decoration.hintText! ,
433+ overflow: TextOverflow .ellipsis,
452434 style: theme.typographyTokens
453435 .typeLabelDefaultLarge (context)
454436 .copyWith (
0 commit comments