@pdg/react-form 1.0.21 → 1.0.23

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.
@@ -21,6 +21,7 @@ export interface PrivateDatePickerProps extends CommonSxProps, Partial<Omit<Desk
21
21
  endAdornment?: ReactNode;
22
22
  align?: 'left' | 'center' | 'right';
23
23
  readOnlyInput?: boolean;
24
+ hidden?: boolean;
24
25
  onChange?(value: PrivateDatePickerValue): void;
25
26
  onValidate?(value: PrivateDatePickerValue): boolean | string;
26
27
  }
@@ -26,6 +26,7 @@ export interface FormAutocompleteProps extends CommonSxProps, Omit<FormValueItem
26
26
  openOnFocus?: boolean;
27
27
  disableClearable?: boolean;
28
28
  async?: boolean;
29
+ hidden?: boolean;
29
30
  onLoadItems?: (inputValue?: string) => Promise<FormAutocompleteItem[]>;
30
31
  onAsyncLoadValueItem?: (value: FormAutocompleteValue) => Promise<FormAutocompleteComponentValue>;
31
32
  onRenderItem?: (item: FormAutocompleteItem) => ReactNode;
@@ -7,6 +7,7 @@ export interface FormCheckboxProps extends CommonSxProps, Omit<CheckboxProps, 'c
7
7
  text?: ReactNode;
8
8
  inputRef?: RefObject<HTMLInputElement>;
9
9
  action?: RefObject<ButtonBaseActions>;
10
+ hidden?: boolean;
10
11
  onChange?(checked: boolean): void;
11
12
  }
12
13
  export declare const FormCheckboxDefaultProps: Pick<FormCheckboxProps, 'checked' | 'value' | 'uncheckedValue'>;
@@ -40,6 +40,7 @@ export interface FormDateRangePickerProps extends CommonSxProps, Omit<FormValueI
40
40
  disableFuture?: boolean;
41
41
  minDate?: Dayjs;
42
42
  maxDate?: Dayjs;
43
+ hidden?: boolean;
43
44
  onChange?(value: FormDateRangePickerValue): void;
44
45
  onValidate?(value: FormDateRangePickerValue): boolean | string;
45
46
  }
@@ -8,6 +8,7 @@ export interface FormFileProps extends CommonSxProps, Omit<FormValueItemProps, '
8
8
  labelShrink?: boolean;
9
9
  maxFileSize?: number;
10
10
  preview?: ReactNode;
11
+ hidden?: boolean;
11
12
  onFile?(file: File): Promise<string>;
12
13
  onLink?(url: string): Promise<string>;
13
14
  }
@@ -16,4 +16,5 @@ export interface FormItemBaseProps extends CommonSxProps, PartialPick<FormContex
16
16
  helperTextProps?: FormHelperTextProps;
17
17
  error?: boolean;
18
18
  hideLabel?: boolean;
19
+ hidden?: boolean;
19
20
  }
@@ -14,6 +14,7 @@ export interface FormRadioGroupProps extends CommonSxProps, Omit<FormValueItemPr
14
14
  inline?: boolean;
15
15
  loading?: boolean;
16
16
  nowrap?: boolean;
17
+ hidden?: boolean;
17
18
  onLoadItems?(): Promise<FormRadioGroupItem[]>;
18
19
  onValue?(value: RadioGroupProps['value']): RadioGroupProps['value'];
19
20
  }
@@ -7,6 +7,7 @@ export interface FormRatingProps extends CommonSxProps, PartialPick<RatingProps,
7
7
  required?: boolean;
8
8
  icon?: string;
9
9
  emptyIcon?: string;
10
+ hidden?: boolean;
10
11
  onChange?(value: number): void;
11
12
  onValue?(value: number): number;
12
13
  }
@@ -3,6 +3,7 @@ export interface FormTextEditorProps extends CommonSxProps, Omit<FormValueItemPr
3
3
  required?: boolean;
4
4
  menubar?: boolean;
5
5
  height?: number;
6
+ hidden?: boolean;
6
7
  onImageUpload?(blob: Blob, success: (url: string) => void, failure: (err: string) => void, progress?: (percent: number) => void): void;
7
8
  }
8
9
  export declare const FormTextEditorDefaultProps: Pick<FormTextEditorProps, 'menubar' | 'height'>;
@@ -19,6 +19,7 @@ export interface FormToggleButtonGroupProps extends CommonSxProps, Omit<FormValu
19
19
  formValueSeparator?: string;
20
20
  formValueSort?: boolean;
21
21
  loading?: boolean;
22
+ hidden?: boolean;
22
23
  onLoadItems?: () => Promise<FormToggleButtonGroupItem[]>;
23
24
  onValue?: (value: FormToggleButtonGroupValue) => FormToggleButtonGroupValue;
24
25
  }
@@ -11,6 +11,7 @@ declare const FormTextField: React.ForwardRefExoticComponent<Omit<import("@mui/m
11
11
  startAdornment?: React.ReactNode;
12
12
  endAdornment?: React.ReactNode;
13
13
  noFormValueItem?: boolean | undefined;
14
+ hidden?: boolean | undefined;
14
15
  onValue?(value: any): any;
15
16
  } & React.RefAttributes<FormTextFieldCommands>>;
16
17
  export default FormTextField;
@@ -13,6 +13,7 @@ export declare type FormTextFieldProps = Omit<TextFieldProps, 'ref' | 'name' | '
13
13
  startAdornment?: ReactNode;
14
14
  endAdornment?: ReactNode;
15
15
  noFormValueItem?: boolean;
16
+ hidden?: boolean;
16
17
  onValue?(value: FormItemValue): FormItemValue;
17
18
  };
18
19
  export declare const FormTextFieldDefaultProps: {};
