@giro-ds/react 12.1.0 → 12.1.1
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 +19 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -30
- package/dist/index.esm.js +20 -19
- package/dist/index.esm.js.map +1 -1
- package/dist/styles.css +3 -3
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -211,12 +211,7 @@ type ButtonAsCustom = ButtonOwnProps & Omit<React__default.HTMLAttributes<HTMLEl
|
|
|
211
211
|
*/
|
|
212
212
|
type ButtonProps = ButtonAsButton | ButtonAsAnchor | ButtonAsCustom;
|
|
213
213
|
|
|
214
|
-
declare const Button:
|
|
215
|
-
({ ref, as, children, variant, iconPosition, href, to, external, target, rel, disabled, onClick, size, scale, className, type, id, icon, fullWidth, ariaLabel, iconOnly, loading, tooltipText, tooltipSide, tooltipAlign, ...rest }: ButtonProps & {
|
|
216
|
-
ref?: React__default.Ref<HTMLButtonElement | HTMLAnchorElement>;
|
|
217
|
-
}): React__default.JSX.Element;
|
|
218
|
-
displayName: string;
|
|
219
|
-
};
|
|
214
|
+
declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
220
215
|
|
|
221
216
|
/** Formato de exibição da data aceito pelo componente. */
|
|
222
217
|
type DateFormat = 'dd/mm/yyyy' | 'mm/dd/yyyy' | (string & {});
|
|
@@ -626,12 +621,7 @@ interface FileUploadProps extends Omit<React__default.InputHTMLAttributes<HTMLIn
|
|
|
626
621
|
description?: string;
|
|
627
622
|
}
|
|
628
623
|
|
|
629
|
-
declare const FileUpload:
|
|
630
|
-
({ ref, value, onChange, helperText, error, errorMessage, maxFileSize, maxFilesQuantity, disabled, className, id, accept, multiple, description, descriptionErrorMessage, ...rest }: FileUploadProps & {
|
|
631
|
-
ref?: React__default.Ref<HTMLInputElement>;
|
|
632
|
-
}): React__default.JSX.Element;
|
|
633
|
-
displayName: string;
|
|
634
|
-
};
|
|
624
|
+
declare const FileUpload: React__default.ForwardRefExoticComponent<FileUploadProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
635
625
|
|
|
636
626
|
interface FilterItem$1 {
|
|
637
627
|
/** Identificador único do item (usado em `selectedIds` e `onApplyFilter`) */
|
|
@@ -1220,12 +1210,7 @@ interface SearchProps extends ScalableProps, NativeInputProps {
|
|
|
1220
1210
|
virtualKeyboard?: VirtualKeyboardType;
|
|
1221
1211
|
}
|
|
1222
1212
|
|
|
1223
|
-
declare const Search:
|
|
1224
|
-
({ ref, placeholder, disabled, value, onChange, onKeyDown, onFocus, onBlur, onClear, onClick, onMouseDown, searchMode, onSearch, id, scale, className, style, virtualKeyboard, "data-testid": testId, ...rest }: SearchProps & {
|
|
1225
|
-
ref?: React__default.Ref<HTMLInputElement>;
|
|
1226
|
-
}): React__default.JSX.Element;
|
|
1227
|
-
displayName: string;
|
|
1228
|
-
};
|
|
1213
|
+
declare const Search: React__default.ForwardRefExoticComponent<SearchProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
1229
1214
|
|
|
1230
1215
|
/**
|
|
1231
1216
|
* Props base compartilhadas por todas as configurações de tooltip do select.
|
|
@@ -1722,12 +1707,7 @@ interface TextAreaPropsBase extends Omit<React__default.TextareaHTMLAttributes<H
|
|
|
1722
1707
|
*/
|
|
1723
1708
|
type TextAreaProps = TextAreaPropsBase & TextAreaTooltipConfig;
|
|
1724
1709
|
|
|
1725
|
-
declare const _default$1: React__default.
|
|
1726
|
-
({ ref, className, value, label, placeholder, onChange, disabled, maxLength, required, helperText, tooltipText, tooltipSide, tooltipAlign, errorMessage, error, id, onBlur, onFocus, name, resize, charCount, height, virtualKeyboard, ...rest }: TextAreaProps & {
|
|
1727
|
-
ref?: React__default.Ref<HTMLTextAreaElement>;
|
|
1728
|
-
}): React__default.JSX.Element;
|
|
1729
|
-
displayName: string;
|
|
1730
|
-
}>;
|
|
1710
|
+
declare const _default$1: React__default.NamedExoticComponent<TextAreaProps & React__default.RefAttributes<HTMLTextAreaElement>>;
|
|
1731
1711
|
|
|
1732
1712
|
/** Tipos de input suportados pelo TextField */
|
|
1733
1713
|
type TextFieldType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url';
|
|
@@ -1824,12 +1804,7 @@ interface TextFieldPropsBase extends ScalableProps, Omit<React__default.InputHTM
|
|
|
1824
1804
|
*/
|
|
1825
1805
|
type TextFieldProps = TextFieldPropsBase & TextFieldTooltipConfig;
|
|
1826
1806
|
|
|
1827
|
-
declare const _default: React__default.
|
|
1828
|
-
({ ref, className, style, value, label, placeholder, type, onChange, disabled, maxLength, required, helperText, tooltipText, tooltipSide, tooltipAlign, errorMessage, error, id, icon, scale, onBlur, onFocus, name, persistIcon, virtualKeyboard, attachedToVirtualKeyboard, disableAutoComplete, ...rest }: TextFieldProps & {
|
|
1829
|
-
ref?: React__default.Ref<HTMLInputElement>;
|
|
1830
|
-
}): React__default.JSX.Element;
|
|
1831
|
-
displayName: string;
|
|
1832
|
-
}>;
|
|
1807
|
+
declare const _default: React__default.NamedExoticComponent<TextFieldProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
1833
1808
|
|
|
1834
1809
|
/**
|
|
1835
1810
|
* Props do componente individual de notificação `Toast`.
|
package/dist/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { Avatar as Avatar$1, Tooltip as Tooltip$1, Checkbox as Checkbox$1, Popover as Popover$1, Label, AlertDialog, DropdownMenu, Dialog as Dialog$1, RadioGroup, Select as Select$1, Toggle as Toggle$1, ToggleGroup as ToggleGroup$1, Toast as Toast$1, Switch as Switch$1, unstable_OneTimePasswordField } from 'radix-ui';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import React__default, { useId, useMemo, createContext, useState, useContext, useRef, useCallback, useEffect, useLayoutEffect, createElement, memo, useReducer } from 'react';
|
|
5
|
+
import React__default, { useId, useMemo, createContext, useState, useContext, useRef, useCallback, useEffect, useLayoutEffect, createElement, forwardRef, memo, useReducer } from 'react';
|
|
6
6
|
import { SpinnerIos16Regular, ChevronUp16Regular, ChevronLeft16Regular, ChevronRight16Regular, ChevronDown16Regular, Dismiss24Regular, Emoji20Regular, ChevronDown20Regular, KeyboardShiftUppercase20Regular, KeyboardShift20Filled, KeyboardShift20Regular, Backspace20Regular, Info12Regular, Dismiss16Regular, Calendar16Regular, DocumentAdd24Regular, Warning24Regular, Document24Regular, FilterRegular, Search16Regular, ChevronDownRegular, ChevronRight16Filled, Subtract16Regular, Add16Regular, SearchInfo20Regular, ArrowSortUp16Regular, ArrowSortDown16Regular, ArrowSort16Regular, Info20Filled, CheckmarkCircle20Filled, Warning20Filled, Dismiss16Filled } from '@fluentui/react-icons';
|
|
7
7
|
import { DayPicker } from 'react-day-picker';
|
|
8
8
|
import { format, addDays, addMonths, addWeeks, addYears, differenceInCalendarDays, differenceInCalendarMonths, eachMonthOfInterval, eachYearOfInterval, endOfISOWeek, endOfMonth, endOfWeek, endOfYear, getISOWeek, getMonth, getYear, getWeek, isAfter, isBefore, isDate, isSameDay, isSameMonth, isSameYear, max, min, setMonth, setYear, startOfDay, startOfISOWeek, startOfMonth, startOfWeek, startOfYear } from 'date-fns';
|
|
@@ -65,7 +65,7 @@ const Tooltip = ({ children, text, side = 'bottom', align = 'start', maxWidth, s
|
|
|
65
65
|
|
|
66
66
|
var styles$s = {"button":"Button-module__button___18Bed","button-lg":"Button-module__button-lg___-A8B9","button-sm":"Button-module__button-sm___L7aT7","button-filled":"Button-module__button-filled___IQx1z","button-outlined":"Button-module__button-outlined___hLkLN","button-text":"Button-module__button-text___8GFeA","buttonWithIcon":"Button-module__buttonWithIcon___8ehK1","buttonIconPosition-left":"Button-module__buttonIconPosition-left___uOY6b","buttonIconPosition-right":"Button-module__buttonIconPosition-right___eswRS","buttonIconPosition-both":"Button-module__buttonIconPosition-both___1Lith","buttonNoContent":"Button-module__buttonNoContent___Tc9jk","buttonIconOnly":"Button-module__buttonIconOnly___aifk4","buttonIconLeft":"Button-module__buttonIconLeft___RICR3","buttonIconRight":"Button-module__buttonIconRight___71lu2","buttonFullWidth":"Button-module__buttonFullWidth___tXuVE","disabled":"Button-module__disabled___UzdWL","buttonLoading":"Button-module__buttonLoading___RGdNw","buttonContentHidden":"Button-module__buttonContentHidden___CoCiN","buttonLoadingSpinner":"Button-module__buttonLoadingSpinner___oZxEU","spin":"Button-module__spin___kQKH9"};
|
|
67
67
|
|
|
68
|
-
const Button = ({
|
|
68
|
+
const Button = React__default.forwardRef(({ as, children, variant = 'filled', iconPosition = 'left', href, to, external = false, target, rel, disabled = false, onClick, size = 'lg', scale = 1, className, type = 'button', id, icon, fullWidth = false, ariaLabel, iconOnly = false, loading = false, tooltipText, tooltipSide = 'top', tooltipAlign = 'center', ...rest }, ref) => {
|
|
69
69
|
const generatedId = useId();
|
|
70
70
|
const componentId = id || generatedId;
|
|
71
71
|
const getComponent = () => {
|
|
@@ -181,7 +181,7 @@ const Button = ({ ref, as, children, variant = 'filled', iconPosition = 'left',
|
|
|
181
181
|
return (jsx(Tooltip, { text: tooltipText, side: tooltipSide, align: tooltipAlign, children: jsx(Component, { ...baseProps, ...getNavigationProps(), children: renderContent() }) }));
|
|
182
182
|
}
|
|
183
183
|
return (jsx(Component, { ...baseProps, ...getNavigationProps(), children: renderContent() }));
|
|
184
|
-
};
|
|
184
|
+
});
|
|
185
185
|
Button.displayName = 'Button';
|
|
186
186
|
|
|
187
187
|
function buildFormatLongFn(args) {
|
|
@@ -2845,11 +2845,13 @@ const Checkbox = ({ id, label, onCheckedChange, checked, disabled, className, st
|
|
|
2845
2845
|
}), role: "presentation", tabIndex: disabled ? -1 : 0, children: jsx(Checkbox$1.Root, { className: styles$o.root, checked: indeterminate ? 'indeterminate' : checked, id: componentId, onCheckedChange: onCheckedChange, disabled: disabled, "data-disabled": disabled, "data-indeterminate": indeterminate, "aria-checked": indeterminate ? 'mixed' : checked ? 'true' : 'false', ...rest, children: jsx(Checkbox$1.Indicator, { className: styles$o.indicator, children: indeterminate ? jsx(CheckHalf, {}) : jsx(CheckSmall, {}) }) }) }), jsx("label", { className: clsx(styles$o.label, { [styles$o.disabled]: disabled }), htmlFor: componentId, children: label })] }));
|
|
2846
2846
|
};
|
|
2847
2847
|
|
|
2848
|
-
var styles$n = {"chips":"Chips-module__chips___SOvBe","title":"Chips-module__title___ZhuQi","iconLeft":"Chips-module__iconLeft___tPhnw","iconRight":"Chips-module__iconRight___-HxL2","hasLeftIcon":"Chips-module__hasLeftIcon___D3quS","hasRightIcon":"Chips-module__hasRightIcon___ZMx2Y","brand":"Chips-module__brand___q1Gsm","success":"Chips-module__success___UhxQa","alert":"Chips-module__alert___nvPnr","disabled":"Chips-module__disabled___ElWLI"};
|
|
2848
|
+
var styles$n = {"chips":"Chips-module__chips___SOvBe","title":"Chips-module__title___ZhuQi","iconLeft":"Chips-module__iconLeft___tPhnw","iconRight":"Chips-module__iconRight___-HxL2","hasLeftIcon":"Chips-module__hasLeftIcon___D3quS","hasRightIcon":"Chips-module__hasRightIcon___ZMx2Y","brand":"Chips-module__brand___q1Gsm","success":"Chips-module__success___UhxQa","alert":"Chips-module__alert___nvPnr","interactive":"Chips-module__interactive___4ytKl","disabled":"Chips-module__disabled___ElWLI"};
|
|
2849
2849
|
|
|
2850
2850
|
const Chips = ({ children, leftIcon, rightIcon, variant = 'neutral', disabled = false, backgroundColor, textColor, scale = 1, className, style, ...rest }) => {
|
|
2851
|
+
const isInteractive = typeof rest.onClick === 'function';
|
|
2851
2852
|
const chipsClass = clsx(styles$n.chips, styles$n[variant], {
|
|
2852
2853
|
[styles$n.disabled]: disabled,
|
|
2854
|
+
[styles$n.interactive]: isInteractive && !disabled,
|
|
2853
2855
|
[styles$n.hasLeftIcon]: leftIcon,
|
|
2854
2856
|
[styles$n.hasRightIcon]: rightIcon,
|
|
2855
2857
|
}, className);
|
|
@@ -2859,7 +2861,6 @@ const Chips = ({ children, leftIcon, rightIcon, variant = 'neutral', disabled =
|
|
|
2859
2861
|
...(!disabled && textColor && { '--chips-text': `var(--${textColor})` }),
|
|
2860
2862
|
...style,
|
|
2861
2863
|
};
|
|
2862
|
-
const isInteractive = typeof rest.onClick === 'function';
|
|
2863
2864
|
const { onKeyDown: userOnKeyDown, ...otherRest } = rest;
|
|
2864
2865
|
const handleKeyDown = (e) => {
|
|
2865
2866
|
userOnKeyDown?.(e);
|
|
@@ -3625,7 +3626,7 @@ const LabelComponent = ({ children, htmlFor, required = false, tooltip = false,
|
|
|
3625
3626
|
return container;
|
|
3626
3627
|
};
|
|
3627
3628
|
|
|
3628
|
-
const TextField = ({
|
|
3629
|
+
const TextField = forwardRef(({ className, style, value, label, placeholder, type = 'text', onChange, disabled = false, maxLength, required = false, helperText, tooltipText, tooltipSide = 'bottom', tooltipAlign = 'start', errorMessage, error, id, icon, scale = 1, onBlur, onFocus, name, persistIcon = false, virtualKeyboard, attachedToVirtualKeyboard, disableAutoComplete = false, ...rest }, ref) => {
|
|
3629
3630
|
const normalizeValue = (val) => {
|
|
3630
3631
|
return val === undefined || val === null ? '' : String(val);
|
|
3631
3632
|
};
|
|
@@ -3689,7 +3690,7 @@ const TextField = ({ ref, className, style, value, label, placeholder, type = 't
|
|
|
3689
3690
|
const containerClass = clsx(styles$j.container, className, {
|
|
3690
3691
|
[styles$j.attachedToVirtualKeyboard]: attachedToVirtualKeyboard,
|
|
3691
3692
|
[styles$j.disabled]: disabled,
|
|
3692
|
-
[styles$j.error]:
|
|
3693
|
+
[styles$j.error]: hasError,
|
|
3693
3694
|
[styles$j.errorWithMessage]: !!errorMessage,
|
|
3694
3695
|
});
|
|
3695
3696
|
return (jsxs("div", { className: containerClass, style: { ...containerStyle, ...style }, children: [label && (jsx(LabelComponent, { scale: scale, htmlFor: componentId, required: required, tooltip: !!tooltipText, tooltipText: tooltipText, side: tooltipSide, align: tooltipAlign, error: hasError, disabled: disabled, children: label })), jsxs("div", { className: styles$j.inputWrapper, children: [jsxs("div", { className: styles$j.inputContainer, children: [jsx("input", { ...rest, ref: setInputRefs, id: componentId, name: name, type: type, value: inputValue, placeholder: placeholder, onChange: handleChange, onFocus: handleFocus, onBlur: handleBlur, maxLength: maxLength, disabled: disabled, "aria-invalid": hasError, "aria-required": required, "aria-describedby": helperId, inputMode: (virtualKeyboard === 'default' || virtualKeyboard === 'numeric') ? 'none' : rest.inputMode, autoComplete: (disableAutoComplete || virtualKeyboard === 'default' || virtualKeyboard === 'numeric') ? 'off' : rest.autoComplete, className: clsx({
|
|
@@ -3703,7 +3704,7 @@ const TextField = ({ ref, className, style, value, label, placeholder, type = 't
|
|
|
3703
3704
|
onChange?.(val);
|
|
3704
3705
|
}
|
|
3705
3706
|
} }) }))] }));
|
|
3706
|
-
};
|
|
3707
|
+
});
|
|
3707
3708
|
TextField.displayName = 'TextField';
|
|
3708
3709
|
var TextField$1 = React__default.memo(TextField);
|
|
3709
3710
|
|
|
@@ -3799,7 +3800,7 @@ function validatePartialDate(value, locale = 'pt-br') {
|
|
|
3799
3800
|
return 'incomplete';
|
|
3800
3801
|
}
|
|
3801
3802
|
|
|
3802
|
-
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, className, style, ...rest }) => {
|
|
3803
|
+
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 }) => {
|
|
3803
3804
|
const fieldId = useId();
|
|
3804
3805
|
const calendarId = `${fieldId}-calendar`;
|
|
3805
3806
|
const containerStyle = { '--giro-scale': scale };
|
|
@@ -3929,7 +3930,7 @@ const DatePicker = ({ locale = 'pt-br', calendarSide = 'bottom', calendarAlign =
|
|
|
3929
3930
|
}
|
|
3930
3931
|
}
|
|
3931
3932
|
};
|
|
3932
|
-
return (jsx("div", { ref: wrapperRef, className: clsx(styles$h.datePicker, className), style: { ...containerStyle, ...style }, ...rest, children: jsx(Popover, { open: showCalendar, onOpenChange: setShowCalendar, asAnchor: true, trigger: jsx(TextField$1, { className: styles$h.textfieldContainer, type: "tel", icon: jsx(Calendar16Regular, { onClick: !disabled ? handleIconClick : undefined, className: clsx(styles$h.datePickerIcon, disabled && styles$h.datePickerIconDisabled) }), onChange: (e) => {
|
|
3933
|
+
return (jsx("div", { ref: wrapperRef, id: id, className: clsx(styles$h.datePicker, className), style: { ...containerStyle, ...style }, ...rest, children: jsx(Popover, { open: showCalendar, onOpenChange: setShowCalendar, asAnchor: true, trigger: jsx(TextField$1, { className: styles$h.textfieldContainer, type: "tel", icon: jsx(Calendar16Regular, { onClick: !disabled ? handleIconClick : undefined, className: clsx(styles$h.datePickerIcon, disabled && styles$h.datePickerIconDisabled) }), onChange: (e) => {
|
|
3933
3934
|
handleTextFieldChange(String(e));
|
|
3934
3935
|
}, onKeyDown: handleKeyDown, onFocus: handleFocus, persistIcon: true, autoComplete: "off", value: displayValue, helperText: !externalError ? (helperText || undefined) : undefined, errorMessage: externalError ? combinedHelperText : undefined, error: hasValidationError ? true : undefined, maxLength: 10, required: required, label: label, disabled: disabled, scale: scale, id: fieldId, "data-testid": testId, placeholder: locale === 'en-us' ? 'MM/DD/YYYY' : 'DD/MM/YYYY', "aria-label": "Open calendar", "aria-expanded": showCalendar, "aria-controls": calendarId, "aria-invalid": hasValidationError, "aria-describedby": externalError ? undefined : (helperText ? `${fieldId}-help` : undefined) }), content: jsx(Calendar, { selected: currentSelectedDate, currentDate: currentDate, onDateChange: setCurrentDate, onDaySelect: handleDaySelect, locale: locale, format: locale === 'en-us' ? 'mm/dd/yyyy' : 'dd/mm/yyyy', minDate: minDate, maxDate: maxDate, scale: scale, id: calendarId, onClear: () => {
|
|
3935
3936
|
handleDateChange(null);
|
|
@@ -4033,7 +4034,7 @@ const matchesAccept = (file, accept) => {
|
|
|
4033
4034
|
return fileType === type;
|
|
4034
4035
|
});
|
|
4035
4036
|
};
|
|
4036
|
-
const FileUpload = ({
|
|
4037
|
+
const FileUpload = forwardRef(({ value, onChange, helperText, error = false, errorMessage, maxFileSize, maxFilesQuantity, disabled = false, className, id, accept, multiple = true, description = 'Clique ou arraste os arquivos aqui', descriptionErrorMessage = 'Falha ao subir um ou mais arquivos.', ...rest }, ref) => {
|
|
4037
4038
|
const generatedId = useId();
|
|
4038
4039
|
const componentId = id || generatedId;
|
|
4039
4040
|
const helperId = `${componentId}-helper`;
|
|
@@ -4168,7 +4169,7 @@ const FileUpload = ({ ref, value, onChange, helperText, error = false, errorMess
|
|
|
4168
4169
|
}
|
|
4169
4170
|
}, children: jsx(Dismiss16Regular, { "aria-hidden": "true" }) })] }, `${file.name}-${index}`));
|
|
4170
4171
|
}) }))] }), displayedHelper && (jsx("span", { id: helperId, role: isError ? 'alert' : undefined, className: clsx(styles$e.helperText, isError && styles$e.errorText), children: displayedHelper }))] }));
|
|
4171
|
-
};
|
|
4172
|
+
});
|
|
4172
4173
|
FileUpload.displayName = 'FileUpload';
|
|
4173
4174
|
|
|
4174
4175
|
var styles$d = {"container":"Filter-module__container___cqntK","panel":"Filter-module__panel___19HqD","search":"Filter-module__search___f0gzj","list":"Filter-module__list___UpBk1","item":"Filter-module__item___oNdeY","itemSelected":"Filter-module__itemSelected___JIpJV","itemText":"Filter-module__itemText___RS--0","itemDisabled":"Filter-module__itemDisabled___X-ktg","itemIcon":"Filter-module__itemIcon___RjJSa","noResults":"Filter-module__noResults___3m6pn","footer":"Filter-module__footer___yYS5j","buttonContent":"Filter-module__buttonContent___28fKe","buttonArrow":"Filter-module__buttonArrow___VJlpc","buttonIcon":"Filter-module__buttonIcon___OOBpZ","triggerWrapper":"Filter-module__triggerWrapper___ptPRL","triggerContent":"Filter-module__triggerContent___LYo9j","body":"Filter-module__body___qsyhk","combinedFooter":"Filter-module__combinedFooter___kTnHP"};
|
|
@@ -4195,7 +4196,7 @@ const Combined = ({ buttonText = 'Filtrar', icon, variant = 'outlined', disabled
|
|
|
4195
4196
|
|
|
4196
4197
|
var styles$c = {"search":"Search-module__search___u3QsV","searchLeftIcon":"Search-module__searchLeftIcon___OKOBq","disabled":"Search-module__disabled___adbxO","inputWithClearIcon":"Search-module__inputWithClearIcon___cqvkq","searchClearIcon":"Search-module__searchClearIcon___qX9-h"};
|
|
4197
4198
|
|
|
4198
|
-
const Search = ({
|
|
4199
|
+
const Search = React__default.forwardRef(({ placeholder = 'Dica do que deve ser buscado', disabled = false, value, onChange, onKeyDown, onFocus, onBlur, onClear, onClick, onMouseDown, searchMode = 'instant', onSearch, id, scale = 1, className, style, virtualKeyboard, 'data-testid': testId, ...rest }, ref) => {
|
|
4199
4200
|
const [internalValue, setInternalValue] = useState('');
|
|
4200
4201
|
const { internalRef: inputRef, setRefs: setInputRefs } = useInputKeyboardValue(ref);
|
|
4201
4202
|
const isControlled = value !== undefined && onChange !== undefined;
|
|
@@ -4267,7 +4268,7 @@ const Search = ({ ref, placeholder = 'Dica do que deve ser buscado', disabled =
|
|
|
4267
4268
|
setInternalValue(val);
|
|
4268
4269
|
}
|
|
4269
4270
|
} }) }))] }));
|
|
4270
|
-
};
|
|
4271
|
+
});
|
|
4271
4272
|
Search.displayName = 'Search';
|
|
4272
4273
|
|
|
4273
4274
|
const Simple = ({ items, type = 'multiple', selectedIds, onApplyFilter, placeholder = 'Selecionar...', enableSearch = false, buttonText = 'Filter', icon, variant = 'outlined', onOpen, onClose, side = 'bottom', align = 'start', disabled = false, className, selectedDate, onDateSelect, onClearDate, minDate, maxDate, locale = 'pt-br', id, ...rest }) => {
|
|
@@ -5097,13 +5098,13 @@ const ExpandableSelectItem = ({ item, variant, onSelect, selectedValues, level =
|
|
|
5097
5098
|
}, role: "button", tabIndex: item.disabled ? -1 : 0, "data-disabled": item.disabled || undefined, "data-selected": isSelected && !hasChildren ? 'true' : undefined, "data-testid": `select-item-${item.value}`, children: [variant === 'icon' && item.icon && (jsx("span", { className: styles$6.icon, children: item.icon })), jsxs("div", { className: styles$6.textContent, children: [jsx("div", { className: styles$6.title, children: item.text }), item.subTitle && jsx("div", { className: styles$6.subTitle, children: item.subTitle })] }), hasChildren && (jsx("span", { className: styles$6.chevron, children: isExpanded ? jsx(ChevronDown16Regular, {}) : jsx(ChevronRight16Regular, {}) }))] }) }), hasChildren && isExpanded && (jsx("div", { className: styles$6.childrenWrapper, children: item.children.map((child) => (jsx(ExpandableSelectItem, { item: child, variant: variant, onSelect: onSelect, selectedValues: selectedValues, level: level + 1 }, child.id || child.value))) }))] }));
|
|
5098
5099
|
};
|
|
5099
5100
|
|
|
5100
|
-
const SelectItem = ({
|
|
5101
|
+
const SelectItem = React__default.forwardRef(({ text, subTitle, icon, disabled, value, variant, disableFocusOnHover, ...restProps }, ref) => {
|
|
5101
5102
|
return (jsxs("div", { className: clsx(styles$6.itemWrapper, {
|
|
5102
5103
|
[styles$6.disabled]: disabled,
|
|
5103
5104
|
}), "data-disabled": disabled || undefined, "data-testid": `select-item-${value}`, ref: ref, children: [variant === 'icon' && icon && (jsx("span", { className: styles$6.icon, children: icon })), jsxs(Select$1.Item, { className: clsx(styles$6.item, {
|
|
5104
5105
|
[styles$6.disabled]: disabled,
|
|
5105
5106
|
}), value: value, disabled: disabled, onPointerMove: disableFocusOnHover ? (e) => e.preventDefault() : undefined, ...restProps, children: [jsx(Select$1.ItemText, { className: styles$6.title, children: text }), subTitle && jsx("div", { className: styles$6.subTitle, children: subTitle }), jsx(Select$1.ItemIndicator, { className: styles$6.itemIndicator })] })] }));
|
|
5106
|
-
};
|
|
5107
|
+
});
|
|
5107
5108
|
SelectItem.displayName = 'SelectItem';
|
|
5108
5109
|
|
|
5109
5110
|
const initialState = {
|
|
@@ -5673,7 +5674,7 @@ const TableV2 = ({ columns, data, rowSelection: rowSelectionConfig, enableSortin
|
|
|
5673
5674
|
maxWidth: col.column.columnDef.maxSize !== Number.MAX_SAFE_INTEGER
|
|
5674
5675
|
? col.column.columnDef.maxSize
|
|
5675
5676
|
: undefined,
|
|
5676
|
-
}, children: jsx("div", { className: styles$5.tableThContent, children: col.isPlaceholder ? null : col.column.getCanSort() ? (jsxs("button", { type: "button", className: styles$5.tableSortButton, onClick: col.column.getToggleSortingHandler(), "aria-label": `Ordenar por ${typeof col.column.columnDef.header === 'string' ? col.column.columnDef.header : col.id}`, children: [flexRender(col.column.columnDef.header, col.getContext()), col.column.getIsSorted() === 'asc' ? (jsx(ArrowSortUp16Regular, { className: styles$5.tableSortIcon })) : col.column.getIsSorted() === 'desc' ? (jsx(ArrowSortDown16Regular, { className: styles$5.tableSortIcon })) : (jsx(ArrowSort16Regular, { className:
|
|
5677
|
+
}, children: jsx("div", { className: styles$5.tableThContent, children: col.isPlaceholder ? null : col.column.getCanSort() ? (jsxs("button", { type: "button", className: styles$5.tableSortButton, onClick: col.column.getToggleSortingHandler(), "aria-label": `Ordenar por ${typeof col.column.columnDef.header === 'string' ? col.column.columnDef.header : col.id}`, children: [flexRender(col.column.columnDef.header, col.getContext()), col.column.getIsSorted() === 'asc' ? (jsx(ArrowSortUp16Regular, { className: styles$5.tableSortIcon })) : col.column.getIsSorted() === 'desc' ? (jsx(ArrowSortDown16Regular, { className: styles$5.tableSortIcon })) : (jsx(ArrowSort16Regular, { className: styles$5.tableSortIconNeutral }))] })) : (flexRender(col.column.columnDef.header, col.getContext())) }) }, col.id))) }, headerGroup.id))) }), jsx("tbody", { className: styles$5.tableBody, children: loading ? (Array.from({ length: skeletonRowCount }).map((_, rowIdx) => (jsx("tr", { className: styles$5.tableRow, children: table.getVisibleLeafColumns().map((col) => (jsx("td", { className: styles$5.tableTd, children: jsx(Skeleton, {}) }, col.id))) }, `skeleton-row-${rowIdx}`)))) : table.getRowModel().rows.length > 0 ? (table.getRowModel().rows.map((row, index) => {
|
|
5677
5678
|
const rowProps = onRow?.(row.original, index) ?? {};
|
|
5678
5679
|
return (jsx("tr", { className: clsx(styles$5.tableRow, rowProps.className), onClick: rowProps.onClick, onDoubleClick: rowProps.onDoubleClick, children: row.getVisibleCells().map((cell) => (jsx("td", { className: styles$5.tableTd, style: {
|
|
5679
5680
|
textAlign: cell.column.columnDef.meta?.align,
|
|
@@ -5698,7 +5699,7 @@ const TableV2 = ({ columns, data, rowSelection: rowSelectionConfig, enableSortin
|
|
|
5698
5699
|
|
|
5699
5700
|
var styles$3 = {"container":"TextArea-module__container___WEBC-","inputWrapper":"TextArea-module__inputWrapper___-omPx","inputContainer":"TextArea-module__inputContainer___0-jKY","footer":"TextArea-module__footer___7XMlj","helperText":"TextArea-module__helperText___709rD","charCount":"TextArea-module__charCount___zdbxM","error":"TextArea-module__error___DWDms","disabled":"TextArea-module__disabled___lHxCa"};
|
|
5700
5701
|
|
|
5701
|
-
const TextArea = ({
|
|
5702
|
+
const TextArea = forwardRef(({ className, value, label, placeholder, onChange, disabled = false, maxLength, required = false, helperText, tooltipText, tooltipSide = 'bottom', tooltipAlign = 'start', errorMessage, error, id, onBlur, onFocus, name, resize = 'vertical', charCount = false, height, virtualKeyboard, ...rest }, ref) => {
|
|
5702
5703
|
const normalizeValue = (val) => {
|
|
5703
5704
|
return val === undefined || val === null ? '' : String(val);
|
|
5704
5705
|
};
|
|
@@ -5743,7 +5744,7 @@ const TextArea = ({ ref, className, value, label, placeholder, onChange, disable
|
|
|
5743
5744
|
onChange?.(val);
|
|
5744
5745
|
}
|
|
5745
5746
|
} }) }))] }));
|
|
5746
|
-
};
|
|
5747
|
+
});
|
|
5747
5748
|
TextArea.displayName = 'TextArea';
|
|
5748
5749
|
var TextArea_default = React__default.memo(TextArea);
|
|
5749
5750
|
|