@giro-ds/react 12.3.0 → 12.4.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.cjs CHANGED
@@ -2138,12 +2138,6 @@ class DateLib {
2138
2138
  * @param overrides Custom overrides for the date library functions.
2139
2139
  */
2140
2140
  constructor(options, overrides) {
2141
- /**
2142
- * Reference to the built-in Date constructor.
2143
- *
2144
- * @deprecated Use `newDate()` or `today()`.
2145
- */
2146
- this.Date = Date;
2147
2141
  /**
2148
2142
  * Creates a new `Date` object representing today's date.
2149
2143
  *
@@ -2157,7 +2151,8 @@ class DateLib {
2157
2151
  if (this.options.timeZone) {
2158
2152
  return TZDate.tz(this.options.timeZone);
2159
2153
  }
2160
- return new this.Date();
2154
+ const DateCtor = this.options.Date ?? Date;
2155
+ return new DateCtor();
2161
2156
  };
2162
2157
  /**
2163
2158
  * Creates a new `Date` object with the specified year, month, and day.
@@ -3150,7 +3145,7 @@ const ACCENT_OPTIONS = {
3150
3145
  * <VirtualKeyboard targetRef={inputRef} value={value} onChange={setValue} />
3151
3146
  * ```
3152
3147
  */
3153
- 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, }) => {
3148
+ 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, }) => {
3154
3149
  const [internalValue, setInternalValue] = React.useState(value ?? '');
3155
3150
  const [layoutName, setLayoutName] = React.useState('default');
3156
3151
  const [capsLockOn, setCapsLockOn] = React.useState(false);
@@ -3681,7 +3676,7 @@ const VirtualKeyboard = ({ variant = 'native', type = 'default', value, onChange
3681
3676
  event.stopPropagation();
3682
3677
  }, onClick: () => handleAccentSelect(option), children: option }, `${accentMenu.sourceKey}-${option}`))) }, rowIndex))) }), document.body))] })) : null;
3683
3678
  if (variant === 'native' && typeof document !== 'undefined') {
3684
- return reactDom.createPortal(jsxRuntime.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);
3679
+ return reactDom.createPortal(jsxRuntime.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);
3685
3680
  }
3686
3681
  return (jsxRuntime.jsxs("div", { id: id, className: clsx(styles$k.container, styles$k[`mode--${variant}`], styles$k[isNumpadLayout ? 'layout--numeric' : 'layout--default'], className), children: [variant === 'fixed' && (jsxRuntime.jsx("div", { className: styles$k.textFieldContainer, children: jsxRuntime.jsx(TextField, { 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] }));
3687
3682
  };