package/dist/index.esm.js CHANGED
@@ -2042,13 +2042,13 @@ styleInject(css_248z$j);var FormTextField = React__default.forwardRef(function (
2042
2042
  var _b;
2043
2043
  var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initLabelShrink = _a.labelShrink, initFullWidth = _a.fullWidth,
2044
2044
  //----------------------------------------------------------------------------------------------------------------
2045
- name = _a.name, required = _a.required, initValue = _a.value, icon = _a.icon, labelIcon = _a.labelIcon, initLabel = _a.label, initError = _a.error, initHelperText = _a.helperText, exceptValue = _a.exceptValue, readOnly = _a.readOnly, initDisabled = _a.disabled, placeholder = _a.placeholder, maxLength = _a.maxLength, clear = _a.clear, width = _a.width, initMuiInputProps = _a.InputProps, initMuiInputLabelProps = _a.InputLabelProps, initInputProps = _a.inputProps, initInputRef = _a.inputRef, select = _a.select, SelectProps = _a.SelectProps, multiline = _a.multiline, validPattern = _a.validPattern, invalidPattern = _a.invalidPattern, startAdornment = _a.startAdornment, endAdornment = _a.endAdornment, noFormValueItem = _a.noFormValueItem,
2045
+ name = _a.name, required = _a.required, initValue = _a.value, icon = _a.icon, labelIcon = _a.labelIcon, initLabel = _a.label, initError = _a.error, initHelperText = _a.helperText, exceptValue = _a.exceptValue, readOnly = _a.readOnly, tabIndex = _a.tabIndex, initDisabled = _a.disabled, placeholder = _a.placeholder, maxLength = _a.maxLength, clear = _a.clear, width = _a.width, initMuiInputProps = _a.InputProps, initMuiInputLabelProps = _a.InputLabelProps, initInputProps = _a.inputProps, initInputRef = _a.inputRef, select = _a.select, SelectProps = _a.SelectProps, multiline = _a.multiline, validPattern = _a.validPattern, invalidPattern = _a.invalidPattern, startAdornment = _a.startAdornment, endAdornment = _a.endAdornment, noFormValueItem = _a.noFormValueItem, hidden = _a.hidden,
2046
2046
  //----------------------------------------------------------------------------------------------------------------
2047
2047
  onChange = _a.onChange, onValue = _a.onValue, onValidate = _a.onValidate, onBlur = _a.onBlur, onKeyDown = _a.onKeyDown,
2048
2048
  //----------------------------------------------------------------------------------------------------------------
2049
2049
  className = _a.className, initStyle = _a.style,
2050
2050
  //----------------------------------------------------------------------------------------------------------------
2051
- props = __rest$2(_a, ["variant", "size", "color", "focused", "labelShrink", "fullWidth", "name", "required", "value", "icon", "labelIcon", "label", "error", "helperText", "exceptValue", "readOnly", "disabled", "placeholder", "maxLength", "clear", "width", "InputProps", "InputLabelProps", "inputProps", "inputRef", "select", "SelectProps", "multiline", "validPattern", "invalidPattern", "startAdornment", "endAdornment", "noFormValueItem", "onChange", "onValue", "onValidate", "onBlur", "onKeyDown", "className", "style"]);
2051
+ props = __rest$2(_a, ["variant", "size", "color", "focused", "labelShrink", "fullWidth", "name", "required", "value", "icon", "labelIcon", "label", "error", "helperText", "exceptValue", "readOnly", "tabIndex", "disabled", "placeholder", "maxLength", "clear", "width", "InputProps", "InputLabelProps", "inputProps", "inputRef", "select", "SelectProps", "multiline", "validPattern", "invalidPattern", "startAdornment", "endAdornment", "noFormValueItem", "hidden", "onChange", "onValue", "onValidate", "onBlur", "onKeyDown", "className", "style"]);
2052
2052
  var id = useId();
2053
2053
  // Ref -------------------------------------------------------------------------------------------------------------
2054
2054
  var inputRef = useRef(null);
@@ -2080,23 +2080,29 @@ styleInject(css_248z$j);var FormTextField = React__default.forwardRef(function (
2080
2080
  if (readOnly != null || maxLength != null) {
2081
2081
  var finalInputProps = __assign$4(__assign$4({}, initInputProps), { readOnly: readOnly, maxLength: maxLength });
2082
2082
  if (readOnly) {
2083
+ finalInputProps.tabIndex = -1;
2083
2084
  finalInputProps.className = classNames$1(finalInputProps.className, 'Mui-disabled');
2084
2085
  }
2086
+ else {
2087
+ finalInputProps.tabIndex = tabIndex;
2088
+ }
2085
2089
  return finalInputProps;
2086
2090
  }
2087
2091
  else {
2088
2092
  return initInputProps;
2089
2093
  }
2090
- }, [initInputProps, readOnly, maxLength]);
2094
+ }, [initInputProps, readOnly, tabIndex, maxLength]);
2091
2095
  // Memo - style ----------------------------------------------------------------------------------------------------
2092
2096
  var style = useMemo(function () {
2097
+ var newStyle = __assign$4({}, initStyle);
2093
2098
  if (width != null) {
2094
- return __assign$4(__assign$4({}, initStyle), { width: width });
2099
+ newStyle.width = width;
2095
2100
  }
2096
- else {
2097
- return initStyle;
2101
+ if (hidden) {
2102
+ newStyle.display = 'none';
2098
2103
  }
2099
- }, [initStyle, width]);
2104
+ return newStyle;
2105
+ }, [initStyle, width, hidden]);
2100
2106
  // Memo - label ----------------------------------------------------------------------------------------------------
