@clickpalm/react 1.3.11 → 1.3.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -4088,10 +4088,7 @@ interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'name' | 'color'> {
4088
4088
  color?: IconColor;
4089
4089
  }
4090
4090
 
4091
- declare function Icon({ name, size, color, ...rest }: IconProps): react_jsx_runtime.JSX.Element | null;
4092
- declare namespace Icon {
4093
- var displayName: string;
4094
- }
4091
+ declare const Icon: react.ForwardRefExoticComponent<Omit<IconProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
4095
4092
 
4096
4093
  interface OneTimePasswordProps extends ComponentPropsWithoutRef<typeof OneTimePasswordField.Root> {
4097
4094
  label: string;
package/dist/index.js CHANGED
@@ -316,7 +316,7 @@ Avatar2.displayName = "Avatar";
316
316
  // src/components/Calendar/index.tsx
317
317
  var import_date_fns = require("date-fns");
318
318
  var import_locale = require("date-fns/locale");
319
- var import_react3 = require("react");
319
+ var import_react4 = require("react");
320
320
  var import_react_day_picker = require("react-day-picker");
321
321
  var import_style = require("react-day-picker/dist/style.css");
322
322
 
@@ -435,6 +435,9 @@ var Button = (0, import_react2.forwardRef)(function Button2({ children, ...props
435
435
  });
436
436
  Button.displayName = "Button";
437
437
 
438
+ // src/components/Icon/index.tsx
439
+ var import_react3 = require("react");
440
+
438
441
  // src/components/Icon/icons.ts
439
442
  var import_react_icons = require("@radix-ui/react-icons");
440
443
 
@@ -742,8 +745,8 @@ var Download = (props) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
742
745
  {
743
746
  d: "M7.50005 1.04999C7.74858 1.04999 7.95005 1.25146 7.95005 1.49999V8.41359L10.1819 6.18179C10.3576 6.00605 10.6425 6.00605 10.8182 6.18179C10.994 6.35753 10.994 6.64245 10.8182 6.81819L7.81825 9.81819C7.64251 9.99392 7.35759 9.99392 7.18185 9.81819L4.18185 6.81819C4.00611 6.64245 4.00611 6.35753 4.18185 6.18179C4.35759 6.00605 4.64251 6.00605 4.81825 6.18179L7.05005 8.41359V1.49999C7.05005 1.25146 7.25152 1.04999 7.50005 1.04999ZM2.5 10C2.77614 10 3 10.2239 3 10.5V12C3 12.5539 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2239 12.2239 10 12.5 10C12.7761 10 13 10.2239 13 10.5V12C13 13.1041 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2239 2.22386 10 2.5 10Z",
744
747
  fill: "currentColor",
745
- "fill-rule": "evenodd",
746
- "clip-rule": "evenodd"
748
+ fillRule: "evenodd",
749
+ clipRule: "evenodd"
747
750
  }
748
751
  )
749
752
  }
@@ -782,24 +785,27 @@ var colorMap = {
782
785
  green: "#78CB63",
783
786
  white: "#ffffff"
784
787
  };
785
- function Icon({ name, size = 24, color = "black", ...rest }) {
786
- const IconComponent = iconMap[name];
787
- if (!IconComponent) {
788
- console.warn(`Icon "${name}" not found in iconMap`);
789
- return null;
790
- }
791
- const fillColor = colorMap[color];
792
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
793
- IconComponent,
794
- {
795
- width: size,
796
- height: size,
797
- style: { color: fillColor },
798
- "aria-hidden": true,
799
- ...rest
788
+ var Icon = (0, import_react3.forwardRef)(
789
+ ({ name, size = 24, color = "black", ...rest }, ref) => {
790
+ const IconComponent = iconMap[name];
791
+ if (!IconComponent) {
792
+ console.warn(`Icon "${name}" not found in iconMap`);
793
+ return null;
800
794
  }
801
- );
802
- }
795
+ const fillColor = colorMap[color];
796
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
797
+ IconComponent,
798
+ {
799
+ ref,
800
+ width: size,
801
+ height: size,
802
+ style: { color: fillColor },
803
+ "aria-hidden": true,
804
+ ...rest
805
+ }
806
+ );
807
+ }
808
+ );
803
809
  Icon.displayName = "Icon";
804
810
 
805
811
  // src/components/Calendar/styles.ts
