@giro-ds/react 12.0.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 +248 -366
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +200 -192
- package/dist/index.esm.js +250 -366
- package/dist/index.esm.js.map +1 -1
- package/dist/styles.css +3 -3
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -84,7 +84,7 @@ const Tooltip = ({ children, text, side = 'bottom', align = 'start', maxWidth, s
|
|
|
84
84
|
|
|
85
85
|
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"};
|
|
86
86
|
|
|
87
|
-
const Button = ({
|
|
87
|
+
const Button = React.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) => {
|
|
88
88
|
const generatedId = React.useId();
|
|
89
89
|
const componentId = id || generatedId;
|
|
90
90
|
const getComponent = () => {
|
|
@@ -200,7 +200,7 @@ const Button = ({ ref, as, children, variant = 'filled', iconPosition = 'left',
|
|
|
200
200
|
return (jsxRuntime.jsx(Tooltip, { text: tooltipText, side: tooltipSide, align: tooltipAlign, children: jsxRuntime.jsx(Component, { ...baseProps, ...getNavigationProps(), children: renderContent() }) }));
|
|
201
201
|
}
|
|
202
202
|
return (jsxRuntime.jsx(Component, { ...baseProps, ...getNavigationProps(), children: renderContent() }));
|
|
203
|
-
};
|
|
203
|
+
});
|
|
204
204
|
Button.displayName = 'Button';
|
|
205
205
|
|
|
206
206
|
function buildFormatLongFn(args) {
|
|
@@ -2864,11 +2864,13 @@ const Checkbox = ({ id, label, onCheckedChange, checked, disabled, className, st
|
|
|
2864
2864
|
}), role: "presentation", tabIndex: disabled ? -1 : 0, children: jsxRuntime.jsx(radixUi.Checkbox.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: jsxRuntime.jsx(radixUi.Checkbox.Indicator, { className: styles$o.indicator, children: indeterminate ? jsxRuntime.jsx(CheckHalf, {}) : jsxRuntime.jsx(CheckSmall, {}) }) }) }), jsxRuntime.jsx("label", { className: clsx(styles$o.label, { [styles$o.disabled]: disabled }), htmlFor: componentId, children: label })] }));
|
|
2865
2865
|
};
|
|
2866
2866
|
|
|
2867
|
-
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"};
|
|
2867
|
+
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"};
|
|
2868
2868
|
|
|
2869
2869
|
const Chips = ({ children, leftIcon, rightIcon, variant = 'neutral', disabled = false, backgroundColor, textColor, scale = 1, className, style, ...rest }) => {
|
|
2870
|
+
const isInteractive = typeof rest.onClick === 'function';
|
|
2870
2871
|
const chipsClass = clsx(styles$n.chips, styles$n[variant], {
|
|
2871
2872
|
[styles$n.disabled]: disabled,
|
|
2873
|
+
[styles$n.interactive]: isInteractive && !disabled,
|
|
2872
2874
|
[styles$n.hasLeftIcon]: leftIcon,
|
|
2873
2875
|
[styles$n.hasRightIcon]: rightIcon,
|
|
2874
2876
|
}, className);
|
|
@@ -2878,7 +2880,6 @@ const Chips = ({ children, leftIcon, rightIcon, variant = 'neutral', disabled =
|
|
|
2878
2880
|
...(!disabled && textColor && { '--chips-text': `var(--${textColor})` }),
|
|
2879
2881
|
...style,
|
|
2880
2882
|
};
|
|
2881
|
-
const isInteractive = typeof rest.onClick === 'function';
|
|
2882
2883
|
const { onKeyDown: userOnKeyDown, ...otherRest } = rest;
|
|
2883
2884
|
const handleKeyDown = (e) => {
|
|
2884
2885
|
userOnKeyDown?.(e);
|
|
@@ -3644,7 +3645,7 @@ const LabelComponent = ({ children, htmlFor, required = false, tooltip = false,
|
|
|
3644
3645
|
return container;
|
|
3645
3646
|
};
|
|
3646
3647
|
|
|
3647
|
-
const TextField$1 = ({
|
|
3648
|
+
const TextField$1 = React.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) => {
|
|
3648
3649
|
const normalizeValue = (val) => {
|
|
3649
3650
|
return val === undefined || val === null ? '' : String(val);
|
|
3650
3651
|
};
|
|
@@ -3708,7 +3709,7 @@ const TextField$1 = ({ ref, className, style, value, label, placeholder, type =
|
|
|
3708
3709
|
const containerClass = clsx(styles$j.container, className, {
|
|
3709
3710
|
[styles$j.attachedToVirtualKeyboard]: attachedToVirtualKeyboard,
|
|
3710
3711
|
[styles$j.disabled]: disabled,
|
|
3711
|
-
[styles$j.error]:
|
|
3712
|
+
[styles$j.error]: hasError,
|
|
3712
3713
|
[styles$j.errorWithMessage]: !!errorMessage,
|
|
3713
3714
|
});
|
|
3714
3715
|
return (jsxRuntime.jsxs("div", { className: containerClass, style: { ...containerStyle, ...style }, children: [label && (jsxRuntime.jsx(LabelComponent, { scale: scale, htmlFor: componentId, required: required, tooltip: !!tooltipText, tooltipText: tooltipText, side: tooltipSide, align: tooltipAlign, error: hasError, disabled: disabled, children: label })), jsxRuntime.jsxs("div", { className: styles$j.inputWrapper, children: [jsxRuntime.jsxs("div", { className: styles$j.inputContainer, children: [jsxRuntime.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({
|
|
@@ -3722,7 +3723,7 @@ const TextField$1 = ({ ref, className, style, value, label, placeholder, type =
|
|
|
3722
3723
|
onChange?.(val);
|
|
3723
3724
|
}
|
|
3724
3725
|
} }) }))] }));
|
|
3725
|
-
};
|
|
3726
|
+
});
|
|
3726
3727
|
TextField$1.displayName = 'TextField';
|
|
3727
3728
|
var TextField = React.memo(TextField$1);
|
|
3728
3729
|
|
|
@@ -3818,7 +3819,7 @@ function validatePartialDate(value, locale = 'pt-br') {
|
|
|
3818
3819
|
return 'incomplete';
|
|
3819
3820
|
}
|
|
3820
3821
|
|
|
3821
|
-
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 }) => {
|
|
3822
|
+
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 }) => {
|
|
3822
3823
|
const fieldId = React.useId();
|
|
3823
3824
|
const calendarId = `${fieldId}-calendar`;
|
|
3824
3825
|
const containerStyle = { '--giro-scale': scale };
|
|
@@ -3948,7 +3949,7 @@ const DatePicker = ({ locale = 'pt-br', calendarSide = 'bottom', calendarAlign =
|
|
|
3948
3949
|
}
|
|
3949
3950
|
}
|
|
3950
3951
|
};
|
|
3951
|
-
return (jsxRuntime.jsx("div", { ref: wrapperRef, className: clsx(styles$h.datePicker, className), style: { ...containerStyle, ...style }, ...rest, children: jsxRuntime.jsx(Popover, { open: showCalendar, onOpenChange: setShowCalendar, asAnchor: true, trigger: jsxRuntime.jsx(TextField, { className: styles$h.textfieldContainer, type: "tel", icon: jsxRuntime.jsx(reactIcons.Calendar16Regular, { onClick: !disabled ? handleIconClick : undefined, className: clsx(styles$h.datePickerIcon, disabled && styles$h.datePickerIconDisabled) }), onChange: (e) => {
|
|
3952
|
+
return (jsxRuntime.jsx("div", { ref: wrapperRef, id: id, className: clsx(styles$h.datePicker, className), style: { ...containerStyle, ...style }, ...rest, children: jsxRuntime.jsx(Popover, { open: showCalendar, onOpenChange: setShowCalendar, asAnchor: true, trigger: jsxRuntime.jsx(TextField, { className: styles$h.textfieldContainer, type: "tel", icon: jsxRuntime.jsx(reactIcons.Calendar16Regular, { onClick: !disabled ? handleIconClick : undefined, className: clsx(styles$h.datePickerIcon, disabled && styles$h.datePickerIconDisabled) }), onChange: (e) => {
|
|
3952
3953
|
handleTextFieldChange(String(e));
|
|
3953
3954
|
}, 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: jsxRuntime.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: () => {
|
|
3954
3955
|
handleDateChange(null);
|
|
@@ -4052,7 +4053,7 @@ const matchesAccept = (file, accept) => {
|
|
|
4052
4053
|
return fileType === type;
|
|
4053
4054
|
});
|
|
4054
4055
|
};
|
|
4055
|
-
const FileUpload = ({
|
|
4056
|
+
const FileUpload = React.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) => {
|
|
4056
4057
|
const generatedId = React.useId();
|
|
4057
4058
|
const componentId = id || generatedId;
|
|
4058
4059
|
const helperId = `${componentId}-helper`;
|
|
@@ -4187,7 +4188,7 @@ const FileUpload = ({ ref, value, onChange, helperText, error = false, errorMess
|
|
|
4187
4188
|
}
|
|
4188
4189
|
}, children: jsxRuntime.jsx(reactIcons.Dismiss16Regular, { "aria-hidden": "true" }) })] }, `${file.name}-${index}`));
|
|
4189
4190
|
}) }))] }), displayedHelper && (jsxRuntime.jsx("span", { id: helperId, role: isError ? 'alert' : undefined, className: clsx(styles$e.helperText, isError && styles$e.errorText), children: displayedHelper }))] }));
|
|
4190
|
-
};
|
|
4191
|
+
});
|
|
4191
4192
|
FileUpload.displayName = 'FileUpload';
|
|
4192
4193
|
|
|
4193
4194
|
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"};
|
|
@@ -4214,7 +4215,7 @@ const Combined = ({ buttonText = 'Filtrar', icon, variant = 'outlined', disabled
|
|
|
4214
4215
|
|
|
4215
4216
|
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"};
|
|
4216
4217
|
|
|
4217
|
-
const Search = ({
|
|
4218
|
+
const Search = React.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) => {
|
|
4218
4219
|
const [internalValue, setInternalValue] = React.useState('');
|
|
4219
4220
|
const { internalRef: inputRef, setRefs: setInputRefs } = useInputKeyboardValue(ref);
|
|
4220
4221
|
const isControlled = value !== undefined && onChange !== undefined;
|
|
@@ -4286,7 +4287,7 @@ const Search = ({ ref, placeholder = 'Dica do que deve ser buscado', disabled =
|
|
|
4286
4287
|
setInternalValue(val);
|
|
4287
4288
|
}
|
|
4288
4289
|
} }) }))] }));
|
|
4289
|
-
};
|
|
4290
|
+
});
|
|
4290
4291
|
Search.displayName = 'Search';
|
|
4291
4292
|
|
|
4292
4293
|
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 }) => {
|
|
@@ -4405,42 +4406,38 @@ const Filter = ({ mode = 'simple', ...props }) => {
|
|
|
4405
4406
|
return jsxRuntime.jsx(Simple, { ...props });
|
|
4406
4407
|
};
|
|
4407
4408
|
|
|
4408
|
-
var styles$b = {"
|
|
4409
|
+
var styles$b = {"listItem":"ListItem-module__listItem___ljWE5","listItemRow":"ListItem-module__listItemRow___Ur5aJ","listItem-checkbox":"ListItem-module__listItem-checkbox___-cn1b","listItem-icon":"ListItem-module__listItem-icon___B-LXx","listItem-text":"ListItem-module__listItem-text___pLRU7","listItemDisabled":"ListItem-module__listItemDisabled___8gsyb","listItemWrapperText":"ListItem-module__listItemWrapperText___tT-Yj","listItemWrapperIcon":"ListItem-module__listItemWrapperIcon___qK4Ct","listItemTitle":"ListItem-module__listItemTitle___lpf-A","listItemSubtext":"ListItem-module__listItemSubtext___WDxHE","listItemChevron":"ListItem-module__listItemChevron___fCuqf","listItemChevronExpanded":"ListItem-module__listItemChevronExpanded___HYTON","listItemChildren":"ListItem-module__listItemChildren___H3Vur"};
|
|
4409
4410
|
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
const Radio = ({ items, onValueChange, defaultValue, name, id, ariaLabel, orientation = 'vertical', scale = 1, className, style, ...rest }) => {
|
|
4413
|
-
const generatedId = React.useId();
|
|
4414
|
-
const componentId = id || generatedId;
|
|
4415
|
-
return (jsxRuntime.jsx(radixUi.RadioGroup.Root, { id: componentId, className: clsx(styles$a.root, className), style: { '--giro-scale': scale, ...style }, defaultValue: defaultValue, onValueChange: onValueChange, name: name, "aria-label": ariaLabel, "data-orientation": orientation, orientation: orientation, ...rest, children: items.map(({ id, value, disabled, label }) => {
|
|
4416
|
-
const itemKey = id ?? value;
|
|
4417
|
-
const uniqueId = `${componentId}-item-${value}`;
|
|
4418
|
-
return (jsxRuntime.jsx("div", { className: clsx(styles$a.wrapper, { [styles$a.disabled]: disabled }), children: jsxRuntime.jsxs("label", { className: styles$a.labelWrapper, htmlFor: uniqueId, children: [jsxRuntime.jsx("div", { className: styles$a.itemWrapper, children: jsxRuntime.jsx(radixUi.RadioGroup.Item, { disabled: disabled, className: styles$a.item, value: value, id: uniqueId, "data-disabled": disabled, children: jsxRuntime.jsx(radixUi.RadioGroup.Indicator, { className: styles$a.indicator }) }) }), jsxRuntime.jsx("span", { className: styles$a.labelText, children: label })] }) }, itemKey));
|
|
4419
|
-
}) }));
|
|
4420
|
-
};
|
|
4421
|
-
|
|
4422
|
-
const ListItem = ({ id, className, variant = 'text', text, name, subText, disabled = false, checked = false, selected = false, onClick, onChange, icon, value, showSubText = false, hovered = false, ...rest }) => {
|
|
4411
|
+
const ListItem = ({ id, className, variant = 'text', text, subText, disabled = false, checked = false, selected = false, onClick, onChange, icon, customWidth, scale = 1, children, defaultExpanded = false, expanded, onExpandedChange, ...rest }) => {
|
|
4423
4412
|
const componentId = React.useId();
|
|
4424
4413
|
const itemId = id || componentId;
|
|
4425
4414
|
const [internalChecked, setInternalChecked] = React.useState(checked);
|
|
4426
4415
|
const [internalSelected, setInternalSelected] = React.useState(selected);
|
|
4416
|
+
const [internalExpanded, setInternalExpanded] = React.useState(expanded ?? defaultExpanded);
|
|
4417
|
+
const [childrenCheckedMap, setChildrenCheckedMap] = React.useState({});
|
|
4418
|
+
const childrenCount = variant === 'checkbox'
|
|
4419
|
+
? React.Children.toArray(children).filter(child => React.isValidElement(child) && !child.props.disabled).length
|
|
4420
|
+
: 0;
|
|
4421
|
+
const checkedCount = Object.values(childrenCheckedMap).filter(Boolean).length;
|
|
4422
|
+
const isIndeterminate = childrenCount > 0 && checkedCount > 0 && checkedCount < childrenCount;
|
|
4423
|
+
const hasChildren = React.Children.count(children) > 0;
|
|
4427
4424
|
const handleCheckboxClick = React.useCallback((e) => {
|
|
4428
4425
|
if (disabled)
|
|
4429
4426
|
return;
|
|
4430
|
-
const newChecked = !internalChecked;
|
|
4427
|
+
const newChecked = isIndeterminate ? true : !internalChecked;
|
|
4431
4428
|
setInternalChecked(newChecked);
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
onChange?.(true);
|
|
4429
|
+
if (childrenCount > 0) {
|
|
4430
|
+
const newMap = {};
|
|
4431
|
+
React.Children.forEach(children, (child, index) => {
|
|
4432
|
+
if (React.isValidElement(child) && !child.props.disabled) {
|
|
4433
|
+
newMap[index] = newChecked;
|
|
4434
|
+
}
|
|
4435
|
+
});
|
|
4436
|
+
setChildrenCheckedMap(newMap);
|
|
4441
4437
|
}
|
|
4438
|
+
onChange?.(newChecked);
|
|
4442
4439
|
onClick?.(e);
|
|
4443
|
-
}, [disabled, internalChecked, onChange, onClick]);
|
|
4440
|
+
}, [disabled, internalChecked, isIndeterminate, childrenCount, onChange, onClick, children]);
|
|
4444
4441
|
const handleTextOrIconClick = React.useCallback((e) => {
|
|
4445
4442
|
if (disabled)
|
|
4446
4443
|
return;
|
|
@@ -4448,16 +4445,55 @@ const ListItem = ({ id, className, variant = 'text', text, name, subText, disabl
|
|
|
4448
4445
|
setInternalSelected(newSelected);
|
|
4449
4446
|
onClick?.(e);
|
|
4450
4447
|
}, [disabled, internalSelected, onClick]);
|
|
4448
|
+
const handleChildChange = React.useCallback((index, childChecked) => {
|
|
4449
|
+
setChildrenCheckedMap(prev => {
|
|
4450
|
+
const next = { ...prev, [index]: childChecked };
|
|
4451
|
+
const total = childrenCount;
|
|
4452
|
+
const checked = Object.values(next).filter(Boolean).length;
|
|
4453
|
+
if (checked === 0) {
|
|
4454
|
+
setInternalChecked(false);
|
|
4455
|
+
onChange?.(false);
|
|
4456
|
+
}
|
|
4457
|
+
else if (checked === total) {
|
|
4458
|
+
setInternalChecked(true);
|
|
4459
|
+
onChange?.(true);
|
|
4460
|
+
}
|
|
4461
|
+
return next;
|
|
4462
|
+
});
|
|
4463
|
+
}, [childrenCount, onChange]);
|
|
4464
|
+
const handleClick = React.useCallback((e) => {
|
|
4465
|
+
if (hasChildren) {
|
|
4466
|
+
if (disabled)
|
|
4467
|
+
return;
|
|
4468
|
+
const newExpanded = !internalExpanded;
|
|
4469
|
+
setInternalExpanded(newExpanded);
|
|
4470
|
+
onExpandedChange?.(newExpanded);
|
|
4471
|
+
return;
|
|
4472
|
+
}
|
|
4473
|
+
switch (variant) {
|
|
4474
|
+
case 'checkbox':
|
|
4475
|
+
handleCheckboxClick(e);
|
|
4476
|
+
break;
|
|
4477
|
+
case 'text':
|
|
4478
|
+
case 'icon':
|
|
4479
|
+
default:
|
|
4480
|
+
handleTextOrIconClick(e);
|
|
4481
|
+
break;
|
|
4482
|
+
}
|
|
4483
|
+
}, [hasChildren, disabled, internalExpanded, onExpandedChange, variant, handleCheckboxClick, handleTextOrIconClick]);
|
|
4451
4484
|
const handleKeyDown = React.useCallback((e) => {
|
|
4452
4485
|
if (!disabled && (e.key === 'Enter' || e.key === ' ')) {
|
|
4453
4486
|
e.preventDefault();
|
|
4487
|
+
if (hasChildren) {
|
|
4488
|
+
const newExpanded = !internalExpanded;
|
|
4489
|
+
setInternalExpanded(newExpanded);
|
|
4490
|
+
onExpandedChange?.(newExpanded);
|
|
4491
|
+
return;
|
|
4492
|
+
}
|
|
4454
4493
|
switch (variant) {
|
|
4455
4494
|
case 'checkbox':
|
|
4456
4495
|
handleCheckboxClick(e);
|
|
4457
4496
|
break;
|
|
4458
|
-
case 'radio':
|
|
4459
|
-
handleRadioClick(e);
|
|
4460
|
-
break;
|
|
4461
4497
|
case 'text':
|
|
4462
4498
|
case 'icon':
|
|
4463
4499
|
default:
|
|
@@ -4465,54 +4501,80 @@ const ListItem = ({ id, className, variant = 'text', text, name, subText, disabl
|
|
|
4465
4501
|
break;
|
|
4466
4502
|
}
|
|
4467
4503
|
}
|
|
4468
|
-
}, [disabled, variant, handleCheckboxClick,
|
|
4504
|
+
}, [disabled, hasChildren, internalExpanded, onExpandedChange, variant, handleCheckboxClick, handleTextOrIconClick]);
|
|
4469
4505
|
React.useEffect(() => {
|
|
4470
4506
|
setInternalChecked(checked);
|
|
4471
4507
|
}, [checked]);
|
|
4472
4508
|
React.useEffect(() => {
|
|
4473
4509
|
setInternalSelected(selected);
|
|
4474
4510
|
}, [selected]);
|
|
4511
|
+
React.useEffect(() => {
|
|
4512
|
+
if (expanded !== undefined)
|
|
4513
|
+
setInternalExpanded(expanded);
|
|
4514
|
+
}, [expanded]);
|
|
4515
|
+
React.useEffect(() => {
|
|
4516
|
+
if (!internalExpanded || variant !== 'checkbox' || childrenCount === 0)
|
|
4517
|
+
return;
|
|
4518
|
+
setChildrenCheckedMap(prev => {
|
|
4519
|
+
let changed = false;
|
|
4520
|
+
const next = { ...prev };
|
|
4521
|
+
React.Children.forEach(children, (child, index) => {
|
|
4522
|
+
if (React.isValidElement(child) && !child.props.disabled && !(index in next)) {
|
|
4523
|
+
next[index] = internalChecked;
|
|
4524
|
+
changed = true;
|
|
4525
|
+
}
|
|
4526
|
+
});
|
|
4527
|
+
return changed ? next : prev;
|
|
4528
|
+
});
|
|
4529
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4530
|
+
}, [internalExpanded, childrenCount, variant]);
|
|
4475
4531
|
const renderVariantContent = React.useCallback(() => {
|
|
4476
|
-
const validVariants = ['text', 'checkbox', '
|
|
4532
|
+
const validVariants = ['text', 'checkbox', 'icon'];
|
|
4477
4533
|
const currentVariant = validVariants.includes(variant) ? variant : 'text';
|
|
4478
4534
|
switch (currentVariant) {
|
|
4479
4535
|
case 'checkbox':
|
|
4480
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Checkbox, { checked: internalChecked, disabled: disabled, onCheckedChange: () => handleCheckboxClick({}) }), jsxRuntime.jsxs("div", { className: styles$b
|
|
4481
|
-
case 'radio':
|
|
4482
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: styles$b['zds-list-item__wrapper-radio'], children: jsxRuntime.jsx("span", { className: styles$b['zds-list-item__radio'], "aria-hidden": "true", children: jsxRuntime.jsx(Radio, { name: name, onValueChange: () => handleRadioClick({}), items: [{
|
|
4483
|
-
value: value || '',
|
|
4484
|
-
label: '',
|
|
4485
|
-
disabled: disabled
|
|
4486
|
-
}], "aria-labelledby": `${itemId}-text` }) }) }), jsxRuntime.jsxs("div", { className: styles$b['zds-list-item__wrapper-text'], children: [jsxRuntime.jsx("span", { id: `${itemId}-text`, className: styles$b['zds-list-item__title'], onClick: handleRadioClick, children: text }), showSubText && subText && (jsxRuntime.jsx("span", { id: `${itemId}-subtext`, className: styles$b['zds-list-item__subtext'], children: subText }))] })] }));
|
|
4536
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { "aria-hidden": "true", onClick: hasChildren ? (e) => e.stopPropagation() : undefined, children: jsxRuntime.jsx(Checkbox, { checked: internalChecked, indeterminate: isIndeterminate, disabled: disabled, scale: scale, onCheckedChange: () => handleCheckboxClick({}) }) }), jsxRuntime.jsxs("div", { className: styles$b.listItemWrapperText, children: [jsxRuntime.jsx("span", { id: `${itemId}-text`, className: styles$b.listItemTitle, onClick: hasChildren ? (e) => { e.stopPropagation(); handleCheckboxClick(e); } : undefined, children: text }), subText && (jsxRuntime.jsx("span", { id: `${itemId}-subtext`, className: styles$b.listItemSubtext, children: subText }))] })] }));
|
|
4487
4537
|
case 'icon':
|
|
4488
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: styles$b
|
|
4538
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: styles$b.listItemWrapperIcon, children: icon }), jsxRuntime.jsxs("div", { className: styles$b.listItemWrapperText, children: [jsxRuntime.jsx("span", { id: `${itemId}-text`, className: styles$b.listItemTitle, children: text }), subText && (jsxRuntime.jsx("span", { id: `${itemId}-subtext`, className: styles$b.listItemSubtext, children: subText }))] })] }));
|
|
4489
4539
|
case 'text':
|
|
4490
4540
|
default:
|
|
4491
|
-
return (jsxRuntime.jsxs("div", { className: styles$b
|
|
4541
|
+
return (jsxRuntime.jsxs("div", { className: styles$b.listItemWrapperText, children: [jsxRuntime.jsx("span", { id: `${itemId}-text`, className: styles$b.listItemTitle, children: text }), subText && (jsxRuntime.jsx("span", { id: `${itemId}-subtext`, className: styles$b.listItemSubtext, children: subText }))] }));
|
|
4492
4542
|
}
|
|
4493
|
-
}, [variant, itemId, internalChecked, disabled, handleCheckboxClick,
|
|
4494
|
-
const listItemClass = clsx(styles$b
|
|
4495
|
-
[styles$b[`
|
|
4496
|
-
[styles$b
|
|
4497
|
-
[styles$b['zds-list-item--hovered']]: hovered,
|
|
4543
|
+
}, [variant, itemId, internalChecked, isIndeterminate, disabled, handleCheckboxClick, text, subText, icon, scale, hasChildren]);
|
|
4544
|
+
const listItemClass = clsx(styles$b.listItem, {
|
|
4545
|
+
[styles$b[`listItem-${variant}`]]: variant,
|
|
4546
|
+
[styles$b.listItemDisabled]: disabled,
|
|
4498
4547
|
[className || '']: className
|
|
4499
4548
|
});
|
|
4500
|
-
const
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4549
|
+
const ariaChecked = variant === 'checkbox' ? internalChecked : undefined;
|
|
4550
|
+
const ariaRole = variant === 'checkbox' ? 'checkbox' : 'option';
|
|
4551
|
+
return (jsxRuntime.jsxs("li", { id: itemId, className: listItemClass, "data-testid": "list-item", style: {
|
|
4552
|
+
'--giro-scale': scale,
|
|
4553
|
+
...(customWidth != null ? { width: customWidth } : {}),
|
|
4554
|
+
}, ...rest, children: [jsxRuntime.jsxs("div", { role: ariaRole, className: styles$b.listItemRow, tabIndex: disabled ? -1 : 0, onClick: handleClick, onKeyDown: handleKeyDown, "aria-selected": variant === 'text' || variant === 'icon' ? internalSelected : undefined, "aria-disabled": disabled, "aria-checked": ariaChecked, "aria-expanded": hasChildren ? internalExpanded : undefined, "aria-labelledby": `${itemId}-text`, "aria-describedby": subText ? `${itemId}-subtext` : undefined, children: [renderVariantContent(), hasChildren && (jsxRuntime.jsx("span", { "data-testid": "list-item-chevron", "aria-hidden": "true", className: clsx(styles$b.listItemChevron, {
|
|
4555
|
+
[styles$b.listItemChevronExpanded]: internalExpanded,
|
|
4556
|
+
}), children: jsxRuntime.jsx(reactIcons.ChevronDown16Regular, {}) }))] }), hasChildren && internalExpanded && (jsxRuntime.jsx("ul", { className: styles$b.listItemChildren, role: "group", children: variant === 'checkbox'
|
|
4557
|
+
? React.Children.map(children, (child, index) => React.isValidElement(child)
|
|
4558
|
+
? React.cloneElement(child, {
|
|
4559
|
+
checked: child.props.disabled
|
|
4560
|
+
? child.props.checked
|
|
4561
|
+
: (childrenCheckedMap[index] ?? internalChecked),
|
|
4562
|
+
onChange: (childChecked) => {
|
|
4563
|
+
child.props.onChange?.(childChecked);
|
|
4564
|
+
handleChildChange(index, childChecked);
|
|
4565
|
+
},
|
|
4566
|
+
})
|
|
4567
|
+
: child)
|
|
4568
|
+
: children }))] }));
|
|
4507
4569
|
};
|
|
4508
4570
|
|
|
4509
|
-
var styles$
|
|
4571
|
+
var styles$a = {"content":"Menu-module__content___pnDF6","subContent":"Menu-module__subContent___O9T-y","itemsWrapper":"Menu-module__itemsWrapper___Fcg71","item":"Menu-module__item___S3HKY","subTrigger":"Menu-module__subTrigger___CdnJE","itemSubText":"Menu-module__itemSubText___U1HFP","itemIcon":"Menu-module__itemIcon___iyxmZ","wrapperText":"Menu-module__wrapperText___PomUe","itemText":"Menu-module__itemText___2fd2B","chevronIcon":"Menu-module__chevronIcon___Gda-U","searchWrapper":"Menu-module__searchWrapper___e0knQ","emptyState":"Menu-module__emptyState___3wh-S","loadingMore":"Menu-module__loadingMore___fUCvH"};
|
|
4510
4572
|
|
|
4511
4573
|
const MenuItem = React.memo(({ item, isSelected, onSelect }) => {
|
|
4512
4574
|
const handleSelect = () => {
|
|
4513
4575
|
onSelect(item);
|
|
4514
4576
|
};
|
|
4515
|
-
return (jsxRuntime.jsxs(radixUi.DropdownMenu.Item, { className: clsx(styles$
|
|
4577
|
+
return (jsxRuntime.jsxs(radixUi.DropdownMenu.Item, { className: clsx(styles$a.item), "data-selected": isSelected || undefined, onSelect: handleSelect, disabled: item.disabled, children: [item.icon && jsxRuntime.jsx("span", { className: styles$a.itemIcon, children: item.icon }), jsxRuntime.jsxs("div", { className: styles$a.wrapperText, children: [jsxRuntime.jsx("span", { className: styles$a.itemText, children: item.text }), item.subText && (jsxRuntime.jsx("span", { className: styles$a.itemSubText, children: item.subText }))] })] }));
|
|
4516
4578
|
});
|
|
4517
4579
|
MenuItem.displayName = 'MenuItem';
|
|
4518
4580
|
|
|
@@ -4740,7 +4802,7 @@ const Menu = ({ items, children, onItemSelect, search, enableInfiniteScroll, onS
|
|
|
4740
4802
|
const renderMenuItem = React.useCallback((item, key) => {
|
|
4741
4803
|
const hasChildren = item.children && item.children.length > 0;
|
|
4742
4804
|
if (hasChildren) {
|
|
4743
|
-
return (jsxRuntime.jsxs(radixUi.DropdownMenu.Sub, { children: [jsxRuntime.jsxs(radixUi.DropdownMenu.SubTrigger, { className: styles$
|
|
4805
|
+
return (jsxRuntime.jsxs(radixUi.DropdownMenu.Sub, { children: [jsxRuntime.jsxs(radixUi.DropdownMenu.SubTrigger, { className: styles$a.subTrigger, disabled: item.disabled, children: [item.icon && (jsxRuntime.jsx("span", { className: styles$a.itemIcon, children: item.icon })), jsxRuntime.jsxs("div", { className: styles$a.wrapperText, children: [jsxRuntime.jsx("span", { className: styles$a.itemText, children: item.text }), item.subText && (jsxRuntime.jsx("span", { className: styles$a.itemSubText, children: item.subText }))] }), jsxRuntime.jsx(reactIcons.ChevronRight16Filled, { className: styles$a.chevronIcon })] }), jsxRuntime.jsx(radixUi.DropdownMenu.Portal, { children: jsxRuntime.jsx(radixUi.DropdownMenu.SubContent, { className: styles$a.subContent, sideOffset: 16, collisionPadding: 20, children: item.children.map((childItem, childIndex) => renderMenuItem(childItem, `${key}-${childIndex}`)) }) })] }, key));
|
|
4744
4806
|
}
|
|
4745
4807
|
return (jsxRuntime.jsx(MenuItem, { item: item, isSelected: isItemSelected(item), onSelect: handleItemSelect }, key));
|
|
4746
4808
|
}, [handleItemSelect, isItemSelected]);
|
|
@@ -4751,7 +4813,7 @@ const Menu = ({ items, children, onItemSelect, search, enableInfiniteScroll, onS
|
|
|
4751
4813
|
hasReachedEndRef.current = false;
|
|
4752
4814
|
}
|
|
4753
4815
|
};
|
|
4754
|
-
return (jsxRuntime.jsxs(radixUi.DropdownMenu.Root, { open: open, onOpenChange: handleOpenChange, children: [jsxRuntime.jsx(radixUi.DropdownMenu.Trigger, { asChild: true, children: triggerWithScale }), jsxRuntime.jsx(radixUi.DropdownMenu.Portal, { children: jsxRuntime.jsxs(radixUi.DropdownMenu.Content, { className: clsx(styles$
|
|
4816
|
+
return (jsxRuntime.jsxs(radixUi.DropdownMenu.Root, { open: open, onOpenChange: handleOpenChange, children: [jsxRuntime.jsx(radixUi.DropdownMenu.Trigger, { asChild: true, children: triggerWithScale }), jsxRuntime.jsx(radixUi.DropdownMenu.Portal, { children: jsxRuntime.jsxs(radixUi.DropdownMenu.Content, { className: clsx(styles$a.content, className), style: { ...containerStyle, ...style }, sideOffset: 8, align: align, onPointerDown: () => { closedByPointerRef.current = true; }, onInteractOutside: () => { closedByPointerRef.current = true; }, onCloseAutoFocus: (e) => {
|
|
4755
4817
|
if (closedByPointerRef.current) {
|
|
4756
4818
|
e.preventDefault();
|
|
4757
4819
|
closedByPointerRef.current = false;
|
|
@@ -4760,10 +4822,10 @@ const Menu = ({ items, children, onItemSelect, search, enableInfiniteScroll, onS
|
|
|
4760
4822
|
if (search) {
|
|
4761
4823
|
e.stopPropagation();
|
|
4762
4824
|
}
|
|
4763
|
-
}, ...rest, children: [search && (jsxRuntime.jsx("div", { className: styles$
|
|
4825
|
+
}, ...rest, children: [search && (jsxRuntime.jsx("div", { className: styles$a.searchWrapper, children: jsxRuntime.jsx(Search, { placeholder: "Buscar", onChange: handleSearchChange, value: searchInput, onKeyDown: handleSearchKeyDown }) })), jsxRuntime.jsxs("div", { className: styles$a.itemsWrapper, ref: itemsWrapperRef, style: { maxHeight: maxHeightStyle }, children: [filteredItems.length > 0 ? (filteredItems.map((item, index) => renderMenuItem(item, item.value || item.text || `item-${index}`))) : (jsxRuntime.jsx("div", { className: styles$a.emptyState, children: "Nenhum item encontrado" })), enableInfiniteScroll && isLoadingMore && (jsxRuntime.jsx("div", { className: styles$a.loadingMore, children: "Carregando mais itens..." })), enableInfiniteScroll && (jsxRuntime.jsx("div", { ref: sentinelRef, "data-scroll-sentinel": true, style: { height: '1px', visibility: 'hidden' } }))] })] }) })] }));
|
|
4764
4826
|
};
|
|
4765
4827
|
|
|
4766
|
-
var styles$
|
|
4828
|
+
var styles$9 = {"modalOverlay":"Modal-module__modalOverlay___rI8Wz","modalContent":"Modal-module__modalContent___6Cgb1","modalContent--fullscreen":"Modal-module__modalContent--fullscreen___QeBlG","modalHeader":"Modal-module__modalHeader___IuHIg","modalTitle":"Modal-module__modalTitle___9VDmr","modalBody":"Modal-module__modalBody___ohjQm","modalFooter":"Modal-module__modalFooter___TEqdK"};
|
|
4767
4829
|
|
|
4768
4830
|
const Modal = ({ isOpen = false, onClose, title, children, headerContent, closeOnOverlayClick = true, className, id, footer, customWidth, customHeight, fullscreen = false, ...rest }) => {
|
|
4769
4831
|
const contentRef = React__namespace.useRef(null);
|
|
@@ -4776,13 +4838,13 @@ const Modal = ({ isOpen = false, onClose, title, children, headerContent, closeO
|
|
|
4776
4838
|
e.preventDefault();
|
|
4777
4839
|
contentRef.current?.focus();
|
|
4778
4840
|
};
|
|
4779
|
-
return (jsxRuntime.jsx(radixUi.Dialog.Root, { open: isOpen, onOpenChange: handleOpenChange, ...rest, children: jsxRuntime.jsxs(radixUi.Dialog.Portal, { children: [jsxRuntime.jsx(radixUi.Dialog.Overlay, { className: styles$
|
|
4841
|
+
return (jsxRuntime.jsx(radixUi.Dialog.Root, { open: isOpen, onOpenChange: handleOpenChange, ...rest, children: jsxRuntime.jsxs(radixUi.Dialog.Portal, { children: [jsxRuntime.jsx(radixUi.Dialog.Overlay, { className: styles$9.modalOverlay }), jsxRuntime.jsxs(radixUi.Dialog.Content, { ref: contentRef, className: clsx(styles$9.modalContent, fullscreen && styles$9['modalContent--fullscreen'], className), id: id, style: {
|
|
4780
4842
|
'--modal-custom-width': customWidth,
|
|
4781
4843
|
'--modal-custom-height': customHeight,
|
|
4782
|
-
}, onInteractOutside: !closeOnOverlayClick ? (e) => e.preventDefault() : undefined, onOpenAutoFocus: handleOpenAutoFocus, "aria-labelledby": id ? `${id}-title` : 'modal-title', tabIndex: -1, children: [jsxRuntime.jsxs("header", { className: styles$
|
|
4844
|
+
}, onInteractOutside: !closeOnOverlayClick ? (e) => e.preventDefault() : undefined, onOpenAutoFocus: handleOpenAutoFocus, "aria-labelledby": id ? `${id}-title` : 'modal-title', tabIndex: -1, children: [jsxRuntime.jsxs("header", { className: styles$9.modalHeader, children: [title && (jsxRuntime.jsx(radixUi.Dialog.Title, { className: styles$9.modalTitle, id: id ? `${id}-title` : 'modal-title', children: title })), headerContent && (jsxRuntime.jsx("div", { children: headerContent })), jsxRuntime.jsx(radixUi.Dialog.Close, { asChild: true, children: jsxRuntime.jsx(Button, { variant: "outlined", iconOnly: true, icon: jsxRuntime.jsx(reactIcons.Dismiss16Regular, {}), size: "lg", tooltipText: 'Fechar' }) })] }), jsxRuntime.jsx("section", { className: styles$9.modalBody, children: children }), footer && (jsxRuntime.jsx("footer", { className: styles$9.modalFooter, children: footer }))] })] }) }));
|
|
4783
4845
|
};
|
|
4784
4846
|
|
|
4785
|
-
var styles$
|
|
4847
|
+
var styles$8 = {"quantity":"Quantity-module__quantity___-vndR","quantityInput":"Quantity-module__quantityInput___xZG-v","disabled":"Quantity-module__disabled___X6p5l"};
|
|
4786
4848
|
|
|
4787
4849
|
const Quantity = ({ value = 0, onChange, disabled = false, decimal = false, decimalPlaces = 2, size = 'lg', id, valueIncrement = 1, scale = 1, className, style, inputSize, minValue = 0, maxValue = 9999, decrementAriaLabel = 'Decrease quantity', incrementAriaLabel = 'Increase quantity', inputAriaLabel = 'Quantity', ...rest }) => {
|
|
4788
4850
|
const initialValue = Math.min(Math.max(value, minValue), maxValue);
|
|
@@ -4963,11 +5025,23 @@ const Quantity = ({ value = 0, onChange, disabled = false, decimal = false, deci
|
|
|
4963
5025
|
const inputSizeValue = inputSize !== undefined ? inputSize : Math.max(1, inputValue.length);
|
|
4964
5026
|
const uniqueId = React.useId();
|
|
4965
5027
|
const inputId = id || uniqueId;
|
|
4966
|
-
return (jsxRuntime.jsxs("div", { className: clsx(styles$
|
|
5028
|
+
return (jsxRuntime.jsxs("div", { className: clsx(styles$8.quantity, { [styles$8.disabled]: disabled }, className), style: { '--giro-scale': scale, ...style }, ...rest, children: [jsxRuntime.jsx(Button, { variant: 'outlined', size: size, type: 'button', iconOnly: true, icon: jsxRuntime.jsx(reactIcons.Subtract16Regular, {}), onClick: decrement, disabled: disabled || isMinValue, "aria-label": decrementAriaLabel, tooltipText: 'Diminuir', scale: scale }), jsxRuntime.jsx("input", { ref: inputRef, className: clsx(styles$8.quantityInput, { [styles$8.disabled]: disabled }), type: 'text', value: inputValue, onChange: handleInputChange, onBlur: handleBlur, onKeyDown: handleInputKeyDown, id: inputId, step: stepValue, "aria-label": inputAriaLabel, role: 'spinbutton', "aria-valuenow": internalValue, "aria-valuemin": minValue, "aria-valuemax": maxValue, disabled: disabled, inputMode: decimal ? 'decimal' : 'numeric', size: inputSizeValue }), jsxRuntime.jsx(Button, { variant: 'outlined', size: size, type: 'button', iconOnly: true, onClick: increment, disabled: disabled || isMaxValue, "aria-label": incrementAriaLabel, icon: jsxRuntime.jsx(reactIcons.Add16Regular, {}), tooltipText: 'Aumentar', scale: scale })] }));
|
|
4967
5029
|
};
|
|
4968
5030
|
const memorizedQuantity = React.memo(Quantity);
|
|
4969
5031
|
memorizedQuantity.displayName = 'Quantity';
|
|
4970
5032
|
|
|
5033
|
+
var styles$7 = {"root":"Radio-module__root___7ElY2","wrapper":"Radio-module__wrapper___NYQ1y","disabled":"Radio-module__disabled___RZ0be","labelText":"Radio-module__labelText___Wkb41","item":"Radio-module__item___3Kvj7","itemWrapper":"Radio-module__itemWrapper___5KbM1","labelWrapper":"Radio-module__labelWrapper___LOHmJ","indicator":"Radio-module__indicator___TJ5hz"};
|
|
5034
|
+
|
|
5035
|
+
const Radio = ({ items, onValueChange, defaultValue, name, id, ariaLabel, orientation = 'vertical', scale = 1, className, style, ...rest }) => {
|
|
5036
|
+
const generatedId = React.useId();
|
|
5037
|
+
const componentId = id || generatedId;
|
|
5038
|
+
return (jsxRuntime.jsx(radixUi.RadioGroup.Root, { id: componentId, className: clsx(styles$7.root, className), style: { '--giro-scale': scale, ...style }, defaultValue: defaultValue, onValueChange: onValueChange, name: name, "aria-label": ariaLabel, "data-orientation": orientation, orientation: orientation, ...rest, children: items.map(({ id, value, disabled, label }) => {
|
|
5039
|
+
const itemKey = id ?? value;
|
|
5040
|
+
const uniqueId = `${componentId}-item-${value}`;
|
|
5041
|
+
return (jsxRuntime.jsx("div", { className: clsx(styles$7.wrapper, { [styles$7.disabled]: disabled }), children: jsxRuntime.jsxs("label", { className: styles$7.labelWrapper, htmlFor: uniqueId, children: [jsxRuntime.jsx("div", { className: styles$7.itemWrapper, children: jsxRuntime.jsx(radixUi.RadioGroup.Item, { disabled: disabled, className: styles$7.item, value: value, id: uniqueId, "data-disabled": disabled, children: jsxRuntime.jsx(radixUi.RadioGroup.Indicator, { className: styles$7.indicator }) }) }), jsxRuntime.jsx("span", { className: styles$7.labelText, children: label })] }) }, itemKey));
|
|
5042
|
+
}) }));
|
|
5043
|
+
};
|
|
5044
|
+
|
|
4971
5045
|
var styles$6 = {"fieldContainer":"Select-module__fieldContainer___zkWSZ","trigger":"Select-module__trigger___xZVUG","disabled":"Select-module__disabled___kkzG-","open":"Select-module__open___bTuTy","error":"Select-module__error___yikGO","hasValue":"Select-module__hasValue___56T9r","triggerText":"Select-module__triggerText___tfXlq","triggerIcon":"Select-module__triggerIcon___Smobj","content":"Select-module__content___Eftze","viewport":"Select-module__viewport___mMGOo","group":"Select-module__group___wErLt","container":"Select-module__container___U1UI1","containerLabel":"Select-module__containerLabel___-5qpN","searchWrapper":"Select-module__searchWrapper___H01Wp","item":"Select-module__item___72Rnu","subTitle":"Select-module__subTitle___FdYBH","checkboxItem":"Select-module__checkboxItem___Ehw-a","checkboxContent":"Select-module__checkboxContent___7eKLC","itemWrapper":"Select-module__itemWrapper___nPovg","title":"Select-module__title___bqW3p","icon":"Select-module__icon___RH27W","itemIndicator":"Select-module__itemIndicator___4DBU-","textContent":"Select-module__textContent___k1SLX","helper":"Select-module__helper___pTp7X","errorMessage":"Select-module__errorMessage___--vrn","noResults":"Select-module__noResults___IxsAN","loadingMore":"Select-module__loadingMore___DjAUE","expandableItemContainer":"Select-module__expandableItemContainer___w4ZIb","chevron":"Select-module__chevron___Kgee3","childrenWrapper":"Select-module__childrenWrapper___2NnS-"};
|
|
4972
5046
|
|
|
4973
5047
|
const CheckboxSelectItem = ({ text, subTitle, disabled, checked, onCheckedChange, value, ...restProps }) => {
|
|
@@ -5043,13 +5117,13 @@ const ExpandableSelectItem = ({ item, variant, onSelect, selectedValues, level =
|
|
|
5043
5117
|
}, 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 && (jsxRuntime.jsx("span", { className: styles$6.icon, children: item.icon })), jsxRuntime.jsxs("div", { className: styles$6.textContent, children: [jsxRuntime.jsx("div", { className: styles$6.title, children: item.text }), item.subTitle && jsxRuntime.jsx("div", { className: styles$6.subTitle, children: item.subTitle })] }), hasChildren && (jsxRuntime.jsx("span", { className: styles$6.chevron, children: isExpanded ? jsxRuntime.jsx(reactIcons.ChevronDown16Regular, {}) : jsxRuntime.jsx(reactIcons.ChevronRight16Regular, {}) }))] }) }), hasChildren && isExpanded && (jsxRuntime.jsx("div", { className: styles$6.childrenWrapper, children: item.children.map((child) => (jsxRuntime.jsx(ExpandableSelectItem, { item: child, variant: variant, onSelect: onSelect, selectedValues: selectedValues, level: level + 1 }, child.id || child.value))) }))] }));
|
|
5044
5118
|
};
|
|
5045
5119
|
|
|
5046
|
-
const SelectItem = ({
|
|
5120
|
+
const SelectItem = React.forwardRef(({ text, subTitle, icon, disabled, value, variant, disableFocusOnHover, ...restProps }, ref) => {
|
|
5047
5121
|
return (jsxRuntime.jsxs("div", { className: clsx(styles$6.itemWrapper, {
|
|
5048
5122
|
[styles$6.disabled]: disabled,
|
|
5049
5123
|
}), "data-disabled": disabled || undefined, "data-testid": `select-item-${value}`, ref: ref, children: [variant === 'icon' && icon && (jsxRuntime.jsx("span", { className: styles$6.icon, children: icon })), jsxRuntime.jsxs(radixUi.Select.Item, { className: clsx(styles$6.item, {
|
|
5050
5124
|
[styles$6.disabled]: disabled,
|
|
5051
5125
|
}), value: value, disabled: disabled, onPointerMove: disableFocusOnHover ? (e) => e.preventDefault() : undefined, ...restProps, children: [jsxRuntime.jsx(radixUi.Select.ItemText, { className: styles$6.title, children: text }), subTitle && jsxRuntime.jsx("div", { className: styles$6.subTitle, children: subTitle }), jsxRuntime.jsx(radixUi.Select.ItemIndicator, { className: styles$6.itemIndicator })] })] }));
|
|
5052
|
-
};
|
|
5126
|
+
});
|
|
5053
5127
|
SelectItem.displayName = 'SelectItem';
|
|
5054
5128
|
|
|
5055
5129
|
const initialState = {
|
|
@@ -5392,272 +5466,55 @@ const Select = ({ items, onValueChange, onOpenChange, variant, required = false,
|
|
|
5392
5466
|
};
|
|
5393
5467
|
Select.displayName = 'Select';
|
|
5394
5468
|
|
|
5395
|
-
var styles$5 = {"tableContainer":"Table-
|
|
5396
|
-
|
|
5397
|
-
/**
|
|
5398
|
-
* Componente de ícone SVG para estado vazio da tabela
|
|
5399
|
-
* Exibe um ícone de lupa com design personalizado do Zanthus Design System
|
|
5400
|
-
* @returns Elemento SVG para estado vazio
|
|
5401
|
-
*/
|
|
5402
|
-
const EmptyRows150Color = () => (jsxRuntime.jsxs("svg", { width: '150', height: '150', viewBox: '0 0 150 150', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', children: [jsxRuntime.jsx("circle", { cx: '75', cy: '75', r: '75', fill: '#E8E8EE' }), jsxRuntime.jsx("path", { d: 'M67.6111 63.3889C69.36 63.3889 70.7778 64.8067 70.7778 66.5556V81.3333C70.7778 83.0822 69.36 84.5 67.6111 84.5C65.8622 84.5 64.4444 83.0822 64.4444 81.3333V66.5556C64.4444 64.8067 65.8622 63.3889 67.6111 63.3889ZM67.6111 59.1667C69.943 59.1667 71.8333 57.2763 71.8333 54.9444C71.8333 52.6126 69.943 50.7222 67.6111 50.7222C65.2792 50.7222 63.3889 52.6126 63.3889 54.9444C63.3889 57.2763 65.2792 59.1667 67.6111 59.1667ZM67.6111 37C84.5172 37 98.2222 50.7051 98.2222 67.6111C98.2222 74.9235 95.6583 81.637 91.3803 86.9017L112.073 107.594C113.309 108.831 113.309 110.836 112.073 112.073C110.948 113.197 109.189 113.299 107.949 112.379L107.594 112.073L86.9017 91.3803C81.637 95.6583 74.9235 98.2222 67.6111 98.2222C50.7051 98.2222 37 84.5172 37 67.6111C37 50.7051 50.7051 37 67.6111 37ZM67.6111 43.3333C54.2029 43.3333 43.3333 54.2029 43.3333 67.6111C43.3333 81.0194 54.2029 91.8889 67.6111 91.8889C81.0194 91.8889 91.8889 81.0194 91.8889 67.6111C91.8889 54.2029 81.0194 43.3333 67.6111 43.3333Z', fill: '#3B45F2' })] }));
|
|
5403
|
-
|
|
5404
|
-
/*! *****************************************************************************
|
|
5405
|
-
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5406
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
5407
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
5408
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
5409
|
-
|
|
5410
|
-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
5411
|
-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
5412
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
5413
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
5414
|
-
|
|
5415
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
5416
|
-
and limitations under the License.
|
|
5417
|
-
***************************************************************************** */
|
|
5418
|
-
|
|
5419
|
-
var __assign = function() {
|
|
5420
|
-
__assign = Object.assign || function __assign(t) {
|
|
5421
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5422
|
-
s = arguments[i];
|
|
5423
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
5424
|
-
}
|
|
5425
|
-
return t;
|
|
5426
|
-
};
|
|
5427
|
-
return __assign.apply(this, arguments);
|
|
5428
|
-
};
|
|
5429
|
-
|
|
5430
|
-
function __rest(s, e) {
|
|
5431
|
-
var t = {};
|
|
5432
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5433
|
-
t[p] = s[p];
|
|
5434
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
5435
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5436
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
5437
|
-
t[p[i]] = s[p[i]];
|
|
5438
|
-
}
|
|
5439
|
-
return t;
|
|
5440
|
-
}
|
|
5441
|
-
|
|
5442
|
-
var SVG = function (_a) {
|
|
5443
|
-
var _b = _a.animate, animate = _b === void 0 ? true : _b, _c = _a.backgroundColor, backgroundColor = _c === void 0 ? '#f5f6f7' : _c, _d = _a.backgroundOpacity, backgroundOpacity = _d === void 0 ? 1 : _d, _e = _a.baseUrl, baseUrl = _e === void 0 ? '' : _e, children = _a.children, _f = _a.foregroundColor, foregroundColor = _f === void 0 ? '#eee' : _f, _g = _a.foregroundOpacity, foregroundOpacity = _g === void 0 ? 1 : _g, _h = _a.gradientRatio, gradientRatio = _h === void 0 ? 2 : _h, uniqueKey = _a.uniqueKey, _j = _a.rtl, rtl = _j === void 0 ? false : _j, _k = _a.speed, speed = _k === void 0 ? 1.2 : _k, _l = _a.style, style = _l === void 0 ? {} : _l, _m = _a.title, title = _m === void 0 ? 'Loading...' : _m, _o = _a.beforeMask, beforeMask = _o === void 0 ? null : _o, props = __rest(_a, ["animate", "backgroundColor", "backgroundOpacity", "baseUrl", "children", "foregroundColor", "foregroundOpacity", "gradientRatio", "uniqueKey", "rtl", "speed", "style", "title", "beforeMask"]);
|
|
5444
|
-
var fixedId = React.useId();
|
|
5445
|
-
if (uniqueKey)
|
|
5446
|
-
fixedId = uniqueKey;
|
|
5447
|
-
var idClip = "".concat(fixedId, "-diff");
|
|
5448
|
-
var idGradient = "".concat(fixedId, "-animated-diff");
|
|
5449
|
-
var idAria = "".concat(fixedId, "-aria");
|
|
5450
|
-
var rtlStyle = rtl ? { transform: 'scaleX(-1)' } : null;
|
|
5451
|
-
var dur = "".concat(speed, "s");
|
|
5452
|
-
var from = "".concat(gradientRatio * -1, " 0");
|
|
5453
|
-
var to = "".concat(gradientRatio, " 0");
|
|
5454
|
-
return (React.createElement("svg", __assign({ "aria-labelledby": idAria, role: "img", style: __assign(__assign({}, style), rtlStyle) }, props),
|
|
5455
|
-
title ? React.createElement("title", { id: idAria }, title) : null,
|
|
5456
|
-
beforeMask && React.isValidElement(beforeMask) ? beforeMask : null,
|
|
5457
|
-
React.createElement("rect", { role: "presentation", x: "0", y: "0", width: "100%", height: "100%", clipPath: "url(".concat(baseUrl, "#").concat(idClip, ")"), style: { fill: "url(".concat(baseUrl, "#").concat(idGradient, ")") } }),
|
|
5458
|
-
React.createElement("defs", null,
|
|
5459
|
-
React.createElement("clipPath", { id: idClip }, children),
|
|
5460
|
-
React.createElement("linearGradient", { id: idGradient, gradientTransform: "translate(".concat(from, ")") },
|
|
5461
|
-
React.createElement("stop", { offset: "0%", stopColor: backgroundColor, stopOpacity: backgroundOpacity }),
|
|
5462
|
-
React.createElement("stop", { offset: "50%", stopColor: foregroundColor, stopOpacity: foregroundOpacity }),
|
|
5463
|
-
React.createElement("stop", { offset: "100%", stopColor: backgroundColor, stopOpacity: backgroundOpacity }),
|
|
5464
|
-
animate && (React.createElement("animateTransform", { attributeName: "gradientTransform", type: "translate", values: "".concat(from, "; 0 0; ").concat(to), dur: dur, repeatCount: "indefinite" }))))));
|
|
5465
|
-
};
|
|
5466
|
-
|
|
5467
|
-
var ContentLoader = function (props) {
|
|
5468
|
-
return props.children ? React.createElement(SVG, __assign({}, props)) : React.createElement(ReactContentLoaderFacebook, __assign({}, props));
|
|
5469
|
-
};
|
|
5469
|
+
var styles$5 = {"wrapper":"Table-module__wrapper___KMc04","tableContainer":"Table-module__tableContainer___byysv","tableHeader":"Table-module__tableHeader___urbxZ","bulkActionsBar":"Table-module__bulkActionsBar___Irfnt","bulkActionsInfo":"Table-module__bulkActionsInfo___pLTb6","bulkActionsClearButton":"Table-module__bulkActionsClearButton___jjQTq","bulkActionsLabel":"Table-module__bulkActionsLabel___QB3N9","bulkActionsButtons":"Table-module__bulkActionsButtons___1anDO","tablePagination":"Table-module__tablePagination___MbqJy","table":"Table-module__table___9xCJC","tableHead":"Table-module__tableHead___oVEa6","tableTh":"Table-module__tableTh___U02-Y","tableThContent":"Table-module__tableThContent___61AqT","tableSortButton":"Table-module__tableSortButton___ZgLkx","tableBody":"Table-module__tableBody___fq4Aa","tableTd":"Table-module__tableTd___OfW9v","tableRow":"Table-module__tableRow___COJNu","checkboxCell":"Table-module__checkboxCell___B9vHM","tableSortIconNeutral":"Table-module__tableSortIconNeutral___uvnHs","tableSortIcon":"Table-module__tableSortIcon___YVa2Q","tableHeaderLeft":"Table-module__tableHeaderLeft___gtnru","tableHeaderSearchContainer":"Table-module__tableHeaderSearchContainer___Yy8-s","tableHeaderSearch":"Table-module__tableHeaderSearch___swewU","tableHeaderFilters":"Table-module__tableHeaderFilters___ncatO","tableHeaderFilterLabel":"Table-module__tableHeaderFilterLabel___r3DI-","tableHeaderFilterItems":"Table-module__tableHeaderFilterItems___kQDsY","tablePaginationSelect":"Table-module__tablePaginationSelect___l2aYm","tablePaginationLabel":"Table-module__tablePaginationLabel___S9VOr","tablePaginationSelectInput":"Table-module__tablePaginationSelectInput___wdhOQ","tablePaginationInfo":"Table-module__tablePaginationInfo___r1v8R","tablePaginationControls":"Table-module__tablePaginationControls___IL8rm","tablePaginationButton":"Table-module__tablePaginationButton___SNDQq","tableScrollWrapper":"Table-module__tableScrollWrapper___SvEOw","tableEmptyCell":"Table-module__tableEmptyCell___N5a9t","tableEmpty":"Table-module__tableEmpty___0yPZ0","tableEmptyContent":"Table-module__tableEmptyContent___uNWpN","tableEmptyText":"Table-module__tableEmptyText___7kY7Q","tableEmptyTitle":"Table-module__tableEmptyTitle___Y-7z8","tableEmptyCaption":"Table-module__tableEmptyCaption___4PZ14","tableCellMaxHeight":"Table-module__tableCellMaxHeight___-tcyU"};
|
|
5470
5470
|
|
|
5471
|
-
|
|
5472
|
-
React.createElement("rect", { x: "48", y: "8", width: "88", height: "6", rx: "3" }),
|
|
5473
|
-
React.createElement("rect", { x: "48", y: "26", width: "52", height: "6", rx: "3" }),
|
|
5474
|
-
React.createElement("rect", { x: "0", y: "56", width: "410", height: "6", rx: "3" }),
|
|
5475
|
-
React.createElement("rect", { x: "0", y: "72", width: "380", height: "6", rx: "3" }),
|
|
5476
|
-
React.createElement("rect", { x: "0", y: "88", width: "178", height: "6", rx: "3" }),
|
|
5477
|
-
React.createElement("circle", { cx: "20", cy: "20", r: "20" }))); };
|
|
5471
|
+
const EmptyState = ({ emptyIcon, emptyTitle, emptyText }) => (jsxRuntime.jsxs("div", { className: styles$5.tableEmpty, children: [jsxRuntime.jsx("div", { className: styles$5.tableEmptyContent, children: emptyIcon ?? jsxRuntime.jsx(reactIcons.SearchInfo20Regular, {}) }), jsxRuntime.jsxs("div", { className: styles$5.tableEmptyText, children: [jsxRuntime.jsx("h3", { className: styles$5.tableEmptyTitle, children: emptyTitle ?? 'Nenhum dado encontrado' }), jsxRuntime.jsx("p", { className: styles$5.tableEmptyCaption, children: emptyText ?? 'Nenhum registro encontrado' })] })] }));
|
|
5478
5472
|
|
|
5479
|
-
|
|
5480
|
-
* Componente de loading para lista de tabela
|
|
5481
|
-
* Simula o carregamento de dados em formato de tabela usando ContentLoader
|
|
5482
|
-
* @param props - Propriedades adicionais para o ContentLoader
|
|
5483
|
-
* @returns Elemento de loading animado
|
|
5484
|
-
*/
|
|
5485
|
-
const LoaderList = (props) => (jsxRuntime.jsxs(ContentLoader, { speed: 1, width: "100%", viewBox: "0 0 1272 652", backgroundColor: "#F5F5F7", foregroundColor: "#FFFFFF", ...props, children: [jsxRuntime.jsx("rect", { x: "0", y: "0", rx: "8", ry: "8", width: "1272", height: "44" }), jsxRuntime.jsx("rect", { x: "0", y: "76", rx: "12", ry: "12", width: "402", height: "24" }), jsxRuntime.jsx("rect", { x: "0", y: "116", rx: "8", ry: "8", width: "280", height: "16" }), jsxRuntime.jsx("rect", { x: "426", y: "76", rx: "12", ry: "12", width: "244", height: "24" }), jsxRuntime.jsx("rect", { x: "426", y: "116", rx: "8", ry: "8", width: "178", height: "16" }), jsxRuntime.jsx("rect", { x: "694", y: "76", rx: "12", ry: "12", width: "244", height: "24" }), jsxRuntime.jsx("rect", { x: "694", y: "116", rx: "8", ry: "8", width: "178", height: "16" }), jsxRuntime.jsx("rect", { x: "962", y: "76", rx: "12", ry: "12", width: "143", height: "24" }), jsxRuntime.jsx("rect", { x: "962", y: "116", rx: "8", ry: "8", width: "90", height: "16" }), jsxRuntime.jsx("rect", { x: "1129", y: "76", rx: "12", ry: "12", width: "143", height: "24" }), jsxRuntime.jsx("rect", { x: "1129", y: "116", rx: "8", ry: "8", width: "90", height: "16" }), jsxRuntime.jsx("rect", { x: "0", y: "164", rx: "12", ry: "12", width: "402", height: "24" }), jsxRuntime.jsx("rect", { x: "0", y: "204", rx: "8", ry: "8", width: "280", height: "16" }), jsxRuntime.jsx("rect", { x: "426", y: "164", rx: "12", ry: "12", width: "244", height: "24" }), jsxRuntime.jsx("rect", { x: "426", y: "204", rx: "8", ry: "8", width: "178", height: "16" }), jsxRuntime.jsx("rect", { x: "694", y: "164", rx: "12", ry: "12", width: "244", height: "24" }), jsxRuntime.jsx("rect", { x: "694", y: "204", rx: "8", ry: "8", width: "178", height: "16" }), jsxRuntime.jsx("rect", { x: "962", y: "164", rx: "12", ry: "12", width: "143", height: "24" }), jsxRuntime.jsx("rect", { x: "962", y: "204", rx: "8", ry: "8", width: "90", height: "16" }), jsxRuntime.jsx("rect", { x: "1129", y: "164", rx: "12", ry: "12", width: "143", height: "24" }), jsxRuntime.jsx("rect", { x: "1129", y: "204", rx: "8", ry: "8", width: "90", height: "16" }), jsxRuntime.jsx("rect", { x: "0", y: "252", rx: "12", ry: "12", width: "402", height: "24" }), jsxRuntime.jsx("rect", { x: "0", y: "292", rx: "8", ry: "8", width: "280", height: "16" }), jsxRuntime.jsx("rect", { x: "426", y: "252", rx: "12", ry: "12", width: "244", height: "24" }), jsxRuntime.jsx("rect", { x: "426", y: "292", rx: "8", ry: "8", width: "178", height: "16" }), jsxRuntime.jsx("rect", { x: "694", y: "252", rx: "12", ry: "12", width: "244", height: "24" }), jsxRuntime.jsx("rect", { x: "694", y: "292", rx: "8", ry: "8", width: "178", height: "16" }), jsxRuntime.jsx("rect", { x: "962", y: "252", rx: "12", ry: "12", width: "143", height: "24" }), jsxRuntime.jsx("rect", { x: "962", y: "292", rx: "8", ry: "8", width: "90", height: "16" }), jsxRuntime.jsx("rect", { x: "1129", y: "252", rx: "12", ry: "12", width: "143", height: "24" }), jsxRuntime.jsx("rect", { x: "1129", y: "292", rx: "8", ry: "8", width: "90", height: "16" }), jsxRuntime.jsx("rect", { x: "0", y: "340", rx: "12", ry: "12", width: "402", height: "24" }), jsxRuntime.jsx("rect", { x: "0", y: "380", rx: "8", ry: "8", width: "280", height: "16" }), jsxRuntime.jsx("rect", { x: "426", y: "340", rx: "12", ry: "12", width: "244", height: "24" }), jsxRuntime.jsx("rect", { x: "426", y: "380", rx: "8", ry: "8", width: "178", height: "16" }), jsxRuntime.jsx("rect", { x: "694", y: "340", rx: "12", ry: "12", width: "244", height: "24" }), jsxRuntime.jsx("rect", { x: "694", y: "380", rx: "8", ry: "8", width: "178", height: "16" }), jsxRuntime.jsx("rect", { x: "962", y: "340", rx: "12", ry: "12", width: "143", height: "24" }), jsxRuntime.jsx("rect", { x: "962", y: "380", rx: "8", ry: "8", width: "90", height: "16" }), jsxRuntime.jsx("rect", { x: "1129", y: "340", rx: "12", ry: "12", width: "143", height: "24" }), jsxRuntime.jsx("rect", { x: "1129", y: "380", rx: "8", ry: "8", width: "90", height: "16" }), jsxRuntime.jsx("rect", { x: "0", y: "428", rx: "12", ry: "12", width: "402", height: "24" }), jsxRuntime.jsx("rect", { x: "0", y: "468", rx: "8", ry: "8", width: "280", height: "16" }), jsxRuntime.jsx("rect", { x: "426", y: "428", rx: "12", ry: "12", width: "244", height: "24" }), jsxRuntime.jsx("rect", { x: "426", y: "468", rx: "8", ry: "8", width: "178", height: "16" }), jsxRuntime.jsx("rect", { x: "694", y: "428", rx: "12", ry: "12", width: "244", height: "24" }), jsxRuntime.jsx("rect", { x: "694", y: "468", rx: "8", ry: "8", width: "178", height: "16" }), jsxRuntime.jsx("rect", { x: "962", y: "428", rx: "12", ry: "12", width: "143", height: "24" }), jsxRuntime.jsx("rect", { x: "962", y: "468", rx: "8", ry: "8", width: "90", height: "16" }), jsxRuntime.jsx("rect", { x: "1129", y: "428", rx: "12", ry: "12", width: "143", height: "24" }), jsxRuntime.jsx("rect", { x: "1129", y: "468", rx: "8", ry: "8", width: "90", height: "16" }), jsxRuntime.jsx("rect", { x: "0", y: "516", rx: "12", ry: "12", width: "402", height: "24" }), jsxRuntime.jsx("rect", { x: "0", y: "556", rx: "8", ry: "8", width: "280", height: "16" }), jsxRuntime.jsx("rect", { x: "426", y: "516", rx: "12", ry: "12", width: "244", height: "24" }), jsxRuntime.jsx("rect", { x: "426", y: "556", rx: "8", ry: "8", width: "178", height: "16" }), jsxRuntime.jsx("rect", { x: "694", y: "516", rx: "12", ry: "12", width: "244", height: "24" }), jsxRuntime.jsx("rect", { x: "694", y: "556", rx: "8", ry: "8", width: "178", height: "16" }), jsxRuntime.jsx("rect", { x: "962", y: "516", rx: "12", ry: "12", width: "143", height: "24" }), jsxRuntime.jsx("rect", { x: "962", y: "556", rx: "8", ry: "8", width: "90", height: "16" }), jsxRuntime.jsx("rect", { x: "1129", y: "516", rx: "12", ry: "12", width: "143", height: "24" }), jsxRuntime.jsx("rect", { x: "1129", y: "556", rx: "8", ry: "8", width: "90", height: "16" }), jsxRuntime.jsx("rect", { x: "0", y: "604", rx: "8", ry: "8", width: "1272", height: "48" })] }));
|
|
5473
|
+
var styles$4 = {"toggle":"ToggleButton-module__toggle___c1Ym-","item":"ToggleButton-module__item___2Qll-","toggle-lg":"ToggleButton-module__toggle-lg___8f3lo","item-lg":"ToggleButton-module__item-lg___479w-","toggle-sm":"ToggleButton-module__toggle-sm___SAGGb","item-sm":"ToggleButton-module__item-sm___4ju--","toggleIconLeft":"ToggleButton-module__toggleIconLeft___VwgKk","toggleWithIcon":"ToggleButton-module__toggleWithIcon___WbCr7","toggleIconOnly":"ToggleButton-module__toggleIconOnly___4iMEp","group":"ToggleButton-module__group___BoR-e"};
|
|
5486
5474
|
|
|
5487
|
-
const
|
|
5488
|
-
const
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
rowSelection.onChange?.(newKeys, newRows);
|
|
5495
|
-
}
|
|
5496
|
-
else {
|
|
5497
|
-
setInternalKeys(newKeys);
|
|
5498
|
-
rowSelection?.onChange?.(newKeys, newRows);
|
|
5499
|
-
}
|
|
5500
|
-
}, [dataSource, rowSelection]);
|
|
5501
|
-
const toggleRow = React.useCallback((key) => {
|
|
5502
|
-
const newKeys = selectedSet.has(key)
|
|
5503
|
-
? selectedKeys.filter(k => k !== key)
|
|
5504
|
-
: [...selectedKeys, key];
|
|
5505
|
-
handleChange(newKeys);
|
|
5506
|
-
}, [selectedKeys, selectedSet, handleChange]);
|
|
5507
|
-
const selectableKeys = React.useMemo(() => (dataSource
|
|
5508
|
-
.map((row, index) => ({ index, disabled: rowSelection?.getCheckboxProps?.(row, index)?.disabled }))
|
|
5509
|
-
.filter(({ disabled }) => !disabled)
|
|
5510
|
-
.map(({ index }) => index)), [dataSource, rowSelection]);
|
|
5511
|
-
const toggleAll = React.useCallback(() => {
|
|
5512
|
-
const isAllSelectableSelected = selectableKeys.every(k => selectedSet.has(k));
|
|
5513
|
-
const newKeys = isAllSelectableSelected
|
|
5514
|
-
? selectedKeys.filter(k => !selectableKeys.includes(k))
|
|
5515
|
-
: [...new Set([...selectedKeys, ...selectableKeys])];
|
|
5516
|
-
handleChange(newKeys);
|
|
5517
|
-
}, [selectableKeys, selectedKeys, selectedSet, handleChange]);
|
|
5518
|
-
const isAllSelected = selectableKeys.length > 0 && selectableKeys.every(k => selectedSet.has(k));
|
|
5519
|
-
const isIndeterminate = selectableKeys.some(k => selectedSet.has(k)) && !isAllSelected;
|
|
5520
|
-
return {
|
|
5521
|
-
selectedSet,
|
|
5522
|
-
selectedKeys,
|
|
5523
|
-
toggleRow,
|
|
5524
|
-
toggleAll,
|
|
5525
|
-
isAllSelected,
|
|
5526
|
-
isIndeterminate,
|
|
5527
|
-
};
|
|
5528
|
-
};
|
|
5529
|
-
const renderCell = (column, row, index) => {
|
|
5530
|
-
if (column.render) {
|
|
5531
|
-
return column.render(row, index);
|
|
5532
|
-
}
|
|
5533
|
-
const value = row[column.key];
|
|
5534
|
-
switch (column.type) {
|
|
5535
|
-
case 'datetime':
|
|
5536
|
-
if (!value)
|
|
5537
|
-
return '';
|
|
5538
|
-
try {
|
|
5539
|
-
const date = new Date(value);
|
|
5540
|
-
return dateFns.format(date, column.format || 'dd/MM/yyyy', { locale: ptBR$1 });
|
|
5541
|
-
}
|
|
5542
|
-
catch {
|
|
5543
|
-
return value;
|
|
5544
|
-
}
|
|
5545
|
-
default:
|
|
5546
|
-
return value;
|
|
5475
|
+
const Toggle = ({ pressed, defaultPressed, onPressedChange, disabled = false, className, children, id, size = 'lg', scale = 1, style, tooltipText, tooltipSide = 'top', tooltipAlign = 'center', icon, iconOnly = false, mode: _mode, selectionType: _type, value: _value, defaultValue: _defaultValue, onValueChange: _onValueChange, orientation: _orientation, items: _items, ...rest }) => {
|
|
5476
|
+
const toggle = (jsxRuntime.jsx(radixUi.Toggle.Root, { pressed: pressed, defaultPressed: defaultPressed, onPressedChange: onPressedChange, disabled: disabled, className: clsx(styles$4.toggle, styles$4[`toggle-${size}`], {
|
|
5477
|
+
[styles$4.toggleIconOnly]: iconOnly,
|
|
5478
|
+
[styles$4.toggleWithIcon]: !!icon && !iconOnly,
|
|
5479
|
+
}, className), id: id, style: { '--giro-scale': scale, ...style }, ...rest, children: iconOnly ? (jsxRuntime.jsx("span", { className: styles$4.toggleIconLeft, "aria-hidden": "true", children: icon })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon && jsxRuntime.jsx("span", { className: styles$4.toggleIconLeft, "aria-hidden": "true", children: icon }), children] })) }));
|
|
5480
|
+
if (tooltipText) {
|
|
5481
|
+
return (jsxRuntime.jsx(Tooltip, { text: tooltipText, side: tooltipSide, align: tooltipAlign, children: toggle }));
|
|
5547
5482
|
}
|
|
5483
|
+
return toggle;
|
|
5548
5484
|
};
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
return (jsxRuntime.jsx(Checkbox, { checked: selectedSet.has(index), onCheckedChange: () => toggleRow(index), disabled: props.disabled }));
|
|
5564
|
-
},
|
|
5565
|
-
align: 'center',
|
|
5485
|
+
|
|
5486
|
+
const ToggleGroup = ({ selectionType = 'single', value, defaultValue, onValueChange, orientation = 'horizontal', disabled = false, items = [], children, className, id, size = 'lg', scale = 1, style, tooltipText, tooltipSide = 'top', tooltipAlign = 'center', mode: _mode, icon: _icon, iconOnly: _iconOnly, pressed: _pressed, defaultPressed: _defaultPressed, onPressedChange: _onPressedChange, ...rest }) => {
|
|
5487
|
+
const rootProps = selectionType === 'multiple'
|
|
5488
|
+
? {
|
|
5489
|
+
type: 'multiple',
|
|
5490
|
+
value: value,
|
|
5491
|
+
defaultValue: defaultValue,
|
|
5492
|
+
onValueChange: onValueChange,
|
|
5493
|
+
}
|
|
5494
|
+
: {
|
|
5495
|
+
type: 'single',
|
|
5496
|
+
value: value,
|
|
5497
|
+
defaultValue: defaultValue,
|
|
5498
|
+
onValueChange: onValueChange,
|
|
5566
5499
|
};
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5500
|
+
const group = (jsxRuntime.jsx(radixUi.ToggleGroup.Root, { ...rootProps, orientation: orientation, disabled: disabled, className: clsx(styles$4.group, className), id: id, style: { '--giro-scale': scale, ...style }, ...rest, children: children ??
|
|
5501
|
+
items.map((item) => (jsxRuntime.jsx(radixUi.ToggleGroup.Item, { value: item.value, disabled: item.disabled, className: clsx(styles$4.item, styles$4[`item-${size}`], {
|
|
5502
|
+
[styles$4.toggleIconOnly]: item.iconOnly,
|
|
5503
|
+
[styles$4.toggleWithIcon]: !!item.icon && !item.iconOnly,
|
|
5504
|
+
}), style: { '--giro-scale': scale }, children: item.iconOnly ? (jsxRuntime.jsx("span", { className: styles$4.toggleIconLeft, "aria-hidden": "true", children: item.icon })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [item.icon && jsxRuntime.jsx("span", { className: styles$4.toggleIconLeft, "aria-hidden": "true", children: item.icon }), item.label] })) }, item.value))) }));
|
|
5505
|
+
if (tooltipText) {
|
|
5506
|
+
return (jsxRuntime.jsx(Tooltip, { text: tooltipText, side: tooltipSide, align: tooltipAlign, children: group }));
|
|
5572
5507
|
}
|
|
5573
|
-
|
|
5574
|
-
return (jsxRuntime.jsx("div", { className: clsx(styles$5.tableContainer, className), ...rest, children: jsxRuntime.jsx("div", { className: styles$5.tableScrollWrapper, children: jsxRuntime.jsxs("table", { className: styles$5.table, role: "table", "aria-label": "Tabela de dados", "aria-describedby": loading ? `${tableId}-loading` : undefined, "aria-rowcount": dataSource.length + 1, children: [jsxRuntime.jsx("thead", { className: styles$5.tableHead, children: jsxRuntime.jsx("tr", { children: finalColumns.map((column) => (jsxRuntime.jsx("th", { className: clsx(styles$5.tableTh, column.align && `text-${column.align}`), style: column.style, children: jsxRuntime.jsx("div", { className: styles$5.tableThContent, children: column.label }) }, column.key))) }) }), jsxRuntime.jsx("tbody", { className: styles$5.tableBody, children: dataSource.length > 0 ? (dataSource.map((row, index) => {
|
|
5575
|
-
const rowProps = onRow?.(row, index) || {};
|
|
5576
|
-
return (jsxRuntime.jsx("tr", { className: clsx(styles$5.tableRow, rowProps.className), onClick: rowProps.onClick, onDoubleClick: rowProps.onDoubleClick, children: finalColumns.map((column) => (jsxRuntime.jsx("td", { className: clsx(styles$5.tableTd, column.align && `text-${column.align}`), children: renderCell(column, row, index) }, column.key))) }, index));
|
|
5577
|
-
})) : (jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: finalColumns.length, className: styles$5.tableEmptyCell, children: emptyText }) })) })] }) }) }));
|
|
5508
|
+
return group;
|
|
5578
5509
|
};
|
|
5579
5510
|
|
|
5580
|
-
const
|
|
5581
|
-
|
|
5582
|
-
};
|
|
5583
|
-
|
|
5584
|
-
return
|
|
5585
|
-
};
|
|
5586
|
-
const TableHeader = ({ searchValue = '', onSearchChange, onSearch, searchPlaceholder = 'Pesquisar...', showSearch = true, showFilters = false, filters, filterItems = [], className = '', ...rest }) => {
|
|
5587
|
-
const [internalSearchValue, setInternalSearchValue] = React.useState(searchValue);
|
|
5588
|
-
React.useEffect(() => {
|
|
5589
|
-
setInternalSearchValue(searchValue);
|
|
5590
|
-
}, [searchValue]);
|
|
5591
|
-
const handleInputChange = (e) => {
|
|
5592
|
-
const value = e.target.value;
|
|
5593
|
-
setInternalSearchValue(value);
|
|
5594
|
-
if (value === '' && onSearchChange) {
|
|
5595
|
-
onSearchChange('');
|
|
5596
|
-
}
|
|
5597
|
-
};
|
|
5598
|
-
const handleKeyDown = (e) => {
|
|
5599
|
-
if (e.key === 'Enter') {
|
|
5600
|
-
e.preventDefault();
|
|
5601
|
-
if (onSearch) {
|
|
5602
|
-
onSearch(internalSearchValue);
|
|
5603
|
-
}
|
|
5604
|
-
else if (onSearchChange) {
|
|
5605
|
-
onSearchChange(internalSearchValue);
|
|
5606
|
-
}
|
|
5607
|
-
}
|
|
5608
|
-
};
|
|
5609
|
-
const hasFilters = filters || (filterItems && filterItems.length > 0);
|
|
5610
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$5.tableHeader} ${className}`.trim(), ...rest, children: [showSearch && (onSearchChange || onSearch) && (jsxRuntime.jsx("div", { className: styles$5.tableHeaderSearchContainer, children: jsxRuntime.jsx(Search, { value: internalSearchValue, onChange: handleInputChange, onKeyDown: handleKeyDown, placeholder: searchPlaceholder, className: styles$5.tableHeaderSearch }) })), showFilters && (jsxRuntime.jsx("div", { className: styles$5.tableHeaderFilters, children: hasFilters ? (jsxRuntime.jsxs("div", { className: styles$5.tableHeaderFiltersContent, children: [filters && (jsxRuntime.jsx("div", { className: styles$5.tableHeaderCustomFilters, children: filters })), jsxRuntime.jsxs("div", { className: styles$5.tableHeaderFiltersWrapper, children: [jsxRuntime.jsx("span", { className: styles$5.tableHeaderFilterLabel, children: "Filtros" }), jsxRuntime.jsx("div", { className: styles$5.tableHeaderFilterItems, children: filterItems && filterItems.map((filterItem, index) => {
|
|
5611
|
-
const commonProps = {
|
|
5612
|
-
buttonText: filterItem.buttonText,
|
|
5613
|
-
icon: filterItem.icon,
|
|
5614
|
-
side: filterItem.side,
|
|
5615
|
-
align: filterItem.align,
|
|
5616
|
-
disabled: filterItem.disabled,
|
|
5617
|
-
variant: 'outlined',
|
|
5618
|
-
onOpen: () => filterItem.onToggle?.(true),
|
|
5619
|
-
onClose: () => filterItem.onToggle?.(false),
|
|
5620
|
-
};
|
|
5621
|
-
if (isCalendarFilter(filterItem)) {
|
|
5622
|
-
return (jsxRuntime.jsx(Filter, { ...commonProps, type: "calendar", selectedDate: filterItem.selectedDate, onDateSelect: filterItem.onDateSelect, onClearDate: filterItem.onClear, minDate: filterItem.minDate, maxDate: filterItem.maxDate, placeholder: filterItem.placeholder }, filterItem.id || index));
|
|
5623
|
-
}
|
|
5624
|
-
if (isCheckboxFilter(filterItem)) {
|
|
5625
|
-
return (jsxRuntime.jsx(Filter, { ...commonProps, type: filterItem.type, items: filterItem.items, selectedIds: filterItem.selectedIds, onApplyFilter: filterItem.onSelectionChange, placeholder: filterItem.placeholder, enableSearch: filterItem.enableSearch }, filterItem.id || index));
|
|
5626
|
-
}
|
|
5627
|
-
console.warn('TableHeader: Tipo de filtro não reconhecido:', filterItem);
|
|
5628
|
-
return null;
|
|
5629
|
-
}) })] })] })) : (jsxRuntime.jsx("div", { className: styles$5.tableHeaderFiltersPlaceholder, children: jsxRuntime.jsx("span", { children: "Nenhum filtro dispon\u00EDvel" }) })) }))] }));
|
|
5630
|
-
};
|
|
5631
|
-
|
|
5632
|
-
const TablePagination = ({ currentPage, totalItems, itemsPerPage, onPageChange, onItemsPerPageChange, pageSizeOptions = [10, 25, 50, 100], disabled = false, className, ...rest }) => {
|
|
5633
|
-
const totalPages = Math.ceil(totalItems / itemsPerPage);
|
|
5634
|
-
const startItem = totalItems > 0 ? (currentPage - 1) * itemsPerPage + 1 : 0;
|
|
5635
|
-
const endItem = Math.min(currentPage * itemsPerPage, totalItems);
|
|
5636
|
-
const canGoPrev = currentPage > 1 && !disabled;
|
|
5637
|
-
const canGoNext = currentPage < totalPages && !disabled;
|
|
5638
|
-
const handlePrevious = () => {
|
|
5639
|
-
if (canGoPrev) {
|
|
5640
|
-
onPageChange(currentPage - 1);
|
|
5641
|
-
}
|
|
5642
|
-
};
|
|
5643
|
-
const handleNext = () => {
|
|
5644
|
-
if (canGoNext) {
|
|
5645
|
-
onPageChange(currentPage + 1);
|
|
5646
|
-
}
|
|
5647
|
-
};
|
|
5648
|
-
const handleItemsPerPageChange = (event) => {
|
|
5649
|
-
const newItemsPerPage = Number(event.target.value);
|
|
5650
|
-
onItemsPerPageChange(newItemsPerPage);
|
|
5651
|
-
};
|
|
5652
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$5.tablePagination} ${className}`.trim(), ...rest, children: [jsxRuntime.jsxs("div", { className: styles$5.tablePaginationSelect, children: [jsxRuntime.jsx("label", { htmlFor: "items-per-page", className: styles$5.tablePaginationLabel, children: "Itens por p\u00E1gina" }), jsxRuntime.jsx("select", { id: "items-per-page", value: itemsPerPage, onChange: handleItemsPerPageChange, disabled: disabled, className: styles$5.tablePaginationSelectInput, children: pageSizeOptions.map((option) => (jsxRuntime.jsx("option", { value: option, children: option }, option))) })] }), jsxRuntime.jsx("div", { className: styles$5.tablePaginationInfo, children: jsxRuntime.jsx("span", { children: totalItems > 0
|
|
5653
|
-
? `${startItem}–${endItem} de ${totalItems}`
|
|
5654
|
-
: '0 itens' }) }), jsxRuntime.jsxs("div", { className: styles$5.tablePaginationControls, children: [jsxRuntime.jsx("button", { className: styles$5.tablePaginationButton, onClick: handlePrevious, disabled: !canGoPrev, "aria-label": "P\u00E1gina anterior", children: jsxRuntime.jsx(reactIcons.ChevronLeft16Regular, {}) }), jsxRuntime.jsx("button", { className: styles$5.tablePaginationButton, onClick: handleNext, disabled: !canGoNext, "aria-label": "Pr\u00F3xima p\u00E1gina", children: jsxRuntime.jsx(reactIcons.ChevronRight16Regular, {}) })] })] }));
|
|
5511
|
+
const ToggleButton = ({ mode = 'simple', ...props }) => {
|
|
5512
|
+
if (mode === 'combined') {
|
|
5513
|
+
return jsxRuntime.jsx(ToggleGroup, { ...props });
|
|
5514
|
+
}
|
|
5515
|
+
return jsxRuntime.jsx(Toggle, { ...props });
|
|
5655
5516
|
};
|
|
5656
5517
|
|
|
5657
|
-
var styles$4 = {"wrapper":"Table-module__wrapper___KMc04","tableContainer":"Table-module__tableContainer___byysv","tableHeader":"Table-module__tableHeader___urbxZ","bulkActionsBar":"Table-module__bulkActionsBar___Irfnt","bulkActionsInfo":"Table-module__bulkActionsInfo___pLTb6","bulkActionsClearButton":"Table-module__bulkActionsClearButton___jjQTq","bulkActionsLabel":"Table-module__bulkActionsLabel___QB3N9","bulkActionsButtons":"Table-module__bulkActionsButtons___1anDO","tablePagination":"Table-module__tablePagination___MbqJy","table":"Table-module__table___9xCJC","tableHead":"Table-module__tableHead___oVEa6","tableTh":"Table-module__tableTh___U02-Y","tableThContent":"Table-module__tableThContent___61AqT","tableSortButton":"Table-module__tableSortButton___ZgLkx","tableBody":"Table-module__tableBody___fq4Aa","tableTd":"Table-module__tableTd___OfW9v","tableRow":"Table-module__tableRow___COJNu","checkboxCell":"Table-module__checkboxCell___B9vHM","tableSortIconNeutral":"Table-module__tableSortIconNeutral___uvnHs","tableSortIcon":"Table-module__tableSortIcon___YVa2Q","tableHeaderSearchContainer":"Table-module__tableHeaderSearchContainer___Yy8-s","tableHeaderSearch":"Table-module__tableHeaderSearch___swewU","tableHeaderFilters":"Table-module__tableHeaderFilters___ncatO","tableHeaderFilterLabel":"Table-module__tableHeaderFilterLabel___r3DI-","tableHeaderFilterItems":"Table-module__tableHeaderFilterItems___kQDsY","tablePaginationSelect":"Table-module__tablePaginationSelect___l2aYm","tablePaginationLabel":"Table-module__tablePaginationLabel___S9VOr","tablePaginationSelectInput":"Table-module__tablePaginationSelectInput___wdhOQ","tablePaginationInfo":"Table-module__tablePaginationInfo___r1v8R","tablePaginationControls":"Table-module__tablePaginationControls___IL8rm","tablePaginationButton":"Table-module__tablePaginationButton___SNDQq","tableScrollWrapper":"Table-module__tableScrollWrapper___SvEOw","tableEmptyCell":"Table-module__tableEmptyCell___N5a9t","tableEmpty":"Table-module__tableEmpty___0yPZ0","tableEmptyContent":"Table-module__tableEmptyContent___uNWpN","tableEmptyText":"Table-module__tableEmptyText___7kY7Q","tableEmptyTitle":"Table-module__tableEmptyTitle___Y-7z8","tableEmptyCaption":"Table-module__tableEmptyCaption___4PZ14","tableCellMaxHeight":"Table-module__tableCellMaxHeight___-tcyU"};
|
|
5658
|
-
|
|
5659
|
-
const EmptyState = ({ emptyIcon, emptyTitle, emptyText }) => (jsxRuntime.jsxs("div", { className: styles$4.tableEmpty, children: [jsxRuntime.jsx("div", { className: styles$4.tableEmptyContent, children: emptyIcon ?? jsxRuntime.jsx(reactIcons.SearchInfo20Regular, {}) }), jsxRuntime.jsxs("div", { className: styles$4.tableEmptyText, children: [jsxRuntime.jsx("h3", { className: styles$4.tableEmptyTitle, children: emptyTitle ?? 'Nenhum dado encontrado' }), jsxRuntime.jsx("p", { className: styles$4.tableEmptyCaption, children: emptyText ?? 'Nenhum registro encontrado' })] })] }));
|
|
5660
|
-
|
|
5661
5518
|
const TableV2 = ({ columns, data, rowSelection: rowSelectionConfig, enableSorting = true, bulkActions, header, footer, loading = false, emptyIcon, emptyTitle, emptyText, onRow, className, }) => {
|
|
5662
5519
|
const isRowSelectionEnabled = !!rowSelectionConfig;
|
|
5663
5520
|
const isControlled = rowSelectionConfig?.selectedRowKeys !== undefined;
|
|
@@ -5667,6 +5524,19 @@ const TableV2 = ({ columns, data, rowSelection: rowSelectionConfig, enableSortin
|
|
|
5667
5524
|
setPendingSearch(header.searchValue);
|
|
5668
5525
|
}
|
|
5669
5526
|
}, [header?.searchValue]);
|
|
5527
|
+
const [activeView, setActiveView] = React.useState(header?.viewToggle?.value ??
|
|
5528
|
+
header?.viewToggle?.defaultValue ??
|
|
5529
|
+
header?.viewToggle?.items?.[0]?.value ??
|
|
5530
|
+
'');
|
|
5531
|
+
React.useEffect(() => {
|
|
5532
|
+
if (header?.viewToggle?.value !== undefined) {
|
|
5533
|
+
setActiveView(header.viewToggle.value);
|
|
5534
|
+
}
|
|
5535
|
+
}, [header?.viewToggle?.value]);
|
|
5536
|
+
const currentViewData = header?.viewToggle?.views?.[activeView];
|
|
5537
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5538
|
+
const effectiveColumns = (currentViewData?.columns ?? columns);
|
|
5539
|
+
const effectiveData = currentViewData?.data ?? data;
|
|
5670
5540
|
const [rowSelectionState, setRowSelectionState] = React.useState({});
|
|
5671
5541
|
const rowSelectionRef = React.useRef({});
|
|
5672
5542
|
const externalSelectionState = React.useMemo(() => {
|
|
@@ -5688,13 +5558,13 @@ const TableV2 = ({ columns, data, rowSelection: rowSelectionConfig, enableSortin
|
|
|
5688
5558
|
size: 48,
|
|
5689
5559
|
enableSorting: false,
|
|
5690
5560
|
enableColumnFilter: false,
|
|
5691
|
-
header: ({ table: t }) => (jsxRuntime.jsx("div", { className: styles$
|
|
5692
|
-
cell: ({ row }) => (jsxRuntime.jsx("div", { className: styles$
|
|
5561
|
+
header: ({ table: t }) => (jsxRuntime.jsx("div", { className: styles$5.checkboxCell, children: jsxRuntime.jsx(Checkbox, { checked: t.getIsAllPageRowsSelected(), indeterminate: t.getIsSomePageRowsSelected(), disabled: rowSelectionConfig?.disableSelectAll, onCheckedChange: (checked) => t.toggleAllPageRowsSelected(checked) }) })),
|
|
5562
|
+
cell: ({ row }) => (jsxRuntime.jsx("div", { className: styles$5.checkboxCell, children: jsxRuntime.jsx(Checkbox, { checked: row.getIsSelected(), disabled: !row.getCanSelect(), onCheckedChange: (checked) => row.toggleSelected(checked) }) })),
|
|
5693
5563
|
}), [rowSelectionConfig?.disableSelectAll]);
|
|
5694
|
-
const resolvedColumns = React.useMemo(() => (isRowSelectionEnabled ? [selectionColumn, ...
|
|
5564
|
+
const resolvedColumns = React.useMemo(() => (isRowSelectionEnabled ? [selectionColumn, ...effectiveColumns] : effectiveColumns), [isRowSelectionEnabled, selectionColumn, effectiveColumns]);
|
|
5695
5565
|
const showSearch = !!(header?.onSearchChange);
|
|
5696
5566
|
const table = reactTable.useReactTable({
|
|
5697
|
-
data,
|
|
5567
|
+
data: effectiveData,
|
|
5698
5568
|
columns: resolvedColumns,
|
|
5699
5569
|
defaultColumn: { minSize: 44, size: 0 },
|
|
5700
5570
|
state: {
|
|
@@ -5737,7 +5607,7 @@ const TableV2 = ({ columns, data, rowSelection: rowSelectionConfig, enableSortin
|
|
|
5737
5607
|
const totalPages = footer ? Math.ceil(effectiveTotalItems / pageSize) : 0;
|
|
5738
5608
|
const canGoPrev = pageIndex > 0;
|
|
5739
5609
|
const canGoNext = pageIndex + 1 < totalPages;
|
|
5740
|
-
const skeletonRowCount = footer ? pageSize : (
|
|
5610
|
+
const skeletonRowCount = footer ? pageSize : (effectiveData.length > 0 ? effectiveData.length : pageSize);
|
|
5741
5611
|
const selectedRows = React.useMemo(() => table
|
|
5742
5612
|
.getCoreRowModel()
|
|
5743
5613
|
.rows.filter((r) => effectiveRowSelection[r.id])
|
|
@@ -5767,24 +5637,38 @@ const TableV2 = ({ columns, data, rowSelection: rowSelectionConfig, enableSortin
|
|
|
5767
5637
|
setPagination({ pageIndex: 0, pageSize: size });
|
|
5768
5638
|
footer?.onPageSizeChange?.(size);
|
|
5769
5639
|
};
|
|
5770
|
-
return (jsxRuntime.jsxs("div", { className: clsx(styles$
|
|
5640
|
+
return (jsxRuntime.jsxs("div", { className: clsx(styles$5.wrapper, className), children: [showBulkActions && (jsxRuntime.jsxs("div", { className: styles$5.bulkActionsBar, children: [jsxRuntime.jsxs("div", { className: styles$5.bulkActionsInfo, children: [jsxRuntime.jsx(Button, { variant: "text", iconOnly: true, icon: jsxRuntime.jsx(reactIcons.Dismiss16Regular, {}), ariaLabel: "Limpar sele\u00E7\u00E3o", onClick: handleClearSelection, className: styles$5.bulkActionsClearButton }), jsxRuntime.jsx("span", { className: styles$5.bulkActionsLabel, children: bulkActions.label
|
|
5771
5641
|
? bulkActions.label(selectedCount, selectedRows)
|
|
5772
|
-
: `${selectedCount} ${selectedCount === 1 ? 'item selecionado' : 'itens selecionados'}` })] }), jsxRuntime.jsx("div", { className: styles$
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5642
|
+
: `${selectedCount} ${selectedCount === 1 ? 'item selecionado' : 'itens selecionados'}` })] }), jsxRuntime.jsx("div", { className: styles$5.bulkActionsButtons, children: bulkActions.actions.map((action, index) => (jsxRuntime.jsx(Button, { variant: action.variant ?? 'outlined', type: "button", disabled: action.disabled, onClick: action.onClick, size: "sm", children: action.label }, index))) })] })), header && (jsxRuntime.jsxs("div", { className: styles$5.tableHeader, children: [jsxRuntime.jsxs("div", { className: styles$5.tableHeaderLeft, children: [showSearch && (jsxRuntime.jsx("div", { className: styles$5.tableHeaderSearchContainer, children: jsxRuntime.jsx(Search, { value: pendingSearch, virtualKeyboard: header.virtualKeyboard, searchMode: header?.searchMode ?? "on-enter", onChange: (e) => {
|
|
5643
|
+
setPendingSearch(e.target.value);
|
|
5644
|
+
}, onSearch: (val) => {
|
|
5645
|
+
if (footer) {
|
|
5646
|
+
setPagination((prev) => ({ ...prev, pageIndex: 0 }));
|
|
5647
|
+
footer?.onPageChange?.(1);
|
|
5648
|
+
}
|
|
5649
|
+
header?.onSearchChange?.(val);
|
|
5650
|
+
}, onClear: () => {
|
|
5651
|
+
setPendingSearch('');
|
|
5652
|
+
if (footer) {
|
|
5653
|
+
setPagination((prev) => ({ ...prev, pageIndex: 0 }));
|
|
5654
|
+
footer?.onPageChange?.(1);
|
|
5655
|
+
}
|
|
5656
|
+
header?.onSearchChange?.('');
|
|
5657
|
+
}, placeholder: header.searchPlaceholder ?? 'Pesquisar...', className: styles$5.tableHeaderSearch }) })), header.viewToggle && (jsxRuntime.jsx(ToggleButton, { mode: "combined", selectionType: "single", value: activeView, onValueChange: (val) => {
|
|
5658
|
+
if (!val)
|
|
5659
|
+
return;
|
|
5660
|
+
setActiveView(val);
|
|
5661
|
+
if (footer) {
|
|
5662
|
+
setPagination((prev) => ({ ...prev, pageIndex: 0 }));
|
|
5663
|
+
footer?.onPageChange?.(1);
|
|
5664
|
+
}
|
|
5665
|
+
header.viewToggle?.onValueChange?.(val);
|
|
5666
|
+
}, items: header.viewToggle.items.map((item) => ({
|
|
5667
|
+
value: item.value,
|
|
5668
|
+
icon: item.icon,
|
|
5669
|
+
iconOnly: true,
|
|
5670
|
+
tooltipText: item.tooltipText,
|
|
5671
|
+
})) }))] }), !!header.filterItems?.length && (jsxRuntime.jsxs("div", { className: styles$5.tableHeaderFilters, children: [header.filterItems.some((item) => item.type !== 'combined') && (jsxRuntime.jsx("span", { className: styles$5.tableHeaderFilterLabel, children: "Filtros" })), jsxRuntime.jsx("div", { className: styles$5.tableHeaderFilterItems, children: header.filterItems.map((filterItem, index) => {
|
|
5788
5672
|
const commonProps = {
|
|
5789
5673
|
buttonText: filterItem.buttonText,
|
|
5790
5674
|
icon: filterItem.icon,
|
|
@@ -5802,30 +5686,30 @@ const TableV2 = ({ columns, data, rowSelection: rowSelectionConfig, enableSortin
|
|
|
5802
5686
|
return (jsxRuntime.jsx(Filter, { ...commonProps, type: "calendar", selectedDate: filterItem.selectedDate, onDateSelect: filterItem.onDateSelect, onClearDate: filterItem.onClear, minDate: filterItem.minDate, maxDate: filterItem.maxDate, locale: filterItem.locale, placeholder: filterItem.placeholder }, filterItem.id ?? index));
|
|
5803
5687
|
}
|
|
5804
5688
|
return (jsxRuntime.jsx(Filter, { ...commonProps, type: filterItem.type, items: filterItem.items, selectedIds: filterItem.selectedIds, onApplyFilter: filterItem.onSelectionChange, placeholder: filterItem.placeholder, enableSearch: filterItem.enableSearch }, filterItem.id ?? index));
|
|
5805
|
-
}) })] }))] })), jsxRuntime.jsx("div", { className: styles$
|
|
5689
|
+
}) })] }))] })), jsxRuntime.jsx("div", { className: styles$5.tableContainer, children: jsxRuntime.jsx("div", { className: styles$5.tableScrollWrapper, children: jsxRuntime.jsxs("table", { className: styles$5.table, "aria-label": "Tabela de dados", "aria-rowcount": data.length + 1, children: [jsxRuntime.jsx("thead", { className: styles$5.tableHead, children: table.getHeaderGroups().map((headerGroup) => (jsxRuntime.jsx("tr", { children: headerGroup.headers.map((col) => (jsxRuntime.jsx("th", { className: styles$5.tableTh, style: {
|
|
5806
5690
|
textAlign: col.column.columnDef.meta?.align,
|
|
5807
5691
|
width: col.column.columnDef.size || undefined,
|
|
5808
5692
|
minWidth: col.column.columnDef.minSize,
|
|
5809
5693
|
maxWidth: col.column.columnDef.maxSize !== Number.MAX_SAFE_INTEGER
|
|
5810
5694
|
? col.column.columnDef.maxSize
|
|
5811
5695
|
: undefined,
|
|
5812
|
-
}, children: jsxRuntime.jsx("div", { className: styles$
|
|
5696
|
+
}, children: jsxRuntime.jsx("div", { className: styles$5.tableThContent, children: col.isPlaceholder ? null : col.column.getCanSort() ? (jsxRuntime.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: [reactTable.flexRender(col.column.columnDef.header, col.getContext()), col.column.getIsSorted() === 'asc' ? (jsxRuntime.jsx(reactIcons.ArrowSortUp16Regular, { className: styles$5.tableSortIcon })) : col.column.getIsSorted() === 'desc' ? (jsxRuntime.jsx(reactIcons.ArrowSortDown16Regular, { className: styles$5.tableSortIcon })) : (jsxRuntime.jsx(reactIcons.ArrowSort16Regular, { className: styles$5.tableSortIconNeutral }))] })) : (reactTable.flexRender(col.column.columnDef.header, col.getContext())) }) }, col.id))) }, headerGroup.id))) }), jsxRuntime.jsx("tbody", { className: styles$5.tableBody, children: loading ? (Array.from({ length: skeletonRowCount }).map((_, rowIdx) => (jsxRuntime.jsx("tr", { className: styles$5.tableRow, children: table.getVisibleLeafColumns().map((col) => (jsxRuntime.jsx("td", { className: styles$5.tableTd, children: jsxRuntime.jsx(Skeleton, {}) }, col.id))) }, `skeleton-row-${rowIdx}`)))) : table.getRowModel().rows.length > 0 ? (table.getRowModel().rows.map((row, index) => {
|
|
5813
5697
|
const rowProps = onRow?.(row.original, index) ?? {};
|
|
5814
|
-
return (jsxRuntime.jsx("tr", { className: clsx(styles$
|
|
5698
|
+
return (jsxRuntime.jsx("tr", { className: clsx(styles$5.tableRow, rowProps.className), onClick: rowProps.onClick, onDoubleClick: rowProps.onDoubleClick, children: row.getVisibleCells().map((cell) => (jsxRuntime.jsx("td", { className: styles$5.tableTd, style: {
|
|
5815
5699
|
textAlign: cell.column.columnDef.meta?.align,
|
|
5816
5700
|
width: cell.column.columnDef.size || undefined,
|
|
5817
5701
|
minWidth: cell.column.columnDef.minSize,
|
|
5818
5702
|
maxWidth: cell.column.columnDef.maxSize !== Number.MAX_SAFE_INTEGER
|
|
5819
5703
|
? cell.column.columnDef.maxSize
|
|
5820
5704
|
: undefined,
|
|
5821
|
-
}, children: jsxRuntime.jsx("div", { className: styles$
|
|
5822
|
-
})) : (jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: table.getVisibleLeafColumns().length, className: styles$
|
|
5705
|
+
}, children: jsxRuntime.jsx("div", { className: styles$5.tableCellMaxHeight, style: { maxHeight: cell.column.columnDef.meta?.maxHeight ?? '64px' }, children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }) }, cell.id))) }, row.id));
|
|
5706
|
+
})) : (jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: table.getVisibleLeafColumns().length, className: styles$5.tableEmptyCell, children: jsxRuntime.jsx(EmptyState, { emptyIcon: emptyIcon, emptyTitle: emptyTitle, emptyText: emptyText }) }) })) })] }) }) }), footer && (jsxRuntime.jsxs("div", { className: styles$5.tablePagination, children: [jsxRuntime.jsxs("div", { className: styles$5.tablePaginationSelect, children: [jsxRuntime.jsx("label", { htmlFor: "tablev2-page-size", className: styles$5.tablePaginationLabel, children: "Itens por p\u00E1gina" }), jsxRuntime.jsx("select", { id: "tablev2-page-size", value: pageSize, onChange: handlePageSizeChange, className: styles$5.tablePaginationSelectInput, children: (footer.pageSizeOptions ?? [10, 25, 50, 100]).map((opt) => (jsxRuntime.jsx("option", { value: opt, children: opt }, opt))) })] }), jsxRuntime.jsx("div", { className: styles$5.tablePaginationInfo, children: jsxRuntime.jsx("span", { children: totalPages > 0
|
|
5823
5707
|
? `${pageIndex + 1} de ${totalPages}`
|
|
5824
|
-
: '0 páginas' }) }), jsxRuntime.jsxs("div", { className: styles$
|
|
5708
|
+
: '0 páginas' }) }), jsxRuntime.jsxs("div", { className: styles$5.tablePaginationControls, children: [jsxRuntime.jsx("button", { className: styles$5.tablePaginationButton, onClick: () => {
|
|
5825
5709
|
const newPage = pageIndex - 1;
|
|
5826
5710
|
setPagination((prev) => ({ ...prev, pageIndex: newPage }));
|
|
5827
5711
|
footer?.onPageChange?.(newPage + 1);
|
|
5828
|
-
}, disabled: !canGoPrev, "aria-label": "P\u00E1gina anterior", children: jsxRuntime.jsx(reactIcons.ChevronLeft16Regular, {}) }), jsxRuntime.jsx("button", { className: styles$
|
|
5712
|
+
}, disabled: !canGoPrev, "aria-label": "P\u00E1gina anterior", children: jsxRuntime.jsx(reactIcons.ChevronLeft16Regular, {}) }), jsxRuntime.jsx("button", { className: styles$5.tablePaginationButton, onClick: () => {
|
|
5829
5713
|
const newPage = pageIndex + 1;
|
|
5830
5714
|
setPagination((prev) => ({ ...prev, pageIndex: newPage }));
|
|
5831
5715
|
footer?.onPageChange?.(newPage + 1);
|
|
@@ -5834,7 +5718,7 @@ const TableV2 = ({ columns, data, rowSelection: rowSelectionConfig, enableSortin
|
|
|
5834
5718
|
|
|
5835
5719
|
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"};
|
|
5836
5720
|
|
|
5837
|
-
const TextArea = ({
|
|
5721
|
+
const TextArea = React.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) => {
|
|
5838
5722
|
const normalizeValue = (val) => {
|
|
5839
5723
|
return val === undefined || val === null ? '' : String(val);
|
|
5840
5724
|
};
|
|
@@ -5879,11 +5763,11 @@ const TextArea = ({ ref, className, value, label, placeholder, onChange, disable
|
|
|
5879
5763
|
onChange?.(val);
|
|
5880
5764
|
}
|
|
5881
5765
|
} }) }))] }));
|
|
5882
|
-
};
|
|
5766
|
+
});
|
|
5883
5767
|
TextArea.displayName = 'TextArea';
|
|
5884
5768
|
var TextArea_default = React.memo(TextArea);
|
|
5885
5769
|
|
|
5886
|
-
var styles$2 = {"toastViewport":"Toast-module__toastViewport___Ns71-","toastRoot":"Toast-module__toastRoot___ZtA3x","slideIn":"Toast-module__slideIn___QcXWP","toastTitle":"Toast-module__toastTitle___WbjNH","toastContent":"Toast-module__toastContent___IY5QB","toastClose":"Toast-module__toastClose___FqVsT","Icon":"Toast-module__Icon___ERU9c","iconInfo":"Toast-module__iconInfo___G-II3","iconSuccess":"Toast-module__iconSuccess___N8iF1","iconAlert":"Toast-module__iconAlert___SSf8u"};
|
|
5770
|
+
var styles$2 = {"toastViewport":"Toast-module__toastViewport___Ns71-","toastRoot":"Toast-module__toastRoot___ZtA3x","slideIn":"Toast-module__slideIn___QcXWP","fadeOut":"Toast-module__fadeOut___0WaGy","toastTitle":"Toast-module__toastTitle___WbjNH","toastContent":"Toast-module__toastContent___IY5QB","toastClose":"Toast-module__toastClose___FqVsT","Icon":"Toast-module__Icon___ERU9c","iconInfo":"Toast-module__iconInfo___G-II3","iconSuccess":"Toast-module__iconSuccess___N8iF1","iconAlert":"Toast-module__iconAlert___SSf8u"};
|
|
5887
5771
|
|
|
5888
5772
|
/**
|
|
5889
5773
|
* Contexto React que armazena o estado e as ações do sistema de Toast.
|
|
@@ -6424,15 +6308,13 @@ exports.Radio = Radio;
|
|
|
6424
6308
|
exports.Search = Search;
|
|
6425
6309
|
exports.Select = Select;
|
|
6426
6310
|
exports.Switch = Switch;
|
|
6427
|
-
exports.Table = Table;
|
|
6428
|
-
exports.TableHeader = TableHeader;
|
|
6429
|
-
exports.TablePagination = TablePagination;
|
|
6430
6311
|
exports.TableV2 = TableV2;
|
|
6431
6312
|
exports.TextArea = TextArea_default;
|
|
6432
6313
|
exports.TextField = TextField;
|
|
6433
6314
|
exports.Toast = Toast;
|
|
6434
6315
|
exports.ToastContainer = ToastContainer;
|
|
6435
6316
|
exports.ToastProvider = ToastProvider;
|
|
6317
|
+
exports.ToggleButton = ToggleButton;
|
|
6436
6318
|
exports.Tooltip = Tooltip;
|
|
6437
6319
|
exports.VerificationCode = VerificationCode;
|
|
6438
6320
|
exports.VirtualKeyboard = VirtualKeyboard;
|