2101
2107
  var label = useMemo(function () {
2102
2108
  return labelIcon ? (React__default.createElement(React__default.Fragment, null,
@@ -2510,7 +2516,7 @@ styleInject(css_248z$h);var FormTag = React__default.forwardRef(function (_a, re
2510
2516
  onValueChangeByUser: function () { },
2511
2517
  // eslint-disable-next-line
2512
2518
  onRequestSearchSubmit: function () { } }, otherFormState) },
2513
- React__default.createElement(Autocomplete, { options: [], multiple: true, freeSolo: true, value: value, disableClearable: true, disabled: disabled, renderTags: handleRenderTags, inputValue: inputValue, style: { display: fullWidth ? 'block' : 'inline-block', width: fullWidth ? '100%' : undefined }, renderInput: function (params) {
2519
+ React__default.createElement(Autocomplete, { options: [], multiple: true, freeSolo: true, value: value, readOnly: readOnly, disableClearable: true, disabled: disabled, renderTags: handleRenderTags, inputValue: inputValue, style: { display: fullWidth ? 'block' : 'inline-block', width: fullWidth ? '100%' : undefined }, renderInput: function (params) {
2514
2520
  var _a;
2515
2521
  var renderProps = __assign$4({}, props);
2516
2522
  renderProps.InputLabelProps = __assign$4(__assign$4({}, renderProps.InputLabelProps), { htmlFor: params.InputLabelProps.htmlFor, id: params.InputLabelProps.id });
@@ -2523,6 +2529,9 @@ styleInject(css_248z$h);var FormTag = React__default.forwardRef(function (_a, re
2523
2529
  renderProps.inputProps = __assign$4(__assign$4({}, renderProps.inputProps), params.inputProps);
2524
2530
  renderProps.inputProps.className = classNames$1(renderProps.inputProps.className, 'FormTag-Input');
2525
2531
  renderProps.inputProps.readOnly = readOnly;
2532
+ if (readOnly) {
2533
+ renderProps.inputProps.tabIndex = -1;
2534
+ }
2526
2535
  renderProps.inputProps.maxLength = maxLength;
2527
2536
  if (readOnly) {
2528
2537
  renderProps.inputProps.className = classNames$1(renderProps.inputProps.className, 'Mui-disabled');
@@ -4046,7 +4055,7 @@ NumberFormat.defaultProps = defaultProps;var NumberFormatCustom = React__default
4046
4055
  });
4047
4056
  NumberFormatCustom.displayName = 'NumberFormatCustom';var FormNumberDefaultProps = __assign$4({}, FormTextDefaultProps);var FormNumber = React__default.forwardRef(function (_a, ref) {
4048
4057
  // Memo --------------------------------------------------------------------------------------------------------------
4049
- var className = _a.className, allowLeadingZeros = _a.allowLeadingZeros, allowNegative = _a.allowNegative, thousandSeparator = _a.thousandSeparator, allowDecimal = _a.allowDecimal, decimalScale = _a.decimalScale, prefix = _a.prefix, suffix = _a.suffix, readOnly = _a.readOnly, initMuiInputProps = _a.InputProps, props = __rest$2(_a, ["className", "allowLeadingZeros", "allowNegative", "thousandSeparator", "allowDecimal", "decimalScale", "prefix", "suffix", "readOnly", "InputProps"]);
4058
+ var className = _a.className, allowLeadingZeros = _a.allowLeadingZeros, allowNegative = _a.allowNegative, thousandSeparator = _a.thousandSeparator, allowDecimal = _a.allowDecimal, decimalScale = _a.decimalScale, prefix = _a.prefix, suffix = _a.suffix, readOnly = _a.readOnly, tabIndex = _a.tabIndex, initMuiInputProps = _a.InputProps, props = __rest$2(_a, ["className", "allowLeadingZeros", "allowNegative", "thousandSeparator", "allowDecimal", "decimalScale", "prefix", "suffix", "readOnly", "tabIndex", "InputProps"]);
4050
4059
  var muiInputProps = useMemo(function () {
4051
4060
  var inputProps = {
4052
4061
  allowLeadingZeros: allowLeadingZeros,
@@ -4055,6 +4064,7 @@ NumberFormatCustom.displayName = 'NumberFormatCustom';var FormNumberDefaultProps
4055
4064
  prefix: prefix,
4056
4065
  suffix: suffix,
4057
4066
  readOnly: readOnly,
4067
+ tabIndex: readOnly ? -1 : tabIndex,
4058
4068
  };
4059
4069
  if (allowDecimal) {
4060
4070
  if (decimalScale) {
@@ -4073,6 +4083,7 @@ NumberFormatCustom.displayName = 'NumberFormatCustom';var FormNumberDefaultProps
4073
4083
  initMuiInputProps,
4074
4084
  prefix,
4075
4085
  readOnly,
4086
+ tabIndex,
4076
4087
  suffix,
4077
4088
  thousandSeparator,
4078
4089
  ]);
@@ -4351,7 +4362,7 @@ styleInject(css_248z$c);var FormItemBase = React__default.forwardRef(function (_
4351
4362
  // FormState -------------------------------------------------------------------------------------------------------
4352
4363
  var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFullWidth = _a.fullWidth,
4353
4364
  //----------------------------------------------------------------------------------------------------------------
4354
- control = _a.control, controlHeight = _a.controlHeight, controlVerticalCenter = _a.controlVerticalCenter, required = _a.required, labelIcon = _a.labelIcon, label = _a.label, focused = _a.focused, helperText = _a.helperText, helperTextProps = _a.helperTextProps, error = _a.error, hideLabel = _a.hideLabel,
4365
+ control = _a.control, controlHeight = _a.controlHeight, controlVerticalCenter = _a.controlVerticalCenter, required = _a.required, labelIcon = _a.labelIcon, label = _a.label, focused = _a.focused, helperText = _a.helperText, helperTextProps = _a.helperTextProps, error = _a.error, hideLabel = _a.hideLabel, hidden = _a.hidden,
4355
4366
  //----------------------------------------------------------------------------------------------------------------
4356
4367
  className = _a.className, style = _a.style, sx = _a.sx;
4357
4368
  var _b = useFormState(), formVariant = _b.variant, formSize = _b.size, formColor = _b.color, formFullWidth = _b.fullWidth, formColWithLabel = _b.formColWithLabel, formColWithHelperText = _b.formColWithHelperText;
@@ -4363,14 +4374,14 @@ styleInject(css_248z$c);var FormItemBase = React__default.forwardRef(function (_
4363
4374
  // Memo --------------------------------------------------------------------------------------------------------------
4364
4375
  var wrapStyle = useMemo(function () {
4365
4376
  var wrapStyle = {
4366
- display: fullWidth ? 'block' : 'inline-flex',
4377
+ display: hidden ? 'none' : fullWidth ? 'block' : 'inline-flex',
4367
4378
  width: fullWidth ? '100%' : undefined,
4368
4379
  };
4369
4380
  if (formColWithLabel) {
4370
4381
  wrapStyle.marginTop = -20;
4371
4382
  }
4372
4383
  return wrapStyle;
4373
- }, [formColWithLabel, fullWidth]);
4384
+ }, [formColWithLabel, fullWidth, hidden]);
4374
4385
  // State - inputHeight ---------------------------------------------------------------------------------------------
4375
4386
  var _c = useState(0), inputHeight = _c[0], setInputHeight = _c[1];
4376
4387
  var inputResizeDetectorRef = useResizeDetector({
@@ -4456,9 +4467,9 @@ FormItemBase.displayName = 'FormItemBase';var FormCheckbox = React__default.forw
4456
4467
  // ID --------------------------------------------------------------------------------------------------------------
4457
4468
  var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initFullWidth = _a.fullWidth,
4458
4469
  //----------------------------------------------------------------------------------------------------------------
4459
- name = _a.name, labelIcon = _a.labelIcon, label = _a.label, initChecked = _a.checked, initInputRef = _a.inputRef, initAction = _a.action, readOnly = _a.readOnly, initDisabled = _a.disabled, text = _a.text, initError = _a.error, initHelperText = _a.helperText, initValue = _a.value, initUncheckedValue = _a.uncheckedValue, exceptValue = _a.exceptValue, onChange = _a.onChange, onValidate = _a.onValidate,
4470
+ name = _a.name, labelIcon = _a.labelIcon, label = _a.label, initChecked = _a.checked, initInputRef = _a.inputRef, initAction = _a.action, readOnly = _a.readOnly, initDisabled = _a.disabled, text = _a.text, initError = _a.error, initHelperText = _a.helperText, initValue = _a.value, initUncheckedValue = _a.uncheckedValue, exceptValue = _a.exceptValue, hidden = _a.hidden, onChange = _a.onChange, onValidate = _a.onValidate,
4460
4471
  //----------------------------------------------------------------------------------------------------------------
4461
- className = _a.className, initStyle = _a.style, sx = _a.sx, props = __rest$2(_a, ["variant", "size", "color", "focused", "fullWidth", "name", "labelIcon", "label", "checked", "inputRef", "action", "readOnly", "disabled", "text", "error", "helperText", "value", "uncheckedValue", "exceptValue", "onChange", "onValidate", "className", "style", "sx"]);
4472
+ className = _a.className, initStyle = _a.style, sx = _a.sx, props = __rest$2(_a, ["variant", "size", "color", "focused", "fullWidth", "name", "labelIcon", "label", "checked", "inputRef", "action", "readOnly", "disabled", "text", "error", "helperText", "value", "uncheckedValue", "exceptValue", "hidden", "onChange", "onValidate", "className", "style", "sx"]);
4462
4473
  var id = useId();
4463
4474
  // FormState -------------------------------------------------------------------------------------------------------
4464
4475
  var _b = useFormState(), formVariant = _b.variant, formSize = _b.size, formColor = _b.color, formFocused = _b.focused, formFullWidth = _b.fullWidth, onAddValueItem = _b.onAddValueItem, onRemoveValueItem = _b.onRemoveValueItem, onValueChange = _b.onValueChange, onValueChangeByUser = _b.onValueChangeByUser, onRequestSearchSubmit = _b.onRequestSearchSubmit;
@@ -4620,7 +4631,7 @@ FormItemBase.displayName = 'FormItemBase';var FormCheckbox = React__default.forw
4620
4631
  }
4621
4632
  }, [readOnly, setChecked, onValueChangeByUser, name, onRequestSearchSubmit]);
4622
4633
  // Render ----------------------------------------------------------------------------------------------------------
4623
- return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormCheckbox'), labelIcon: labelIcon, label: label, error: error, fullWidth: fullWidth, helperText: helperText, helperTextProps: { style: { marginLeft: 2 } }, style: style, sx: sx, controlHeight: height || (size === 'small' ? 35 : 39), controlVerticalCenter: true, control: React__default.createElement(FormControlLabel, { ref: resizeDetectorRef, control: React__default.createElement(Checkbox, __assign$4({ name: name, color: color, size: size, inputRef: initInputRef ? initInputRef : inputRef, action: initAction ? initAction : actionRef, checked: !!checked, checkedIcon: React__default.createElement(CheckBox, { color: error ? 'error' : undefined }), icon: React__default.createElement(CheckBoxOutlineBlank, { color: error ? 'error' : undefined }), onChange: handleChange, disabled: disabled || readOnly }, props)), label: React__default.createElement(Typography, { color: error ? 'error' : undefined, whiteSpace: 'nowrap' }, text) }) }));
4634
+ return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormCheckbox'), labelIcon: labelIcon, label: label, error: error, fullWidth: fullWidth, helperText: helperText, helperTextProps: { style: { marginLeft: 2 } }, style: style, sx: sx, hidden: hidden, controlHeight: height || (size === 'small' ? 35 : 39), controlVerticalCenter: true, control: React__default.createElement(FormControlLabel, { ref: resizeDetectorRef, control: React__default.createElement(Checkbox, __assign$4({ name: name, color: color, size: size, inputRef: initInputRef ? initInputRef : inputRef, action: initAction ? initAction : actionRef, checked: !!checked, checkedIcon: React__default.createElement(CheckBox, { color: error ? 'error' : undefined }), icon: React__default.createElement(CheckBoxOutlineBlank, { color: error ? 'error' : undefined }), onChange: handleChange, disabled: disabled || readOnly }, props)), label: React__default.createElement(Typography, { color: error ? 'error' : undefined, whiteSpace: 'nowrap' }, text) }) }));
4624
4635
  });
4625
4636
  FormCheckbox.displayName = 'FormCheckbox';
4626
4637
  FormCheckbox.defaultProps = FormCheckboxDefaultProps;var FormRadioGroupDefaultProps = {
@@ -4628,13 +4639,13 @@ FormCheckbox.defaultProps = FormCheckboxDefaultProps;var FormRadioGroupDefaultPr
4628
4639
  };var PADDING_LEFT = 3;
4629
4640
  var FormRadioGroup = React__default.forwardRef(function (_a, ref) {
4630
4641
  // ID --------------------------------------------------------------------------------------------------------------
4631
- var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initFullWidth = _a.fullWidth,
4642
+ var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initFullWidth = _a.fullWidth, hidden = _a.hidden,
4632
4643
  //----------------------------------------------------------------------------------------------------------------
4633
4644
  name = _a.name, initWidth = _a.width, labelIcon = _a.labelIcon, label = _a.label, inline = _a.inline, initLoading = _a.loading, nowrap = _a.nowrap, initItems = _a.items, initValue = _a.value, initError = _a.error, initHelperText = _a.helperText, initDisabled = _a.disabled, readOnly = _a.readOnly, required = _a.required, exceptValue = _a.exceptValue, onLoadItems = _a.onLoadItems, onChange = _a.onChange, onValue = _a.onValue, onValidate = _a.onValidate,
4634
4645
  //----------------------------------------------------------------------------------------------------------------
4635
4646
  className = _a.className, initStyle = _a.style, sx = _a.sx,
4636
4647
  //----------------------------------------------------------------------------------------------------------------
4637
- props = __rest$2(_a, ["variant", "size", "color", "focused", "fullWidth", "name", "width", "labelIcon", "label", "inline", "loading", "nowrap", "items", "value", "error", "helperText", "disabled", "readOnly", "required", "exceptValue", "onLoadItems", "onChange", "onValue", "onValidate", "className", "style", "sx"]);
4648
+ props = __rest$2(_a, ["variant", "size", "color", "focused", "fullWidth", "hidden", "name", "width", "labelIcon", "label", "inline", "loading", "nowrap", "items", "value", "error", "helperText", "disabled", "readOnly", "required", "exceptValue", "onLoadItems", "onChange", "onValue", "onValidate", "className", "style", "sx"]);
4638
4649
  var id = useId();
4639
4650
  // FormState -------------------------------------------------------------------------------------------------------
4640
4651
  var _b = useFormState(), formVariant = _b.variant, formSize = _b.size, formColor = _b.color, formFocused = _b.focused, formFullWidth = _b.fullWidth, onAddValueItem = _b.onAddValueItem, onRemoveValueItem = _b.onRemoveValueItem, onValueChange = _b.onValueChange, onValueChangeByUser = _b.onValueChangeByUser, onRequestSearchSubmit = _b.onRequestSearchSubmit;
@@ -4899,7 +4910,7 @@ var FormRadioGroup = React__default.forwardRef(function (_a, ref) {
4899
4910
  }
4900
4911
  }, [readOnly, items, getFinalValue, value, setValue, onValueChangeByUser, name, onRequestSearchSubmit]);
4901
4912
  // Render ----------------------------------------------------------------------------------------------------------
4902
- return (React__default.createElement(FormItemBase, { focused: focused, ref: baseRef, className: classNames$1(className, 'FormValueItem', 'FormRadioGroup'), variant: variant, size: size, color: color, labelIcon: labelIcon, label: label, fullWidth: fullWidth, required: required, error: error, helperText: helperText, helperTextProps: { style: { marginLeft: 2 } }, style: style, sx: sx, controlHeight: height || (size === 'small' ? 35 : 39), controlVerticalCenter: true, control: React__default.createElement(React__default.Fragment, null,
4913
+ return (React__default.createElement(FormItemBase, { focused: focused, ref: baseRef, className: classNames$1(className, 'FormValueItem', 'FormRadioGroup'), variant: variant, size: size, color: color, labelIcon: labelIcon, label: label, fullWidth: fullWidth, required: required, error: error, helperText: helperText, helperTextProps: { style: { marginLeft: 2 } }, style: style, sx: sx, hidden: hidden, controlHeight: height || (size === 'small' ? 35 : 39), controlVerticalCenter: true, control: React__default.createElement(React__default.Fragment, null,
4903
4914
  !fullWidth && !isOnGetItemLoading && !loading && items && (React__default.createElement("div", { ref: resizeWidthDetectorRef, style: {
4904
4915
  display: 'grid',
4905
4916
  position: 'absolute',
@@ -4935,7 +4946,7 @@ styleInject(css_248z$b);var FormToggleButtonGroup = React__default.forwardRef(fu
4935
4946
  // ID --------------------------------------------------------------------------------------------------------------
4936
4947
  var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initFullWidth = _a.fullWidth,
4937
4948
  //----------------------------------------------------------------------------------------------------------------
4938
- name = _a.name, labelIcon = _a.labelIcon, label = _a.label, type = _a.type, initLoading = _a.loading, initItems = _a.items, initValue = _a.value, initError = _a.error, initHelperText = _a.helperText, initDisabled = _a.disabled, readOnly = _a.readOnly, required = _a.required, notAllowEmptyValue = _a.notAllowEmptyValue, exceptValue = _a.exceptValue, initWidth = _a.width, multiple = _a.multiple, formValueSeparator = _a.formValueSeparator, formValueSort = _a.formValueSort, onLoadItems = _a.onLoadItems,
4949
+ name = _a.name, labelIcon = _a.labelIcon, label = _a.label, type = _a.type, initLoading = _a.loading, initItems = _a.items, initValue = _a.value, initError = _a.error, initHelperText = _a.helperText, initDisabled = _a.disabled, readOnly = _a.readOnly, required = _a.required, notAllowEmptyValue = _a.notAllowEmptyValue, exceptValue = _a.exceptValue, initWidth = _a.width, multiple = _a.multiple, formValueSeparator = _a.formValueSeparator, formValueSort = _a.formValueSort, hidden = _a.hidden, onLoadItems = _a.onLoadItems,
4939
4950
  //----------------------------------------------------------------------------------------------------------------
4940
4951
  onChange = _a.onChange, onValue = _a.onValue, onValidate = _a.onValidate,
4941
4952
  //----------------------------------------------------------------------------------------------------------------
@@ -5272,7 +5283,7 @@ styleInject(css_248z$b);var FormToggleButtonGroup = React__default.forwardRef(fu
5272
5283
  if (focused) {
5273
5284
  formControlBaseProps.focused = true;
5274
5285
  }
5275
- return (React__default.createElement(FormItemBase, __assign$4({}, formControlBaseProps, { className: classNames$1(className, 'FormValueItem', 'FormToggleButtonGroup', "variant-".concat(variant), "size-".concat(size), !!label && 'with-label', !!fullWidth && 'full-width', "type-".concat(type)), variant: variant, size: size, color: color, labelIcon: labelIcon, label: label, required: required, fullWidth: fullWidth, error: error, helperText: helperText, helperTextProps: { style: { marginLeft: 2 } }, style: style, sx: sx, controlHeight: height || 0, controlVerticalCenter: isOnGetItemLoading || loading, control: isOnGetItemLoading || loading ? (React__default.createElement("div", { style: { opacity: 0.54 }, ref: resizeHeightDetectorRef },
5286
+ return (React__default.createElement(FormItemBase, __assign$4({}, formControlBaseProps, { className: classNames$1(className, 'FormValueItem', 'FormToggleButtonGroup', "variant-".concat(variant), "size-".concat(size), !!label && 'with-label', !!fullWidth && 'full-width', "type-".concat(type)), variant: variant, size: size, color: color, labelIcon: labelIcon, label: label, required: required, fullWidth: fullWidth, error: error, helperText: helperText, helperTextProps: { style: { marginLeft: 2 } }, style: style, sx: sx, hidden: hidden, controlHeight: height || 0, controlVerticalCenter: isOnGetItemLoading || loading, control: isOnGetItemLoading || loading ? (React__default.createElement("div", { style: { opacity: 0.54 }, ref: resizeHeightDetectorRef },
5276
5287
  React__default.createElement(CircularProgress, { size: 16, color: 'inherit' }))) : (React__default.createElement(React__default.Fragment, null,
5277
5288
  !fullWidth && !isOnGetItemLoading && !loading && items && (React__default.createElement("div", { ref: resizeWidthDetectorRef, style: {
5278
5289
  display: 'grid',
@@ -5314,7 +5325,7 @@ FormToggleButtonGroup.defaultProps = FormToggleButtonGroupDefaultProps;var FormR
5314
5325
  // ID --------------------------------------------------------------------------------------------------------------
5315
5326
  var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused,
5316
5327
  //----------------------------------------------------------------------------------------------------------------
5317
- precision = _a.precision, highlightSelectedOnly = _a.highlightSelectedOnly, icon = _a.icon, emptyIcon = _a.emptyIcon, max = _a.max,
5328
+ precision = _a.precision, highlightSelectedOnly = _a.highlightSelectedOnly, icon = _a.icon, emptyIcon = _a.emptyIcon, max = _a.max, hidden = _a.hidden,
5318
5329
  //----------------------------------------------------------------------------------------------------------------
5319
5330
  name = _a.name, labelIcon = _a.labelIcon, label = _a.label, readOnly = _a.readOnly, required = _a.required, initDisabled = _a.disabled, initError = _a.error, initHelperText = _a.helperText, initValue = _a.value, exceptValue = _a.exceptValue, onChange = _a.onChange, onValidate = _a.onValidate, onValue = _a.onValue,
5320
5331
  //----------------------------------------------------------------------------------------------------------------
@@ -5474,7 +5485,7 @@ FormToggleButtonGroup.defaultProps = FormToggleButtonGroupDefaultProps;var FormR
5474
5485
  }
5475
5486
  }, [readOnly, getFinalValue, setValue, onValueChangeByUser, name, onRequestSearchSubmit]);
5476
5487
  // Render ----------------------------------------------------------------------------------------------------------
5477
- return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormRating'), labelIcon: labelIcon, label: label, error: error, fullWidth: false, required: required, helperText: helperText, helperTextProps: { style: { marginLeft: 5 } }, style: style, sx: sx, controlHeight: height || (size === 'small' ? 21 : 26), controlVerticalCenter: true, control: React__default.createElement(Rating, { ref: resizeDetectorRef, size: size === 'medium' ? 'large' : 'medium', name: name, precision: precision, highlightSelectedOnly: highlightSelectedOnly, value: value, disabled: disabled || readOnly, max: max, icon: React__default.createElement(FormIcon, { color: color, fontSize: 'inherit' }, icon ? icon : 'Star'), emptyIcon: React__default.createElement(FormIcon, { fontSize: 'inherit' }, emptyIcon ? emptyIcon : 'StarBorder'), onChange: handleChange, onFocus: function () { return setFocused(initFocused || true); }, onBlur: function () { return setFocused(initFocused || false); } }) }));
5488
+ return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormRating'), labelIcon: labelIcon, label: label, error: error, fullWidth: false, required: required, helperText: helperText, helperTextProps: { style: { marginLeft: 5 } }, style: style, sx: sx, hidden: hidden, controlHeight: height || (size === 'small' ? 21 : 26), controlVerticalCenter: true, control: React__default.createElement(Rating, { ref: resizeDetectorRef, size: size === 'medium' ? 'large' : 'medium', name: name, precision: precision, highlightSelectedOnly: highlightSelectedOnly, value: value, disabled: disabled || readOnly, max: max, icon: React__default.createElement(FormIcon, { color: color, fontSize: 'inherit' }, icon ? icon : 'Star'), emptyIcon: React__default.createElement(FormIcon, { fontSize: 'inherit' }, emptyIcon ? emptyIcon : 'StarBorder'), onChange: handleChange, onFocus: function () { return setFocused(initFocused || true); }, onBlur: function () { return setFocused(initFocused || false); } }) }));
5478
5489
  });
5479
5490
  FormRating.displayName = 'FormRating';
5480
5491
  FormRating.defaultProps = FormRatingDefaultProps;var propTypes = {exports: {}};var reactIs = {exports: {}};var reactIs_production_min = {};/** @license React v16.13.1
@@ -7207,7 +7218,7 @@ styleInject(css_248z$a);var FormTextEditor = React__default.forwardRef(function
7207
7218
  // ID --------------------------------------------------------------------------------------------------------------
7208
7219
  var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused,
7209
7220
  //----------------------------------------------------------------------------------------------------------------
7210
- menubar = _a.menubar, height = _a.height, onImageUpload = _a.onImageUpload,
7221
+ menubar = _a.menubar, height = _a.height, hidden = _a.hidden, onImageUpload = _a.onImageUpload,
7211
7222
  //----------------------------------------------------------------------------------------------------------------
7212
7223
  name = _a.name, labelIcon = _a.labelIcon, label = _a.label, readOnly = _a.readOnly, required = _a.required, initDisabled = _a.disabled, initError = _a.error, initHelperText = _a.helperText, initValue = _a.value, exceptValue = _a.exceptValue, onChange = _a.onChange, onValidate = _a.onValidate,
7213
7224
  //----------------------------------------------------------------------------------------------------------------
@@ -7361,7 +7372,7 @@ styleInject(css_248z$a);var FormTextEditor = React__default.forwardRef(function
7361
7372
  onImageUpload(blobInfo.blob(), success, failure, progress);
7362
7373
  }, [onImageUpload]);
7363
7374
  // Render ----------------------------------------------------------------------------------------------------------
7364
- return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormTextEditor', !initialized && 'initializing'), labelIcon: labelIcon, label: label, error: error, required: required, fullWidth: true, helperText: helperText, helperTextProps: { style: { marginLeft: 5 } }, style: { width: '100%' }, controlHeight: height, control: React__default.createElement(React__default.Fragment, null,
7375
+ return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormTextEditor', !initialized && 'initializing'), labelIcon: labelIcon, label: label, error: error, required: required, fullWidth: true, helperText: helperText, helperTextProps: { style: { marginLeft: 5 } }, style: { width: '100%' }, hidden: hidden, controlHeight: height, control: React__default.createElement(React__default.Fragment, null,
7365
7376
  !initialized ? React__default.createElement(Skeleton, { variant: 'rectangular', width: '100%', height: height }) : null,
7366
7377
  React__default.createElement(Editor, { ref: editorRef, value: value, disabled: readOnly || disabled, init: {
7367
7378
  height: height,
@@ -7394,7 +7405,7 @@ FormTextEditor.defaultProps = FormTextEditorDefaultProps;var FormAutocompleteDef
7394
7405
  // ID --------------------------------------------------------------------------------------------------------------
7395
7406
  var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initLabelShrink = _a.labelShrink, initFullWidth = _a.fullWidth,
7396
7407
  //----------------------------------------------------------------------------------------------------------------
7397
- name = _a.name, labelIcon = _a.labelIcon, label = _a.label, initLoading = _a.loading, initItems = _a.items, initValue = _a.value, initError = _a.error, initHelperText = _a.helperText, initDisabled = _a.disabled, readOnly = _a.readOnly, required = _a.required, exceptValue = _a.exceptValue, width = _a.width, placeholder = _a.placeholder, multiple = _a.multiple, formValueSeparator = _a.formValueSeparator, formValueSort = _a.formValueSort, disablePortal = _a.disablePortal, noOptionsText = _a.noOptionsText, loadingText = _a.loadingText, limitTags = _a.limitTags, openOnFocus = _a.openOnFocus, disableClearable = _a.disableClearable, async = _a.async, onLoadItems = _a.onLoadItems, onAsyncLoadValueItem = _a.onAsyncLoadValueItem, onRenderItem = _a.onRenderItem, onRenderTag = _a.onRenderTag, onAddItem = _a.onAddItem,
7408
+ name = _a.name, labelIcon = _a.labelIcon, label = _a.label, initLoading = _a.loading, initItems = _a.items, initValue = _a.value, initError = _a.error, initHelperText = _a.helperText, initDisabled = _a.disabled, readOnly = _a.readOnly, required = _a.required, exceptValue = _a.exceptValue, width = _a.width, placeholder = _a.placeholder, multiple = _a.multiple, formValueSeparator = _a.formValueSeparator, formValueSort = _a.formValueSort, disablePortal = _a.disablePortal, noOptionsText = _a.noOptionsText, loadingText = _a.loadingText, limitTags = _a.limitTags, openOnFocus = _a.openOnFocus, disableClearable = _a.disableClearable, async = _a.async, hidden = _a.hidden, onLoadItems = _a.onLoadItems, onAsyncLoadValueItem = _a.onAsyncLoadValueItem, onRenderItem = _a.onRenderItem, onRenderTag = _a.onRenderTag, onAddItem = _a.onAddItem,
7398
7409
  //----------------------------------------------------------------------------------------------------------------
7399
7410
  onChange = _a.onChange, onValue = _a.onValue, onValidate = _a.onValidate,
7400
7411
  //----------------------------------------------------------------------------------------------------------------
@@ -7436,11 +7447,14 @@ FormTextEditor.defaultProps = FormTextEditorDefaultProps;var FormAutocompleteDef
7436
7447
  }, [items]);
7437
7448
  var style = useMemo(function () {
7438
7449
  var style = __assign$4({ minWidth: 120 }, initStyle);
7450
+ if (hidden) {
7451
+ style.display = 'none';
7452
+ }
7439
7453
  if (width != null) {
7440
7454
  style.width = width;
7441
7455
  }
7442
7456
  return style;
7443
- }, [initStyle, width]);
7457
+ }, [initStyle, width, hidden]);
7444
7458
  // Function - getFinalValue ----------------------------------------------------------------------------------------
7445
7459
  var getFinalValue = useCallback(function (value) {
7446
7460
  var finalValue = value;
@@ -7824,7 +7838,7 @@ FormTextEditor.defaultProps = FormTextEditorDefaultProps;var FormAutocompleteDef
7824
7838
  return value.map(function (option, index) { return (React__default.createElement(Chip, __assign$4({ size: 'small', label: onRenderTag ? onRenderTag(option) : option.label }, getTagProps({ index: index })))); });
7825
7839
  }, renderInput: function (params) { return (React__default.createElement(FormTextField, __assign$4({}, params, { ref: textFieldRef, name: name, variant: variant, size: size, color: color, labelIcon: labelIcon, label: label, labelShrink: labelShrink, required: required, focused: focused, error: error, helperText: helperText, placeholder: placeholder, noFormValueItem: true, InputProps: __assign$4(__assign$4({}, params.InputProps), { endAdornment: (React__default.createElement(React__default.Fragment, null,
7826
7840
  loading || isOnGetItemLoading ? React__default.createElement(CircularProgress$1, { color: 'inherit', size: 20 }) : null,
7827
- params.InputProps.endAdornment)) }) }))); } }));
7841
+ params.InputProps.endAdornment)) }), inputProps: readOnly || disabled ? __assign$4(__assign$4({}, params.inputProps), { tabIndex: -1 }) : params.inputProps }))); } }));
7828
7842
  });
7829
7843
  FormAutocomplete.displayName = 'FormAutocomplete';
7830
7844
  FormAutocomplete.defaultProps = FormAutocompleteDefaultProps;var FormDatePickerDefaultProps = {};var __assign = function() {
@@ -14633,9 +14647,9 @@ styleInject(css_248z$5);var PrivateDatePicker = React__default.forwardRef(functi
14633
14647
  // ID --------------------------------------------------------------------------------------------------------------
14634
14648
  var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initLabelShrink = _a.labelShrink, initFullWidth = _a.fullWidth,
14635
14649
  //--------------------------------------------------------------------------------------------------------------------
14636
- name = _a.name, type = _a.type, time = _a.time, initValue = _a.value, initLabel = _a.label, labelIcon = _a.labelIcon, initFormat = _a.format, initFormValueFormat = _a.formValueFormat, required = _a.required, readOnly = _a.readOnly, initDisabled = _a.disabled, width = _a.width, initError = _a.error, initHelperText = _a.helperText, minDate = _a.minDate, maxDate = _a.maxDate, disableFuture = _a.disableFuture, disablePast = _a.disablePast, exceptValue = _a.exceptValue, icon = _a.icon, startAdornment = _a.startAdornment, endAdornment = _a.endAdornment, align = _a.align, hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds, minuteInterval = _a.minuteInterval, secondInterval = _a.secondInterval, readOnlyInput = _a.readOnlyInput, onChange = _a.onChange, onValidate = _a.onValidate,
14650
+ name = _a.name, type = _a.type, time = _a.time, initValue = _a.value, initLabel = _a.label, labelIcon = _a.labelIcon, initFormat = _a.format, initFormValueFormat = _a.formValueFormat, required = _a.required, readOnly = _a.readOnly, initDisabled = _a.disabled, width = _a.width, initError = _a.error, initHelperText = _a.helperText, minDate = _a.minDate, maxDate = _a.maxDate, disableFuture = _a.disableFuture, disablePast = _a.disablePast, exceptValue = _a.exceptValue, icon = _a.icon, startAdornment = _a.startAdornment, endAdornment = _a.endAdornment, align = _a.align, hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds, minuteInterval = _a.minuteInterval, secondInterval = _a.secondInterval, readOnlyInput = _a.readOnlyInput, hidden = _a.hidden, onChange = _a.onChange, onValidate = _a.onValidate,
14637
14651
  //--------------------------------------------------------------------------------------------------------------------
14638
- className = _a.className, initStyle = _a.style, sx = _a.sx, otherProps = __rest$2(_a, ["variant", "size", "color", "focused", "labelShrink", "fullWidth", "name", "type", "time", "value", "label", "labelIcon", "format", "formValueFormat", "required", "readOnly", "disabled", "width", "error", "helperText", "minDate", "maxDate", "disableFuture", "disablePast", "exceptValue", "icon", "startAdornment", "endAdornment", "align", "hours", "minutes", "seconds", "minuteInterval", "secondInterval", "readOnlyInput", "onChange", "onValidate", "className", "style", "sx"]);
14652
+ className = _a.className, initStyle = _a.style, sx = _a.sx, otherProps = __rest$2(_a, ["variant", "size", "color", "focused", "labelShrink", "fullWidth", "name", "type", "time", "value", "label", "labelIcon", "format", "formValueFormat", "required", "readOnly", "disabled", "width", "error", "helperText", "minDate", "maxDate", "disableFuture", "disablePast", "exceptValue", "icon", "startAdornment", "endAdornment", "align", "hours", "minutes", "seconds", "minuteInterval", "secondInterval", "readOnlyInput", "hidden", "onChange", "onValidate", "className", "style", "sx"]);
14639
14653
  var id = useId();
14640
14654
  // Ref -------------------------------------------------------------------------------------------------------------
14641
14655
  var privateStaticDatePickerRef = useRef(null);
@@ -14762,6 +14776,11 @@ styleInject(css_248z$5);var PrivateDatePicker = React__default.forwardRef(functi
14762
14776
  }
14763
14777
  // eslint-disable-next-line react-hooks/exhaustive-deps
14764
14778
  }, [value]);
14779
+ // Memo --------------------------------------------------------------------------------------------------------------
14780
+ var wrapStyle = useMemo(function () { return ({
14781
+ display: hidden ? 'none' : fullWidth ? 'block' : 'inline-block',
14782
+ flex: fullWidth ? 1 : undefined,
14783
+ }); }, [hidden, fullWidth]);
14765
14784
  // Function - focus ------------------------------------------------------------------------------------------------
14766
14785
  var focus = useCallback(function () {
14767
14786
  var _a;
@@ -14966,11 +14985,8 @@ styleInject(css_248z$5);var PrivateDatePicker = React__default.forwardRef(functi
14966
14985
  // Render ----------------------------------------------------------------------------------------------------------
14967
14986
  return (React__default.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: dayjsLocale },
14968
14987
  React__default.createElement(ClickAwayListener, { mouseEvent: 'onMouseDown', touchEvent: 'onTouchStart', onClickAway: function () { return setOpen(false); } },
14969
- React__default.createElement("div", { className: classNames$1(className, 'PrivateDatePicker'), style: {
14970
- display: fullWidth ? 'block' : 'inline-block',
14971
- flex: fullWidth ? 1 : undefined,
14972
- }, onMouseDown: handleContainerMouseDown, onFocus: handleContainerFocus, onBlur: handleContainerBlur },
14973
- React__default.createElement(PrivateStyledTooltip, { open: open, PopperProps: {
14988
+ React__default.createElement("div", { className: classNames$1(className, 'PrivateDatePicker'), style: wrapStyle, onMouseDown: handleContainerMouseDown, onFocus: handleContainerFocus, onBlur: handleContainerBlur },
14989
+ React__default.createElement(PrivateStyledTooltip, { open: disabled || readOnly ? false : open, PopperProps: {
14974
14990
  modifiers: [
14975
14991
  {
14976
14992
  name: 'offset',
@@ -14984,7 +15000,11 @@ styleInject(css_248z$5);var PrivateDatePicker = React__default.forwardRef(functi
14984
15000
  React__default.createElement(DesktopDatePicker, __assign$4({ value: inputValue, label: label, open: false, inputFormat: format, disabled: disabled, readOnly: readOnly, minDate: minDate, maxDate: maxDate, disablePast: disablePast, disableFuture: disableFuture, onClose: function () { return setOpen(false); }, onError: function (reason) { return (datePickerErrorRef.current = reason); }, onChange: function (newValue, keyboardInputValue) { return handleChange('date', newValue, keyboardInputValue); }, renderInput: function (_a) {
14985
15001
  var initClassName = _a.className, initFocused = _a.focused, initError = _a.error, initStyle = _a.style, initInputProps = _a.inputProps, initMuiInputProps = _a.InputProps, InputLabelProps = _a.InputLabelProps, params = __rest$2(_a, ["className", "focused", "error", "style", "inputProps", "InputProps", "InputLabelProps"]);
14986
15002
  var textFieldInputLabelProps = __assign$4(__assign$4({}, InputLabelProps), { shrink: labelShrink ? true : InputLabelProps === null || InputLabelProps === void 0 ? void 0 : InputLabelProps.shrink });
14987
- var inputProps = __assign$4(__assign$4({}, initInputProps), { readOnly: (initInputProps === null || initInputProps === void 0 ? void 0 : initInputProps.readOnly) || readOnlyInput });
15003
+ var readOnly = (initInputProps === null || initInputProps === void 0 ? void 0 : initInputProps.readOnly) || readOnlyInput;
15004
+ var inputProps = __assign$4(__assign$4({}, initInputProps), { readOnly: readOnly });
15005
+ if (readOnly) {
15006
+ inputProps.tabIndex = -1;
15007
+ }
14988
15008
  var muiInputProps = __assign$4(__assign$4({}, initMuiInputProps), { endAdornment: undefined });
14989
15009
  if (startAdornment || icon || muiInputProps.startAdornment) {
14990
15010
  muiInputProps.startAdornment = (React__default.createElement(React__default.Fragment, null,
@@ -15538,7 +15558,7 @@ styleInject(css_248z$2);var InputDatePicker = function (_a) {
15538
15558
  }, [labelShrink]);
15539
15559
  // Render ----------------------------------------------------------------------------------------------------------
15540
15560
  return (React__default.createElement(DesktopDatePicker, __assign$4({}, props, { className: classNames$1(className, 'InputDatePicker', "align-".concat(align)), open: false, value: value, inputFormat: format, disabled: disabled, readOnly: readOnly || readOnlyInput, renderInput: function (_a) {
15541
- var inputStyle = _a.style, inputInputRef = _a.inputRef, inputInputProps = _a.InputProps, inputError = _a.error, inputOnFocus = _a.onFocus, inputOnBlur = _a.onBlur, params = __rest$2(_a, ["style", "inputRef", "InputProps", "error", "onFocus", "onBlur"]);
15561
+ var inputStyle = _a.style, inputInputRef = _a.inputRef, inputInputProps = _a.InputProps, initInputProps = _a.inputProps, inputError = _a.error, inputOnFocus = _a.onFocus, inputOnBlur = _a.onBlur, params = __rest$2(_a, ["style", "inputRef", "InputProps", "inputProps", "error", "onFocus", "onBlur"]);
15542
15562
  var muiInputProps = __assign$4(__assign$4({}, inputInputProps), { endAdornment: undefined });
15543
15563
  if (startAdornment || icon || muiInputProps.startAdornment) {
15544
15564
  muiInputProps.startAdornment = (React__default.createElement(React__default.Fragment, null,
@@ -15550,6 +15570,10 @@ styleInject(css_248z$2);var InputDatePicker = function (_a) {
15550
15570
  if (endAdornment) {
15551
15571
  muiInputProps.endAdornment = (React__default.createElement(React__default.Fragment, null, endAdornment && React__default.createElement(InputAdornment, { position: 'end' }, endAdornment)));
15552
15572
  }
15573
+ var inputProps = __assign$4({}, initInputProps);
15574
+ if (readOnly) {
15575
+ inputProps.tabIndex = -1;
15576
+ }
15553
15577
  return (React__default.createElement(TextField, __assign$4({}, params, { style: __assign$4(__assign$4({}, inputStyle), style), variant: variant, size: size, color: color, focused: focused, fullWidth: fullWidth, required: required, name: id, label: label, error: error || inputError, inputRef: function (ref) {
15554
15578
  if (inputInputRef) {
15555
15579
  if (typeof inputInputRef === 'function') {
@@ -15559,7 +15583,7 @@ styleInject(css_248z$2);var InputDatePicker = function (_a) {
15559
15583
  if (inputRef) {
15560
15584
  inputRef.current = ref;
15561
15585
  }
15562
- }, InputProps: muiInputProps, InputLabelProps: inputLabelProps, onFocus: function (e) {
15586
+ }, InputProps: muiInputProps, InputLabelProps: inputLabelProps, inputProps: inputProps, onFocus: function (e) {
15563
15587
  if (inputOnFocus)
15564
15588
  inputOnFocus(e);
15565
15589
  if (onFocus)
@@ -15579,7 +15603,7 @@ var FormDateRangePicker = React__default.forwardRef(function (_a, ref) {
15579
15603
  // ID --------------------------------------------------------------------------------------------------------------
15580
15604
  var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initLabelShrink = _a.labelShrink, initFullWidth = _a.fullWidth,
15581
15605
  //--------------------------------------------------------------------------------------------------------------------
15582
- name = _a.name, initValue = _a.value, startLabel = _a.startLabel, startLabelIcon = _a.startLabelIcon, endLabel = _a.endLabel, endLabelIcon = _a.endLabelIcon, initCalendarCount = _a.calendarCount, initFormat = _a.format, formValueFormat = _a.formValueFormat, allowSingleSelect = _a.allowSingleSelect, required = _a.required, requiredStart = _a.requiredStart, requiredEnd = _a.requiredEnd, readOnly = _a.readOnly, readOnlyStart = _a.readOnlyStart, readOnlyEnd = _a.readOnlyEnd, readOnlyInput = _a.readOnlyInput, initDisabled = _a.disabled, inputWidth = _a.inputWidth, exceptValue = _a.exceptValue, initError = _a.error, initHelperText = _a.helperText, formValueStartNameSuffix = _a.formValueStartNameSuffix, formValueEndNameSuffix = _a.formValueEndNameSuffix, icon = _a.icon, startIcon = _a.startIcon, endIcon = _a.endIcon, startAdornment = _a.startAdornment, startStartAdornment = _a.startStartAdornment, endStartAdornment = _a.endStartAdornment, endAdornment = _a.endAdornment, startEndAdornment = _a.startEndAdornment, endEndAdornment = _a.endEndAdornment, disablePast = _a.disablePast, disableFuture = _a.disableFuture, minDate = _a.minDate, maxDate = _a.maxDate, onChange = _a.onChange, onValidate = _a.onValidate,
15606
+ name = _a.name, initValue = _a.value, startLabel = _a.startLabel, startLabelIcon = _a.startLabelIcon, endLabel = _a.endLabel, endLabelIcon = _a.endLabelIcon, initCalendarCount = _a.calendarCount, initFormat = _a.format, formValueFormat = _a.formValueFormat, allowSingleSelect = _a.allowSingleSelect, required = _a.required, requiredStart = _a.requiredStart, requiredEnd = _a.requiredEnd, readOnly = _a.readOnly, readOnlyStart = _a.readOnlyStart, readOnlyEnd = _a.readOnlyEnd, readOnlyInput = _a.readOnlyInput, initDisabled = _a.disabled, inputWidth = _a.inputWidth, exceptValue = _a.exceptValue, initError = _a.error, initHelperText = _a.helperText, formValueStartNameSuffix = _a.formValueStartNameSuffix, formValueEndNameSuffix = _a.formValueEndNameSuffix, icon = _a.icon, startIcon = _a.startIcon, endIcon = _a.endIcon, startAdornment = _a.startAdornment, startStartAdornment = _a.startStartAdornment, endStartAdornment = _a.endStartAdornment, endAdornment = _a.endAdornment, startEndAdornment = _a.startEndAdornment, endEndAdornment = _a.endEndAdornment, disablePast = _a.disablePast, disableFuture = _a.disableFuture, minDate = _a.minDate, maxDate = _a.maxDate, hidden = _a.hidden, onChange = _a.onChange, onValidate = _a.onValidate,
15583
15607
  // -------------------------------------------------------------------------------------------------------------------
15584
15608
  className = _a.className;
15585
15609
  var id = useId();
@@ -15796,6 +15820,11 @@ var FormDateRangePicker = React__default.forwardRef(function (_a, ref) {
15796
15820
  }
15797
15821
  }
15798
15822
  }, [open]);
15823
+ // Memo --------------------------------------------------------------------------------------------------------------
15824
+ var wrapStyle = useMemo(function () { return ({
15825
+ display: hidden ? 'none' : fullWidth ? 'block' : 'inline-block',
15826
+ flex: fullWidth ? 1 : undefined,
15827
+ }); }, [hidden, fullWidth]);
15799
15828
  // Event Handler ---------------------------------------------------------------------------------------------------
15800
15829
  var handleChange = useCallback(function (newValue) {
15801
15830
  setValue(newValue);
@@ -16068,10 +16097,7 @@ var FormDateRangePicker = React__default.forwardRef(function (_a, ref) {
16068
16097
  // Render ----------------------------------------------------------------------------------------------------------
16069
16098
  return (React__default.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: dayjsLocale },
16070
16099
  React__default.createElement(ClickAwayListener, { mouseEvent: 'onMouseDown', touchEvent: 'onTouchStart', onClickAway: function () { return setOpen(false); } },
16071
- React__default.createElement("div", { className: classNames$1(className, 'FormDateRangePicker'), style: {
16072
- display: fullWidth ? 'block' : 'inline-block',
16073
- flex: fullWidth ? 1 : undefined,
16074
- }, onMouseDown: handleContainerMouseDown, onFocus: handleContainerFocus, onBlur: handleContainerBlur },
16100
+ React__default.createElement("div", { className: classNames$1(className, 'FormDateRangePicker'), style: wrapStyle, onMouseDown: handleContainerMouseDown, onFocus: handleContainerFocus, onBlur: handleContainerBlur },
16075
16101
  React__default.createElement(PrivateStyledTooltip, { open: open, PopperProps: {
16076
16102
  modifiers: [
16077
16103
  {
@@ -16147,7 +16173,7 @@ styleInject(css_248z$1);var FormFile = React__default.forwardRef(function (_a, r
16147
16173
  // ID --------------------------------------------------------------------------------------------------------------
16148
16174
  var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused, initLabelShrink = _a.labelShrink, initFullWidth = _a.fullWidth,
16149
16175
  //----------------------------------------------------------------------------------------------------------------
16150
- accept = _a.accept, hideUrl = _a.hideUrl, hideLink = _a.hideLink, maxFileSize = _a.maxFileSize, preview = _a.preview, onFile = _a.onFile, onLink = _a.onLink,
16176
+ accept = _a.accept, hideUrl = _a.hideUrl, hideLink = _a.hideLink, maxFileSize = _a.maxFileSize, preview = _a.preview, hidden = _a.hidden, onFile = _a.onFile, onLink = _a.onLink,
16151
16177
  //----------------------------------------------------------------------------------------------------------------
16152
16178
  name = _a.name, labelIcon = _a.labelIcon, initLabel = _a.label, required = _a.required, initDisabled = _a.disabled, initError = _a.error, initHelperText = _a.helperText, initValue = _a.value, exceptValue = _a.exceptValue, onChange = _a.onChange, onValidate = _a.onValidate,
16153
16179
  //----------------------------------------------------------------------------------------------------------------
@@ -16372,7 +16398,7 @@ styleInject(css_248z$1);var FormFile = React__default.forwardRef(function (_a, r
16372
16398
  }
16373
16399
  }, [name, onLink, onValueChangeByUser, setValue]);
16374
16400
  // Render ----------------------------------------------------------------------------------------------------------
16375
- return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormFile', "variant-".concat(variant), "size-".concat(size), !!initLabel && 'with-label', !!fullWidth && 'full-width', !!hideUrl && 'hide-file-name', !!hideLink && 'hide-link', notEmpty(value) && 'with-value'), labelIcon: hideUrl ? labelIcon : undefined, label: hideUrl ? initLabel : undefined, error: error, required: required, fullWidth: fullWidth, helperText: React__default.createElement("div", null,
16401
+ return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormFile', "variant-".concat(variant), "size-".concat(size), !!initLabel && 'with-label', !!fullWidth && 'full-width', !!hideUrl && 'hide-file-name', !!hideLink && 'hide-link', notEmpty(value) && 'with-value'), labelIcon: hideUrl ? labelIcon : undefined, label: hideUrl ? initLabel : undefined, error: error, required: required, fullWidth: fullWidth, hidden: hidden, helperText: React__default.createElement("div", null,
16376
16402
  preview,
16377
16403
  React__default.createElement("div", null, helperText)), hideLabel: !hideUrl, helperTextProps: {
16378
16404
  style: {
@@ -16381,7 +16407,7 @@ styleInject(css_248z$1);var FormFile = React__default.forwardRef(function (_a, r
16381
16407
  },
16382
16408
  }, style: { width: fullWidth ? '100%' : undefined }, control: React__default.createElement("div", { className: 'control-wrap' },
16383
16409
  !hideUrl && (React__default.createElement("div", { className: 'file-name-wrap' },
16384
- React__default.createElement(TextField, { inputRef: textFieldRef, className: 'file-name', variant: variant, label: label, size: size, required: required, value: value || '', focused: focused, disabled: disabled, fullWidth: true, error: error, InputLabelProps: labelShrink ? { shrink: labelShrink } : undefined, inputProps: { readOnly: true }, InputProps: {
16410
+ React__default.createElement(TextField, { inputRef: textFieldRef, className: 'file-name', variant: variant, label: label, size: size, required: required, value: value || '', focused: focused, disabled: disabled, fullWidth: true, error: error, InputLabelProps: labelShrink ? { shrink: labelShrink } : undefined, inputProps: { readOnly: true, tabIndex: -1 }, InputProps: {
16385
16411
  endAdornment: (React__default.createElement(InputAdornment, { position: 'end' },
16386
16412
  React__default.createElement("div", { className: 'input-file-wrap' },
16387
16413
  React__default.createElement(Button, { variant: 'text', className: 'input-file-btn form-file-btn', color: error ? 'error' : color, disabled: disabled, ref: fileUploadBtnRef },