@giro-ds/react 12.5.1 → 12.6.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
@@ -335,6 +335,8 @@ interface CalloutProps extends Omit<BaseProps, 'disabled'>, Omit<React$1.HTMLAtt
335
335
 
336
336
  declare const Callout: React__default.FC<CalloutProps>;
337
337
 
338
+ /** Valores permitidos para o raio das bordas do Card, baseados nos tokens de border-radius do design system */
339
+ type CardBorderRadius = 4 | 8 | 12 | 16 | 24 | 'none' | 'pill' | 'circular';
338
340
  /**
339
341
  * Props do componente Card
340
342
  * @example
@@ -352,9 +354,11 @@ interface CardProps {
352
354
  className?: string;
353
355
  /** Define se o card é interativo, aplicando estilos de hover e cursor pointer */
354
356
  hoverable?: boolean;
357
+ /** Raio das bordas do card, baseado nos tokens de border-radius do design system. O padrão é 8 (8px) */
358
+ borderRadius?: CardBorderRadius;
355
359
  }
356
360
 
357
- declare function Card({ children, className, hoverable }: CardProps): React$1.JSX.Element;
361
+ declare function Card({ children, className, hoverable, borderRadius }: CardProps): React$1.JSX.Element;
358
362
 
359
363
  /**
360
364
  * Props do componente Checkbox
package/dist/index.esm.js CHANGED
@@ -2119,6 +2119,12 @@ 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;
2122
2128
  /**
2123
2129
  * Creates a new `Date` object representing today's date.
2124
2130
  *
@@ -2132,8 +2138,7 @@ class DateLib {
2132
2138
  if (this.options.timeZone) {
2133
2139
  return TZDate.tz(this.options.timeZone);
2134
2140
  }
2135
- const DateCtor = this.options.Date ?? Date;
2136
- return new DateCtor();
2141
+ return new this.Date();
2137
2142
  };
2138
2143
  /**
2139
2144
  * Creates a new `Date` object with the specified year, month, and day.
@@ -2852,8 +2857,8 @@ const Callout = ({ variant = 'neutral', title, text, icon, onDismiss, dismiss, b
2852
2857
 
2853
2858
  var styles$p = {"card":"Card-module__card___LzN-3","card--hoverable":"Card-module__card--hoverable___orpJZ"};
2854
2859
 
2855
- function Card({ children, className, hoverable }) {
2856
- return (jsx("main", { className: clsx(styles$p['card'], hoverable && styles$p['card--hoverable'], className), children: children }));
2860
+ function Card({ children, className, hoverable, borderRadius }) {
2861
+ return (jsx("div", { className: clsx(styles$p['card'], hoverable && styles$p['card--hoverable'], className), style: borderRadius !== undefined ? { borderRadius: `var(--border-radius-${borderRadius})` } : undefined, children: children }));
2857
2862
  }
2858
2863
 
2859
2864
  const CheckSmall = ({ className = '', width = 12, height = 10, fill = 'white', ...restProps }) => {
@@ -3701,7 +3706,7 @@ const VirtualKeyboard = ({ variant = 'native', type = 'default', value, onChange
3701
3706
  if (variant === 'native' && typeof document !== 'undefined') {
3702
3707
  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, [DISMISS_OUTSIDE_IGNORE_ATTRIBUTE]: true, onPointerDownCapture: handleOverlayPointerDown, onPointerUpCapture: handleOverlayPointerUp, onPointerCancelCapture: handleOverlayPointerUp, children: keyboardEl }), document.body);
3703
3708
  }
3704
- 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] }));
3709
+ 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, disableAutoComplete: true, maxLength: maxLength, attachedToVirtualKeyboard: true, className: styles$k.textFieldWrapper, scale: textFieldScale }) })), keyboardEl] }));
3705
3710
  };
3706
3711
 
3707
3712
  var styles$j = {"container":"TextField-module__container___WJHFR","inputWrapper":"TextField-module__inputWrapper___INjfd","inputContainer":"TextField-module__inputContainer___3EsFJ","icon":"TextField-module__icon___p1vwi","clearButton":"TextField-module__clearButton___kgOot","inputWithIcon":"TextField-module__inputWithIcon___shqkL","helperText":"TextField-module__helperText___d5QGC","error":"TextField-module__error___IGQzp","disabled":"TextField-module__disabled___roIKP","attachedToVirtualKeyboard":"TextField-module__attachedToVirtualKeyboard___fuO2O","errorWithMessage":"TextField-module__errorWithMessage___m-5AA","clearButtonIcon":"TextField-module__clearButtonIcon___Z2iyc"};
@@ -3904,7 +3909,7 @@ function validatePartialDate(value, locale = 'pt-br') {
3904
3909
  return 'incomplete';
3905
3910
  }
3906
3911
 
3907
- const DatePicker = ({ locale = 'pt-br', calendarSide = 'bottom', calendarAlign = 'start', helperText, required = false, label = 'Data', value, defaultValue, onChange, disabled = false, error: externalError, minDate, maxDate, 'data-testid': testId, scale = 1, id, className, style, ...rest }) => {
3912
+ const DatePicker = ({ locale = 'pt-br', calendarSide = 'bottom', calendarAlign = 'start', helperText, required = false, label, value, defaultValue, onChange, disabled = false, error: externalError, minDate, maxDate, 'data-testid': testId, scale = 1, id, className, style, ...rest }) => {
3908
3913
  const fieldId = useId();
3909
3914
  const calendarId = `${fieldId}-calendar`;
3910
3915
  const containerStyle = { '--giro-scale': scale };