@@ -999,9 +1005,9 @@ var StyledLabel = styled("label", {
999
1005
  var import_jsx_runtime18 = require("react/jsx-runtime");
1000
1006
  calendarStyles();
1001
1007
  var Calendar2 = ({ label, onChange }) => {
1002
- const [selected, setSelected] = (0, import_react3.useState)(void 0);
1003
- const [month, setMonth] = (0, import_react3.useState)(/* @__PURE__ */ new Date());
1004
- const [open, setOpen] = (0, import_react3.useState)(true);
1008
+ const [selected, setSelected] = (0, import_react4.useState)(void 0);
1009
+ const [month, setMonth] = (0, import_react4.useState)(/* @__PURE__ */ new Date());
1010
+ const [open, setOpen] = (0, import_react4.useState)(true);
1005
1011
  const handleDaySelect = (date) => {
1006
1012
  setSelected(date);
1007
1013
  if (date) {
@@ -1009,7 +1015,7 @@ var Calendar2 = ({ label, onChange }) => {
1009
1015
  onChange(formatted);
1010
1016
  }
1011
1017
  };
1012
- (0, import_react3.useEffect)(() => {
1018
+ (0, import_react4.useEffect)(() => {
1013
1019
  if (selected) {
1014
1020
  setMonth(selected);
1015
1021
  }
@@ -1068,7 +1074,7 @@ var Calendar2 = ({ label, onChange }) => {
1068
1074
  };
1069
1075
 
1070
1076
  // src/components/Checkbox/index.tsx
1071
- var import_react4 = require("react");
1077
+ var import_react5 = require("react");
1072
1078
 
1073
1079
  // src/components/Checkbox/styles.ts
1074
1080
  var Checkbox = __toESM(require("@radix-ui/react-checkbox"));
@@ -1185,7 +1191,7 @@ var Span = styled("span", {
1185
1191
 
1186
1192
  // src/components/Checkbox/index.tsx
1187
1193
  var import_jsx_runtime19 = require("react/jsx-runtime");
1188
- var Checkbox2 = (0, import_react4.forwardRef)(
1194
+ var Checkbox2 = (0, import_react5.forwardRef)(
1189
1195
  ({ label, checked, onCheckedChange, errorMessage, ...rest }, ref) => {
1190
1196
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
1191
1197
  /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(StyledWrapper, { hasError: !!errorMessage, children: [
@@ -1211,12 +1217,12 @@ Checkbox2.displayName = "Checkbox";
1211
1217
  // src/components/Datepicker/index.tsx
1212
1218
  var import_date_fns2 = require("date-fns");
1213
1219
  var import_locale2 = require("date-fns/locale");
1214
- var import_react7 = require("react");
1220
+ var import_react8 = require("react");
1215
1221
  var import_react_day_picker2 = require("react-day-picker");
1216
1222
  var import_style2 = require("react-day-picker/dist/style.css");
1217
1223
 
1218
1224
  // src/components/Input/index.tsx
1219
- var import_react5 = __toESM(require("react"));
1225
+ var import_react6 = __toESM(require("react"));
1220
1226
 
1221
1227
  // src/components/Input/styles.ts
1222
1228
  var StyledWrapper2 = styled("div", {
@@ -1355,7 +1361,7 @@ var CharCounter = styled(Span2, {
1355
1361
 
1356
1362
  // src/components/Input/index.tsx
1357
1363
  var import_jsx_runtime20 = require("react/jsx-runtime");
1358
- var Input2 = (0, import_react5.forwardRef)(
1364
+ var Input2 = (0, import_react6.forwardRef)(
1359
1365
  ({ prefix, suffix, label, maxLength, showCounter = false, errorMessage, noMargin = false, redBorder, ...props }, forwardedRef) => {
1360
1366
  const getDisplayValue = (value) => {
1361
1367
  const stringValue = String(value || "");
@@ -1364,19 +1370,15 @@ var Input2 = (0, import_react5.forwardRef)(
1364
1370
  }
1365
1371
  return stringValue;
1366
1372
  };
1367
- const [displayValue, setDisplayValue] = (0, import_react5.useState)(getDisplayValue(props.value));
1368
- const [charCount, setCharCount] = (0, import_react5.useState)(getDisplayValue(props.value).length);
1369
- const localInputRef = (0, import_react5.useRef)(null);
1373
+ const localInputRef = (0, import_react6.useRef)(null);
1370
1374
  const inputRef = forwardedRef || localInputRef;
1371
- (0, import_react5.useEffect)(() => {
1372
- const newDisplayValue = getDisplayValue(props.value);
1373
- if (newDisplayValue !== displayValue) {
1374
- setDisplayValue(newDisplayValue);
1375
- setCharCount(newDisplayValue.length);
1376
- }
1377
- }, [props.value, prefix, displayValue]);
1375
+ const displayValue = getDisplayValue(props.value);
1376
+ const charCount = displayValue.length;
1378
1377
  const handleChange = (e) => {
1379
- let currentDisplayValue = getDisplayValue(e.target.value);
1378
+ let currentDisplayValue = e.target.value;
1379
+ if (prefix && currentDisplayValue.startsWith(prefix)) {
1380
+ currentDisplayValue = currentDisplayValue.substring(prefix.length);
1381
+ }
1380
1382
  if (props.type === "number") {
1381
1383
  currentDisplayValue = currentDisplayValue.replace(/[^0-9]/g, "");
1382
1384
  }
@@ -1395,7 +1397,7 @@ var Input2 = (0, import_react5.forwardRef)(
1395
1397
  inputRef?.current?.focus();
1396
1398
  };
1397
1399
  const isButtonElement = (node) => {
1398
- if (!import_react5.default.isValidElement(node))
1400
+ if (!import_react6.default.isValidElement(node))
1399
1401
  return false;
1400
1402
  const type = node.type;
1401
1403
  return type?.displayName === "Button";
@@ -1443,7 +1445,7 @@ var Input2 = (0, import_react5.forwardRef)(
1443
1445
  Input2.displayName = "Input";
1444
1446
 
1445
1447
  // src/components/Datepicker/CustomSelect/index.tsx
1446
- var import_react6 = require("react");
1448
+ var import_react7 = require("react");
1447
1449
 
1448
1450
  // src/components/Datepicker/CustomSelect/styles.ts
1449
1451
  var IconWrapper = styled("span", {
@@ -1578,8 +1580,8 @@ var CustomSelect = ({
1578
1580
  onChange,
1579
1581
  color = "white"
1580
1582
  }) => {
1581
- const [isOpen, setIsOpen] = (0, import_react6.useState)(false);
1582
- const selectRef = (0, import_react6.useRef)(null);
1583
+ const [isOpen, setIsOpen] = (0, import_react7.useState)(false);
1584
+ const selectRef = (0, import_react7.useRef)(null);
1583
1585
  const handleToggle = () => setIsOpen(!isOpen);
1584
1586
  const handleOptionClick = (optionValue) => {
1585
1587
  if (onChange) {
@@ -1587,7 +1589,7 @@ var CustomSelect = ({
1587
1589
  }
1588
1590
  setIsOpen(false);
1589
1591
  };
1590
- (0, import_react6.useEffect)(() => {
1592
+ (0, import_react7.useEffect)(() => {
1591
1593
  const handleClickOutside = (event) => {
1592
1594
  if (selectRef.current && !selectRef.current.contains(event.target)) {
1593
1595
  setIsOpen(false);
@@ -1748,13 +1750,13 @@ var datePickerStyles = globalCss({
1748
1750
  var import_jsx_runtime23 = require("react/jsx-runtime");
1749
1751
  datePickerStyles();
1750
1752
  var oneYearMore = new Date((/* @__PURE__ */ new Date()).getFullYear() + 1, 11);
1751
- var Datepicker = (0, import_react7.forwardRef)(({ label, placeholder, value, onChange, errorMessage, endDate = oneYearMore }, ref) => {
1752
- const [selected, setSelected] = (0, import_react7.useState)(void 0);
1753
- const [month, setMonth] = (0, import_react7.useState)(/* @__PURE__ */ new Date());
1754
- const [open, setOpen] = (0, import_react7.useState)(false);
1755
- const inputRef = (0, import_react7.useRef)(null);
1756
- const calendarRef = (0, import_react7.useRef)(null);
1757
- (0, import_react7.useImperativeHandle)(ref, () => inputRef.current);
1753
+ var Datepicker = (0, import_react8.forwardRef)(({ label, placeholder, value, onChange, errorMessage, endDate = oneYearMore }, ref) => {
1754
+ const [selected, setSelected] = (0, import_react8.useState)(void 0);
1755
+ const [month, setMonth] = (0, import_react8.useState)(/* @__PURE__ */ new Date());
1756
+ const [open, setOpen] = (0, import_react8.useState)(false);
1757
+ const inputRef = (0, import_react8.useRef)(null);
1758
+ const calendarRef = (0, import_react8.useRef)(null);
1759
+ (0, import_react8.useImperativeHandle)(ref, () => inputRef.current);
1758
1760
  const handleDaySelect = (date) => {
1759
1761
  setSelected(date);
1760
1762
  if (date) {
@@ -1763,7 +1765,7 @@ var Datepicker = (0, import_react7.forwardRef)(({ label, placeholder, value, onC
1763
1765
  }
1764
1766
  setOpen(false);
1765
1767
  };
1766
- (0, import_react7.useEffect)(() => {
1768
+ (0, import_react8.useEffect)(() => {
1767
1769
  const handleClickOutside = (event) => {
1768
1770
  if (calendarRef.current && !calendarRef.current.contains(event.target) && inputRef.current && !inputRef.current.contains(event.target)) {
1769
1771
  setOpen(false);
@@ -1772,7 +1774,7 @@ var Datepicker = (0, import_react7.forwardRef)(({ label, placeholder, value, onC
1772
1774
  document.addEventListener("mousedown", handleClickOutside);
1773
1775
  return () => document.removeEventListener("mousedown", handleClickOutside);
1774
1776
  }, []);
1775
- (0, import_react7.useEffect)(() => {
1777
+ (0, import_react8.useEffect)(() => {
1776
1778
  if (!open && selected) {
1777
1779
  setMonth(selected);
1778
1780
  }
@@ -1833,7 +1835,7 @@ var Datepicker = (0, import_react7.forwardRef)(({ label, placeholder, value, onC
1833
1835
  Datepicker.displayName = "Datepicker";
1834
1836
 
1835
1837
  // src/components/Hr.tsx
1836
- var import_react8 = require("react");
1838
+ var import_react9 = require("react");
1837
1839
  var import_jsx_runtime24 = require("react/jsx-runtime");
1838
1840
  var StyledHr = styled("hr", {
1839
1841
  border: "none",
@@ -1850,7 +1852,7 @@ var StyledHr = styled("hr", {
1850
1852
  }
1851
1853
  }
1852
1854
  });
1853
- var Hr = (0, import_react8.forwardRef)(function Hr2({ children, ...props }, ref) {
1855
+ var Hr = (0, import_react9.forwardRef)(function Hr2({ children, ...props }, ref) {
1854
1856
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StyledHr, { ref, ...props, children });
1855
1857
  });
1856
1858
  Hr.displayName = "Hr";
@@ -1947,7 +1949,7 @@ var Modal = ({ open, onOpenChange, title, description, children }) => {
1947
1949
  };
1948
1950
 
1949
1951
  // src/components/ProgressBar/index.tsx
1950
- var import_react9 = require("react");
1952
+ var import_react10 = require("react");
1951
1953
 
1952
1954
  // src/components/ProgressBar/styles.ts
1953
1955
  var Progress = __toESM(require("@radix-ui/react-progress"));
@@ -1979,8 +1981,8 @@ var StyledIndicator = styled(Progress.Indicator, {
1979
1981
  // src/components/ProgressBar/index.tsx
1980
1982
  var import_jsx_runtime26 = require("react/jsx-runtime");
1981
1983
  var ProgressBar = ({ label, value = 0, max = 100, ...rest }) => {
1982
- const [progress2, setProgress] = (0, import_react9.useState)(0);
1983
- (0, import_react9.useEffect)(() => {
1984
+ const [progress2, setProgress] = (0, import_react10.useState)(0);
1985
+ (0, import_react10.useEffect)(() => {
1984
1986
  const timer = setTimeout(() => setProgress(value), 500);
1985
1987
  return () => clearTimeout(timer);
1986
1988
  }, [value]);
@@ -2006,7 +2008,7 @@ var ProgressBar = ({ label, value = 0, max = 100, ...rest }) => {
2006
2008
  ProgressBar.displayName = "ProgressBar";
2007
2009
 
2008
2010
  // src/components/Radio/index.tsx
2009
- var import_react10 = require("react");
2011
+ var import_react11 = require("react");
2010
2012
 
2011
2013
  // src/components/Radio/styles.ts
2012
2014
  var RadioGroup = __toESM(require("@radix-ui/react-radio-group"));
@@ -2101,7 +2103,7 @@ var Span3 = styled("span", {
2101
2103
 
2102
2104
  // src/components/Radio/index.tsx
2103
2105
  var import_jsx_runtime27 = require("react/jsx-runtime");
2104
- var Radio = (0, import_react10.forwardRef)(({
2106
+ var Radio = (0, import_react11.forwardRef)(({
2105
2107
  labels,
2106
2108
  value,
2107
2109
  onChange,
@@ -2157,7 +2159,7 @@ var Spacing = ({ size, axis = "vertical" }) => {
2157
2159
  };
2158
2160
 
2159
2161
  // src/components/Switch/index.tsx
2160
- var import_react11 = require("react");
2162
+ var import_react12 = require("react");
2161
2163
 
2162
2164
  // src/components/Switch/styles.ts
2163
2165
  var Switch = __toESM(require("@radix-ui/react-switch"));
@@ -2255,7 +2257,7 @@ var Span4 = styled("span", {
2255
2257
 
2256
2258
  // src/components/Switch/index.tsx
2257
2259
  var import_jsx_runtime29 = require("react/jsx-runtime");
2258
- var Switch2 = (0, import_react11.forwardRef)(({
2260
+ var Switch2 = (0, import_react12.forwardRef)(({
2259
2261
  label,
2260
2262
  checked,
2261
2263
  defaultChecked,
@@ -2289,7 +2291,7 @@ var Switch2 = (0, import_react11.forwardRef)(({
2289
2291
  Switch2.displayName = "Switch";
2290
2292
 
2291
2293
  // src/components/Tabs/index.tsx
2292
- var import_react12 = require("react");
2294
+ var import_react13 = require("react");
2293
2295
 
2294
2296
  // src/components/Tabs/styles.ts
2295
2297
  var Tabs = __toESM(require("@radix-ui/react-tabs"));
@@ -2375,17 +2377,17 @@ var TabsItem = ({ children }) => {
2375
2377
  };
2376
2378
  var Tabs2 = ({ defaultValue, colorContent, children, value, onValueChange }) => {
2377
2379
  const items = [];
2378
- const childrenArray = import_react12.Children.toArray(children);
2380
+ const childrenArray = import_react13.Children.toArray(children);
2379
2381
  childrenArray.forEach((child) => {
2380
- if ((0, import_react12.isValidElement)(child) && child.type === TabsItem) {
2382
+ if ((0, import_react13.isValidElement)(child) && child.type === TabsItem) {
2381
2383
  const { value: value2, label, forceMount, children: content } = child.props;
2382
2384
  items.push({ value: value2, label, forceMount, children: content });
2383
2385
  }
2384
2386
  });
2385
- const listRef = (0, import_react12.useRef)(null);
2386
- const rootRef = (0, import_react12.useRef)(null);
2387
- const hasOverflowRef = (0, import_react12.useRef)(false);
2388
- const [hasOverflow, setHasOverflow] = (0, import_react12.useState)(false);
2387
+ const listRef = (0, import_react13.useRef)(null);
2388
+ const rootRef = (0, import_react13.useRef)(null);
2389
+ const hasOverflowRef = (0, import_react13.useRef)(false);
2390
+ const [hasOverflow, setHasOverflow] = (0, import_react13.useState)(false);
2389
2391
  const checkOverflow = () => {
2390
2392
  const listEl = listRef.current;
2391
2393
  const rootEl = rootRef.current;
@@ -2400,7 +2402,7 @@ var Tabs2 = ({ defaultValue, colorContent, children, value, onValueChange }) =>
2400
2402
  setHasOverflow(overflow);
2401
2403
  }
2402
2404
  };
2403
- (0, import_react12.useLayoutEffect)(() => {
2405
+ (0, import_react13.useLayoutEffect)(() => {
2404
2406
  checkOverflow();
2405
2407
  const resizeObserver = new ResizeObserver(checkOverflow);
2406
2408
  if (listRef.current) {
@@ -2429,7 +2431,7 @@ var Tabs2 = ({ defaultValue, colorContent, children, value, onValueChange }) =>
2429
2431
  value,
2430
2432
  onValueChange,
2431
2433
  children: [
2432
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
2434
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px", padding: `${hasOverflow ? "0 1rem" : ""}` }, children: [
2433
2435
  hasOverflow && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2434
2436
  Button,
2435
2437
  {
@@ -2482,7 +2484,7 @@ var Tabs2 = ({ defaultValue, colorContent, children, value, onValueChange }) =>
2482
2484
  Tabs2.Item = TabsItem;
2483
2485
 
2484
2486
  // src/components/TextArea.tsx
2485
- var import_react13 = require("react");
2487
+ var import_react14 = require("react");
2486
2488
  var import_jsx_runtime31 = require("react/jsx-runtime");
2487
2489
  var Wrapper4 = styled("div", {
2488
2490
  display: "flex",
@@ -2589,11 +2591,11 @@ var CharCounter2 = styled(Span5, {
2589
2591
  }
2590
2592
  }
2591
2593
  });
2592
- var TextArea = (0, import_react13.forwardRef)(
2594
+ var TextArea = (0, import_react14.forwardRef)(
2593
2595
  ({ label, id, htmlFor, errorMessage, maxLength, showCounter = false, ...props }, ref) => {
2594
2596
  const textAreaId = id || htmlFor || `textarea-${crypto.randomUUID()}`;
2595
- const [charCount, setCharCount] = (0, import_react13.useState)(props.value?.toString().length || 0);
2596
- (0, import_react13.useEffect)(() => {
2597
+ const [charCount, setCharCount] = (0, import_react14.useState)(props.value?.toString().length || 0);
2598
+ (0, import_react14.useEffect)(() => {
2597
2599
  setCharCount(props.value?.toString().length || 0);
2598
2600
  }, [props.value]);
2599
2601
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Wrapper4, { children: [
@@ -2679,7 +2681,7 @@ var TooltipArrow = styled(RadixTooltip.Arrow, {
2679
2681
  });
2680
2682
 
2681
2683
  // src/components/Tooltip/index.tsx
2682
- var import_react14 = require("react");
2684
+ var import_react15 = require("react");
2683
2685
  var import_jsx_runtime32 = require("react/jsx-runtime");
2684
2686
  var Tooltip = ({
2685
2687
  content,
@@ -2690,9 +2692,9 @@ var Tooltip = ({
2690
2692
  onOpenChange,
2691
2693
  delayDuration = 100
2692
2694
  }) => {
2693
- const [uncontrolledOpen, setUncontrolledOpen] = (0, import_react14.useState)(false);
2694
- const [isTouchDevice, setIsTouchDevice] = (0, import_react14.useState)(false);
2695
- (0, import_react14.useEffect)(() => {
2695
+ const [uncontrolledOpen, setUncontrolledOpen] = (0, import_react15.useState)(false);
2696
+ const [isTouchDevice, setIsTouchDevice] = (0, import_react15.useState)(false);
2697
+ (0, import_react15.useEffect)(() => {
2696
2698
  setIsTouchDevice("ontouchstart" in window || navigator.maxTouchPoints > 0);
2697
2699
  }, []);
2698
2700
  const open = controlledOpen ?? uncontrolledOpen;
@@ -2798,7 +2800,7 @@ var Loader = ({ show, fullscreen = false }) => {
2798
2800
  Loader.displayName = "Loader";
2799
2801
 
2800
2802
  // src/components/MaskedInput/index.tsx
2801
- var import_react15 = require("react");
2803
+ var import_react16 = require("react");
2802
2804
 
2803
2805
  // src/components/MaskedInput/utils.ts
2804
2806
  var MAX_LENGTHS = {
@@ -2863,10 +2865,10 @@ var applyMask = (value, maskType) => {
2863
2865
 
2864
2866
  // src/components/MaskedInput/index.tsx
2865
2867
  var import_jsx_runtime34 = require("react/jsx-runtime");
2866
- var MaskedInput = (0, import_react15.forwardRef)(
2868
+ var MaskedInput = (0, import_react16.forwardRef)(
2867
2869
  ({ maskType, onChange, ...props }, ref) => {
2868
- const [value, setValue] = (0, import_react15.useState)("");
2869
- const inputRef = (0, import_react15.useRef)(null);
2870
+ const [value, setValue] = (0, import_react16.useState)("");
2871
+ const inputRef = (0, import_react16.useRef)(null);
2870
2872
  const handleChange = (e) => {
2871
2873
  const { value: inputValue, selectionStart } = e.target;
2872
2874
  const isBackspace = value.length > inputValue.length;
@@ -2914,7 +2916,7 @@ var MaskedInput = (0, import_react15.forwardRef)(
2914
2916
  MaskedInput.displayName = "MaskedInput";
2915
2917
 
2916
2918
  // src/components/Dropdown/index.tsx
2917
- var import_react16 = __toESM(require("react"));
2919
+ var import_react17 = __toESM(require("react"));
2918
2920
  var DropdownMenu2 = __toESM(require("@radix-ui/react-dropdown-menu"));
2919
2921
 
2920
2922
  // src/components/Dropdown/styles.ts
@@ -3002,17 +3004,17 @@ var IconButton = styled("button", {
3002
3004
  // src/components/Dropdown/index.tsx
3003
3005
  var import_jsx_runtime35 = require("react/jsx-runtime");
3004
3006
  var Dropdown = ({ children }) => {
3005
- const childrenArray = import_react16.Children.toArray(children);
3007
+ const childrenArray = import_react17.Children.toArray(children);
3006
3008
  return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(DropdownMenu2.Root, { modal: false, children: [
3007
3009
  /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Button, { variant: "secondary", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon, { name: "Dots", size: 16 }) }) }),
3008
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenu2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StyledContent2, { sideOffset: 5, align: "end", children: childrenArray.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react16.Fragment, { children: [
3010
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenu2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StyledContent2, { sideOffset: 5, align: "end", children: childrenArray.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react17.Fragment, { children: [
3009
3011
  child,
3010
3012
  index < childrenArray.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownSeparator, {})
3011
3013
  ] }, index)) }) })
3012
3014
  ] });
3013
3015
  };
3014
3016
  var DropdownSeparator = StyledSeparator;
3015
- var DropdownItem = import_react16.default.forwardRef(({ children, ...props }, forwardedRef) => {
3017
+ var DropdownItem = import_react17.default.forwardRef(({ children, ...props }, forwardedRef) => {
3016
3018
  return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StyledItem2, { ...props, ref: forwardedRef, children });
3017
3019
  });
3018
3020
  Dropdown.displayName = "Dropdown";
@@ -3094,7 +3096,7 @@ var Paragraph = (props) => {
3094
3096
  Paragraph.displayName = "Paragraph";
3095
3097
 
3096
3098
  // src/components/Heading.tsx
3097
- var import_react17 = require("react");
3099
+ var import_react18 = require("react");
3098
3100
  var import_jsx_runtime38 = require("react/jsx-runtime");
3099
3101
  var StyledHeading = styled("h2", {
3100
3102
  fontFamily: "$default",
@@ -3126,7 +3128,7 @@ var StyledHeading = styled("h2", {
3126
3128
  size: "md"
3127
3129
  }
3128
3130
  });
3129
- var Heading = (0, import_react17.forwardRef)(
3131
+ var Heading = (0, import_react18.forwardRef)(
3130
3132
  function Heading2({ children, bold = false, ...props }, ref) {
3131
3133
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StyledHeading, { ref, bold, ...props, children });
3132
3134
  }
@@ -3136,7 +3138,7 @@ Heading.displayName = "Heading";
3136
3138
  // src/components/Select/index.tsx
3137
3139
  var import_react_icons2 = require("@radix-ui/react-icons");
3138
3140
  var CustomSelect2 = __toESM(require("@radix-ui/react-select"));
3139
- var import_react18 = require("react");
3141
+ var import_react19 = require("react");
3140
3142
 
3141
3143
  // src/components/Select/styles.ts
3142
3144
  var Select = __toESM(require("@radix-ui/react-select"));
@@ -3269,7 +3271,7 @@ var Span6 = styled("span", {
3269
3271
 
3270
3272
  // src/components/Select/index.tsx
3271
3273
  var import_jsx_runtime39 = require("react/jsx-runtime");
3272
- var Select2 = (0, import_react18.forwardRef)(
3274
+ var Select2 = (0, import_react19.forwardRef)(
3273
3275
  ({
3274
3276
  value,
3275
3277
  onValueChange,
@@ -3282,7 +3284,7 @@ var Select2 = (0, import_react18.forwardRef)(
3282
3284
  style,
3283
3285
  ...rest
3284
3286
  }, ref) => {
3285
- const [open, setOpen] = (0, import_react18.useState)(false);
3287
+ const [open, setOpen] = (0, import_react19.useState)(false);
3286
3288
  return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(StyledWrapper4, { css: css2, className, style, children: [
3287
3289
  label && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Label3, { children: label }),
3288
3290
  /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
@@ -3312,7 +3314,7 @@ var Select2 = (0, import_react18.forwardRef)(
3312
3314
  Select2.displayName = "Select";
3313
3315
 
3314
3316
  // src/components/LabelledValue/index.tsx
3315
- var import_react19 = require("react");
3317
+ var import_react20 = require("react");
3316
3318
 
3317
3319
  // src/components/LabelledValue/styles.ts
3318
3320
  var Container = styled("div", {
@@ -3383,9 +3385,9 @@ var Value2 = styled("div", {
3383
3385
  // src/components/LabelledValue/index.tsx
3384
3386
  var import_jsx_runtime40 = require("react/jsx-runtime");
3385
3387
  function LabelledValue({ position = "vertical", withRow = false, children }) {
3386
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Container, { position, children: import_react19.Children.map(children, (child) => {
3387
- if ((0, import_react19.isValidElement)(child)) {
3388
- return (0, import_react19.cloneElement)(child, { position, withRow });
3388
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Container, { position, children: import_react20.Children.map(children, (child) => {
3389
+ if ((0, import_react20.isValidElement)(child)) {
3390
+ return (0, import_react20.cloneElement)(child, { position, withRow });
3389
3391
  }
3390
3392
  return child;
3391
3393
  }) });
@@ -3981,7 +3983,7 @@ var MultiStep = ({
3981
3983
  MultiStep.displayName = "MultiStep";
3982
3984
 
3983
3985
  // src/components/Carousel/index.tsx
3984
- var import_react20 = require("react");
3986
+ var import_react21 = require("react");
3985
3987
 
3986
3988
  // src/components/Carousel/styles.ts
3987
3989
  var CarouselContainer = styled("div", {
@@ -4045,7 +4047,20 @@ var Navigation = styled("h3", {
4045
4047
  var CarouselContent = styled("div", {
4046
4048
  width: "100%",
4047
4049
  overflow: "hidden",
4048
- position: "relative"
4050
+ position: "relative",
4051
+ variants: {
4052
+ variant: {
4053
+ gray: {
4054
+ color: "$black"
4055
+ },
4056
+ purple: {
4057
+ color: "$white",
4058
+ "& *": {
4059
+ color: "$white"
4060
+ }
4061
+ }
4062
+ }
4063
+ }
4049
4064
  });
4050
4065
  var DotsContainer = styled("div", {
4051
4066
  display: "flex",
@@ -4091,17 +4106,18 @@ var Ellipsis = styled("span", {
4091
4106
  alignItems: "center"
4092
4107
  });
4093
4108
  var CarouselItemContainer = styled("div", {
4094
- width: "100%"
4109
+ width: "100%",
4110
+ color: "inherit"
4095
4111
  });
4096
4112
 
4097
4113
  // src/components/Carousel/index.tsx
4098
4114
  var import_jsx_runtime44 = require("react/jsx-runtime");
4099
4115
  var SWIPE_THRESHOLD = 50;
4100
4116
  var Carousel = ({ title, variant, children }) => {
4101
- const items = import_react20.Children.toArray(children);
4102
- const [activeIndex, setActiveIndex] = (0, import_react20.useState)(0);
4103
- const [touchStartX, setTouchStartX] = (0, import_react20.useState)(null);
4104
- const [touchEndX, setTouchEndX] = (0, import_react20.useState)(null);
4117
+ const items = import_react21.Children.toArray(children);
4118
+ const [activeIndex, setActiveIndex] = (0, import_react21.useState)(0);
4119
+ const [touchStartX, setTouchStartX] = (0, import_react21.useState)(null);
4120
+ const [touchEndX, setTouchEndX] = (0, import_react21.useState)(null);
4105
4121
  const prev = () => {
4106
4122
  setActiveIndex((prevIndex) => prevIndex === 0 ? items.length - 1 : prevIndex - 1);
4107
4123
  };
@@ -4130,7 +4146,7 @@ var Carousel = ({ title, variant, children }) => {
4130
4146
  setTouchEndX(null);
4131
4147
  };
4132
4148
  const activeItem = items[activeIndex];
4133
- const itemTitle = activeItem.props.title;
4149
+ const itemTitle = activeItem?.props?.title;
4134
4150
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
4135
4151
  CarouselContainer,
4136
4152
  {
@@ -4140,8 +4156,8 @@ var Carousel = ({ title, variant, children }) => {
4140
4156
  children: [
4141
4157
  /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Wrapper6, { variant, children: [
4142
4158
  /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(CarouselHeader, { children: [
4143
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Title2, { children: itemTitle ?? title }),
4144
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Navigation, { children: [
4159
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Title2, { variant, children: itemTitle ?? title }),
4160
+ items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Navigation, { children: [
4145
4161
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4146
4162
  Button,
4147
4163
  {
@@ -4158,7 +4174,7 @@ var Carousel = ({ title, variant, children }) => {
4158
4174
  {
4159
4175
  size: "sm",
4160
4176
  variant: "secondary",
4161
- "aria-label": "Previous Slide",
4177
+ "aria-label": "Next Slide",
4162
4178
  onClick: next,
4163
4179
  tabIndex: 0,
4164
4180
  children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon, { name: "TriangleRight", size: 16, color: variant === "purple" ? "white" : "black" })
@@ -4175,8 +4191,9 @@ var Carousel = ({ title, variant, children }) => {
4175
4191
  onTouchStart,
4176
4192
  onTouchMove,
4177
4193
  onTouchEnd,
4194
+ variant,
4178
4195
  children: items.map(
4179
- (child, index) => (0, import_react20.cloneElement)(child, {
4196
+ (child, index) => (0, import_react21.cloneElement)(child, {
4180
4197
  "aria-hidden": index !== activeIndex,
4181
4198
  style: {
4182
4199
  display: index === activeIndex ? "block" : "none"
@@ -4187,7 +4204,7 @@ var Carousel = ({ title, variant, children }) => {
4187
4204
  )
4188
4205
  ] }),
4189
4206
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Spacing, { size: "md" }),
4190
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DotsContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Dots2, { role: "tablist", "aria-label": "Carousel Pagination", children: getPaginationItems(items.length, activeIndex).map(
4207
+ items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DotsContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Dots2, { role: "tablist", "aria-label": "Carousel Pagination", children: getPaginationItems(items.length, activeIndex).map(
4191
4208
  (page, index) => typeof page === "number" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4192
4209
  DotButton,
4193
4210
  {
@@ -4221,7 +4238,7 @@ var CarouselItem = ({ children, style, title, ...props }) => /* @__PURE__ */ (0,
4221
4238
  Carousel.Item = CarouselItem;
4222
4239
 
4223
4240
  // src/components/PasswordInput.tsx
4224
- var import_react21 = require("react");
4241
+ var import_react22 = require("react");
4225
4242
  var import_jsx_runtime45 = require("react/jsx-runtime");
4226
4243
  var ToggleButton = styled("button", {
4227
4244
  all: "unset",
@@ -4237,11 +4254,11 @@ var ToggleButton = styled("button", {
4237
4254
  borderRadius: "$sm"
4238
4255
  }
4239
4256
  });
4240
- var PasswordInput = (0, import_react21.forwardRef)(
4257
+ var PasswordInput = (0, import_react22.forwardRef)(
4241
4258
  ({ value, onChange, ...props }, ref) => {
4242
- const [visible, setVisible] = (0, import_react21.useState)(false);
4243
- const innerRef = (0, import_react21.useRef)(null);
4244
- (0, import_react21.useImperativeHandle)(ref, () => innerRef.current);
4259
+ const [visible, setVisible] = (0, import_react22.useState)(false);
4260
+ const innerRef = (0, import_react22.useRef)(null);
4261
+ (0, import_react22.useImperativeHandle)(ref, () => innerRef.current);
4245
4262
  const handleToggleVisibility = () => {
4246
4263
  setVisible((v) => !v);
4247
4264
  setTimeout(() => {
@@ -4277,7 +4294,7 @@ PasswordInput.displayName = "PasswordInput";
4277
4294
 
4278
4295
  // src/components/Accordion/index.tsx
4279
4296
  var RadixAccordion = __toESM(require("@radix-ui/react-accordion"));
4280
- var import_react22 = __toESM(require("react"));
4297
+ var import_react23 = __toESM(require("react"));
4281
4298
 
4282
4299
  // src/components/Accordion/styles.ts
4283
4300
  var Accordion = __toESM(require("@radix-ui/react-accordion"));
@@ -4364,7 +4381,7 @@ var OptionsButton = styled(Button, {
4364
4381
 
4365
4382
  // src/components/Accordion/index.tsx
4366
4383
  var import_jsx_runtime46 = require("react/jsx-runtime");
4367
- var Accordion2 = import_react22.default.forwardRef(
4384
+ var Accordion2 = import_react23.default.forwardRef(
4368
4385
  ({ title, children, dropdownItems }, ref) => {
4369
4386
  return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(AccordionContainer, { type: "single", collapsible: true, ref, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(AccordionItem, { value: "item-1", children: [
4370
4387
  /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(AccordionHeader, { children: [
package/dist/index.mjs CHANGED
@@ -356,6 +356,9 @@ var Button = forwardRef(function Button2({ children, ...props }, ref) {
356
356
  });
357
357
  Button.displayName = "Button";
358
358
 
359
+ // src/components/Icon/index.tsx
360
+ import { forwardRef as forwardRef2 } from "react";
361
+
359
362
  // src/components/Icon/icons.ts
360
363
  import {
361
364
  TriangleDownIcon as TriangleDown,
@@ -672,8 +675,8 @@ var Download = (props) => /* @__PURE__ */ jsx16(
672
675
  {
673
676
  d: "M7.50005 1.04999C7.74858 1.04999 7.95005 1.25146 7.95005 1.49999V8.41359L10.1819 6.18179C10.3576 6.00605 10.6425 6.00605 10.8182 6.18179C10.994 6.35753 10.994 6.64245 10.8182 6.81819L7.81825 9.81819C7.64251 9.99392 7.35759 9.99392 7.18185 9.81819L4.18185 6.81819C4.00611 6.64245 4.00611 6.35753 4.18185 6.18179C4.35759 6.00605 4.64251 6.00605 4.81825 6.18179L7.05005 8.41359V1.49999C7.05005 1.25146 7.25152 1.04999 7.50005 1.04999ZM2.5 10C2.77614 10 3 10.2239 3 10.5V12C3 12.5539 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2239 12.2239 10 12.5 10C12.7761 10 13 10.2239 13 10.5V12C13 13.1041 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2239 2.22386 10 2.5 10Z",
674
677
  fill: "currentColor",
675
- "fill-rule": "evenodd",
676
- "clip-rule": "evenodd"
678
+ fillRule: "evenodd",
679
+ clipRule: "evenodd"
677
680
  }
678
681
  )
679
682
  }
@@ -712,24 +715,27 @@ var colorMap = {
712
715
  green: "#78CB63",
713
716
  white: "#ffffff"
714
717
  };
715
- function Icon({ name, size = 24, color = "black", ...rest }) {
716
- const IconComponent = iconMap[name];
717
- if (!IconComponent) {
718
- console.warn(`Icon "${name}" not found in iconMap`);
719
- return null;
720
- }
721
- const fillColor = colorMap[color];
722
- return /* @__PURE__ */ jsx17(
723
- IconComponent,
724
- {
725
- width: size,
726
- height: size,
727
- style: { color: fillColor },
728
- "aria-hidden": true,
729
- ...rest
718
+ var Icon = forwardRef2(
719
+ ({ name, size = 24, color = "black", ...rest }, ref) => {
720
+ const IconComponent = iconMap[name];
721
+ if (!IconComponent) {
722
+ console.warn(`Icon "${name}" not found in iconMap`);
723
+ return null;
730
724
  }
731
- );
732
- }
725
+ const fillColor = colorMap[color];
726
+ return /* @__PURE__ */ jsx17(
727
+ IconComponent,
728
+ {
729
+ ref,
730
+ width: size,
731
+ height: size,
732
+ style: { color: fillColor },
733
+ "aria-hidden": true,
734
+ ...rest
735
+ }
736
+ );
737
+ }
738
+ );
733
739
  Icon.displayName = "Icon";
734
740
 
735
741
  // src/components/Calendar/styles.ts
@@ -998,7 +1004,7 @@ var Calendar2 = ({ label, onChange }) => {
998
1004
  };
999
1005
 
1000
1006
  // src/components/Checkbox/index.tsx
1001
- import { forwardRef as forwardRef2 } from "react";
1007
+ import { forwardRef as forwardRef3 } from "react";
1002
1008
 
1003
1009
  // src/components/Checkbox/styles.ts
1004
1010
  import * as Checkbox from "@radix-ui/react-checkbox";
@@ -1115,7 +1121,7 @@ var Span = styled("span", {
1115
1121
 
1116
1122
  // src/components/Checkbox/index.tsx
1117
1123
  import { jsx as jsx19, jsxs as jsxs3 } from "react/jsx-runtime";
1118
- var Checkbox2 = forwardRef2(
1124
+ var Checkbox2 = forwardRef3(
1119
1125
  ({ label, checked, onCheckedChange, errorMessage, ...rest }, ref) => {
1120
1126
  return /* @__PURE__ */ jsxs3("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: [
1121
1127
  /* @__PURE__ */ jsxs3(StyledWrapper, { hasError: !!errorMessage, children: [
@@ -1141,12 +1147,12 @@ Checkbox2.displayName = "Checkbox";
1141
1147
  // src/components/Datepicker/index.tsx
1142
1148
  import { format as format2 } from "date-fns";
1143
1149
  import { ptBR as ptBR2 } from "date-fns/locale";
1144
- import { forwardRef as forwardRef4, useEffect as useEffect4, useImperativeHandle, useRef as useRef4, useState as useState4 } from "react";
1150
+ import { forwardRef as forwardRef5, useEffect as useEffect4, useImperativeHandle, useRef as useRef4, useState as useState4 } from "react";
1145
1151
  import { DayPicker as DayPicker2 } from "react-day-picker";
1146
1152
  import "react-day-picker/dist/style.css";
1147
1153
 
1148
1154
  // src/components/Input/index.tsx
1149
- import React, { forwardRef as forwardRef3, useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "react";
1155
+ import React, { forwardRef as forwardRef4, useRef as useRef2 } from "react";
1150
1156
 
1151
1157
  // src/components/Input/styles.ts
1152
1158
  var StyledWrapper2 = styled("div", {
@@ -1285,7 +1291,7 @@ var CharCounter = styled(Span2, {
1285
1291
 
1286
1292
  // src/components/Input/index.tsx
1287
1293
  import { jsx as jsx20, jsxs as jsxs4 } from "react/jsx-runtime";
1288
- var Input2 = forwardRef3(
1294
+ var Input2 = forwardRef4(
1289
1295
  ({ prefix, suffix, label, maxLength, showCounter = false, errorMessage, noMargin = false, redBorder, ...props }, forwardedRef) => {
1290
1296
  const getDisplayValue = (value) => {
1291
1297
  const stringValue = String(value || "");
@@ -1294,19 +1300,15 @@ var Input2 = forwardRef3(
1294
1300
  }
1295
1301
  return stringValue;
1296
1302
  };
1297
- const [displayValue, setDisplayValue] = useState2(getDisplayValue(props.value));
1298
- const [charCount, setCharCount] = useState2(getDisplayValue(props.value).length);
1299
1303
  const localInputRef = useRef2(null);
1300
1304
  const inputRef = forwardedRef || localInputRef;
1301
- useEffect2(() => {
1302
- const newDisplayValue = getDisplayValue(props.value);
1303
- if (newDisplayValue !== displayValue) {
1304
- setDisplayValue(newDisplayValue);
1305
- setCharCount(newDisplayValue.length);
1306
- }
1307
- }, [props.value, prefix, displayValue]);
1305
+ const displayValue = getDisplayValue(props.value);
1306
+ const charCount = displayValue.length;
1308
1307
  const handleChange = (e) => {
1309
- let currentDisplayValue = getDisplayValue(e.target.value);
1308
+ let currentDisplayValue = e.target.value;
1309
+ if (prefix && currentDisplayValue.startsWith(prefix)) {
1310
+ currentDisplayValue = currentDisplayValue.substring(prefix.length);
1311
+ }
1310
1312
  if (props.type === "number") {
1311
1313
  currentDisplayValue = currentDisplayValue.replace(/[^0-9]/g, "");
1312
1314
  }
@@ -1678,7 +1680,7 @@ var datePickerStyles = globalCss({
1678
1680
  import { jsx as jsx23, jsxs as jsxs6 } from "react/jsx-runtime";
1679
1681
  datePickerStyles();
1680
1682
  var oneYearMore = new Date((/* @__PURE__ */ new Date()).getFullYear() + 1, 11);
1681
- var Datepicker = forwardRef4(({ label, placeholder, value, onChange, errorMessage, endDate = oneYearMore }, ref) => {
1683
+ var Datepicker = forwardRef5(({ label, placeholder, value, onChange, errorMessage, endDate = oneYearMore }, ref) => {
1682
1684
  const [selected, setSelected] = useState4(void 0);
1683
1685
  const [month, setMonth] = useState4(/* @__PURE__ */ new Date());
1684
1686
  const [open, setOpen] = useState4(false);
@@ -1763,7 +1765,7 @@ var Datepicker = forwardRef4(({ label, placeholder, value, onChange, errorMessag
1763
1765
  Datepicker.displayName = "Datepicker";
1764
1766
 
1765
1767
  // src/components/Hr.tsx
1766
- import { forwardRef as forwardRef5 } from "react";
1768
+ import { forwardRef as forwardRef6 } from "react";
1767
1769
  import { jsx as jsx24 } from "react/jsx-runtime";
1768
1770
  var StyledHr = styled("hr", {
1769
1771
  border: "none",
@@ -1780,7 +1782,7 @@ var StyledHr = styled("hr", {
1780
1782
  }
1781
1783
  }
1782
1784
  });
1783
- var Hr = forwardRef5(function Hr2({ children, ...props }, ref) {
1785
+ var Hr = forwardRef6(function Hr2({ children, ...props }, ref) {
1784
1786
  return /* @__PURE__ */ jsx24(StyledHr, { ref, ...props, children });
1785
1787
  });
1786
1788
  Hr.displayName = "Hr";
@@ -1936,7 +1938,7 @@ var ProgressBar = ({ label, value = 0, max = 100, ...rest }) => {
1936
1938
  ProgressBar.displayName = "ProgressBar";
1937
1939
 
1938
1940
  // src/components/Radio/index.tsx
1939
- import { forwardRef as forwardRef6 } from "react";
1941
+ import { forwardRef as forwardRef7 } from "react";
1940
1942
 
1941
1943
  // src/components/Radio/styles.ts
1942
1944
  import * as RadioGroup from "@radix-ui/react-radio-group";
@@ -2031,7 +2033,7 @@ var Span3 = styled("span", {
2031
2033
 
2032
2034
  // src/components/Radio/index.tsx
2033
2035
  import { jsx as jsx27, jsxs as jsxs9 } from "react/jsx-runtime";
2034
- var Radio = forwardRef6(({
2036
+ var Radio = forwardRef7(({
2035
2037
  labels,
2036
2038
  value,
2037
2039
  onChange,
@@ -2087,7 +2089,7 @@ var Spacing = ({ size, axis = "vertical" }) => {
2087
2089
  };
2088
2090
 
2089
2091
  // src/components/Switch/index.tsx
2090
- import { forwardRef as forwardRef7 } from "react";
2092
+ import { forwardRef as forwardRef8 } from "react";
2091
2093
 
2092
2094
  // src/components/Switch/styles.ts
2093
2095
  import * as Switch from "@radix-ui/react-switch";
@@ -2185,7 +2187,7 @@ var Span4 = styled("span", {
2185
2187
 
2186
2188
  // src/components/Switch/index.tsx
2187
2189
  import { jsx as jsx29, jsxs as jsxs10 } from "react/jsx-runtime";
2188
- var Switch2 = forwardRef7(({
2190
+ var Switch2 = forwardRef8(({
2189
2191
  label,
2190
2192
  checked,
2191
2193
  defaultChecked,
@@ -2359,7 +2361,7 @@ var Tabs2 = ({ defaultValue, colorContent, children, value, onValueChange }) =>
2359
2361
  value,
2360
2362
  onValueChange,
2361
2363
  children: [
2362
- /* @__PURE__ */ jsxs11("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
2364
+ /* @__PURE__ */ jsxs11("div", { style: { display: "flex", alignItems: "center", gap: "8px", padding: `${hasOverflow ? "0 1rem" : ""}` }, children: [
2363
2365
  hasOverflow && /* @__PURE__ */ jsx30(
2364
2366
  Button,
2365
2367
  {
@@ -2412,7 +2414,7 @@ var Tabs2 = ({ defaultValue, colorContent, children, value, onValueChange }) =>
2412
2414
  Tabs2.Item = TabsItem;
2413
2415
 
2414
2416
  // src/components/TextArea.tsx
2415
- import { forwardRef as forwardRef8, useEffect as useEffect6, useState as useState7 } from "react";
2417
+ import { forwardRef as forwardRef9, useEffect as useEffect6, useState as useState7 } from "react";
2416
2418
  import { jsx as jsx31, jsxs as jsxs12 } from "react/jsx-runtime";
2417
2419
  var Wrapper4 = styled("div", {
2418
2420
  display: "flex",
@@ -2519,7 +2521,7 @@ var CharCounter2 = styled(Span5, {
2519
2521
  }
2520
2522
  }
2521
2523
  });
2522
- var TextArea = forwardRef8(
2524
+ var TextArea = forwardRef9(
2523
2525
  ({ label, id, htmlFor, errorMessage, maxLength, showCounter = false, ...props }, ref) => {
2524
2526
  const textAreaId = id || htmlFor || `textarea-${crypto.randomUUID()}`;
2525
2527
  const [charCount, setCharCount] = useState7(props.value?.toString().length || 0);
@@ -2728,7 +2730,7 @@ var Loader = ({ show, fullscreen = false }) => {
2728
2730
  Loader.displayName = "Loader";
2729
2731
 
2730
2732
  // src/components/MaskedInput/index.tsx
2731
- import { forwardRef as forwardRef9, useState as useState9, useRef as useRef6 } from "react";
2733
+ import { forwardRef as forwardRef10, useState as useState9, useRef as useRef6 } from "react";
2732
2734
 
2733
2735
  // src/components/MaskedInput/utils.ts
2734
2736
  var MAX_LENGTHS = {
@@ -2793,7 +2795,7 @@ var applyMask = (value, maskType) => {
2793
2795
 
2794
2796
  // src/components/MaskedInput/index.tsx
2795
2797
  import { jsx as jsx34 } from "react/jsx-runtime";
2796
- var MaskedInput = forwardRef9(
2798
+ var MaskedInput = forwardRef10(
2797
2799
  ({ maskType, onChange, ...props }, ref) => {
2798
2800
  const [value, setValue] = useState9("");
2799
2801
  const inputRef = useRef6(null);
@@ -3024,7 +3026,7 @@ var Paragraph = (props) => {
3024
3026
  Paragraph.displayName = "Paragraph";
3025
3027
 
3026
3028
  // src/components/Heading.tsx
3027
- import { forwardRef as forwardRef10 } from "react";
3029
+ import { forwardRef as forwardRef11 } from "react";
3028
3030
  import { jsx as jsx38 } from "react/jsx-runtime";
3029
3031
  var StyledHeading = styled("h2", {
3030
3032
  fontFamily: "$default",
@@ -3056,7 +3058,7 @@ var StyledHeading = styled("h2", {
3056
3058
  size: "md"
3057
3059
  }
3058
3060
  });
3059
- var Heading = forwardRef10(
3061
+ var Heading = forwardRef11(
3060
3062
  function Heading2({ children, bold = false, ...props }, ref) {
3061
3063
  return /* @__PURE__ */ jsx38(StyledHeading, { ref, bold, ...props, children });
3062
3064
  }
@@ -3066,7 +3068,7 @@ Heading.displayName = "Heading";
3066
3068
  // src/components/Select/index.tsx
3067
3069
  import { TriangleDownIcon, TriangleUpIcon } from "@radix-ui/react-icons";
3068
3070
  import * as CustomSelect2 from "@radix-ui/react-select";
3069
- import { forwardRef as forwardRef11, useState as useState10 } from "react";
3071
+ import { forwardRef as forwardRef12, useState as useState10 } from "react";
3070
3072
 
3071
3073
  // src/components/Select/styles.ts
3072
3074
  import * as Select from "@radix-ui/react-select";
@@ -3199,7 +3201,7 @@ var Span6 = styled("span", {
3199
3201
 
3200
3202
  // src/components/Select/index.tsx
3201
3203
  import { jsx as jsx39, jsxs as jsxs15 } from "react/jsx-runtime";
3202
- var Select2 = forwardRef11(
3204
+ var Select2 = forwardRef12(
3203
3205
  ({
3204
3206
  value,
3205
3207
  onValueChange,
@@ -3979,7 +3981,20 @@ var Navigation = styled("h3", {
3979
3981
  var CarouselContent = styled("div", {
3980
3982
  width: "100%",
3981
3983
  overflow: "hidden",
3982
- position: "relative"
3984
+ position: "relative",
3985
+ variants: {
3986
+ variant: {
3987
+ gray: {
3988
+ color: "$black"
3989
+ },
3990
+ purple: {
3991
+ color: "$white",
3992
+ "& *": {
3993
+ color: "$white"
3994
+ }
3995
+ }
3996
+ }
3997
+ }
3983
3998
  });
3984
3999
  var DotsContainer = styled("div", {
3985
4000
  display: "flex",
@@ -4025,7 +4040,8 @@ var Ellipsis = styled("span", {
4025
4040
  alignItems: "center"
4026
4041
  });
4027
4042
  var CarouselItemContainer = styled("div", {
4028
- width: "100%"
4043
+ width: "100%",
4044
+ color: "inherit"
4029
4045
  });
4030
4046
 
4031
4047
  // src/components/Carousel/index.tsx
@@ -4064,7 +4080,7 @@ var Carousel = ({ title, variant, children }) => {
4064
4080
  setTouchEndX(null);
4065
4081
  };
4066
4082
  const activeItem = items[activeIndex];
4067
- const itemTitle = activeItem.props.title;
4083
+ const itemTitle = activeItem?.props?.title;
4068
4084
  return /* @__PURE__ */ jsxs20(
4069
4085
  CarouselContainer,
4070
4086
  {
@@ -4074,8 +4090,8 @@ var Carousel = ({ title, variant, children }) => {
4074
4090
  children: [
4075
4091
  /* @__PURE__ */ jsxs20(Wrapper6, { variant, children: [
4076
4092
  /* @__PURE__ */ jsxs20(CarouselHeader, { children: [
4077
- /* @__PURE__ */ jsx44(Title2, { children: itemTitle ?? title }),
4078
- /* @__PURE__ */ jsxs20(Navigation, { children: [
4093
+ /* @__PURE__ */ jsx44(Title2, { variant, children: itemTitle ?? title }),
4094
+ items.length > 0 && /* @__PURE__ */ jsxs20(Navigation, { children: [
4079
4095
  /* @__PURE__ */ jsx44(
4080
4096
  Button,
4081
4097
  {
@@ -4092,7 +4108,7 @@ var Carousel = ({ title, variant, children }) => {
4092
4108
  {
4093
4109
  size: "sm",
4094
4110
  variant: "secondary",
4095
- "aria-label": "Previous Slide",
4111
+ "aria-label": "Next Slide",
4096
4112
  onClick: next,
4097
4113
  tabIndex: 0,
4098
4114
  children: /* @__PURE__ */ jsx44(Icon, { name: "TriangleRight", size: 16, color: variant === "purple" ? "white" : "black" })
@@ -4109,6 +4125,7 @@ var Carousel = ({ title, variant, children }) => {
4109
4125
  onTouchStart,
4110
4126
  onTouchMove,
4111
4127
  onTouchEnd,
4128
+ variant,
4112
4129
  children: items.map(
4113
4130
  (child, index) => cloneElement2(child, {
4114
4131
  "aria-hidden": index !== activeIndex,
@@ -4121,7 +4138,7 @@ var Carousel = ({ title, variant, children }) => {
4121
4138
  )
4122
4139
  ] }),
4123
4140
  /* @__PURE__ */ jsx44(Spacing, { size: "md" }),
4124
- /* @__PURE__ */ jsx44(DotsContainer, { children: /* @__PURE__ */ jsx44(Dots2, { role: "tablist", "aria-label": "Carousel Pagination", children: getPaginationItems(items.length, activeIndex).map(
4141
+ items.length > 0 && /* @__PURE__ */ jsx44(DotsContainer, { children: /* @__PURE__ */ jsx44(Dots2, { role: "tablist", "aria-label": "Carousel Pagination", children: getPaginationItems(items.length, activeIndex).map(
4125
4142
  (page, index) => typeof page === "number" ? /* @__PURE__ */ jsx44(
4126
4143
  DotButton,
4127
4144
  {
@@ -4155,7 +4172,7 @@ var CarouselItem = ({ children, style, title, ...props }) => /* @__PURE__ */ jsx
4155
4172
  Carousel.Item = CarouselItem;
4156
4173
 
4157
4174
  // src/components/PasswordInput.tsx
4158
- import { forwardRef as forwardRef12, useImperativeHandle as useImperativeHandle2, useRef as useRef7, useState as useState13 } from "react";
4175
+ import { forwardRef as forwardRef13, useImperativeHandle as useImperativeHandle2, useRef as useRef7, useState as useState13 } from "react";
4159
4176
  import { jsx as jsx45 } from "react/jsx-runtime";
4160
4177
  var ToggleButton = styled("button", {
4161
4178
  all: "unset",
@@ -4171,7 +4188,7 @@ var ToggleButton = styled("button", {
4171
4188
  borderRadius: "$sm"
4172
4189
  }
4173
4190
  });
4174
- var PasswordInput = forwardRef12(
4191
+ var PasswordInput = forwardRef13(
4175
4192
  ({ value, onChange, ...props }, ref) => {
4176
4193
  const [visible, setVisible] = useState13(false);
4177
4194
  const innerRef = useRef7(null);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Design System da Clikpalm",
4
4
  "author": "Enisson Shilo",
5
5
  "license": "MIT",
6
- "version": "1.3.11",
6
+ "version": "1.3.13",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/clickpalm/clickpalm-designsystem-lib.git"