@giro-ds/react 12.3.0 → 12.5.0

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/dist/index.d.ts CHANGED
@@ -1148,6 +1148,15 @@ interface VirtualKeyboardProps extends Omit<BaseProps, 'disabled'> {
1148
1148
  * @default false
1149
1149
  */
1150
1150
  numpadWithEnter?: boolean;
1151
+ /**
1152
+ * Altura do teclado no modo `native` (overlay). Aceita qualquer valor CSS válido
1153
+ * de altura (ex.: `'320px'`, `'50dvh'`, `'40%'`).
1154
+ * Se omitido, o teclado usa uma altura fluida padrão baseada no viewport
1155
+ * (`clamp(280px, 45dvh, 420px)`).
1156
+ * Independente do valor informado, a altura nunca fica menor que 280px (piso mínimo).
1157
+ * Só tem efeito quando `variant="native"`.
1158
+ */
1159
+ nativeHeight?: string;
1151
1160
  /** Texto de ajuda do TextField exibido no modo `fixed` */
1152
1161
  helperText?: string;
1153
1162
  /** Sinaliza erro no TextField exibido no modo `fixed` */
package/dist/index.esm.js CHANGED
@@ -2119,12 +2119,6 @@ class DateLib {
2119
2119
  * @param overrides Custom overrides for the date library functions.
2120
2120
  */
2121
2121
  constructor(options, overrides) {
2122
- /**
2123
- * Reference to the built-in Date constructor.
2124
- *
2125
- * @deprecated Use `newDate()` or `today()`.
2126
- */
2127
- this.Date = Date;
2128
2122
  /**
2129
2123
  * Creates a new `Date` object representing today's date.
2130
2124
  *
@@ -2138,7 +2132,8 @@ class DateLib {
2138
2132
  if (this.options.timeZone) {
2139
2133
  return TZDate.tz(this.options.timeZone);
2140
2134
  }
2141
- return new this.Date();
2135
+ const DateCtor = this.options.Date ?? Date;
2136
+ return new DateCtor();
2142
2137
  };
2143
2138
  /**
2144
2139
  * Creates a new `Date` object with the specified year, month, and day.
@@ -3131,7 +3126,7 @@ const ACCENT_OPTIONS = {
3131
3126
  * <VirtualKeyboard targetRef={inputRef} value={value} onChange={setValue} />
3132
3127
  * ```
3133
3128
  */
3134
- const VirtualKeyboard = ({ variant = 'native', type = 'default', value, onChange, onKeyPress, onEnterPress, onTypeChange, maxLength, Emoji = false, className, id, placeholder = 'Digite aqui...', helperText, error, errorMessage, targetRef, textFieldScale = 1, showEnterKey = true, showTypeSwitchKey = true, numpadWithEnter = false, }) => {
3129
+ const VirtualKeyboard = ({ variant = 'native', type = 'default', value, onChange, onKeyPress, onEnterPress, onTypeChange, maxLength, Emoji = false, className, id, placeholder = 'Digite aqui...', helperText, error, errorMessage, targetRef, textFieldScale = 1, showEnterKey = true, showTypeSwitchKey = true, numpadWithEnter = false, nativeHeight, }) => {
3135
3130
  const [internalValue, setInternalValue] = useState(value ?? '');
3136
3131
  const [layoutName, setLayoutName] = useState('default');
3137
3132
  const [capsLockOn, setCapsLockOn] = useState(false);
@@ -3662,7 +3657,7 @@ const VirtualKeyboard = ({ variant = 'native', type = 'default', value, onChange
3662
3657
  event.stopPropagation();
3663
3658
  }, onClick: () => handleAccentSelect(option), children: option }, `${accentMenu.sourceKey}-${option}`))) }, rowIndex))) }), document.body))] })) : null;
3664
3659
  if (variant === 'native' && typeof document !== 'undefined') {
3665
- return createPortal(jsx("div", { id: id, className: clsx(styles$k.overlay, { [styles$k.overlayOpen]: isOpen }, styles$k[isNumpadLayout ? 'layout--numeric' : 'layout--default'], className), children: keyboardEl }), document.body);
3660
+ return createPortal(jsx("div", { id: id, className: clsx(styles$k.overlay, { [styles$k.overlayOpen]: isOpen }, styles$k[isNumpadLayout ? 'layout--numeric' : 'layout--default'], className), style: nativeHeight ? { '--vkeyboard-native-height': nativeHeight } : undefined, children: keyboardEl }), document.body);
3666
3661
  }
3667
3662
  return (jsxs("div", { id: id, className: clsx(styles$k.container, styles$k[`mode--${variant}`], styles$k[isNumpadLayout ? 'layout--numeric' : 'layout--default'], className), children: [variant === 'fixed' && (jsx("div", { className: styles$k.textFieldContainer, children: jsx(TextField$1, { placeholder: placeholder, value: effectiveValue, onChange: onChange, helperText: helperText, error: error, errorMessage: errorMessage, readOnly: true, disableAutoComplete: true, maxLength: maxLength, attachedToVirtualKeyboard: true, className: styles$k.textFieldWrapper, scale: textFieldScale }) })), keyboardEl] }));
3668
3663
  };