@giro-ds/react 9.0.0 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -8,6 +8,7 @@ var reactIcons = require('@fluentui/react-icons');
8
8
  var reactDayPicker = require('react-day-picker');
9
9
  var dateFns = require('date-fns');
10
10
  var reactDom = require('react-dom');
11
+ var Keyboard = require('react-simple-keyboard');
11
12
  var reactTable = require('@tanstack/react-table');
12
13
  var Skeleton = require('react-loading-skeleton');
13
14
 
@@ -30,17 +31,17 @@ function _interopNamespaceDefault(e) {
30
31
 
31
32
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
32
33
 
33
- var styles$s = {"AvatarRoot":"Avatar-module__AvatarRoot___7eNx7","AvatarRoot--sm":"Avatar-module__AvatarRoot--sm___LVHoe","AvatarRoot--lg":"Avatar-module__AvatarRoot--lg___QWux5","AvatarImage":"Avatar-module__AvatarImage___-H6iH","AvatarFallback":"Avatar-module__AvatarFallback___RDyNV"};
34
+ var styles$t = {"AvatarRoot":"Avatar-module__AvatarRoot___7eNx7","AvatarRoot--sm":"Avatar-module__AvatarRoot--sm___LVHoe","AvatarRoot--lg":"Avatar-module__AvatarRoot--lg___QWux5","AvatarImage":"Avatar-module__AvatarImage___-H6iH","AvatarFallback":"Avatar-module__AvatarFallback___RDyNV"};
34
35
 
35
36
  const Avatar = ({ icon, size = 'lg', src, className, initialLetters, ...rest }) => {
36
- const AvatarClass = clsx(styles$s.AvatarRoot, {
37
- [styles$s['AvatarRoot--lg']]: size === 'lg',
38
- [styles$s['AvatarRoot--sm']]: size === 'sm',
37
+ const AvatarClass = clsx(styles$t.AvatarRoot, {
38
+ [styles$t['AvatarRoot--lg']]: size === 'lg',
39
+ [styles$t['AvatarRoot--sm']]: size === 'sm',
39
40
  }, className);
40
- return (jsxRuntime.jsxs(radixUi.Avatar.Root, { className: AvatarClass, ...rest, children: [src && (jsxRuntime.jsx(radixUi.Avatar.Image, { className: styles$s.AvatarImage, src: src, alt: "Avatar" })), jsxRuntime.jsx(radixUi.Avatar.Fallback, { className: styles$s.AvatarFallback, children: icon || initialLetters })] }));
41
+ return (jsxRuntime.jsxs(radixUi.Avatar.Root, { className: AvatarClass, ...rest, children: [src && (jsxRuntime.jsx(radixUi.Avatar.Image, { className: styles$t.AvatarImage, src: src, alt: "Avatar" })), jsxRuntime.jsx(radixUi.Avatar.Fallback, { className: styles$t.AvatarFallback, children: icon || initialLetters })] }));
41
42
  };
42
43
 
43
- var styles$r = {"badge__status":"Badge-module__badge__status___-u3xv","badge":"Badge-module__badge___ZbEBU","badgeContainer":"Badge-module__badgeContainer___Guw9Z","badge__empty":"Badge-module__badge__empty___u8ccy","badge__flex":"Badge-module__badge__flex___DSJHW","badge__status__empty":"Badge-module__badge__status__empty___h8L4e","badge__status__flex":"Badge-module__badge__status__flex___703Q6","badge__status__filterBadge":"Badge-module__badge__status__filterBadge___DhjGU"};
44
+ var styles$s = {"badge__status":"Badge-module__badge__status___-u3xv","badge":"Badge-module__badge___ZbEBU","badgeContainer":"Badge-module__badgeContainer___Guw9Z","badge__empty":"Badge-module__badge__empty___u8ccy","badge__flex":"Badge-module__badge__flex___DSJHW","badge__status__empty":"Badge-module__badge__status__empty___h8L4e","badge__status__flex":"Badge-module__badge__status__flex___703Q6","badge__status__filterBadge":"Badge-module__badge__status__filterBadge___DhjGU"};
44
45
 
45
46
  const getDisplayValue = (value) => {
46
47
  if (value === null || value === undefined)
@@ -62,27 +63,27 @@ const Badge = ({ children, badgeValue = null, className, id, filterVariant = fal
62
63
  const displayValue = getDisplayValue(badgeValue);
63
64
  const isEmpty = displayValue === '';
64
65
  if (children) {
65
- return (jsxRuntime.jsxs("div", { className: styles$r.badgeContainer, ...rest, children: [jsxRuntime.jsx("div", { "data-testid": "badge-content", children: children }), jsxRuntime.jsx("div", { id: componentId, className: clsx(styles$r.badge, {
66
- [styles$r['badge__empty']]: isEmpty,
67
- [styles$r['badge__flex']]: displayValue.length >= 2,
66
+ return (jsxRuntime.jsxs("div", { className: styles$s.badgeContainer, ...rest, children: [jsxRuntime.jsx("div", { "data-testid": "badge-content", children: children }), jsxRuntime.jsx("div", { id: componentId, className: clsx(styles$s.badge, {
67
+ [styles$s['badge__empty']]: isEmpty,
68
+ [styles$s['badge__flex']]: displayValue.length >= 2,
68
69
  }, className), "data-testid": "badge", children: !isEmpty && jsxRuntime.jsx("span", { "aria-hidden": !!ariaLabel, children: displayValue }) })] }));
69
70
  }
70
- return (jsxRuntime.jsx("div", { className: styles$r.badgeContainer, children: jsxRuntime.jsx("div", { className: clsx(styles$r['badge__status'], {
71
- [styles$r['badge__status__empty']]: isEmpty,
72
- [styles$r['badge__status__flex']]: displayValue.length >= 2,
73
- [styles$r['badge__status__filterBadge']]: filterVariant,
71
+ return (jsxRuntime.jsx("div", { className: styles$s.badgeContainer, children: jsxRuntime.jsx("div", { className: clsx(styles$s['badge__status'], {
72
+ [styles$s['badge__status__empty']]: isEmpty,
73
+ [styles$s['badge__status__flex']]: displayValue.length >= 2,
74
+ [styles$s['badge__status__filterBadge']]: filterVariant,
74
75
  }, className), "data-testid": "badge", children: !isEmpty && (jsxRuntime.jsx("span", { "aria-hidden": !!ariaLabel, children: displayValue })) }) }));
75
76
  };
76
77
 
77
- var styles$q = {"tooltipContent":"Tooltip-module__tooltipContent___xycUg","triggerWrapper":"Tooltip-module__triggerWrapper___x83XR"};
78
+ var styles$r = {"tooltipContent":"Tooltip-module__tooltipContent___xycUg","triggerWrapper":"Tooltip-module__triggerWrapper___x83XR"};
78
79
 
79
80
  const Tooltip = ({ children, text, side = 'bottom', align = 'start', maxWidth, sideOffset = 10, className, ...rest }) => {
80
- return (jsxRuntime.jsx(radixUi.Tooltip.Provider, { children: jsxRuntime.jsxs(radixUi.Tooltip.Root, { children: [jsxRuntime.jsx(radixUi.Tooltip.Trigger, { asChild: true, children: jsxRuntime.jsx("span", { className: styles$q.triggerWrapper, children: children }) }), jsxRuntime.jsx(radixUi.Tooltip.Portal, { children: jsxRuntime.jsx(radixUi.Tooltip.Content, { className: clsx(styles$q.tooltipContent, className), side: side, align: align, sideOffset: sideOffset, style: { maxWidth: maxWidth ? `${maxWidth}px` : 'auto' }, ...rest, children: text }) })] }) }));
81
+ return (jsxRuntime.jsx(radixUi.Tooltip.Provider, { children: jsxRuntime.jsxs(radixUi.Tooltip.Root, { children: [jsxRuntime.jsx(radixUi.Tooltip.Trigger, { asChild: true, children: jsxRuntime.jsx("span", { className: styles$r.triggerWrapper, children: children }) }), jsxRuntime.jsx(radixUi.Tooltip.Portal, { children: jsxRuntime.jsx(radixUi.Tooltip.Content, { className: clsx(styles$r.tooltipContent, className), side: side, align: align, sideOffset: sideOffset, style: { maxWidth: maxWidth ? `${maxWidth}px` : 'auto' }, ...rest, children: text }) })] }) }));
81
82
  };
82
83
 
83
- var styles$p = {"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"};
84
+ var styles$q = {"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"};
84
85
 
85
- const Button = React.forwardRef(({ as, children, variant = 'filled', iconPosition = 'left', href, to, external = false, target, rel, disabled = false, onClick, size = 'lg', className, type = 'button', id, icon, fullWidth = false, ariaLabel, iconOnly = false, loading = false, tooltipText, tooltipSide = 'top', tooltipAlign = 'center', ...rest }, ref) => {
86
+ 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) => {
86
87
  const generatedId = React.useId();
87
88
  const componentId = id || generatedId;
88
89
  const getComponent = () => {
@@ -109,14 +110,19 @@ const Button = React.forwardRef(({ as, children, variant = 'filled', iconPositio
109
110
  'Forneça um ícone via `icon={<MeuIcone />}`.');
110
111
  }
111
112
  const resolvedIcon = icon;
112
- const buttonClasses = clsx(styles$p.button, styles$p[`button-${variant}`], styles$p[`button-${size}`], {
113
- [styles$p['disabled']]: disabled,
114
- [styles$p['buttonLoading']]: loading,
115
- [styles$p['buttonWithIcon']]: resolvedIcon && !iconOnly,
116
- [styles$p[`buttonIconPosition-${iconPosition}`]]: resolvedIcon && !iconOnly,
117
- [styles$p['buttonNoContent']]: resolvedIcon && !hasContent && !iconOnly,
118
- [styles$p['buttonFullWidth']]: fullWidth,
119
- [styles$p['buttonIconOnly']]: iconOnly,
113
+ const scaleClass = {
114
+ 1: 'scale-1-0',
115
+ 1.5: 'scale-1-5',
116
+ 2: 'scale-2-0',
117
+ }[scale];
118
+ const buttonClasses = clsx(styles$q.button, styles$q[`button-${variant}`], styles$q[`button-${size}`], scaleClass, {
119
+ [styles$q['disabled']]: disabled,
120
+ [styles$q['buttonLoading']]: loading,
121
+ [styles$q['buttonWithIcon']]: resolvedIcon && !iconOnly,
122
+ [styles$q[`buttonIconPosition-${iconPosition}`]]: resolvedIcon && !iconOnly,
123
+ [styles$q['buttonNoContent']]: resolvedIcon && !hasContent && !iconOnly,
124
+ [styles$q['buttonFullWidth']]: fullWidth,
125
+ [styles$q['buttonIconOnly']]: iconOnly,
120
126
  }, className);
121
127
  const getAriaLabel = () => {
122
128
  if (ariaLabel)
@@ -142,12 +148,12 @@ const Button = React.forwardRef(({ as, children, variant = 'filled', iconPositio
142
148
  };
143
149
  const renderContent = () => {
144
150
  if (iconOnly && !loading) {
145
- return (jsxRuntime.jsx("span", { className: styles$p.buttonIconOnly, "aria-hidden": "true", children: resolvedIcon }));
151
+ return (jsxRuntime.jsx("span", { className: styles$q.buttonIconOnly, "aria-hidden": "true", children: resolvedIcon }));
146
152
  }
147
153
  if (loading) {
148
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!iconOnly && (jsxRuntime.jsxs("span", { className: styles$p.buttonContentHidden, "aria-hidden": "true", children: [resolvedIcon && (iconPosition === 'left' || iconPosition === 'both') && (jsxRuntime.jsx("span", { className: styles$p.buttonIconLeft, children: resolvedIcon })), children, resolvedIcon && (iconPosition === 'right' || iconPosition === 'both') && (jsxRuntime.jsx("span", { className: styles$p.buttonIconRight, children: resolvedIcon }))] })), jsxRuntime.jsx("span", { className: styles$p.buttonLoadingSpinner, "aria-hidden": "true", children: jsxRuntime.jsx(reactIcons.SpinnerIos16Regular, { "aria-hidden": "true" }) })] }));
154
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!iconOnly && (jsxRuntime.jsxs("span", { className: styles$q.buttonContentHidden, "aria-hidden": "true", children: [resolvedIcon && (iconPosition === 'left' || iconPosition === 'both') && (jsxRuntime.jsx("span", { className: styles$q.buttonIconLeft, children: resolvedIcon })), children, resolvedIcon && (iconPosition === 'right' || iconPosition === 'both') && (jsxRuntime.jsx("span", { className: styles$q.buttonIconRight, children: resolvedIcon }))] })), jsxRuntime.jsx("span", { className: styles$q.buttonLoadingSpinner, "aria-hidden": "true", children: jsxRuntime.jsx(reactIcons.SpinnerIos16Regular, { "aria-hidden": "true" }) })] }));
149
155
  }
150
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [resolvedIcon && (iconPosition === 'left' || iconPosition === 'both') && (jsxRuntime.jsx("span", { className: styles$p.buttonIconLeft, "aria-hidden": "true", children: resolvedIcon })), children, resolvedIcon && (iconPosition === 'right' || iconPosition === 'both') && (jsxRuntime.jsx("span", { className: styles$p.buttonIconRight, "aria-hidden": "true", children: resolvedIcon }))] }));
156
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [resolvedIcon && (iconPosition === 'left' || iconPosition === 'both') && (jsxRuntime.jsx("span", { className: styles$q.buttonIconLeft, "aria-hidden": "true", children: resolvedIcon })), children, resolvedIcon && (iconPosition === 'right' || iconPosition === 'both') && (jsxRuntime.jsx("span", { className: styles$q.buttonIconRight, "aria-hidden": "true", children: resolvedIcon }))] }));
151
157
  };
152
158
  const baseProps = {
153
159
  ref,
@@ -2452,7 +2458,7 @@ const ptBR = {
2452
2458
  },
2453
2459
  };
2454
2460
 
2455
- var styles$o = {"root":"Calendar-module__root___vQEhz","day":"Calendar-module__day___dseUA","day_button":"Calendar-module__day_button___r3WNU","caption_label":"Calendar-module__caption_label___Dhkie","button_next":"Calendar-module__button_next___iRaNz","button_previous":"Calendar-module__button_previous___r7JBs","chevron":"Calendar-module__chevron___NPDg-","nav":"Calendar-module__nav___MT3Dm","dropdowns":"Calendar-module__dropdowns___xBVtv","dropdown":"Calendar-module__dropdown___D7OlW","dropdown_root":"Calendar-module__dropdown_root___v4DlK","month_caption":"Calendar-module__month_caption___P3Hlu","month":"Calendar-module__month___0RA-L","months":"Calendar-module__months___rmJdy","month_grid":"Calendar-module__month_grid___f6YkX","weekday":"Calendar-module__weekday___Spb2f","week_number":"Calendar-module__week_number___EXJD9","today":"Calendar-module__today___U36wP","outside":"Calendar-module__outside___UeJFZ","selected":"Calendar-module__selected___5Nryr","disabled":"Calendar-module__disabled___T3658","hidden":"Calendar-module__hidden___uL3uc","range_start":"Calendar-module__range_start___c1eNH","range_middle":"Calendar-module__range_middle___Uv4gt","range_end":"Calendar-module__range_end___4qDh5","focusable":"Calendar-module__focusable___V7w-Q","weeks_before_enter":"Calendar-module__weeks_before_enter___O1ytQ","slide_in_left":"Calendar-module__slide_in_left___hfrfr","weeks_before_exit":"Calendar-module__weeks_before_exit___v7nDr","slide_out_left":"Calendar-module__slide_out_left___kib4j","weeks_after_enter":"Calendar-module__weeks_after_enter___CEtsD","slide_in_right":"Calendar-module__slide_in_right___ldL0M","weeks_after_exit":"Calendar-module__weeks_after_exit___F8Edz","slide_out_right":"Calendar-module__slide_out_right___X2hxE","caption_after_enter":"Calendar-module__caption_after_enter___0ek1H","fade_in":"Calendar-module__fade_in___YyYoZ","caption_after_exit":"Calendar-module__caption_after_exit___RA1iK","fade_out":"Calendar-module__fade_out___lNcmB","caption_before_enter":"Calendar-module__caption_before_enter___j6sMK","caption_before_exit":"Calendar-module__caption_before_exit___rntl-","calendar_grid_wrapper":"Calendar-module__calendar_grid_wrapper___OX0TR","caption_grid_btn":"Calendar-module__caption_grid_btn___qD0-E","caption_year_chevron":"Calendar-module__caption_year_chevron___4ghQV","caption_grid_label":"Calendar-module__caption_grid_label___93Wx4","gridOverlay":"Calendar-module__gridOverlay___Za-y0","gridOverlayCaption":"Calendar-module__gridOverlayCaption___p4OUO","gridOverlayYearsNav":"Calendar-module__gridOverlayYearsNav___U6S-V","gridCells":"Calendar-module__gridCells___Y8DaG","gridCellsYears":"Calendar-module__gridCellsYears___jEV52","gridCell":"Calendar-module__gridCell___RV1co","gridCellActive":"Calendar-module__gridCellActive___UBi5y","gridNavBtn":"Calendar-module__gridNavBtn___Jligz","chevronNavBtnPrev":"Calendar-module__chevronNavBtnPrev___ifEps","chevronNavBtnNext":"Calendar-module__chevronNavBtnNext___qmghm"};
2461
+ var styles$p = {"root":"Calendar-module__root___vQEhz","day":"Calendar-module__day___dseUA","day_button":"Calendar-module__day_button___r3WNU","caption_label":"Calendar-module__caption_label___Dhkie","button_next":"Calendar-module__button_next___iRaNz","button_previous":"Calendar-module__button_previous___r7JBs","chevron":"Calendar-module__chevron___NPDg-","nav":"Calendar-module__nav___MT3Dm","dropdowns":"Calendar-module__dropdowns___xBVtv","dropdown":"Calendar-module__dropdown___D7OlW","dropdown_root":"Calendar-module__dropdown_root___v4DlK","month_caption":"Calendar-module__month_caption___P3Hlu","month":"Calendar-module__month___0RA-L","months":"Calendar-module__months___rmJdy","month_grid":"Calendar-module__month_grid___f6YkX","weekday":"Calendar-module__weekday___Spb2f","week_number":"Calendar-module__week_number___EXJD9","today":"Calendar-module__today___U36wP","outside":"Calendar-module__outside___UeJFZ","selected":"Calendar-module__selected___5Nryr","disabled":"Calendar-module__disabled___T3658","hidden":"Calendar-module__hidden___uL3uc","range_start":"Calendar-module__range_start___c1eNH","range_middle":"Calendar-module__range_middle___Uv4gt","range_end":"Calendar-module__range_end___4qDh5","focusable":"Calendar-module__focusable___V7w-Q","weeks_before_enter":"Calendar-module__weeks_before_enter___O1ytQ","slide_in_left":"Calendar-module__slide_in_left___hfrfr","weeks_before_exit":"Calendar-module__weeks_before_exit___v7nDr","slide_out_left":"Calendar-module__slide_out_left___kib4j","weeks_after_enter":"Calendar-module__weeks_after_enter___CEtsD","slide_in_right":"Calendar-module__slide_in_right___ldL0M","weeks_after_exit":"Calendar-module__weeks_after_exit___F8Edz","slide_out_right":"Calendar-module__slide_out_right___X2hxE","caption_after_enter":"Calendar-module__caption_after_enter___0ek1H","fade_in":"Calendar-module__fade_in___YyYoZ","caption_after_exit":"Calendar-module__caption_after_exit___RA1iK","fade_out":"Calendar-module__fade_out___lNcmB","caption_before_enter":"Calendar-module__caption_before_enter___j6sMK","caption_before_exit":"Calendar-module__caption_before_exit___rntl-","calendar_grid_wrapper":"Calendar-module__calendar_grid_wrapper___OX0TR","caption_grid_btn":"Calendar-module__caption_grid_btn___qD0-E","caption_year_chevron":"Calendar-module__caption_year_chevron___4ghQV","caption_grid_label":"Calendar-module__caption_grid_label___93Wx4","gridOverlay":"Calendar-module__gridOverlay___Za-y0","gridOverlayCaption":"Calendar-module__gridOverlayCaption___p4OUO","gridOverlayYearsNav":"Calendar-module__gridOverlayYearsNav___U6S-V","gridCells":"Calendar-module__gridCells___Y8DaG","gridCellsYears":"Calendar-module__gridCellsYears___jEV52","gridCell":"Calendar-module__gridCell___RV1co","gridCellActive":"Calendar-module__gridCellActive___UBi5y","gridNavBtn":"Calendar-module__gridNavBtn___Jligz","chevronNavBtnPrev":"Calendar-module__chevronNavBtnPrev___ifEps","chevronNavBtnNext":"Calendar-module__chevronNavBtnNext___qmghm"};
2456
2462
 
2457
2463
  const FLUENT_CHEVRON_MAP = {
2458
2464
  down: reactIcons.ChevronDown16Regular,
@@ -2471,10 +2477,10 @@ const GridMonthCaption = ({ calendarMonth, displayIndex: _displayIndex, ...divPr
2471
2477
  const date = calendarMonth.date;
2472
2478
  const monthLabel = new Intl.DateTimeFormat(intlLocale, { month: "long" }).format(date);
2473
2479
  const yearLabel = String(date.getFullYear());
2474
- return (jsxRuntime.jsxs("div", { ...divProps, children: [jsxRuntime.jsx("span", { className: styles$o.caption_grid_label, children: monthLabel }), jsxRuntime.jsxs("button", { type: "button", className: styles$o.caption_grid_btn, "aria-pressed": view === "years", onClick: onYearLabelClick, children: [yearLabel, view !== "days" ? (jsxRuntime.jsx(reactIcons.ChevronUp16Regular, { className: styles$o.caption_year_chevron, "aria-hidden": true })) : (jsxRuntime.jsx(reactIcons.ChevronDown16Regular, { className: styles$o.caption_year_chevron, "aria-hidden": true }))] })] }));
2480
+ return (jsxRuntime.jsxs("div", { ...divProps, children: [jsxRuntime.jsx("span", { className: styles$p.caption_grid_label, children: monthLabel }), jsxRuntime.jsxs("button", { type: "button", className: styles$p.caption_grid_btn, "aria-pressed": view === "years", onClick: onYearLabelClick, children: [yearLabel, view !== "days" ? (jsxRuntime.jsx(reactIcons.ChevronUp16Regular, { className: styles$p.caption_year_chevron, "aria-hidden": true })) : (jsxRuntime.jsx(reactIcons.ChevronDown16Regular, { className: styles$p.caption_year_chevron, "aria-hidden": true }))] })] }));
2475
2481
  };
2476
2482
  const YEARS_PER_PAGE = 20;
2477
- const Calendar = ({ selected, currentDate, defaultMonth, startMonth, endMonth, onDaySelect, onDateChange, onClear: _onClear, minDate, maxDate, disabled, format: _format, locale = "pt-br", autoFocus, className, id, "aria-label": ariaLabel, ...rest }) => {
2483
+ const Calendar = ({ selected, currentDate, defaultMonth, startMonth, endMonth, onDaySelect, onDateChange, onClear: _onClear, minDate, maxDate, disabled, format: _format, locale = "pt-br", autoFocus, className, scale = 1, id, "aria-label": ariaLabel, ...rest }) => {
2478
2484
  const animate = true;
2479
2485
  const [internalSelected, setInternalSelected] = React.useState(selected ?? undefined);
2480
2486
  const [internalDisplayMonth, setInternalDisplayMonth] = React.useState(() => currentDate ?? defaultMonth ?? new Date());
@@ -2539,7 +2545,7 @@ const Calendar = ({ selected, currentDate, defaultMonth, startMonth, endMonth, o
2539
2545
  onYearLabelClick: handleYearLabelClick,
2540
2546
  };
2541
2547
  const sharedDayPickerProps = {
2542
- classNames: styles$o,
2548
+ classNames: styles$p,
2543
2549
  animate,
2544
2550
  mode: "single",
2545
2551
  selected: resolvedSelected,
@@ -2551,10 +2557,15 @@ const Calendar = ({ selected, currentDate, defaultMonth, startMonth, endMonth, o
2551
2557
  autoFocus,
2552
2558
  "aria-label": ariaLabel,
2553
2559
  };
2554
- return (jsxRuntime.jsx(GridCtx.Provider, { value: gridCtxValue, children: jsxRuntime.jsxs("div", { className: clsx(styles$o.calendar_grid_wrapper, className), children: [jsxRuntime.jsx(reactDayPicker.DayPicker, { id: id, ...sharedDayPickerProps, ...rest, captionLayout: "label", month: resolvedDisplayMonth, onMonthChange: handleMonthChange, components: { MonthCaption: GridMonthCaption, Chevron: CustomChevron } }), gridView !== "days" && (jsxRuntime.jsxs("div", { className: `${styles$o.gridOverlay}${gridView === "years" ? ` ${styles$o.gridOverlayYears}` : ""}`, role: "dialog", "aria-modal": "true", "aria-label": gridView === "months" ? "Selecione o mês" : "Selecione o ano", children: [gridView === "months" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: styles$o.gridOverlayCaption, children: [jsxRuntime.jsx("span", { className: styles$o.caption_grid_label, children: new Intl.DateTimeFormat(intlLocale, { month: "long" }).format(resolvedDisplayMonth) }), jsxRuntime.jsxs("button", { type: "button", className: styles$o.caption_grid_btn, onClick: () => setGridView("days"), "aria-label": "Fechar sele\u00E7\u00E3o de m\u00EAs", children: [displayedYear, jsxRuntime.jsx(reactIcons.ChevronUp16Regular, { className: styles$o.caption_year_chevron, "aria-hidden": true })] })] }), jsxRuntime.jsx("div", { className: styles$o.gridCells, children: monthsGrid.map(({ index, label, disabled: monthDisabled }) => (jsxRuntime.jsx("button", { type: "button", disabled: monthDisabled, className: `${styles$o.gridCell}${displayedMonthIndex === index ? ` ${styles$o.gridCellActive}` : ""}`, onClick: () => handleGridMonthSelect(index), children: label }, index))) })] })), gridView === "years" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: styles$o.gridOverlayCaption, children: [jsxRuntime.jsx("span", { className: styles$o.caption_grid_label, children: new Intl.DateTimeFormat(intlLocale, { month: "long" }).format(resolvedDisplayMonth) }), jsxRuntime.jsxs("button", { type: "button", className: styles$o.caption_grid_btn, onClick: () => setGridView("days"), "aria-label": "Fechar sele\u00E7\u00E3o de ano", children: [displayedYear, jsxRuntime.jsx(reactIcons.ChevronUp16Regular, { className: styles$o.caption_year_chevron, "aria-hidden": true })] }), jsxRuntime.jsxs("div", { className: styles$o.gridOverlayYearsNav, children: [jsxRuntime.jsx("button", { type: "button", className: styles$o.gridNavBtn, disabled: !canGoPrevYears, onClick: () => setYearPageStart((s) => s - YEARS_PER_PAGE), "aria-label": "Anos anteriores", children: jsxRuntime.jsx(reactIcons.ChevronLeft16Regular, { className: styles$o.chevronNavBtnPrev, "aria-hidden": true }) }), jsxRuntime.jsx("button", { type: "button", className: styles$o.gridNavBtn, disabled: !canGoNextYears, onClick: () => setYearPageStart((s) => s + YEARS_PER_PAGE), "aria-label": "Pr\u00F3ximos anos", children: jsxRuntime.jsx(reactIcons.ChevronRight16Regular, { className: styles$o.chevronNavBtnNext, "aria-hidden": true }) })] })] }), jsxRuntime.jsx("div", { className: `${styles$o.gridCells} ${styles$o.gridCellsYears}`, children: yearsInPage.map((year) => (jsxRuntime.jsx("button", { type: "button", className: `${styles$o.gridCell}${displayedYear === year ? ` ${styles$o.gridCellActive}` : ""}`, onClick: () => handleGridYearSelect(year), children: year }, year))) })] }))] }))] }) }));
2560
+ const scaleClass = {
2561
+ 1: 'scale-1-0',
2562
+ 1.5: 'scale-1-5',
2563
+ 2: 'scale-2-0',
2564
+ }[scale];
2565
+ return (jsxRuntime.jsx(GridCtx.Provider, { value: gridCtxValue, children: jsxRuntime.jsxs("div", { className: clsx(styles$p.calendar_grid_wrapper, scaleClass, className), children: [jsxRuntime.jsx(reactDayPicker.DayPicker, { id: id, ...sharedDayPickerProps, ...rest, captionLayout: "label", month: resolvedDisplayMonth, onMonthChange: handleMonthChange, components: { MonthCaption: GridMonthCaption, Chevron: CustomChevron } }), gridView !== "days" && (jsxRuntime.jsxs("div", { className: `${styles$p.gridOverlay}${gridView === "years" ? ` ${styles$p.gridOverlayYears}` : ""}`, role: "dialog", "aria-modal": "true", "aria-label": gridView === "months" ? "Selecione o mês" : "Selecione o ano", children: [gridView === "months" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: styles$p.gridOverlayCaption, children: [jsxRuntime.jsx("span", { className: styles$p.caption_grid_label, children: new Intl.DateTimeFormat(intlLocale, { month: "long" }).format(resolvedDisplayMonth) }), jsxRuntime.jsxs("button", { type: "button", className: styles$p.caption_grid_btn, onClick: () => setGridView("days"), "aria-label": "Fechar sele\u00E7\u00E3o de m\u00EAs", children: [displayedYear, jsxRuntime.jsx(reactIcons.ChevronUp16Regular, { className: styles$p.caption_year_chevron, "aria-hidden": true })] })] }), jsxRuntime.jsx("div", { className: styles$p.gridCells, children: monthsGrid.map(({ index, label, disabled: monthDisabled }) => (jsxRuntime.jsx("button", { type: "button", disabled: monthDisabled, className: `${styles$p.gridCell}${displayedMonthIndex === index ? ` ${styles$p.gridCellActive}` : ""}`, onClick: () => handleGridMonthSelect(index), children: label }, index))) })] })), gridView === "years" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: styles$p.gridOverlayCaption, children: [jsxRuntime.jsx("span", { className: styles$p.caption_grid_label, children: new Intl.DateTimeFormat(intlLocale, { month: "long" }).format(resolvedDisplayMonth) }), jsxRuntime.jsxs("button", { type: "button", className: styles$p.caption_grid_btn, onClick: () => setGridView("days"), "aria-label": "Fechar sele\u00E7\u00E3o de ano", children: [displayedYear, jsxRuntime.jsx(reactIcons.ChevronUp16Regular, { className: styles$p.caption_year_chevron, "aria-hidden": true })] }), jsxRuntime.jsxs("div", { className: styles$p.gridOverlayYearsNav, children: [jsxRuntime.jsx("button", { type: "button", className: styles$p.gridNavBtn, disabled: !canGoPrevYears, onClick: () => setYearPageStart((s) => s - YEARS_PER_PAGE), "aria-label": "Anos anteriores", children: jsxRuntime.jsx(reactIcons.ChevronLeft16Regular, { className: styles$p.chevronNavBtnPrev, "aria-hidden": true }) }), jsxRuntime.jsx("button", { type: "button", className: styles$p.gridNavBtn, disabled: !canGoNextYears, onClick: () => setYearPageStart((s) => s + YEARS_PER_PAGE), "aria-label": "Pr\u00F3ximos anos", children: jsxRuntime.jsx(reactIcons.ChevronRight16Regular, { className: styles$p.chevronNavBtnNext, "aria-hidden": true }) })] })] }), jsxRuntime.jsx("div", { className: `${styles$p.gridCells} ${styles$p.gridCellsYears}`, children: yearsInPage.map((year) => (jsxRuntime.jsx("button", { type: "button", className: `${styles$p.gridCell}${displayedYear === year ? ` ${styles$p.gridCellActive}` : ""}`, onClick: () => handleGridYearSelect(year), children: year }, year))) })] }))] }))] }) }));
2555
2566
  };
2556
2567
 
2557
- var styles$n = {"container":"Callout-module__container___dggFW","withTitle":"Callout-module__withTitle___e-HEg","brand":"Callout-module__brand___YHDPQ","success":"Callout-module__success___RPS0Q","alert":"Callout-module__alert___LVlJM","content":"Callout-module__content___g44Qz","icon":"Callout-module__icon___4CBkz","subcontent":"Callout-module__subcontent___5hz-f","title":"Callout-module__title___IPSdE","text":"Callout-module__text___0Ys48","dismiss":"Callout-module__dismiss___ZaycS"};
2568
+ var styles$o = {"container":"Callout-module__container___dggFW","withTitle":"Callout-module__withTitle___e-HEg","brand":"Callout-module__brand___YHDPQ","success":"Callout-module__success___RPS0Q","alert":"Callout-module__alert___LVlJM","content":"Callout-module__content___g44Qz","icon":"Callout-module__icon___4CBkz","subcontent":"Callout-module__subcontent___5hz-f","title":"Callout-module__title___IPSdE","text":"Callout-module__text___0Ys48","dismiss":"Callout-module__dismiss___ZaycS"};
2558
2569
 
2559
2570
  const Callout = ({ variant = 'neutral', title, text, icon, onDismiss, dismiss, backgroundColor, textColor, className, id, style, ...rest }) => {
2560
2571
  if (process.env.NODE_ENV !== 'production' && (text === '' || (typeof text === 'string' && !text.trim()))) {
@@ -2564,13 +2575,13 @@ const Callout = ({ variant = 'neutral', title, text, icon, onDismiss, dismiss, b
2564
2575
  const titleId = `callout-title-${id || generatedId}`;
2565
2576
  const componentId = id || generatedId;
2566
2577
  const isAlert = variant === 'alert';
2567
- const containerClass = clsx(styles$n.container, styles$n[variant], { [styles$n.withTitle]: title }, className);
2578
+ const containerClass = clsx(styles$o.container, styles$o[variant], { [styles$o.withTitle]: title }, className);
2568
2579
  const customStyle = {
2569
2580
  ...style,
2570
2581
  ...(backgroundColor && { '--callout-bg': `var(--${backgroundColor})` }),
2571
2582
  ...(textColor && { '--callout-text': `var(--${textColor})` }),
2572
2583
  };
2573
- return (jsxRuntime.jsx("div", { id: componentId, className: containerClass, role: isAlert ? 'alert' : 'status', "aria-live": isAlert ? 'assertive' : 'polite', "aria-labelledby": title ? titleId : undefined, style: customStyle, ...rest, children: jsxRuntime.jsxs("div", { className: styles$n.content, children: [icon && jsxRuntime.jsx("span", { className: styles$n.icon, "aria-hidden": "true", children: icon }), jsxRuntime.jsxs("div", { className: styles$n.subcontent, children: [title && (jsxRuntime.jsx("span", { id: titleId, className: styles$n.title, children: title })), text && jsxRuntime.jsx("span", { className: styles$n.text, children: text })] }), dismiss && (jsxRuntime.jsx("button", { className: styles$n.dismiss, onClick: onDismiss, type: "button", "aria-label": "Fechar", children: jsxRuntime.jsx(reactIcons.Dismiss24Regular, { "aria-hidden": "true" }) }))] }) }));
2584
+ return (jsxRuntime.jsx("div", { id: componentId, className: containerClass, role: isAlert ? 'alert' : 'status', "aria-live": isAlert ? 'assertive' : 'polite', "aria-labelledby": title ? titleId : undefined, style: customStyle, ...rest, children: jsxRuntime.jsxs("div", { className: styles$o.content, children: [icon && jsxRuntime.jsx("span", { className: styles$o.icon, "aria-hidden": "true", children: icon }), jsxRuntime.jsxs("div", { className: styles$o.subcontent, children: [title && (jsxRuntime.jsx("span", { id: titleId, className: styles$o.title, children: title })), text && jsxRuntime.jsx("span", { className: styles$o.text, children: text })] }), dismiss && (jsxRuntime.jsx("button", { className: styles$o.dismiss, onClick: onDismiss, type: "button", "aria-label": "Fechar", children: jsxRuntime.jsx(reactIcons.Dismiss24Regular, { "aria-hidden": "true" }) }))] }) }));
2574
2585
  };
2575
2586
 
2576
2587
  const CheckSmall = ({ className = '', width = 12, height = 10, fill = 'white', ...restProps }) => {
@@ -2581,22 +2592,32 @@ const CheckHalf = ({ className = '', width = 16, height = 16, fill = 'white', ..
2581
2592
  return (jsxRuntime.jsx("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, "aria-hidden": "true", ...restProps, children: jsxRuntime.jsx("g", { id: "Icons/check_indeterminate_small", children: jsxRuntime.jsx("path", { id: "icon", d: "M3 9V7H13V9H3Z", fill: fill }) }) }));
2582
2593
  };
2583
2594
 
2584
- var styles$m = {"container":"Checkbox-module__container___pUY-s","root":"Checkbox-module__root___BS5dT","disabled":"Checkbox-module__disabled___WagIC","label":"Checkbox-module__label___JBaRm","indicator":"Checkbox-module__indicator___HXLHH","wrapperCheckbox":"Checkbox-module__wrapperCheckbox___m2qIW"};
2595
+ var styles$n = {"container":"Checkbox-module__container___pUY-s","root":"Checkbox-module__root___BS5dT","disabled":"Checkbox-module__disabled___WagIC","label":"Checkbox-module__label___JBaRm","indicator":"Checkbox-module__indicator___HXLHH","wrapperCheckbox":"Checkbox-module__wrapperCheckbox___m2qIW"};
2585
2596
 
2586
- const Checkbox = ({ id, label, onCheckedChange, checked, disabled, className, indeterminate = false, ...rest }) => {
2597
+ const Checkbox = ({ id, label, onCheckedChange, checked, disabled, className, scale = 1, indeterminate = false, ...rest }) => {
2587
2598
  const componentId = id || React__namespace.useId();
2588
- return (jsxRuntime.jsxs("div", { className: clsx(styles$m.container, className), children: [jsxRuntime.jsx("div", { className: clsx(styles$m.wrapperCheckbox, {
2589
- [styles$m.disabled]: disabled,
2590
- }), role: "presentation", tabIndex: disabled ? -1 : 0, children: jsxRuntime.jsx(radixUi.Checkbox.Root, { className: styles$m.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$m.indicator, children: indeterminate ? jsxRuntime.jsx(CheckHalf, {}) : jsxRuntime.jsx(CheckSmall, {}) }) }) }), jsxRuntime.jsx("label", { className: clsx(styles$m.label, { [styles$m.disabled]: disabled }), htmlFor: componentId, children: label })] }));
2599
+ const scaleClass = {
2600
+ 1: 'scale-1-0',
2601
+ 1.5: 'scale-1-5',
2602
+ 2: 'scale-2-0',
2603
+ }[scale];
2604
+ return (jsxRuntime.jsxs("div", { className: clsx(styles$n.container, scaleClass, className), children: [jsxRuntime.jsx("div", { className: clsx(styles$n.wrapperCheckbox, {
2605
+ [styles$n.disabled]: disabled,
2606
+ }), role: "presentation", tabIndex: disabled ? -1 : 0, children: jsxRuntime.jsx(radixUi.Checkbox.Root, { className: styles$n.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$n.indicator, children: indeterminate ? jsxRuntime.jsx(CheckHalf, {}) : jsxRuntime.jsx(CheckSmall, {}) }) }) }), jsxRuntime.jsx("label", { className: clsx(styles$n.label, { [styles$n.disabled]: disabled }), htmlFor: componentId, children: label })] }));
2591
2607
  };
2592
2608
 
2593
- var styles$l = {"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"};
2594
-
2595
- const Chips = ({ children, leftIcon, rightIcon, variant = 'neutral', disabled = false, backgroundColor, textColor, className, style, ...rest }) => {
2596
- const chipsClass = clsx(styles$l.chips, styles$l[variant], {
2597
- [styles$l.disabled]: disabled,
2598
- [styles$l.hasLeftIcon]: leftIcon,
2599
- [styles$l.hasRightIcon]: rightIcon,
2609
+ var styles$m = {"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"};
2610
+
2611
+ const Chips = ({ children, leftIcon, rightIcon, variant = 'neutral', disabled = false, backgroundColor, textColor, scale = 1, className, style, ...rest }) => {
2612
+ const scaleClass = {
2613
+ 1: 'scale-1-0',
2614
+ 1.5: 'scale-1-5',
2615
+ 2: 'scale-2-0',
2616
+ }[scale];
2617
+ const chipsClass = clsx(styles$m.chips, styles$m[variant], scaleClass, {
2618
+ [styles$m.disabled]: disabled,
2619
+ [styles$m.hasLeftIcon]: leftIcon,
2620
+ [styles$m.hasRightIcon]: rightIcon,
2600
2621
  }, className);
2601
2622
  const colorStyle = {
2602
2623
  ...(!disabled && backgroundColor && { '--chips-bg': `var(--${backgroundColor})` }),
@@ -2604,24 +2625,631 @@ const Chips = ({ children, leftIcon, rightIcon, variant = 'neutral', disabled =
2604
2625
  ...style,
2605
2626
  };
2606
2627
  const isInteractive = typeof rest.onClick === 'function';
2607
- return (jsxRuntime.jsxs("div", { className: chipsClass, "aria-disabled": disabled, style: colorStyle, role: isInteractive ? 'button' : undefined, tabIndex: isInteractive ? (disabled ? -1 : 0) : undefined, ...rest, children: [leftIcon && (jsxRuntime.jsx("span", { className: styles$l.iconLeft, "aria-hidden": "true", children: leftIcon })), jsxRuntime.jsx("span", { className: styles$l.title, children: children }), rightIcon && (jsxRuntime.jsx("span", { className: styles$l.iconRight, children: rightIcon }))] }));
2628
+ return (jsxRuntime.jsxs("div", { className: chipsClass, "aria-disabled": disabled, style: colorStyle, role: isInteractive ? 'button' : undefined, tabIndex: isInteractive ? (disabled ? -1 : 0) : undefined, ...rest, children: [leftIcon && (jsxRuntime.jsx("span", { className: styles$m.iconLeft, "aria-hidden": "true", children: leftIcon })), jsxRuntime.jsx("span", { className: styles$m.title, children: children }), rightIcon && (jsxRuntime.jsx("span", { className: styles$m.iconRight, children: rightIcon }))] }));
2608
2629
  };
2609
2630
  const MemoizedChips = React.memo(Chips);
2610
2631
  MemoizedChips.displayName = 'Chips';
2611
2632
 
2612
- var styles$k = {"container":"Container-module__container___exPuE"};
2633
+ var styles$l = {"container":"Container-module__container___exPuE"};
2613
2634
 
2614
2635
  function Container({ children, className }) {
2615
- return (jsxRuntime.jsx("main", { className: clsx(styles$k['container'], 'mx-auto', className), children: children }));
2636
+ return (jsxRuntime.jsx("main", { className: clsx(styles$l['container'], 'mx-auto', className), children: children }));
2616
2637
  }
2617
2638
 
2618
- var styles$j = {"Content":"Popover-module__Content___RIETg"};
2639
+ var styles$k = {"Content":"Popover-module__Content___RIETg"};
2619
2640
 
2620
2641
  const Popover = ({ trigger, content, side = "left", align = "start", sideOffset = 8, open, onOpenChange, asAnchor = false, onOpenAutoFocus, onCloseAutoFocus, showArrow = false, className, ...rest }) => {
2621
- return (jsxRuntime.jsxs(radixUi.Popover.Root, { open: open, onOpenChange: onOpenChange, ...rest, children: [asAnchor ? (jsxRuntime.jsx(radixUi.Popover.Anchor, { asChild: true, children: trigger })) : (jsxRuntime.jsx(radixUi.Popover.Trigger, { asChild: true, children: trigger })), jsxRuntime.jsx(radixUi.Popover.Portal, { children: jsxRuntime.jsxs(radixUi.Popover.Content, { className: clsx(styles$j.Content, className), sideOffset: sideOffset, side: side, align: align, onOpenAutoFocus: asAnchor ? (e) => e.preventDefault() : onOpenAutoFocus, onCloseAutoFocus: asAnchor ? (e) => e.preventDefault() : onCloseAutoFocus, onInteractOutside: asAnchor ? (e) => e.preventDefault() : undefined, children: [content, showArrow && jsxRuntime.jsx(radixUi.Popover.Arrow, {})] }) })] }));
2642
+ return (jsxRuntime.jsxs(radixUi.Popover.Root, { open: open, onOpenChange: onOpenChange, ...rest, children: [asAnchor ? (jsxRuntime.jsx(radixUi.Popover.Anchor, { asChild: true, children: trigger })) : (jsxRuntime.jsx(radixUi.Popover.Trigger, { asChild: true, children: trigger })), jsxRuntime.jsx(radixUi.Popover.Portal, { children: jsxRuntime.jsxs(radixUi.Popover.Content, { className: clsx(styles$k.Content, className), sideOffset: sideOffset, side: side, align: align, onOpenAutoFocus: asAnchor ? (e) => e.preventDefault() : onOpenAutoFocus, onCloseAutoFocus: asAnchor ? (e) => e.preventDefault() : onCloseAutoFocus, onInteractOutside: asAnchor ? (e) => e.preventDefault() : undefined, children: [content, showArrow && jsxRuntime.jsx(radixUi.Popover.Arrow, {})] }) })] }));
2643
+ };
2644
+
2645
+ function useInputKeyboardValue(externalRef) {
2646
+ const internalRef = React.useRef(null);
2647
+ const setRefs = React.useCallback((node) => {
2648
+ internalRef.current = node;
2649
+ if (typeof externalRef === 'function') {
2650
+ externalRef(node);
2651
+ return;
2652
+ }
2653
+ if (externalRef) {
2654
+ externalRef.current = node;
2655
+ }
2656
+ }, [externalRef]);
2657
+ return { internalRef, setRefs };
2658
+ }
2659
+
2660
+ const iconSlot = (key) => `<span data-icon-key="${key}"></span>`;
2661
+ const ICON_KEY_MAP = {
2662
+ bksp: reactIcons.Backspace20Regular,
2663
+ shift: reactIcons.KeyboardShift20Regular,
2664
+ shiftactivated: reactIcons.KeyboardShift20Filled,
2665
+ capslock: reactIcons.KeyboardShiftUppercase20Regular,
2666
+ downkeyboard: reactIcons.ChevronDown20Regular,
2667
+ emoji: reactIcons.Emoji20Regular,
2668
+ };
2669
+ const SHARED_DISPLAY = {
2670
+ '{capslock}': iconSlot('capslock'),
2671
+ '{numbers}': '123',
2672
+ '{abc}': 'ABC',
2673
+ '{alt}': '.?!',
2674
+ '{alt2}': '#+=',
2675
+ '{emoticon}': iconSlot('emoji'),
2676
+ '{shift}': iconSlot('shift'),
2677
+ '{shiftactivated}': iconSlot('shiftactivated'),
2678
+ '{enter}': 'Enter',
2679
+ '{bksp}': `${iconSlot('bksp')} Apagar`,
2680
+ '{altright}': '.?123',
2681
+ '{downkeyboard}': iconSlot('downkeyboard'),
2682
+ '{space}': ' ',
2683
+ '{default}': 'ABC',
2684
+ };
2685
+ const LAYOUT_DISPLAY = {
2686
+ default: SHARED_DISPLAY,
2687
+ numeric: SHARED_DISPLAY,
2688
+ };
2689
+
2690
+ const EMOTICON_KEY = '{emoticon}';
2691
+ const DOWN_KEYBOARD_KEY = '{downkeyboard}';
2692
+ const removeKeyFromLayout = (layout, key) => Object.fromEntries(Object.entries(layout).map(([layoutName, rows]) => [
2693
+ layoutName,
2694
+ rows.map((row) => row.split(key).join(' ').replace(/\s+/g, ' ').trim()),
2695
+ ]));
2696
+ const QWERTY_LOWERCASE = [
2697
+ '{//} 1 2 3 4 5 6 7 8 9 0 {//}',
2698
+ '{//} q w e r t y u i o p {//}',
2699
+ 'a s d f g h j k l ç {bksp}',
2700
+ '{shift} z x c v b n m , . {shift}',
2701
+ '{numbers} {alt} {space} {downkeyboard} {enter}',
2702
+ ];
2703
+ const NUMPAD = ['1 2 3', '4 5 6', '7 8 9', '{bksp} 0 {abc}'];
2704
+ const SHARED_LAYOUTS = {
2705
+ shift: [
2706
+ '{//} 1 2 3 4 5 6 7 8 9 0 {//}',
2707
+ '{//} Q W E R T Y U I O P {//}',
2708
+ 'A S D F G H J K L Ç {bksp}',
2709
+ '{capslock} Z X C V B N M , . {capslock}',
2710
+ '{numbers} {alt} {emoticon} {space} {downkeyboard} {enter}',
2711
+ ],
2712
+ caps: [
2713
+ '{//} 1 2 3 4 5 6 7 8 9 0 {//}',
2714
+ '{//} Q W E R T Y U I O P {//}',
2715
+ 'A S D F G H J K L Ç {bksp}',
2716
+ '{shiftactivated} Z X C V B N M , . {shiftactivated}',
2717
+ '{numbers} {alt} {emoticon} {space} {downkeyboard} {enter}',
2718
+ ],
2719
+ numbers: NUMPAD,
2720
+ alt: [
2721
+ '1 2 3 4 5 6 7 8 9 0',
2722
+ `- / : ; ( ) $ & @ "`,
2723
+ '{alt2} . , ? ! ´ {bksp}',
2724
+ '{default} {emoticon} {space} {downkeyboard} {enter}',
2725
+ ],
2726
+ alt2: [
2727
+ '[ ] { } # % ^ * + =',
2728
+ '_ \\ | ~ < > ¢ £ ¥ •',
2729
+ `{alt} . , ? ! ' {bksp}`,
2730
+ '{default} {emoticon} {space} {downkeyboard} {enter}',
2731
+ ],
2732
+ emoticon: [
2733
+ '😀 😊 😅 😂 🙂 😉 😍 😛 😠 😎 {bksp}',
2734
+ `😏 😬 😭 😓 😱 😪 🙄 😴 😯 {enter}`,
2735
+ '😐 😇 🤣 😘 😚 😆 😡 😥 😓 {shift}',
2736
+ '{default} {alt} {space} {altright} {downkeyboard}',
2737
+ ],
2738
+ };
2739
+ const NATIVE_LAYOUTS = {
2740
+ default: {
2741
+ default: QWERTY_LOWERCASE,
2742
+ ...SHARED_LAYOUTS,
2743
+ },
2744
+ numeric: {
2745
+ default: NUMPAD,
2746
+ abc: QWERTY_LOWERCASE,
2747
+ ...SHARED_LAYOUTS,
2748
+ },
2749
+ };
2750
+ const NATIVE_LAYOUT_KEYS = new Set([
2751
+ 'default', 'numeric',
2752
+ ]);
2753
+ const getNativeLayout = (type, Emoji = true, showDownKeyboardButton = true, isFixed = false) => {
2754
+ const layout = NATIVE_LAYOUTS[type] ?? NATIVE_LAYOUTS.default ?? null;
2755
+ if (!layout)
2756
+ return null;
2757
+ let computedLayout = layout;
2758
+ if (!Emoji) {
2759
+ computedLayout = removeKeyFromLayout(computedLayout, EMOTICON_KEY);
2760
+ }
2761
+ if (!showDownKeyboardButton) {
2762
+ computedLayout = removeKeyFromLayout(computedLayout, DOWN_KEYBOARD_KEY);
2763
+ }
2764
+ if (isFixed) {
2765
+ computedLayout = Object.fromEntries(Object.entries(computedLayout).map(([layoutName, rows]) => [
2766
+ layoutName,
2767
+ rows.map((row) => {
2768
+ const trimmed = row.trim();
2769
+ if (/^[a-zA-ZçÇ]/.test(trimmed) && trimmed.endsWith('{bksp}')) {
2770
+ return '{//} ' + trimmed.replace(/\s*\{bksp\}$/, '') + ' {//}';
2771
+ }
2772
+ if (/\{(shift|capslock|shiftactivated)\}$/.test(trimmed)) {
2773
+ return trimmed.replace(/\{(shift|capslock|shiftactivated)\}$/, '{bksp}');
2774
+ }
2775
+ return row;
2776
+ }),
2777
+ ]));
2778
+ }
2779
+ return computedLayout;
2780
+ };
2781
+ const SHIFT_TOGGLES = {
2782
+ default: 'shift',
2783
+ abc: 'shift',
2784
+ shift: 'default',
2785
+ alt: 'default',
2786
+ alt2: 'alt',
2787
+ };
2788
+
2789
+ var styles$j = {"container":"VirtualKeyboard-module__container___A-e0I","disabled":"VirtualKeyboard-module__disabled___HGS2n","layout--numeric":"VirtualKeyboard-module__layout--numeric___zfd7G","layout--default":"VirtualKeyboard-module__layout--default___qyY1b","mode--fixed":"VirtualKeyboard-module__mode--fixed___1eFY1","textFieldContainer":"VirtualKeyboard-module__textFieldContainer___XxGen","keyboardWrapper":"VirtualKeyboard-module__keyboardWrapper___jryTf","overlay":"VirtualKeyboard-module__overlay___a5y7i","overlayOpen":"VirtualKeyboard-module__overlayOpen___hREu-","textFieldWrapper":"VirtualKeyboard-module__textFieldWrapper___bmi-z","accentMenu":"VirtualKeyboard-module__accentMenu___A6tTy","accentOption":"VirtualKeyboard-module__accentOption___ao-Ta"};
2790
+
2791
+ const LONG_PRESS_DELAY_MS = 400;
2792
+ const ACCENT_OPTIONS = {
2793
+ a: ['á', 'à', 'â', 'ã', 'ä', 'å', 'æ'],
2794
+ e: ['é', 'è', 'ê', 'ë'],
2795
+ i: ['í', 'ì', 'î', 'ï'],
2796
+ o: ['ó', 'ò', 'ô', 'õ', 'ö', 'ø', 'œ', 'ð'],
2797
+ u: ['ú', 'ù', 'û', 'ü'],
2798
+ y: ['ý', 'ÿ'],
2799
+ n: ['ñ'],
2800
+ c: ['ç'],
2801
+ '?': ['¿'],
2802
+ '!': ['¡'],
2803
+ };
2804
+ /**
2805
+ * Componente VirtualKeyboard — teclado virtual on-screen para entradas controladas.
2806
+ *
2807
+ * @description Baseado em `react-simple-keyboard`, oferece apenas layouts nativos (QWERTY e numérico)
2808
+ * seguindo o visual padrão da biblioteca.
2809
+ *
2810
+ * Possui dois modos:
2811
+ * - **`native`** (padrão): age como teclado nativo — aparece ao focar no campo referenciado por `targetRef` e some ao perder o foco.
2812
+ * - **`fixed`**: teclado sempre visível com um TextField próprio acima.
2813
+ *
2814
+ * @example
2815
+ * ```tsx
2816
+ * // Modo fixed
2817
+ * <VirtualKeyboard variant="fixed" type="default" onChange={setValue} />
2818
+ * ```
2819
+ *
2820
+ * @example
2821
+ * ```tsx
2822
+ * // Modo native — aparece ao focar no input
2823
+ * const inputRef = useRef<HTMLInputElement>(null);
2824
+ * const [value, setValue] = useState('');
2825
+ * <input ref={inputRef} value={value} readOnly />
2826
+ * <VirtualKeyboard targetRef={inputRef} value={value} onChange={setValue} />
2827
+ * ```
2828
+ */
2829
+ const VirtualKeyboard = ({ variant = 'native', type = 'default', value = '', onChange, onKeyPress, maxLength, Emoji = false, className, id, textFieldPlaceholder = 'Digite aqui...', helperText, error, errorMessage, targetRef, }) => {
2830
+ const [layoutName, setLayoutName] = React.useState('default');
2831
+ const [capsLockOn, setCapsLockOn] = React.useState(false);
2832
+ const [accentMenu, setAccentMenu] = React.useState(null);
2833
+ const [accentMenuOffsetX, setAccentMenuOffsetX] = React.useState(0);
2834
+ const [activeLayout, setActiveLayout] = React.useState(getNativeLayout(type, Emoji, variant === 'native', variant === 'fixed'));
2835
+ const visualType = NATIVE_LAYOUT_KEYS.has(type) ? type : 'default';
2836
+ const [isOpen, setIsOpen] = React.useState(variant !== 'native');
2837
+ const hideTimeoutRef = React.useRef(null);
2838
+ const longPressTimeoutRef = React.useRef(null);
2839
+ const suppressNextInputRef = React.useRef(null);
2840
+ const heldAccentKeyRef = React.useRef(null);
2841
+ const longPressTriggeredRef = React.useRef(false);
2842
+ const isKeyboardInteractingRef = React.useRef(false);
2843
+ const keyboardWrapperRef = React.useRef(null);
2844
+ const keyboardInstanceRef = React.useRef(null);
2845
+ const accentMenuRef = React.useRef(null);
2846
+ const accentButtonRef = React.useRef(null);
2847
+ const accentMenuOpenRef = React.useRef(false);
2848
+ const valueRef = React.useRef(value);
2849
+ const [iconSlots, setIconSlots] = React.useState([]);
2850
+ React.useEffect(() => {
2851
+ valueRef.current = value;
2852
+ }, [value]);
2853
+ const clearLongPressTimeout = React.useCallback(() => {
2854
+ if (longPressTimeoutRef.current !== null) {
2855
+ clearTimeout(longPressTimeoutRef.current);
2856
+ longPressTimeoutRef.current = null;
2857
+ }
2858
+ }, []);
2859
+ const closeAccentMenu = React.useCallback(() => {
2860
+ setAccentMenu(null);
2861
+ accentButtonRef.current = null;
2862
+ }, []);
2863
+ const syncKeyboardInput = React.useCallback((nextValue) => {
2864
+ keyboardInstanceRef.current?.setInput(nextValue);
2865
+ }, []);
2866
+ React.useEffect(() => {
2867
+ syncKeyboardInput(value);
2868
+ }, [value, syncKeyboardInput]);
2869
+ const scheduleHideIfBlurred = React.useCallback(() => {
2870
+ if (variant !== 'native')
2871
+ return;
2872
+ if (hideTimeoutRef.current !== null) {
2873
+ clearTimeout(hideTimeoutRef.current);
2874
+ }
2875
+ hideTimeoutRef.current = setTimeout(() => {
2876
+ const targetEl = targetRef?.current;
2877
+ const isTargetFocused = !!targetEl && document.activeElement === targetEl;
2878
+ if (!isTargetFocused && !isKeyboardInteractingRef.current) {
2879
+ setIsOpen(false);
2880
+ }
2881
+ }, 150);
2882
+ }, [variant, targetRef]);
2883
+ React.useEffect(() => {
2884
+ if (variant !== 'native')
2885
+ return;
2886
+ if (!targetRef?.current) {
2887
+ setIsOpen(true);
2888
+ return;
2889
+ }
2890
+ const el = targetRef.current;
2891
+ const handleFocus = () => {
2892
+ if (hideTimeoutRef.current !== null)
2893
+ clearTimeout(hideTimeoutRef.current);
2894
+ setIsOpen(true);
2895
+ };
2896
+ const handleBlur = () => {
2897
+ scheduleHideIfBlurred();
2898
+ };
2899
+ el.addEventListener('focus', handleFocus);
2900
+ el.addEventListener('blur', handleBlur);
2901
+ return () => {
2902
+ el.removeEventListener('focus', handleFocus);
2903
+ el.removeEventListener('blur', handleBlur);
2904
+ if (hideTimeoutRef.current !== null)
2905
+ clearTimeout(hideTimeoutRef.current);
2906
+ };
2907
+ }, [variant, targetRef, scheduleHideIfBlurred]);
2908
+ React.useEffect(() => {
2909
+ setLayoutName('default');
2910
+ setCapsLockOn(false);
2911
+ setActiveLayout(getNativeLayout(type, Emoji, variant === 'native', variant === 'fixed'));
2912
+ }, [type, Emoji, variant]);
2913
+ React.useEffect(() => {
2914
+ if (!Emoji && layoutName === 'emoticon') {
2915
+ setLayoutName(type === 'numeric' ? 'abc' : 'default');
2916
+ }
2917
+ }, [Emoji, layoutName, type]);
2918
+ React.useEffect(() => {
2919
+ return () => {
2920
+ clearLongPressTimeout();
2921
+ };
2922
+ }, [clearLongPressTimeout]);
2923
+ React.useEffect(() => {
2924
+ if (!accentMenu)
2925
+ return;
2926
+ const handleOutsidePointerDown = (event) => {
2927
+ if (accentMenuRef.current?.contains(event.target))
2928
+ return;
2929
+ closeAccentMenu();
2930
+ };
2931
+ const handleEscape = (event) => {
2932
+ if (event.key === 'Escape') {
2933
+ closeAccentMenu();
2934
+ }
2935
+ };
2936
+ document.addEventListener('pointerdown', handleOutsidePointerDown, true);
2937
+ document.addEventListener('keydown', handleEscape);
2938
+ return () => {
2939
+ document.removeEventListener('pointerdown', handleOutsidePointerDown, true);
2940
+ document.removeEventListener('keydown', handleEscape);
2941
+ };
2942
+ }, [accentMenu, closeAccentMenu]);
2943
+ React.useLayoutEffect(() => {
2944
+ if (!accentMenu || !accentMenuRef.current)
2945
+ return;
2946
+ const margin = 8;
2947
+ const rect = accentMenuRef.current.getBoundingClientRect();
2948
+ if (rect.width <= 0 || rect.height <= 0)
2949
+ return;
2950
+ const minCenter = margin + rect.width / 2;
2951
+ const maxCenter = window.innerWidth - margin - rect.width / 2;
2952
+ const clampedCenter = Math.min(maxCenter, Math.max(minCenter, accentMenu.left));
2953
+ const nextOffset = clampedCenter - accentMenu.left;
2954
+ if (Math.abs(nextOffset - accentMenuOffsetX) > 0.5) {
2955
+ setAccentMenuOffsetX(nextOffset);
2956
+ }
2957
+ }, [accentMenu, accentMenuOffsetX]);
2958
+ React.useEffect(() => {
2959
+ if (!keyboardWrapperRef.current)
2960
+ return;
2961
+ const container = keyboardWrapperRef.current;
2962
+ const registerNewSlots = () => {
2963
+ const newSlots = Array.from(container.querySelectorAll('[data-icon-key]:not([data-icon-root])'));
2964
+ if (newSlots.length === 0)
2965
+ return;
2966
+ newSlots.forEach((s) => s.setAttribute('data-icon-root', 'true'));
2967
+ setIconSlots((prev) => [...prev, ...newSlots]);
2968
+ };
2969
+ registerNewSlots();
2970
+ const observer = new MutationObserver(() => {
2971
+ setIconSlots((prev) => prev.filter((slot) => container.contains(slot)));
2972
+ registerNewSlots();
2973
+ });
2974
+ observer.observe(container, { childList: true, subtree: true });
2975
+ return () => {
2976
+ observer.disconnect();
2977
+ };
2978
+ }, []);
2979
+ React.useEffect(() => {
2980
+ closeAccentMenu();
2981
+ setAccentMenuOffsetX(0);
2982
+ suppressNextInputRef.current = null;
2983
+ clearLongPressTimeout();
2984
+ }, [layoutName, type, closeAccentMenu, clearLongPressTimeout]);
2985
+ React.useEffect(() => {
2986
+ accentMenuOpenRef.current = !!accentMenu;
2987
+ }, [accentMenu]);
2988
+ React.useEffect(() => {
2989
+ const updateAccentPosition = () => {
2990
+ if (!accentMenuOpenRef.current)
2991
+ return;
2992
+ const btn = accentButtonRef.current;
2993
+ if (!btn)
2994
+ return;
2995
+ const rect = btn.getBoundingClientRect();
2996
+ setAccentMenu((prev) => prev ? { ...prev, top: rect.top - 8, left: rect.left + rect.width / 2 } : null);
2997
+ };
2998
+ window.addEventListener('scroll', updateAccentPosition, { capture: true, passive: true });
2999
+ window.addEventListener('resize', updateAccentPosition);
3000
+ return () => {
3001
+ window.removeEventListener('scroll', updateAccentPosition, true);
3002
+ window.removeEventListener('resize', updateAccentPosition);
3003
+ };
3004
+ }, []);
3005
+ const handleLongPressStart = React.useCallback((event) => {
3006
+ isKeyboardInteractingRef.current = true;
3007
+ if (hideTimeoutRef.current !== null) {
3008
+ clearTimeout(hideTimeoutRef.current);
3009
+ }
3010
+ const keyboardWrapper = keyboardWrapperRef.current;
3011
+ if (!keyboardWrapper)
3012
+ return;
3013
+ const buttonEl = event.target.closest('.hg-button');
3014
+ if (!buttonEl || !keyboardWrapper.contains(buttonEl))
3015
+ return;
3016
+ const sourceKey = buttonEl.getAttribute('data-skbtn') ?? '';
3017
+ heldAccentKeyRef.current = null;
3018
+ longPressTriggeredRef.current = false;
3019
+ if (!sourceKey || sourceKey.startsWith('{'))
3020
+ return;
3021
+ const accentOptions = ACCENT_OPTIONS[sourceKey.toLowerCase()];
3022
+ if (!accentOptions)
3023
+ return;
3024
+ heldAccentKeyRef.current = sourceKey;
3025
+ clearLongPressTimeout();
3026
+ longPressTimeoutRef.current = setTimeout(() => {
3027
+ const buttonRect = buttonEl.getBoundingClientRect();
3028
+ const isUpperCaseKey = sourceKey === sourceKey.toUpperCase();
3029
+ longPressTriggeredRef.current = true;
3030
+ accentButtonRef.current = buttonEl;
3031
+ setAccentMenu({
3032
+ sourceKey,
3033
+ options: isUpperCaseKey
3034
+ ? accentOptions.map((option) => option.toUpperCase())
3035
+ : accentOptions,
3036
+ top: buttonRect.top - 8,
3037
+ left: buttonRect.left + buttonRect.width / 2,
3038
+ });
3039
+ setAccentMenuOffsetX(0);
3040
+ suppressNextInputRef.current = sourceKey;
3041
+ }, LONG_PRESS_DELAY_MS);
3042
+ }, [clearLongPressTimeout]);
3043
+ const handleLongPressEnd = React.useCallback(() => {
3044
+ const heldKey = heldAccentKeyRef.current;
3045
+ const longPressTriggered = longPressTriggeredRef.current;
3046
+ const baseLayout = type === 'numeric' ? 'abc' : 'default';
3047
+ isKeyboardInteractingRef.current = false;
3048
+ clearLongPressTimeout();
3049
+ if (heldKey && !longPressTriggered) {
3050
+ const currentValue = valueRef.current;
3051
+ if (maxLength === undefined || currentValue.length < maxLength) {
3052
+ const nextValue = `${currentValue}${heldKey}`;
3053
+ onChange?.(nextValue);
3054
+ onKeyPress?.(heldKey);
3055
+ syncKeyboardInput(nextValue);
3056
+ }
3057
+ if (layoutName === 'shift' && !capsLockOn) {
3058
+ setLayoutName(baseLayout);
3059
+ }
3060
+ suppressNextInputRef.current = heldKey;
3061
+ }
3062
+ heldAccentKeyRef.current = null;
3063
+ longPressTriggeredRef.current = false;
3064
+ scheduleHideIfBlurred();
3065
+ }, [
3066
+ clearLongPressTimeout,
3067
+ scheduleHideIfBlurred,
3068
+ maxLength,
3069
+ onChange,
3070
+ onKeyPress,
3071
+ syncKeyboardInput,
3072
+ type,
3073
+ layoutName,
3074
+ capsLockOn,
3075
+ ]);
3076
+ const handleAccentSelect = React.useCallback((accentedChar) => {
3077
+ const currentValue = valueRef.current;
3078
+ const baseLayout = type === 'numeric' ? 'abc' : 'default';
3079
+ if (maxLength !== undefined && currentValue.length >= maxLength) {
3080
+ closeAccentMenu();
3081
+ suppressNextInputRef.current = null;
3082
+ syncKeyboardInput(currentValue);
3083
+ return;
3084
+ }
3085
+ const nextValue = `${currentValue}${accentedChar}`;
3086
+ onChange?.(nextValue);
3087
+ onKeyPress?.(accentedChar);
3088
+ closeAccentMenu();
3089
+ suppressNextInputRef.current = null;
3090
+ heldAccentKeyRef.current = null;
3091
+ longPressTriggeredRef.current = false;
3092
+ if (layoutName === 'shift' && !capsLockOn) {
3093
+ setLayoutName(baseLayout);
3094
+ }
3095
+ syncKeyboardInput(nextValue);
3096
+ }, [maxLength, onChange, onKeyPress, closeAccentMenu, syncKeyboardInput, type, layoutName, capsLockOn]);
3097
+ const handleKeyPress = React.useCallback((button) => {
3098
+ const baseLayout = type === 'numeric' ? 'abc' : 'default';
3099
+ if (button === '{capslock}') {
3100
+ setCapsLockOn((prev) => {
3101
+ const next = !prev;
3102
+ setLayoutName(next ? 'caps' : baseLayout);
3103
+ return next;
3104
+ });
3105
+ return;
3106
+ }
3107
+ if (button === '{shift}' ||
3108
+ button === '{shiftactivated}') {
3109
+ if (button === '{shiftactivated}') {
3110
+ setCapsLockOn(false);
3111
+ setLayoutName(baseLayout);
3112
+ return;
3113
+ }
3114
+ setLayoutName((prev) => {
3115
+ const next = SHIFT_TOGGLES[prev] ?? 'default';
3116
+ return next === 'default' ? baseLayout : next;
3117
+ });
3118
+ return;
3119
+ }
3120
+ if (button === '{numbers}') {
3121
+ setLayoutName('numbers');
3122
+ return;
3123
+ }
3124
+ if (button === '{abc}') {
3125
+ setLayoutName(baseLayout);
3126
+ return;
3127
+ }
3128
+ if (button === '{alt}' || button === '{altright}') {
3129
+ setLayoutName((prev) => {
3130
+ if (prev === 'alt2')
3131
+ return 'alt';
3132
+ return prev === 'alt' ? baseLayout : 'alt';
3133
+ });
3134
+ return;
3135
+ }
3136
+ if (button === '{alt2}') {
3137
+ setLayoutName((prev) => (prev === 'alt2' ? 'alt' : 'alt2'));
3138
+ return;
3139
+ }
3140
+ if (button === '{emoticon}') {
3141
+ if (!Emoji)
3142
+ return;
3143
+ setLayoutName((prev) => (prev === 'emoticon' ? baseLayout : 'emoticon'));
3144
+ return;
3145
+ }
3146
+ if (button === '{default}') {
3147
+ setLayoutName(baseLayout);
3148
+ return;
3149
+ }
3150
+ if (button === '{downkeyboard}') {
3151
+ setLayoutName(baseLayout);
3152
+ if (variant === 'native') {
3153
+ closeAccentMenu();
3154
+ setIsOpen(false);
3155
+ const targetElement = targetRef?.current;
3156
+ if (targetElement && document.activeElement === targetElement) {
3157
+ targetElement.blur();
3158
+ }
3159
+ }
3160
+ return;
3161
+ }
3162
+ const isHeldAccentKey = heldAccentKeyRef.current === button;
3163
+ if (button !== '{bksp}' && button !== '{enter}' && !isHeldAccentKey) {
3164
+ if (layoutName === 'shift' && !capsLockOn) {
3165
+ setLayoutName(baseLayout);
3166
+ }
3167
+ else if (layoutName === baseLayout && capsLockOn) {
3168
+ setLayoutName('shift');
3169
+ }
3170
+ }
3171
+ if (isHeldAccentKey) {
3172
+ return;
3173
+ }
3174
+ onKeyPress?.(button);
3175
+ }, [
3176
+ type,
3177
+ layoutName,
3178
+ capsLockOn,
3179
+ onKeyPress,
3180
+ Emoji,
3181
+ variant,
3182
+ closeAccentMenu,
3183
+ targetRef,
3184
+ ]);
3185
+ const handleChange = React.useCallback((input) => {
3186
+ const currentValue = valueRef.current;
3187
+ const suppressedKey = suppressNextInputRef.current;
3188
+ const heldKey = heldAccentKeyRef.current;
3189
+ if (heldKey &&
3190
+ input.length >= currentValue.length + 1 &&
3191
+ input.startsWith(currentValue) &&
3192
+ input.slice(currentValue.length).split('').every((char) => char === heldKey)) {
3193
+ syncKeyboardInput(currentValue);
3194
+ return;
3195
+ }
3196
+ if (suppressedKey &&
3197
+ input.length === currentValue.length + 1 &&
3198
+ input.endsWith(suppressedKey)) {
3199
+ suppressNextInputRef.current = null;
3200
+ syncKeyboardInput(currentValue);
3201
+ return;
3202
+ }
3203
+ if (maxLength !== undefined && input.length > maxLength)
3204
+ return;
3205
+ onChange?.(input);
3206
+ }, [maxLength, onChange, syncKeyboardInput]);
3207
+ const keyboardDisplay = React.useMemo(() => {
3208
+ const baseDisplay = LAYOUT_DISPLAY[visualType];
3209
+ if (!baseDisplay)
3210
+ return baseDisplay;
3211
+ if (variant !== 'fixed') {
3212
+ return baseDisplay;
3213
+ }
3214
+ return {
3215
+ ...baseDisplay,
3216
+ '{bksp}': (baseDisplay['{bksp}'] ?? '').replace(/\s*Apagar$/, ''),
3217
+ };
3218
+ }, [visualType, variant]);
3219
+ const keyboardEl = activeLayout ? (jsxRuntime.jsxs("div", { ref: keyboardWrapperRef, className: styles$j.keyboardWrapper, onPointerDownCapture: handleLongPressStart, onPointerUpCapture: handleLongPressEnd, onPointerLeave: handleLongPressEnd, onPointerCancelCapture: handleLongPressEnd, children: [jsxRuntime.jsx(Keyboard, { keyboardRef: (instance) => {
3220
+ keyboardInstanceRef.current = instance;
3221
+ if (instance) {
3222
+ instance.setInput(valueRef.current);
3223
+ }
3224
+ }, layoutName: layoutName, layout: activeLayout, theme: 'hg-theme-default', display: keyboardDisplay, onChange: handleChange, onKeyPress: handleKeyPress, preventMouseDownDefault: true }), (() => {
3225
+ const shiftCount = { current: 0 };
3226
+ return iconSlots.map((slot) => {
3227
+ const key = slot.getAttribute('data-icon-key');
3228
+ const Icon = key ? ICON_KEY_MAP[key] : undefined;
3229
+ if (!Icon || !key)
3230
+ return null;
3231
+ if (key === 'shift') {
3232
+ const label = shiftCount.current === 0 ? 'left' : 'right';
3233
+ shiftCount.current += 1;
3234
+ return reactDom.createPortal(React.createElement(Icon), slot, `icon-shift-${label}`);
3235
+ }
3236
+ return reactDom.createPortal(React.createElement(Icon), slot, `icon-${key}`);
3237
+ });
3238
+ })(), accentMenu && (typeof document !== 'undefined' &&
3239
+ reactDom.createPortal(jsxRuntime.jsx("div", { ref: accentMenuRef, className: styles$j.accentMenu, style: {
3240
+ top: accentMenu.top,
3241
+ left: accentMenu.left + accentMenuOffsetX,
3242
+ }, role: "listbox", "aria-label": `Opcoes de acento para ${accentMenu.sourceKey}`, children: accentMenu.options.map((option) => (jsxRuntime.jsx("button", { type: "button", className: styles$j.accentOption, onPointerDown: (event) => {
3243
+ event.preventDefault();
3244
+ event.stopPropagation();
3245
+ }, onClick: () => handleAccentSelect(option), children: option }, `${accentMenu.sourceKey}-${option}`))) }), document.body))] })) : null;
3246
+ if (variant === 'native' && typeof document !== 'undefined') {
3247
+ return reactDom.createPortal(jsxRuntime.jsx("div", { id: id, className: clsx(styles$j.overlay, { [styles$j.overlayOpen]: isOpen }, styles$j[`layout--${visualType}`], className), children: keyboardEl }), document.body);
3248
+ }
3249
+ return (jsxRuntime.jsxs("div", { id: id, className: clsx(styles$j.container, styles$j[`mode--${variant}`], styles$j[`layout--${visualType}`], className), children: [variant === 'fixed' && (jsxRuntime.jsx("div", { className: styles$j.textFieldContainer, children: jsxRuntime.jsx(TextField, { placeholder: textFieldPlaceholder, value: value, onChange: onChange, helperText: helperText, error: error, errorMessage: errorMessage, readOnly: true, maxLength: maxLength, attachedToVirtualKeyboard: true, className: styles$j.textFieldWrapper }) })), keyboardEl] }));
2622
3250
  };
2623
3251
 
2624
- var styles$i = {"container":"TextField-module__container___WJHFR","inputWrapper":"TextField-module__inputWrapper___INjfd","inputContainer":"TextField-module__inputContainer___3EsFJ","icon":"TextField-module__icon___p1vwi","clearButton":"TextField-module__clearButton___kgOot","inputWithIcon":"TextField-module__inputWithIcon___shqkL","helperText":"TextField-module__helperText___d5QGC","error":"TextField-module__error___IGQzp","disabled":"TextField-module__disabled___roIKP"};
3252
+ var styles$i = {"container":"TextField-module__container___WJHFR","inputWrapper":"TextField-module__inputWrapper___INjfd","inputContainer":"TextField-module__inputContainer___3EsFJ","icon":"TextField-module__icon___p1vwi","clearButton":"TextField-module__clearButton___kgOot","inputWithIcon":"TextField-module__inputWithIcon___shqkL","helperText":"TextField-module__helperText___d5QGC","error":"TextField-module__error___IGQzp","disabled":"TextField-module__disabled___roIKP","attachedToVirtualKeyboard":"TextField-module__attachedToVirtualKeyboard___fuO2O","errorWithMessage":"TextField-module__errorWithMessage___m-5AA"};
2625
3253
 
2626
3254
  const validateInput = ({ value, maxLength, errorMessage, required }) => {
2627
3255
  if (required && value.trim() === '') {
@@ -2644,19 +3272,19 @@ const LabelComponent = ({ children, htmlFor, required = false, tooltip = false,
2644
3272
  return container;
2645
3273
  };
2646
3274
 
2647
- const TextField$1 = React.forwardRef(({ className, value, label, placeholder, type = 'text', onChange, disabled = false, maxLength = 30, required = false, helperText, tooltip = false, tooltipText, side = 'bottom', align = 'start', errorMessage, error, id, icon, onBlur, onFocus, name, persistIcon = false, ...rest }, ref) => {
3275
+ const TextField$1 = React.forwardRef(({ className, value, label, placeholder, type = 'text', onChange, disabled = false, maxLength = 30, required = false, helperText, tooltip = false, tooltipText, side = 'bottom', align = 'start', errorMessage, error, id, icon, scale = 1, onBlur, onFocus, name, persistIcon = false, virtualKeyboard = false, virtualKeyboardType, virtualKeyboardMaxLength, attachedToVirtualKeyboard = false, ...rest }, ref) => {
2648
3276
  const normalizeValue = (val) => {
2649
3277
  return val === undefined || val === null ? '' : String(val);
2650
3278
  };
2651
3279
  const [inputValue, setInputValue] = React.useState(normalizeValue(value));
2652
3280
  const [inputError, setInputError] = React.useState('');
2653
3281
  const [isFocused, setIsFocused] = React.useState(false);
3282
+ const { internalRef: inputRef, setRefs: setInputRefs } = useInputKeyboardValue(ref);
2654
3283
  const generatedId = React.useId();
2655
3284
  const componentId = id || generatedId;
2656
3285
  React.useEffect(() => {
2657
3286
  const newValue = normalizeValue(value);
2658
3287
  setInputValue(newValue);
2659
- // Reavaliar erro quando valor muda externamente (ex: DatePicker atualiza o campo)
2660
3288
  if (inputError) {
2661
3289
  const validationError = validateInput({
2662
3290
  value: newValue,
@@ -2704,17 +3332,29 @@ const TextField$1 = React.forwardRef(({ className, value, label, placeholder, ty
2704
3332
  : helperText
2705
3333
  ? `${componentId}-helper`
2706
3334
  : undefined;
2707
- const containerClass = clsx(styles$i.container, {
3335
+ const scaleClass = {
3336
+ 1: 'scale-1-0',
3337
+ 1.5: 'scale-1-5',
3338
+ 2: 'scale-2-0',
3339
+ }[scale];
3340
+ const containerClass = clsx(styles$i.container, scaleClass, {
2708
3341
  [styles$i.disabled]: disabled,
2709
3342
  [styles$i.error]: hasError && !disabled,
3343
+ [styles$i.errorWithMessage]: Boolean(error) && Boolean(errorMessage) && !disabled,
3344
+ [styles$i.attachedToVirtualKeyboard]: attachedToVirtualKeyboard,
2710
3345
  [className]: className,
2711
3346
  });
2712
- return (jsxRuntime.jsxs("div", { className: containerClass, children: [label && (jsxRuntime.jsx(LabelComponent, { htmlFor: componentId, required: required, tooltip: tooltip, tooltipText: tooltipText, side: side, align: align, error: hasError, disabled: disabled, children: label })), jsxRuntime.jsxs("div", { className: styles$i.inputWrapper, children: [jsxRuntime.jsxs("div", { className: styles$i.inputContainer, children: [jsxRuntime.jsx("input", { ...rest, ref: ref, 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, className: clsx({
3347
+ return (jsxRuntime.jsxs("div", { className: containerClass, children: [label && (jsxRuntime.jsx(LabelComponent, { htmlFor: componentId, required: required, tooltip: tooltip, tooltipText: tooltipText, side: side, align: align, error: hasError, disabled: disabled, children: label })), jsxRuntime.jsxs("div", { className: styles$i.inputWrapper, children: [jsxRuntime.jsxs("div", { className: styles$i.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 ? 'none' : rest.inputMode, className: clsx({
2713
3348
  [styles$i.inputWithIcon]: showCustomIcon || showClearIcon,
2714
3349
  }) }), showCustomIcon && jsxRuntime.jsx("span", { className: styles$i.icon, children: icon }), showClearIcon && (jsxRuntime.jsx("button", { type: "button", className: styles$i.clearButton, onMouseDown: (e) => {
2715
3350
  e.preventDefault();
2716
3351
  handleClear();
2717
- }, "aria-label": "Limpar campo", tabIndex: -1, children: jsxRuntime.jsx(reactIcons.Dismiss16Regular, {}) }))] }), jsxRuntime.jsx("span", { id: helperId, className: styles$i.helperText, "aria-live": hasError ? 'polite' : undefined, children: displayHelperText })] })] }));
3352
+ }, "aria-label": "Limpar campo", tabIndex: -1, children: jsxRuntime.jsx(reactIcons.Dismiss16Regular, {}) }))] }), (errorMessage || inputError || helperText) && (jsxRuntime.jsx("span", { id: helperId, className: styles$i.helperText, "aria-live": hasError ? 'polite' : undefined, children: displayHelperText }))] }), virtualKeyboard && (jsxRuntime.jsx("div", { className: "virtualKeyboardWrapper", children: jsxRuntime.jsx(VirtualKeyboard, { variant: "native", type: virtualKeyboardType, value: inputValue, maxLength: maxLength ?? virtualKeyboardMaxLength, targetRef: inputRef, onChange: (val) => {
3353
+ if (!disabled && (!maxLength || val.length <= maxLength)) {
3354
+ setInputValue(val);
3355
+ onChange?.(val);
3356
+ }
3357
+ } }) }))] }));
2718
3358
  });
2719
3359
  TextField$1.displayName = 'TextField';
2720
3360
  var TextField = React.memo(TextField$1);
@@ -2811,7 +3451,7 @@ function validatePartialDate(value, locale = 'pt-br') {
2811
3451
  return 'incomplete';
2812
3452
  }
2813
3453
 
2814
- 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, className, ...rest }) => {
3454
+ 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, datePickerScale = 1, calendarScale = 1, className, ...rest }) => {
2815
3455
  const fieldId = React.useId();
2816
3456
  const calendarId = `${fieldId}-calendar`;
2817
3457
  const isControlled = value !== undefined;
@@ -2828,6 +3468,11 @@ const DatePicker = ({ locale = 'pt-br', calendarSide = 'bottom', calendarAlign =
2828
3468
  const combinedHelperText = externalError && helperText
2829
3469
  ? `${helperText} • ${externalError}`
2830
3470
  : externalError || helperText || '';
3471
+ const scaleClass = {
3472
+ 1: 'scale-1-0',
3473
+ 1.5: 'scale-1-5',
3474
+ 2: 'scale-2-0',
3475
+ }[datePickerScale];
2831
3476
  React.useEffect(() => {
2832
3477
  function handleClickOutside(event) {
2833
3478
  const target = event.target;
@@ -2940,9 +3585,9 @@ const DatePicker = ({ locale = 'pt-br', calendarSide = 'bottom', calendarAlign =
2940
3585
  }
2941
3586
  }
2942
3587
  };
2943
- return (jsxRuntime.jsx("div", { ref: wrapperRef, className: clsx(styles$g.datePicker, className), ...rest, children: jsxRuntime.jsx(Popover, { open: showCalendar, onOpenChange: setShowCalendar, asAnchor: true, trigger: jsxRuntime.jsx(TextField, { className: styles$g.textfieldContainer, type: "tel", icon: jsxRuntime.jsx(reactIcons.Calendar16Regular, { onClick: !disabled ? handleIconClick : undefined, className: clsx(styles$g.datePickerIcon, disabled && styles$g.datePickerIconDisabled) }), onChange: (e) => {
3588
+ return (jsxRuntime.jsx("div", { ref: wrapperRef, className: clsx(styles$g.datePicker, scaleClass, className), ...rest, children: jsxRuntime.jsx(Popover, { open: showCalendar, onOpenChange: setShowCalendar, asAnchor: true, trigger: jsxRuntime.jsx(TextField, { className: styles$g.textfieldContainer, type: "tel", icon: jsxRuntime.jsx(reactIcons.Calendar16Regular, { onClick: !disabled ? handleIconClick : undefined, className: clsx(styles$g.datePickerIcon, disabled && styles$g.datePickerIconDisabled) }), onChange: (e) => {
2944
3589
  handleTextFieldChange(String(e));
2945
- }, 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, 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, id: calendarId, onClear: () => {
3590
+ }, 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, 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: calendarScale, id: calendarId, onClear: () => {
2946
3591
  handleDateChange(null);
2947
3592
  setCurrentDate(new Date());
2948
3593
  } }), side: calendarSide, align: calendarAlign, sideOffset: 8 }) }));
@@ -3036,12 +3681,18 @@ const Combined = ({ buttonText = 'Filtrar', icon, variant = 'outlined', disabled
3036
3681
 
3037
3682
  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"};
3038
3683
 
3039
- 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, className, 'data-testid': testId, ...rest }, ref) => {
3684
+ 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, virtualKeyboard = false, virtualKeyboardType, virtualKeyboardMaxLength, 'data-testid': testId, ...rest }, ref) => {
3040
3685
  const [internalValue, setInternalValue] = React.useState('');
3686
+ const { internalRef: inputRef, setRefs: setInputRefs } = useInputKeyboardValue(ref);
3041
3687
  const isControlled = value !== undefined && onChange !== undefined;
3042
3688
  const currentValue = isControlled ? value : internalValue;
3043
3689
  const generatedId = React.useId();
3044
3690
  const inputId = id || generatedId;
3691
+ const scaleClass = {
3692
+ 1: 'scale-1-0',
3693
+ 1.5: 'scale-1-5',
3694
+ 2: 'scale-2-0',
3695
+ }[scale];
3045
3696
  const handleChange = (e) => {
3046
3697
  if (disabled)
3047
3698
  return;
@@ -3088,12 +3739,25 @@ const Search = React.forwardRef(({ placeholder = 'Dica do que deve ser buscado',
3088
3739
  }
3089
3740
  onKeyDown?.(e);
3090
3741
  };
3091
- return (jsxRuntime.jsxs("div", { className: clsx(styles$c.search, { [styles$c.disabled]: disabled }, className), onClick: onClick, onMouseDown: onMouseDown, role: onClick || onMouseDown ? "button" : undefined, tabIndex: onClick || onMouseDown ? 0 : undefined, onKeyDown: onClick || onMouseDown ? (e) => {
3742
+ return (jsxRuntime.jsxs("div", { className: clsx(styles$c.search, scaleClass, { [styles$c.disabled]: disabled }, className), onClick: onClick, onMouseDown: onMouseDown, role: onClick || onMouseDown ? "button" : undefined, tabIndex: onClick || onMouseDown ? 0 : undefined, onKeyDown: onClick || onMouseDown ? (e) => {
3092
3743
  if (e.key === 'Enter' || e.key === ' ') {
3093
3744
  e.preventDefault();
3094
3745
  onClick?.(e);
3095
3746
  }
3096
- } : undefined, children: [jsxRuntime.jsx("span", { className: clsx(styles$c.searchLeftIcon, { [styles$c.disabled]: disabled }), tabIndex: -1, role: "presentation", "aria-hidden": "true", children: jsxRuntime.jsx(reactIcons.Search16Regular, {}) }), jsxRuntime.jsx("input", { ref: ref, id: inputId, type: "text", placeholder: placeholder, "aria-label": placeholder, value: currentValue || '', onChange: handleChange, onKeyDown: handleKeyDown, disabled: disabled, onFocus: handleFocus, onBlur: handleBlur, "data-testid": testId, ...rest, className: clsx({ [styles$c.inputWithClearIcon]: currentValue && currentValue.length > 0 }) }), currentValue && currentValue.length > 0 && (jsxRuntime.jsx("span", { className: styles$c.searchClearIcon, "aria-hidden": "true", onClick: clearInputSearch, children: jsxRuntime.jsx(reactIcons.Dismiss16Regular, {}) }))] }));
3747
+ } : undefined, children: [jsxRuntime.jsx("span", { className: clsx(styles$c.searchLeftIcon, { [styles$c.disabled]: disabled }), tabIndex: -1, role: "presentation", "aria-hidden": "true", children: jsxRuntime.jsx(reactIcons.Search16Regular, {}) }), jsxRuntime.jsx("input", { ref: setInputRefs, id: inputId, type: "text", placeholder: placeholder, "aria-label": placeholder, value: currentValue || '', onChange: handleChange, onKeyDown: handleKeyDown, disabled: disabled, onFocus: handleFocus, onBlur: handleBlur, "data-testid": testId, ...rest, inputMode: virtualKeyboard ? 'none' : rest.inputMode, className: clsx({ [styles$c.inputWithClearIcon]: currentValue && currentValue.length > 0 }) }), currentValue && currentValue.length > 0 && (jsxRuntime.jsx("span", { className: styles$c.searchClearIcon, "aria-hidden": "true", onClick: clearInputSearch, children: jsxRuntime.jsx(reactIcons.Dismiss16Regular, {}) })), virtualKeyboard && (jsxRuntime.jsx("div", { className: "virtualKeyboardWrapper", children: jsxRuntime.jsx(VirtualKeyboard, { variant: "native", type: virtualKeyboardType, maxLength: virtualKeyboardMaxLength, value: currentValue || '', targetRef: inputRef, onChange: (val) => {
3748
+ if (disabled)
3749
+ return;
3750
+ if (isControlled) {
3751
+ const syntheticEvent = {
3752
+ target: { value: val },
3753
+ currentTarget: { value: val },
3754
+ };
3755
+ onChange?.(syntheticEvent);
3756
+ }
3757
+ else {
3758
+ setInternalValue(val);
3759
+ }
3760
+ } }) }))] }));
3097
3761
  });
3098
3762
  Search.displayName = 'Search';
3099
3763
 
@@ -3217,9 +3881,15 @@ var styles$b = {"zds-list-item__container":"ListItem-module__zds-list-item__cont
3217
3881
 
3218
3882
  var styles$a = {"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"};
3219
3883
 
3220
- const Radio = ({ items, onValueChange, defaultValue, name, id, ariaLabel, orientation = 'vertical', className, ...rest }) => {
3221
- const componentId = id || React.useId();
3222
- return (jsxRuntime.jsx(radixUi.RadioGroup.Root, { id: componentId, className: clsx(styles$a.root, className), defaultValue: defaultValue, onValueChange: onValueChange, name: name, "aria-label": ariaLabel, "data-orientation": orientation, orientation: orientation, ...rest, children: items.map(({ id, value, disabled, label }) => {
3884
+ const Radio = ({ items, onValueChange, defaultValue, name, id, ariaLabel, orientation = 'vertical', scale = 1, className, ...rest }) => {
3885
+ const generatedId = React.useId();
3886
+ const componentId = id || generatedId;
3887
+ const scaleClass = {
3888
+ 1: 'scale-1-0',
3889
+ 1.5: 'scale-1-5',
3890
+ 2: 'scale-2-0',
3891
+ }[scale];
3892
+ return (jsxRuntime.jsx(radixUi.RadioGroup.Root, { id: componentId, className: clsx(styles$a.root, scaleClass, className), defaultValue: defaultValue, onValueChange: onValueChange, name: name, "aria-label": ariaLabel, "data-orientation": orientation, orientation: orientation, ...rest, children: items.map(({ id, value, disabled, label }) => {
3223
3893
  const itemKey = id ?? value;
3224
3894
  const uniqueId = `${componentId}-item-${value}`;
3225
3895
  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));
@@ -3440,7 +4110,7 @@ const useSearchLogic = ({ items, searchValue, searchTerm, enableApiSearch, onApi
3440
4110
  return { filteredItems: filteredItems() };
3441
4111
  };
3442
4112
 
3443
- const Menu = ({ items, children, onItemSelect, search, enableInfiniteScroll, onScrollEnd, isLoadingMore, onApiSearch, enableApiSearch, selectedItems, onOpenChange, align = 'start', className, maxHeight = 400, ...rest }) => {
4113
+ const Menu = ({ items, children, onItemSelect, search, enableInfiniteScroll, onScrollEnd, isLoadingMore, onApiSearch, enableApiSearch, selectedItems, onOpenChange, align = 'start', dropdownScale = 1, buttonScale, className, maxHeight = 400, ...rest }) => {
3444
4114
  const itemsWrapperRef = React.useRef(null);
3445
4115
  const hasReachedEndRef = React.useRef(false);
3446
4116
  const observerRef = React.useRef(null);
@@ -3450,6 +4120,16 @@ const Menu = ({ items, children, onItemSelect, search, enableInfiniteScroll, onS
3450
4120
  const [searchInput, setSearchInput] = React.useState('');
3451
4121
  const [searchTerm, setSearchTerm] = React.useState('');
3452
4122
  const maxHeightStyle = typeof maxHeight === 'number' ? `${maxHeight}px` : maxHeight;
4123
+ const scaleClass = {
4124
+ 1: 'scale-1-0',
4125
+ 1.5: 'scale-1-5',
4126
+ 2: 'scale-2-0',
4127
+ }[dropdownScale];
4128
+ const triggerWithScale = React.isValidElement(children) && buttonScale
4129
+ ? React.cloneElement(children, {
4130
+ scale: children.props?.scale ?? buttonScale,
4131
+ })
4132
+ : children;
3453
4133
  const { open, setOpen, handleItemSelect: handleItemSelectLogic, isItemSelected } = useMenuLogic({
3454
4134
  selectedItems,
3455
4135
  onItemSelect,
@@ -3552,7 +4232,7 @@ const Menu = ({ items, children, onItemSelect, search, enableInfiniteScroll, onS
3552
4232
  hasReachedEndRef.current = false;
3553
4233
  }
3554
4234
  };
3555
- return (jsxRuntime.jsxs(radixUi.DropdownMenu.Root, { open: open, onOpenChange: handleOpenChange, children: [jsxRuntime.jsx(radixUi.DropdownMenu.Trigger, { asChild: true, children: children }), jsxRuntime.jsx(radixUi.DropdownMenu.Portal, { children: jsxRuntime.jsxs(radixUi.DropdownMenu.Content, { className: clsx(styles$9.content, className), sideOffset: 8, align: align, onPointerDown: () => { closedByPointerRef.current = true; }, onInteractOutside: () => { closedByPointerRef.current = true; }, onCloseAutoFocus: (e) => {
4235
+ 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$9.content, scaleClass, className), sideOffset: 8, align: align, onPointerDown: () => { closedByPointerRef.current = true; }, onInteractOutside: () => { closedByPointerRef.current = true; }, onCloseAutoFocus: (e) => {
3556
4236
  if (closedByPointerRef.current) {
3557
4237
  e.preventDefault();
3558
4238
  closedByPointerRef.current = false;
@@ -3584,7 +4264,7 @@ const Modal = ({ isOpen = false, onClose, title, children, headerContent, closeO
3584
4264
 
3585
4265
  var styles$7 = {"quantity":"Quantity-module__quantity___-vndR","quantityInput":"Quantity-module__quantityInput___xZG-v","disabled":"Quantity-module__disabled___X6p5l"};
3586
4266
 
3587
- const Quantity = ({ value = 0, onChange, disabled = false, decimal = false, decimalPlaces = 2, size = 'lg', id, valueIncrement = 1, className, inputSize, minValue = 0, maxValue = 9999, decrementAriaLabel = 'Decrease quantity', incrementAriaLabel = 'Increase quantity', inputAriaLabel = 'Quantity', ...rest }) => {
4267
+ const Quantity = ({ value = 0, onChange, disabled = false, decimal = false, decimalPlaces = 2, size = 'lg', id, valueIncrement = 1, scale = 1, className, inputSize, minValue = 0, maxValue = 9999, decrementAriaLabel = 'Decrease quantity', incrementAriaLabel = 'Increase quantity', inputAriaLabel = 'Quantity', ...rest }) => {
3588
4268
  const initialValue = Math.min(Math.max(value, minValue), maxValue);
3589
4269
  const [internalValue, setInternalValue] = React.useState(initialValue);
3590
4270
  const [inputValue, setInputValue] = React.useState(decimal ? initialValue.toFixed(decimalPlaces) : String(initialValue));
@@ -3763,7 +4443,12 @@ const Quantity = ({ value = 0, onChange, disabled = false, decimal = false, deci
3763
4443
  const inputSizeValue = inputSize !== undefined ? inputSize : Math.max(1, inputValue.length);
3764
4444
  const uniqueId = React.useId();
3765
4445
  const inputId = id || uniqueId;
3766
- return (jsxRuntime.jsxs("div", { className: clsx(styles$7.quantity, { [styles$7.disabled]: disabled }, className), ...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' }), jsxRuntime.jsx("input", { ref: inputRef, className: clsx(styles$7.quantityInput, { [styles$7.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' })] }));
4446
+ const scaleClass = {
4447
+ 1: 'scale-1-0',
4448
+ 1.5: 'scale-1-5',
4449
+ 2: 'scale-2-0',
4450
+ }[scale];
4451
+ return (jsxRuntime.jsxs("div", { className: clsx(styles$7.quantity, scaleClass, { [styles$7.disabled]: disabled }, className), ...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' }), jsxRuntime.jsx("input", { ref: inputRef, className: clsx(styles$7.quantityInput, { [styles$7.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' })] }));
3767
4452
  };
3768
4453
  const memorizedQuantity = React.memo(Quantity);
3769
4454
  memorizedQuantity.displayName = 'Quantity';
@@ -4077,7 +4762,7 @@ function useSelectLogic({ value, required = false, search = false, onValueChange
4077
4762
  };
4078
4763
  }
4079
4764
 
4080
- const Select = ({ items, onValueChange, onOpenChange, variant, required = false, value, label, helperText, placeholder = 'Selecione', maxWidth, search = false, errorMessage, disabled = false, className, 'aria-label': ariaLabel, 'data-testid': testId, tooltip = false, tooltipText, side = 'bottom', align = 'start', enableInfiniteScroll = false, onScrollEnd, isLoadingMore = false, enableApiSearch = false, onApiSearch, isSearching = false, ...rest }) => {
4765
+ const Select = ({ items, onValueChange, onOpenChange, variant, required = false, value, label, helperText, placeholder = 'Selecione', maxWidth, search = false, errorMessage, disabled = false, scale = 1, className, 'aria-label': ariaLabel, 'data-testid': testId, tooltip = false, tooltipText, side = 'bottom', align = 'start', enableInfiniteScroll = false, onScrollEnd, isLoadingMore = false, enableApiSearch = false, onApiSearch, isSearching = false, ...rest }) => {
4081
4766
  const componentId = React.useId();
4082
4767
  const selectId = `select-${componentId}`;
4083
4768
  const viewportRef = React.useRef(null);
@@ -4125,6 +4810,11 @@ const Select = ({ items, onValueChange, onOpenChange, variant, required = false,
4125
4810
  const containerStyle = React.useMemo(() => ({
4126
4811
  maxWidth: maxWidth ? `${maxWidth}px` : undefined,
4127
4812
  }), [maxWidth]);
4813
+ const scaleClass = {
4814
+ 1: 'scale-1-0',
4815
+ 1.5: 'scale-1-5',
4816
+ 2: 'scale-2-0',
4817
+ }[scale];
4128
4818
  const handleSearchChange = (e) => {
4129
4819
  const value = e.target.value;
4130
4820
  actions.setSearchInput(value);
@@ -4157,7 +4847,7 @@ const Select = ({ items, onValueChange, onOpenChange, variant, required = false,
4157
4847
  onApiSearch('');
4158
4848
  }
4159
4849
  };
4160
- return (jsxRuntime.jsx(radixUi.Select.Root, { value: variant === 'checkbox' || (search && state.isOpen) ? '' : (state.selectedValues[0] || ''), onValueChange: variant === 'checkbox' ? undefined : actions.handleSingleSelect, required: required, open: state.isOpen, onOpenChange: actions.setOpen, disabled: disabled, ...rest, children: jsxRuntime.jsxs("div", { className: clsx(styles$6.container, className), style: containerStyle, "data-testid": testId, children: [jsxRuntime.jsx("div", { className: styles$6.fieldContainer, children: jsxRuntime.jsxs("div", { className: styles$6.containerLabel, children: [jsxRuntime.jsx(LabelComponent, { htmlFor: selectId, required: required, tooltipText: tooltipText, tooltip: tooltip, side: side, align: align, error: state.hasError && state.touched, disabled: disabled, children: label }), jsxRuntime.jsxs(radixUi.Select.Trigger, { className: clsx(styles$6.trigger, {
4850
+ return (jsxRuntime.jsx(radixUi.Select.Root, { value: variant === 'checkbox' || (search && state.isOpen) ? '' : (state.selectedValues[0] || ''), onValueChange: variant === 'checkbox' ? undefined : actions.handleSingleSelect, required: required, open: state.isOpen, onOpenChange: actions.setOpen, disabled: disabled, ...rest, children: jsxRuntime.jsxs("div", { className: clsx(styles$6.container, scaleClass, className), style: containerStyle, "data-testid": testId, children: [jsxRuntime.jsx("div", { className: styles$6.fieldContainer, children: jsxRuntime.jsxs("div", { className: styles$6.containerLabel, children: [jsxRuntime.jsx(LabelComponent, { htmlFor: selectId, required: required, tooltipText: tooltipText, tooltip: tooltip, side: side, align: align, error: state.hasError && state.touched, disabled: disabled, children: label }), jsxRuntime.jsxs(radixUi.Select.Trigger, { className: clsx(styles$6.trigger, {
4161
4851
  [styles$6.error]: state.hasError && state.touched,
4162
4852
  [styles$6.disabled]: disabled,
4163
4853
  [styles$6.hasValue]: state.selectedValues.length > 0,
@@ -4563,7 +5253,7 @@ const TableV2 = ({ columns, data, rowSelection: rowSelectionConfig, enableSortin
4563
5253
  };
4564
5254
  return (jsxRuntime.jsxs("div", { className: clsx(styles$4.wrapper, className), children: [showBulkActions && (jsxRuntime.jsxs("div", { className: styles$4.bulkActionsBar, children: [jsxRuntime.jsxs("div", { className: styles$4.bulkActionsInfo, children: [jsxRuntime.jsx(Button, { variant: "text", iconOnly: true, icon: jsxRuntime.jsx(reactIcons.Dismiss16Regular, {}), ariaLabel: "Limpar sele\u00E7\u00E3o", onClick: handleClearSelection, className: styles$4.bulkActionsClearButton }), jsxRuntime.jsx("span", { className: styles$4.bulkActionsLabel, children: bulkActions.label
4565
5255
  ? bulkActions.label(selectedCount, selectedRows)
4566
- : `${selectedCount} ${selectedCount === 1 ? 'item selecionado' : 'itens selecionados'}` })] }), jsxRuntime.jsx("div", { className: styles$4.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$4.tableHeader, children: [showSearch && (jsxRuntime.jsx("div", { className: styles$4.tableHeaderSearchContainer, children: jsxRuntime.jsx(Search, { value: pendingSearch, searchMode: header?.searchMode ?? "on-enter", onChange: (e) => {
5256
+ : `${selectedCount} ${selectedCount === 1 ? 'item selecionado' : 'itens selecionados'}` })] }), jsxRuntime.jsx("div", { className: styles$4.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$4.tableHeader, children: [showSearch && (jsxRuntime.jsx("div", { className: styles$4.tableHeaderSearchContainer, children: jsxRuntime.jsx(Search, { value: pendingSearch, virtualKeyboard: header.virtualKeyboard, virtualKeyboardType: header.virtualKeyboardType, virtualKeyboardMaxLength: header.virtualKeyboardMaxLength, searchMode: header?.searchMode ?? "on-enter", onChange: (e) => {
4567
5257
  setPendingSearch(e.target.value);
4568
5258
  }, onSearch: (val) => {
4569
5259
  if (footer) {
@@ -4578,7 +5268,7 @@ const TableV2 = ({ columns, data, rowSelection: rowSelectionConfig, enableSortin
4578
5268
  footer?.onPageChange?.(1);
4579
5269
  }
4580
5270
  header?.onSearchChange?.('');
4581
- }, placeholder: header.searchPlaceholder ?? 'Pesquisar...', className: styles$4.tableHeaderSearch }) })), !!header.filterItems?.length && (jsxRuntime.jsxs("div", { className: styles$4.tableHeaderFilters, children: [jsxRuntime.jsx("span", { className: styles$4.tableHeaderFilterLabel, children: "Filtros" }), jsxRuntime.jsx("div", { className: styles$4.tableHeaderFilterItems, children: header.filterItems.map((filterItem, index) => {
5271
+ }, placeholder: header.searchPlaceholder ?? 'Pesquisar...', className: styles$4.tableHeaderSearch }) })), !!header.filterItems?.length && (jsxRuntime.jsxs("div", { className: styles$4.tableHeaderFilters, children: [header.filterItems.some((item) => item.type !== 'combined') && (jsxRuntime.jsx("span", { className: styles$4.tableHeaderFilterLabel, children: "Filtros" })), jsxRuntime.jsx("div", { className: styles$4.tableHeaderFilterItems, children: header.filterItems.map((filterItem, index) => {
4582
5272
  const commonProps = {
4583
5273
  buttonText: filterItem.buttonText,
4584
5274
  icon: filterItem.icon,
@@ -4628,12 +5318,13 @@ const TableV2 = ({ columns, data, rowSelection: rowSelectionConfig, enableSortin
4628
5318
 
4629
5319
  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"};
4630
5320
 
4631
- const TextArea = React.forwardRef(({ className, value, label, placeholder, onChange, disabled = false, maxLength, required = false, helperText, tooltip = false, tooltipText, side = 'bottom', align = 'start', errorMessage, error, id, onBlur, onFocus, name, resize = 'vertical', showCharCount = false, height, ...rest }, ref) => {
5321
+ const TextArea = React.forwardRef(({ className, value, label, placeholder, onChange, disabled = false, maxLength, required = false, helperText, tooltip = false, tooltipText, side = 'bottom', align = 'start', errorMessage, error, id, onBlur, onFocus, name, resize = 'vertical', showCharCount = false, height, virtualKeyboard = false, virtualKeyboardType, virtualKeyboardMaxLength, ...rest }, ref) => {
4632
5322
  const normalizeValue = (val) => {
4633
5323
  return val === undefined || val === null ? '' : String(val);
4634
5324
  };
4635
5325
  const [textareaValue, setTextareaValue] = React.useState(normalizeValue(value));
4636
5326
  const [textareaError, setTextareaError] = React.useState('');
5327
+ const { internalRef: textareaRef, setRefs: setTextareaRefs } = useInputKeyboardValue(ref);
4637
5328
  const generatedId = React.useId();
4638
5329
  const componentId = id || generatedId;
4639
5330
  React.useEffect(() => {
@@ -4666,7 +5357,12 @@ const TextArea = React.forwardRef(({ className, value, label, placeholder, onCha
4666
5357
  ? `${componentId}-helper`
4667
5358
  : undefined;
4668
5359
  const containerClass = clsx(styles$3.container, disabled && styles$3.disabled, hasError && !disabled && styles$3.error, className);
4669
- return (jsxRuntime.jsxs("div", { className: containerClass, children: [label && (jsxRuntime.jsx(LabelComponent, { htmlFor: componentId, required: required, tooltip: tooltip, tooltipText: tooltipText, side: side, align: align, error: hasError, disabled: disabled, children: label })), jsxRuntime.jsxs("div", { className: styles$3.inputWrapper, children: [jsxRuntime.jsx("div", { className: styles$3.inputContainer, children: jsxRuntime.jsx("textarea", { ...rest, ref: ref, id: componentId, name: name, value: textareaValue, placeholder: placeholder, onChange: handleChange, onFocus: handleFocus, onBlur: handleBlur, maxLength: maxLength, disabled: disabled, "aria-invalid": hasError, "aria-required": required, "aria-describedby": helperId, style: { resize, height } }) }), jsxRuntime.jsxs("div", { className: styles$3.footer, children: [jsxRuntime.jsx("span", { id: helperId, className: styles$3.helperText, "aria-live": hasError ? 'polite' : undefined, children: displayHelperText }), showCharCount && maxLength && (jsxRuntime.jsxs("span", { className: styles$3.charCount, children: [textareaValue.length, "/", maxLength] }))] })] })] }));
5360
+ return (jsxRuntime.jsxs("div", { className: containerClass, children: [label && (jsxRuntime.jsx(LabelComponent, { htmlFor: componentId, required: required, tooltip: tooltip, tooltipText: tooltipText, side: side, align: align, error: hasError, disabled: disabled, children: label })), jsxRuntime.jsxs("div", { className: styles$3.inputWrapper, children: [jsxRuntime.jsx("div", { className: styles$3.inputContainer, children: jsxRuntime.jsx("textarea", { ...rest, ref: setTextareaRefs, id: componentId, name: name, value: textareaValue, placeholder: placeholder, onChange: handleChange, onFocus: handleFocus, onBlur: handleBlur, maxLength: maxLength, disabled: disabled, "aria-invalid": hasError, "aria-required": required, "aria-describedby": helperId, style: { resize, height }, inputMode: virtualKeyboard ? 'none' : rest.inputMode }) }), jsxRuntime.jsxs("div", { className: styles$3.footer, children: [jsxRuntime.jsx("span", { id: helperId, className: styles$3.helperText, "aria-live": hasError ? 'polite' : undefined, children: displayHelperText }), showCharCount && maxLength && (jsxRuntime.jsxs("span", { className: styles$3.charCount, children: [textareaValue.length, "/", maxLength] }))] })] }), virtualKeyboard && (jsxRuntime.jsx("div", { className: "virtualKeyboardWrapper", children: jsxRuntime.jsx(VirtualKeyboard, { variant: "native", type: virtualKeyboardType, maxLength: virtualKeyboardMaxLength, value: textareaValue, targetRef: textareaRef, onChange: (val) => {
5361
+ if (!disabled && (!maxLength || val.length <= maxLength)) {
5362
+ setTextareaValue(val);
5363
+ onChange?.(val);
5364
+ }
5365
+ } }) }))] }));
4670
5366
  });
4671
5367
  TextArea.displayName = 'TextArea';
4672
5368
  var TextArea_default = React.memo(TextArea);
@@ -4879,7 +5575,14 @@ ToastContainer.displayName = 'ToastContainer';
4879
5575
 
4880
5576
  var styles$1 = {"container":"Switch-module__container___BR1OB","switchRoot":"Switch-module__switchRoot___jz2HD","switchThumb":"Switch-module__switchThumb___X3RL7"};
4881
5577
 
4882
- const Switch = ({ disabled = false, defaultChecked = false, checked, onCheckedChange, className, ...rest }) => (jsxRuntime.jsx("div", { className: clsx(styles$1.container, className), children: jsxRuntime.jsx(radixUi.Switch.Root, { className: styles$1.switchRoot, disabled: disabled, defaultChecked: defaultChecked, checked: checked, onCheckedChange: onCheckedChange, ...rest, children: jsxRuntime.jsx(radixUi.Switch.Thumb, { className: styles$1.switchThumb }) }) }));
5578
+ const Switch = ({ disabled = false, defaultChecked = false, checked, onCheckedChange, scale = 1, className, ...rest }) => {
5579
+ const scaleClass = {
5580
+ 1: 'scale-1-0',
5581
+ 1.5: 'scale-1-5',
5582
+ 2: 'scale-2-0',
5583
+ }[scale];
5584
+ return (jsxRuntime.jsx("div", { className: clsx(styles$1.container, scaleClass, className), children: jsxRuntime.jsx(radixUi.Switch.Root, { className: styles$1.switchRoot, disabled: disabled, defaultChecked: defaultChecked, checked: checked, onCheckedChange: onCheckedChange, ...rest, children: jsxRuntime.jsx(radixUi.Switch.Thumb, { className: styles$1.switchThumb }) }) }));
5585
+ };
4883
5586
 
4884
5587
  var styles = {"zds-verification-code__container":"VerificationCode-module__zds-verification-code__container___tUNuJ","zds-verification-code__input":"VerificationCode-module__zds-verification-code__input___wDIQ6","zds-verification-code__filled":"VerificationCode-module__zds-verification-code__filled___-2VVb","zds-verification-code__has-error":"VerificationCode-module__zds-verification-code__has-error___eqKAp","zds-verification-code__error":"VerificationCode-module__zds-verification-code__error___T53i5"};
4885
5588
 
@@ -5331,6 +6034,7 @@ exports.ToastContainer = ToastContainer;
5331
6034
  exports.ToastProvider = ToastProvider;
5332
6035
  exports.Tooltip = Tooltip;
5333
6036
  exports.VerificationCode = VerificationCode;
6037
+ exports.VirtualKeyboard = VirtualKeyboard;
5334
6038
  exports.normalizeText = normalizeText;
5335
6039
  exports.useApiSimulation = useApiSimulation;
5336
6040
  exports.useInfiniteScroll = useInfiniteScroll;