@yr3/ui 1.0.17 → 1.0.19

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
@@ -49,8 +49,10 @@ __export(index_exports, {
49
49
  Flex: () => Flex,
50
50
  Grid: () => Grid,
51
51
  Group: () => Group,
52
+ IconCalendar: () => IconCalendar,
52
53
  IconClose: () => IconClose,
53
54
  IconDown: () => IconDown,
55
+ IconLeft: () => IconLeft,
54
56
  IconSearch: () => IconSearch,
55
57
  Image: () => Image,
56
58
  ImageDropzone: () => ImageDropzone,
@@ -60,6 +62,7 @@ __export(index_exports, {
60
62
  Loader: () => Loader,
61
63
  Modal: () => Modal,
62
64
  ModalContainer: () => ModalContainer,
65
+ MonthSelector: () => MonthSelector,
63
66
  Notistack: () => Notistack,
64
67
  NotistackContext: () => NotistackContext,
65
68
  NotistackProvider: () => NotistackProvider,
@@ -68,6 +71,7 @@ __export(index_exports, {
68
71
  PlacesAutocomplete: () => PlacesAutocomplete,
69
72
  Radio: () => Radio,
70
73
  Select: () => Select,
74
+ Selector: () => Selector,
71
75
  Slide: () => Slide,
72
76
  Switch: () => Switch,
73
77
  Text: () => Text,
@@ -92,6 +96,7 @@ __export(index_exports, {
92
96
  getCountryCodePhone: () => getCountryCodePhone,
93
97
  getDialPhone: () => getDialPhone,
94
98
  getMonthCalendar: () => getMonthCalendar,
99
+ getMonthCalendarProps: () => getMonthCalendarProps,
95
100
  getNumberPhone: () => getNumberPhone,
96
101
  hexToRgb: () => hexToRgb,
97
102
  initTheme: () => initTheme,
@@ -220,6 +225,20 @@ function getMonthCalendar(year, month, startIndex, selected, props) {
220
225
  currentDay: dayCurrent
221
226
  };
222
227
  }
228
+ function getMonthCalendarProps({ year, years, month, formatMonth, monthsDisabled }) {
229
+ const startIndex = (0, import_dayjs.default)().year(year).month().valueOf();
230
+ return {
231
+ month: (0, import_dayjs.default)().set("m", month).format(formatMonth || "MMM"),
232
+ year,
233
+ startIndex,
234
+ years,
235
+ months: Array.from({ length: 12 }, (_, i) => ({
236
+ label: (0, import_dayjs.default)().month(i).format(formatMonth || "MMM"),
237
+ value: (0, import_dayjs.default)().month(i).format("MM"),
238
+ disabled: (0, import_dayjs.default)().year(year).month(i).isAfter((0, import_dayjs.default)(), "month") || monthsDisabled && monthsDisabled.includes(i)
239
+ }))
240
+ };
241
+ }
223
242
 
224
243
  // src/utils/color.ts
225
244
  var rgbToHex = (r, g, b) => {
@@ -1500,151 +1519,527 @@ var Drawer = ({ open, anchor = null, onClose, children, propsComponent }) => {
1500
1519
  );
1501
1520
  };
1502
1521
 
1503
- // src/components/Fade/Fade.tsx
1522
+ // src/components/Input/Input.tsx
1504
1523
  var React9 = __toESM(require("react"), 1);
1524
+
1525
+ // src/components/Label/Label.tsx
1505
1526
  var import_jsx_runtime17 = require("react/jsx-runtime");
1506
- var Fade = ({
1507
- in: inProp,
1508
- children,
1509
- duration = 200,
1510
- onTransitionEnd,
1511
- style
1512
- }) => {
1513
- React9.useEffect(() => {
1514
- let timeoutId;
1515
- if (inProp) {
1516
- timeoutId = setTimeout(() => {
1517
- onTransitionEnd && onTransitionEnd();
1518
- }, duration);
1519
- }
1520
- return () => clearTimeout(timeoutId);
1521
- }, [inProp, duration, onTransitionEnd]);
1527
+ var Label = ({ text: text2, children, className, color = "primary", ui, style }) => {
1528
+ const classes = bem("yr3Label");
1529
+ const classComponent = classes(void 0, { color: `color-${color}` });
1530
+ const classnames = bemMerge(classComponent, className);
1522
1531
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1523
- "div",
1532
+ "span",
1524
1533
  {
1525
- className: `yr3Fade ${inProp ? "yr3Fade--in" : ""}`,
1526
- style: { ...style, transitionDuration: `${duration}ms` },
1527
- "data-testid": "yr3Fade",
1528
- children
1534
+ className: classnames,
1535
+ "data-testid": "yr3Label",
1536
+ style: composeStyles(ui, style),
1537
+ children: text2 ? text2 : children
1529
1538
  }
1530
1539
  );
1531
1540
  };
1532
1541
 
1533
- // src/components/Flex/flex.variants.ts
1534
- var flexVariants = createVariants({
1535
- base: "yr3Flex",
1542
+ // src/components/Input/input.variants.ts
1543
+ var inputVariants = createVariants({
1544
+ base: "yr3Input",
1536
1545
  variants: {
1537
1546
  variant: {
1538
- row: "yr3Flex--row",
1539
- column: "yr3Flex--column",
1540
- wrap: "yr3Flex--wrap"
1547
+ filled: "yr3Input--filled",
1548
+ outlined: "yr3Input--outlined",
1549
+ base: "yr3Input--base",
1550
+ lined: "yr3Input--lined"
1541
1551
  },
1542
- container: {
1543
- true: "yr3Flex--container"
1552
+ color: {
1553
+ primary: "yr3Input--color-primary",
1554
+ secondary: "yr3Input--color-secondary",
1555
+ success: "yr3Input--color-success",
1556
+ text: "yr3Input--color-text",
1557
+ disabled: "yr3Input--color-disabled",
1558
+ background: "yr3Input--color-background",
1559
+ error: "yr3Input--color-error",
1560
+ warning: "yr3Input--color-warning",
1561
+ info: "yr3Input--color-info",
1562
+ common: "yr3Input--color-common"
1544
1563
  },
1545
- center: {
1546
- true: "yr3Flex--center"
1564
+ size: {
1565
+ auto: "yr3Input--size-auto",
1566
+ full: "yr3Input--size-full"
1547
1567
  },
1548
- between: {
1549
- true: "yr3Flex--between"
1568
+ rounded: {
1569
+ true: "yr3Input--rounded"
1550
1570
  },
1551
- bordered: {
1552
- true: "yr3Flex--bordered"
1571
+ disabled: {
1572
+ true: "yr3Input--disabled"
1573
+ },
1574
+ animated: {
1575
+ true: "yr3Input--animated"
1576
+ },
1577
+ label: {
1578
+ true: "yr3Input--label"
1553
1579
  }
1554
1580
  }
1555
1581
  });
1556
- var flex_variants_default = flexVariants;
1557
1582
 
1558
- // src/components/Flex/Flex.tsx
1583
+ // src/components/Input/Input.tsx
1559
1584
  var import_jsx_runtime18 = require("react/jsx-runtime");
1560
- var Flex = ({
1561
- container = false,
1562
- spacing: spacing2 = 1,
1563
- children,
1564
- ui,
1565
- gap,
1566
- variant = "column",
1567
- center = false,
1568
- between = false,
1569
- style,
1570
- bordered = false,
1571
- ...props
1572
- }) => {
1573
- const classes = flex_variants_default({ variant, container, center, between, bordered, spacing: spacing2 });
1574
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1575
- "div",
1576
- {
1577
- className: classes,
1578
- style: composeStyles(ui, style),
1579
- ...props,
1580
- "data-testid": "yr3Flex",
1581
- children
1582
- }
1583
- );
1585
+ var initiaPropsComponent = {
1586
+ label: {
1587
+ display: true,
1588
+ ui: {},
1589
+ style: {}
1590
+ },
1591
+ control: {}
1584
1592
  };
1585
-
1586
- // src/components/Grid/Grid.tsx
1587
- var import_jsx_runtime19 = require("react/jsx-runtime");
1588
- var Grid = ({
1589
- container = false,
1590
- spacing: spacing2 = 0,
1591
- children,
1592
- columns = 12,
1593
- span = 1,
1594
- ui,
1595
- style,
1596
- item = false,
1597
- size = 0,
1598
- center = false,
1599
- ...props
1600
- }) => {
1601
- if (item) {
1602
- columns = 0;
1603
- }
1604
- if (container) {
1605
- columns = 0;
1606
- ui = {
1607
- ...ui,
1608
- gridTemplateColumns: `repeat(${columns}, 1fr)`
1593
+ var Input = React9.forwardRef(
1594
+ ({
1595
+ label,
1596
+ value,
1597
+ defaultValue,
1598
+ onChange,
1599
+ variant = "outlined",
1600
+ error = "ce un errore",
1601
+ separatorCurrency = ",",
1602
+ ui,
1603
+ style,
1604
+ propsComponent = initiaPropsComponent,
1605
+ pattern = "text",
1606
+ color = "primary",
1607
+ size = "auto",
1608
+ ...props
1609
+ }, ref) => {
1610
+ const [focused, setFocused] = React9.useState(false);
1611
+ const [internalValue, setInternalValue] = React9.useState(defaultValue);
1612
+ const isControlled = value !== void 0;
1613
+ const currentValue = isControlled ? value : internalValue;
1614
+ const isActive = focused || !!currentValue;
1615
+ const checkPattern = (type, value2) => {
1616
+ switch (type) {
1617
+ case "email":
1618
+ return /^[\w.-]+@[\w.-]+\.\w{2,}$/.test(value2);
1619
+ case "phone":
1620
+ return /^\d{10}$/.test(value2);
1621
+ case "number":
1622
+ return /^\d+$/.test(value2);
1623
+ case "currency":
1624
+ if (separatorCurrency === ",") return /^\d+(\,\d{0,2})?$/.test(value2);
1625
+ if (separatorCurrency === ".") return /^\d+(\.\d{0,2})?$/.test(value2);
1626
+ default:
1627
+ return true;
1628
+ }
1609
1629
  };
1610
- }
1611
- if (center) {
1612
- ui = {
1613
- ...ui,
1614
- justifyContent: "center",
1615
- alignItems: "center"
1630
+ const handleChange = (e) => {
1631
+ const newValue = e.target.value;
1632
+ if (newValue && !checkPattern(pattern, newValue)) return;
1633
+ if (!isControlled) {
1634
+ setInternalValue(newValue);
1635
+ }
1636
+ onChange?.(e, newValue);
1616
1637
  };
1638
+ const classes = inputVariants({ color, label: propsComponent?.label?.display });
1639
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Control, { variant, color, label: propsComponent?.label?.display, ...propsComponent.control, children: [
1640
+ propsComponent?.label?.display && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1641
+ Label,
1642
+ {
1643
+ text: label || "",
1644
+ className: !!isActive ? "yr3Input--active" : "",
1645
+ color,
1646
+ ...propsComponent.label
1647
+ }
1648
+ ),
1649
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1650
+ "input",
1651
+ {
1652
+ ref,
1653
+ value: currentValue,
1654
+ inputMode: pattern === "currency" ? "numeric" : pattern === "phone" ? "tel" : void 0,
1655
+ autoComplete: "off",
1656
+ type: "text",
1657
+ onChange: handleChange,
1658
+ onFocus: () => setFocused(true),
1659
+ onBlur: () => setFocused(false),
1660
+ className: classes,
1661
+ style: composeStyles(ui, style),
1662
+ ...props,
1663
+ "data-testid": "yr3Input"
1664
+ }
1665
+ )
1666
+ ] });
1617
1667
  }
1618
- const classes = bem("yr3Grid");
1619
- const className = classes(void 0, { container, [`spacing-${spacing2}`]: center, span: item && `Col-${size}` });
1620
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1621
- "div",
1668
+ );
1669
+
1670
+ // src/components/Date/MonthSelector.tsx
1671
+ var React10 = __toESM(require("react"), 1);
1672
+
1673
+ // src/Icons/IconSearch.tsx
1674
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1675
+ var IconSearch = (props) => {
1676
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("svg", { width: props.width || "64px", height: props.height || "64px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1677
+ "path",
1622
1678
  {
1623
- className,
1624
- style: composeStyles(ui, style),
1625
- "data-testid": "yr3Grid",
1626
- ...props,
1627
- children
1679
+ d: "M15.7955 15.8111L21 21M18 10.5C18 14.6421 14.6421 18 10.5 18C6.35786 18 3 14.6421 3 10.5C3 6.35786 6.35786 3 10.5 3C14.6421 3 18 6.35786 18 10.5Z",
1680
+ stroke: props.stroke || "#fff",
1681
+ strokeWidth: props.strokeWidth || "1.5",
1682
+ strokeLinecap: "round",
1683
+ strokeLinejoin: "round"
1628
1684
  }
1629
- );
1685
+ ) });
1630
1686
  };
1631
1687
 
1632
- // src/components/Group/Group.tsx
1633
- var React10 = __toESM(require("react"), 1);
1688
+ // src/Icons/IconDown.tsx
1689
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1690
+ var IconDown = (props) => {
1691
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { width: props.width || "64px", height: props.height || "64px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "data-testid": "yr3Icons", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M7 10L12 15L17 10", stroke: props.stroke || "#fff", strokeWidth: props.strokeWidth || "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
1692
+ };
1634
1693
 
1635
- // src/components/Group/group.variants.ts
1636
- var groupVariants = createVariants({
1637
- base: "yr3Group",
1694
+ // src/Icons/IconCalendar.tsx
1695
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1696
+ var IconCalendar = (props) => {
1697
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("svg", { width: props.width || "24px", height: props.height || "24px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { stroke: props.stroke, strokeLinecap: "round", strokeLinejoin: "round", d: "M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5" }) });
1698
+ };
1699
+
1700
+ // src/Icons/IconLeft.tsx
1701
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1702
+ var IconLeft = (props) => {
1703
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("svg", { width: props.width || "24px", height: props.height || "24px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M15 7L10 12L15 17", stroke: props.stroke || "currentColor", strokeWidth: props.strokeWidth || "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
1704
+ };
1705
+
1706
+ // src/components/Date/month.variants.ts
1707
+ var monthSelectorIconVariants = createVariants({
1708
+ base: "yr3MonthSelector--icon",
1638
1709
  variants: {
1639
- variant: {
1640
- filled: "yr3Group--filled",
1641
- outlined: "yr3Group--outlined",
1642
- text: "yr3Group--text"
1643
- },
1644
1710
  color: {
1645
- primary: "yr3Group--color-primary",
1646
- secondary: "yr3Group--color-secondary",
1647
- success: "yr3Group--color-success",
1711
+ primary: "yr3MonthSelector--icon-color-primary",
1712
+ secondary: "yr3MonthSelector--icon-color-secondary",
1713
+ success: "yr3MonthSelector--icon-color-success",
1714
+ text: "yr3MonthSelector--icon-color-text",
1715
+ disabled: "yr3MonthSelector--icon-color-disabled",
1716
+ background: "yr3MonthSelector--icon-color-background",
1717
+ error: "yr3MonthSelector--icon-color-error",
1718
+ warning: "yr3MonthSelector--icon-color-warning",
1719
+ info: "yr3MonthSelector--icon-color-info",
1720
+ common: "yr3MonthSelector--icon-color-common"
1721
+ },
1722
+ animated: {
1723
+ true: "yr3MonthSelector--icon-animated"
1724
+ },
1725
+ open: {
1726
+ true: "yr3MonthSelector--icon-open"
1727
+ }
1728
+ }
1729
+ });
1730
+ var monthSelectorContainerVariants = createVariants({
1731
+ base: "yr3MonthSelector--year-options",
1732
+ variants: {
1733
+ color: {
1734
+ primary: "yr3MonthSelector--icon-color-primary",
1735
+ secondary: "yr3MonthSelector--icon-color-secondary",
1736
+ success: "yr3MonthSelector--icon-color-success",
1737
+ text: "yr3MonthSelector--icon-color-text",
1738
+ disabled: "yr3MonthSelector--icon-color-disabled",
1739
+ background: "yr3MonthSelector--icon-color-background",
1740
+ error: "yr3MonthSelector--icon-color-error",
1741
+ warning: "yr3MonthSelector--icon-color-warning",
1742
+ info: "yr3MonthSelector--icon-color-info",
1743
+ common: "yr3MonthSelector--icon-color-common"
1744
+ }
1745
+ }
1746
+ });
1747
+
1748
+ // src/Icons/IconRight.tsx
1749
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1750
+ var IconRight = (props) => {
1751
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("svg", { width: props.width || "24px", height: props.height || "24px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1752
+ "path",
1753
+ {
1754
+ d: "M9 7L14 12L9 17",
1755
+ stroke: props.stroke || "currentColor",
1756
+ strokeWidth: props.strokeWidth || "2",
1757
+ strokeLinecap: "round",
1758
+ strokeLinejoin: "round"
1759
+ }
1760
+ ) });
1761
+ };
1762
+
1763
+ // src/components/Date/MonthSelector.tsx
1764
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1765
+ var initialPropsComponent3 = {
1766
+ control: {
1767
+ variant: "outlined",
1768
+ color: "primary",
1769
+ ui: {},
1770
+ style: {}
1771
+ },
1772
+ label: {
1773
+ display: true,
1774
+ color: "primary",
1775
+ ui: {},
1776
+ style: {}
1777
+ },
1778
+ wrapper: {
1779
+ ui: {},
1780
+ style: {}
1781
+ },
1782
+ icon: {
1783
+ color: "primary",
1784
+ style: {},
1785
+ svg: {
1786
+ width: 20,
1787
+ height: 20
1788
+ },
1789
+ component: void 0
1790
+ },
1791
+ text: {
1792
+ variant: "caption",
1793
+ color: "primary",
1794
+ ui: {},
1795
+ style: {},
1796
+ button: {}
1797
+ },
1798
+ container: {
1799
+ color: "primary",
1800
+ ui: {},
1801
+ style: {}
1802
+ }
1803
+ };
1804
+ var MonthSelector = ({ label, year, month, value, defaultValue, propsComponent, years, language, formatMonth = "MMM", monthsDisabled }) => {
1805
+ const [open, setOpen] = React10.useState(false);
1806
+ const [valueState, setValueState] = React10.useState(value || defaultValue || null);
1807
+ const [yearSelected, setYearSelected] = React10.useState(years.findIndex((y) => y === year) || 0);
1808
+ const ref = React10.useRef(null);
1809
+ useClickAway(ref, () => setOpen(false));
1810
+ const properties = mergeDeep(initialPropsComponent3, propsComponent || {});
1811
+ const iconClasses = monthSelectorIconVariants({ color: properties?.icon?.color });
1812
+ const containerClasses = monthSelectorContainerVariants({ color: properties?.container?.color });
1813
+ const data = React10.useMemo(() => getMonthCalendarProps({ year, month, years, language, formatMonth, monthsDisabled }), [year, month, years, language, formatMonth, monthsDisabled]);
1814
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "yr3MonthSelector", ref, children: [
1815
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1816
+ Input,
1817
+ {
1818
+ label,
1819
+ variant: "base",
1820
+ disabled: true,
1821
+ value: valueState || "",
1822
+ propsComponent: {
1823
+ control: properties?.control,
1824
+ label: properties?.label
1825
+ }
1826
+ }
1827
+ ),
1828
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1829
+ "div",
1830
+ {
1831
+ className: iconClasses,
1832
+ style: properties?.icon?.style,
1833
+ onClick: () => setOpen((prev) => !prev),
1834
+ "data-testid": "yr3MonthSelector--icon",
1835
+ children: properties?.icon?.component ? properties?.icon.component : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1836
+ IconCalendar,
1837
+ {
1838
+ width: properties?.icon?.svg?.width,
1839
+ height: properties?.icon?.svg?.height,
1840
+ stroke: "currentColor",
1841
+ style: properties?.icon?.svg
1842
+ }
1843
+ )
1844
+ }
1845
+ ),
1846
+ open && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1847
+ "div",
1848
+ {
1849
+ className: "yr3MonthSelector--wrapper",
1850
+ style: composeStyles(properties?.wrapper?.ui, properties?.wrapper?.style),
1851
+ "data-testid": "yr3MonthSelector--wrapper",
1852
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "yr3MonthSelector--component", children: [
1853
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1854
+ "div",
1855
+ {
1856
+ className: containerClasses,
1857
+ style: composeStyles(properties?.container?.ui, properties?.container?.style),
1858
+ children: [
1859
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("button", { disabled: yearSelected === 0, type: "button", className: `yr3MonthSelector--year-button-back ${yearSelected === 0 ? "yr3MonthSelector--year-button-back--disabled" : ""} `, onClick: () => setYearSelected(yearSelected - 1), children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(IconLeft, { width: 20, height: 20, stroke: "currentColor" }) }),
1860
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: `yr3MonthSelector--year-option`, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { variant: "body1", color: "primary", children: [
1861
+ years[yearSelected],
1862
+ " "
1863
+ ] }) }),
1864
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1865
+ "button",
1866
+ {
1867
+ disabled: yearSelected === years.length - 1,
1868
+ type: "button",
1869
+ className: `yr3MonthSelector--year-button-next ${yearSelected === years.length - 1 ? "yr3MonthSelector--year-button-next--disabled" : ""}`,
1870
+ onClick: () => setYearSelected(yearSelected + 1),
1871
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(IconRight, { width: 20, height: 30, stroke: "currentColor" })
1872
+ }
1873
+ )
1874
+ ]
1875
+ }
1876
+ ),
1877
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "yr3MonthSelector--months", children: data.months.map((m) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1878
+ "button",
1879
+ {
1880
+ type: "button",
1881
+ style: properties?.text?.button,
1882
+ disabled: m.disabled,
1883
+ className: `yr3MonthSelector--month ${m.disabled ? "yr3MonthSelector--month-disabled" : ""}`,
1884
+ onClick: () => {
1885
+ setValueState(`${m.value}-${years[yearSelected]}`);
1886
+ setOpen(false);
1887
+ },
1888
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { ...properties?.text, weight: m.disabled ? "thin" : "medium", children: m.label })
1889
+ },
1890
+ "month-" + m.value
1891
+ )) })
1892
+ ] })
1893
+ }
1894
+ )
1895
+ ] });
1896
+ };
1897
+
1898
+ // src/components/Fade/Fade.tsx
1899
+ var React11 = __toESM(require("react"), 1);
1900
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1901
+ var Fade = ({
1902
+ in: inProp,
1903
+ children,
1904
+ duration = 200,
1905
+ onTransitionEnd,
1906
+ style
1907
+ }) => {
1908
+ React11.useEffect(() => {
1909
+ let timeoutId;
1910
+ if (inProp) {
1911
+ timeoutId = setTimeout(() => {
1912
+ onTransitionEnd && onTransitionEnd();
1913
+ }, duration);
1914
+ }
1915
+ return () => clearTimeout(timeoutId);
1916
+ }, [inProp, duration, onTransitionEnd]);
1917
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1918
+ "div",
1919
+ {
1920
+ className: `yr3Fade ${inProp ? "yr3Fade--in" : ""}`,
1921
+ style: { ...style, transitionDuration: `${duration}ms` },
1922
+ "data-testid": "yr3Fade",
1923
+ children
1924
+ }
1925
+ );
1926
+ };
1927
+
1928
+ // src/components/Flex/flex.variants.ts
1929
+ var flexVariants = createVariants({
1930
+ base: "yr3Flex",
1931
+ variants: {
1932
+ variant: {
1933
+ row: "yr3Flex--row",
1934
+ column: "yr3Flex--column",
1935
+ wrap: "yr3Flex--wrap"
1936
+ },
1937
+ container: {
1938
+ true: "yr3Flex--container"
1939
+ },
1940
+ center: {
1941
+ true: "yr3Flex--center"
1942
+ },
1943
+ between: {
1944
+ true: "yr3Flex--between"
1945
+ },
1946
+ bordered: {
1947
+ true: "yr3Flex--bordered"
1948
+ }
1949
+ }
1950
+ });
1951
+ var flex_variants_default = flexVariants;
1952
+
1953
+ // src/components/Flex/Flex.tsx
1954
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1955
+ var Flex = ({
1956
+ container = false,
1957
+ spacing: spacing2 = 1,
1958
+ children,
1959
+ ui,
1960
+ gap,
1961
+ variant = "column",
1962
+ center = false,
1963
+ between = false,
1964
+ style,
1965
+ bordered = false,
1966
+ ...props
1967
+ }) => {
1968
+ const classes = flex_variants_default({ variant, container, center, between, bordered, spacing: spacing2 });
1969
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1970
+ "div",
1971
+ {
1972
+ className: classes,
1973
+ style: composeStyles(ui, style),
1974
+ ...props,
1975
+ "data-testid": "yr3Flex",
1976
+ children
1977
+ }
1978
+ );
1979
+ };
1980
+
1981
+ // src/components/Grid/Grid.tsx
1982
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1983
+ var Grid = ({
1984
+ container = false,
1985
+ spacing: spacing2 = 0,
1986
+ children,
1987
+ columns = 12,
1988
+ span = 1,
1989
+ ui,
1990
+ style,
1991
+ item = false,
1992
+ size = 0,
1993
+ center = false,
1994
+ ...props
1995
+ }) => {
1996
+ if (item) {
1997
+ columns = 0;
1998
+ }
1999
+ if (container) {
2000
+ columns = 0;
2001
+ ui = {
2002
+ ...ui,
2003
+ gridTemplateColumns: `repeat(${columns}, 1fr)`
2004
+ };
2005
+ }
2006
+ if (center) {
2007
+ ui = {
2008
+ ...ui,
2009
+ justifyContent: "center",
2010
+ alignItems: "center"
2011
+ };
2012
+ }
2013
+ const classes = bem("yr3Grid");
2014
+ const className = classes(void 0, { container, [`spacing-${spacing2}`]: center, span: item && `Col-${size}` });
2015
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2016
+ "div",
2017
+ {
2018
+ className,
2019
+ style: composeStyles(ui, style),
2020
+ "data-testid": "yr3Grid",
2021
+ ...props,
2022
+ children
2023
+ }
2024
+ );
2025
+ };
2026
+
2027
+ // src/components/Group/Group.tsx
2028
+ var React12 = __toESM(require("react"), 1);
2029
+
2030
+ // src/components/Group/group.variants.ts
2031
+ var groupVariants = createVariants({
2032
+ base: "yr3Group",
2033
+ variants: {
2034
+ variant: {
2035
+ filled: "yr3Group--filled",
2036
+ outlined: "yr3Group--outlined",
2037
+ text: "yr3Group--text"
2038
+ },
2039
+ color: {
2040
+ primary: "yr3Group--color-primary",
2041
+ secondary: "yr3Group--color-secondary",
2042
+ success: "yr3Group--color-success",
1648
2043
  error: "yr3Group--color-error",
1649
2044
  warning: "yr3Group--color-warning",
1650
2045
  info: "yr3Group--color-info",
@@ -1661,7 +2056,7 @@ var groupVariants = createVariants({
1661
2056
  });
1662
2057
 
1663
2058
  // src/components/Group/Group.tsx
1664
- var import_jsx_runtime20 = require("react/jsx-runtime");
2059
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1665
2060
  var initialComponents = (color) => ({
1666
2061
  group: {
1667
2062
  ui: {},
@@ -1694,9 +2089,9 @@ var Group = ({
1694
2089
  initialComponents(type === "rounded" ? "text" : color),
1695
2090
  propsComponent || {}
1696
2091
  );
1697
- const [internalValue, setInternalValue] = React10.useState(null);
2092
+ const [internalValue, setInternalValue] = React12.useState(null);
1698
2093
  const isControlled = value !== void 0;
1699
- React10.useEffect(() => {
2094
+ React12.useEffect(() => {
1700
2095
  if (isControlled) {
1701
2096
  setInternalValue(value);
1702
2097
  }
@@ -1707,7 +2102,7 @@ var Group = ({
1707
2102
  active: !exclude ? Array.isArray(value) ? value.includes(item?.value) : internalValue === item.value : false,
1708
2103
  exclude: exclude && Array.isArray(value) ? !value.includes(item?.value) : ""
1709
2104
  });
1710
- const mappingStyle = React10.useMemo(() => {
2105
+ const mappingStyle = React12.useMemo(() => {
1711
2106
  if (variant !== "filled") return options.map((opt, index) => ({
1712
2107
  ...opt,
1713
2108
  index,
@@ -1738,13 +2133,13 @@ var Group = ({
1738
2133
  }
1739
2134
  }));
1740
2135
  }, [exclude, value, options, type]);
1741
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2136
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1742
2137
  "div",
1743
2138
  {
1744
2139
  className: groupVariants({ variant, color, type }),
1745
2140
  "data-testid": "yr3Group",
1746
2141
  style: composeStyles(properties.group?.ui, properties.group?.style),
1747
- children: options.map((opt, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2142
+ children: options.map((opt, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1748
2143
  "div",
1749
2144
  {
1750
2145
  "data-testid": "yr3Group-item",
@@ -1762,7 +2157,7 @@ var Group = ({
1762
2157
  ...mappingStyle?.find((o) => o.value === opt.value)?.style
1763
2158
  }
1764
2159
  ),
1765
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2160
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1766
2161
  Text,
1767
2162
  {
1768
2163
  ...properties.item?.text,
@@ -1778,14 +2173,14 @@ var Group = ({
1778
2173
  };
1779
2174
 
1780
2175
  // src/components/Image/Image.tsx
1781
- var import_jsx_runtime21 = require("react/jsx-runtime");
2176
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1782
2177
  var Image = ({
1783
2178
  src,
1784
2179
  alt = "",
1785
2180
  ui,
1786
2181
  style
1787
2182
  }) => {
1788
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2183
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1789
2184
  "img",
1790
2185
  {
1791
2186
  src,
@@ -1798,9 +2193,9 @@ var Image = ({
1798
2193
  };
1799
2194
 
1800
2195
  // src/components/ImageDropzone/ImageDropzone.tsx
1801
- var React11 = __toESM(require("react"), 1);
1802
- var import_jsx_runtime22 = require("react/jsx-runtime");
1803
- var initialPropsComponent3 = {
2196
+ var React13 = __toESM(require("react"), 1);
2197
+ var import_jsx_runtime30 = require("react/jsx-runtime");
2198
+ var initialPropsComponent4 = {
1804
2199
  box: {},
1805
2200
  text: {},
1806
2201
  container: {},
@@ -1808,10 +2203,10 @@ var initialPropsComponent3 = {
1808
2203
  content: {}
1809
2204
  };
1810
2205
  var ImageDropzone = ({ onChange, multiple, propsComponent, bordered, component, defaultImage, variant = "outlined" }) => {
1811
- const properties = mergeDeep(initialPropsComponent3, propsComponent || {});
1812
- const [dragging, setDragging] = React11.useState(false);
1813
- const [files, setFiles] = React11.useState([]);
1814
- const inputRef = React11.useRef(null);
2206
+ const properties = mergeDeep(initialPropsComponent4, propsComponent || {});
2207
+ const [dragging, setDragging] = React13.useState(false);
2208
+ const [files, setFiles] = React13.useState([]);
2209
+ const inputRef = React13.useRef(null);
1815
2210
  const handleFiles = (fileList) => {
1816
2211
  if (!fileList) return;
1817
2212
  const newFiles = Array.from(fileList);
@@ -1823,7 +2218,7 @@ var ImageDropzone = ({ onChange, multiple, propsComponent, bordered, component,
1823
2218
  };
1824
2219
  const classes = bem("yr3Dropzone");
1825
2220
  const classComponent = classes(void 0, { "dragging": !!dragging, "bordered": !!bordered, variant });
1826
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box, { as: "div", position: "relative", content: "center", ...properties?.box, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2221
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box, { as: "div", position: "relative", content: "center", ...properties?.box, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
1827
2222
  "div",
1828
2223
  {
1829
2224
  className: classComponent,
@@ -1840,7 +2235,7 @@ var ImageDropzone = ({ onChange, multiple, propsComponent, bordered, component,
1840
2235
  onClick: () => inputRef.current?.click(),
1841
2236
  style: composeStyles(properties?.container?.ui, properties?.container?.style),
1842
2237
  children: [
1843
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2238
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1844
2239
  "input",
1845
2240
  {
1846
2241
  ref: inputRef,
@@ -1851,166 +2246,18 @@ var ImageDropzone = ({ onChange, multiple, propsComponent, bordered, component,
1851
2246
  onChange: (e) => handleFiles(e.target.files)
1852
2247
  }
1853
2248
  ),
1854
- isEmpty(files) && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "yr3Dropzone--content", style: composeStyles(properties?.content?.ui, properties?.content?.style), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { variant: "helper", color: "disabled", ...propsComponent?.text, children: propsComponent?.text?.primary || "Drag and drop an image here, or click to select one" }) }),
1855
- multiple && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "yr3Dropzone--previews", style: composeStyles(properties?.preview?.ui, properties?.preview?.style), children: files.map((file, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("img", { src: URL.createObjectURL(file) }, i)) }),
1856
- !multiple && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "yr3Dropzone--preview", style: composeStyles(properties?.preview?.ui, properties?.preview?.style), children: files.map((file, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("img", { src: URL.createObjectURL(file) }, i)) }),
1857
- !!defaultImage && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "yr3Dropzone--preview", style: composeStyles(properties?.preview?.ui, properties?.preview?.style), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("img", { src: defaultImage }) }),
2249
+ isEmpty(files) && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "yr3Dropzone--content", style: composeStyles(properties?.content?.ui, properties?.content?.style), children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { variant: "helper", color: "disabled", ...propsComponent?.text, children: propsComponent?.text?.primary || "Drag and drop an image here, or click to select one" }) }),
2250
+ multiple && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "yr3Dropzone--previews", style: composeStyles(properties?.preview?.ui, properties?.preview?.style), children: files.map((file, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("img", { src: URL.createObjectURL(file) }, i)) }),
2251
+ !multiple && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "yr3Dropzone--preview", style: composeStyles(properties?.preview?.ui, properties?.preview?.style), children: files.map((file, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("img", { src: URL.createObjectURL(file) }, i)) }),
2252
+ !!defaultImage && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "yr3Dropzone--preview", style: composeStyles(properties?.preview?.ui, properties?.preview?.style), children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("img", { src: defaultImage }) }),
1858
2253
  component
1859
2254
  ]
1860
2255
  }
1861
2256
  ) });
1862
2257
  };
1863
2258
 
1864
- // src/components/Input/Input.tsx
1865
- var React12 = __toESM(require("react"), 1);
1866
-
1867
- // src/components/Label/Label.tsx
1868
- var import_jsx_runtime23 = require("react/jsx-runtime");
1869
- var Label = ({ text: text2, children, className, color = "primary", ui, style }) => {
1870
- const classes = bem("yr3Label");
1871
- const classComponent = classes(void 0, { color: `color-${color}` });
1872
- const classnames = bemMerge(classComponent, className);
1873
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1874
- "span",
1875
- {
1876
- className: classnames,
1877
- "data-testid": "yr3Label",
1878
- style: composeStyles(ui, style),
1879
- children: text2 ? text2 : children
1880
- }
1881
- );
1882
- };
1883
-
1884
- // src/components/Input/input.variants.ts
1885
- var inputVariants = createVariants({
1886
- base: "yr3Input",
1887
- variants: {
1888
- variant: {
1889
- filled: "yr3Input--filled",
1890
- outlined: "yr3Input--outlined",
1891
- base: "yr3Input--base",
1892
- lined: "yr3Input--lined"
1893
- },
1894
- color: {
1895
- primary: "yr3Input--color-primary",
1896
- secondary: "yr3Input--color-secondary",
1897
- success: "yr3Input--color-success",
1898
- text: "yr3Input--color-text",
1899
- disabled: "yr3Input--color-disabled",
1900
- background: "yr3Input--color-background",
1901
- error: "yr3Input--color-error",
1902
- warning: "yr3Input--color-warning",
1903
- info: "yr3Input--color-info",
1904
- common: "yr3Input--color-common"
1905
- },
1906
- size: {
1907
- auto: "yr3Input--size-auto",
1908
- full: "yr3Input--size-full"
1909
- },
1910
- rounded: {
1911
- true: "yr3Input--rounded"
1912
- },
1913
- disabled: {
1914
- true: "yr3Input--disabled"
1915
- },
1916
- animated: {
1917
- true: "yr3Input--animated"
1918
- },
1919
- label: {
1920
- true: "yr3Input--label"
1921
- }
1922
- }
1923
- });
1924
-
1925
- // src/components/Input/Input.tsx
1926
- var import_jsx_runtime24 = require("react/jsx-runtime");
1927
- var initiaPropsComponent = {
1928
- label: {
1929
- display: true,
1930
- ui: {},
1931
- style: {}
1932
- },
1933
- control: {}
1934
- };
1935
- var Input = React12.forwardRef(
1936
- ({
1937
- label,
1938
- value,
1939
- defaultValue,
1940
- onChange,
1941
- variant = "outlined",
1942
- error = "ce un errore",
1943
- separatorCurrency = ",",
1944
- ui,
1945
- style,
1946
- propsComponent = initiaPropsComponent,
1947
- pattern = "text",
1948
- color = "primary",
1949
- size = "auto",
1950
- ...props
1951
- }, ref) => {
1952
- const [focused, setFocused] = React12.useState(false);
1953
- const [internalValue, setInternalValue] = React12.useState(defaultValue);
1954
- const isControlled = value !== void 0;
1955
- const currentValue = isControlled ? value : internalValue;
1956
- const isActive = focused || !!currentValue;
1957
- const checkPattern = (type, value2) => {
1958
- switch (type) {
1959
- case "email":
1960
- return /^[\w.-]+@[\w.-]+\.\w{2,}$/.test(value2);
1961
- case "phone":
1962
- return /^\d{10}$/.test(value2);
1963
- case "number":
1964
- return /^\d+$/.test(value2);
1965
- case "currency":
1966
- if (separatorCurrency === ",") return /^\d+(\,\d{0,2})?$/.test(value2);
1967
- if (separatorCurrency === ".") return /^\d+(\.\d{0,2})?$/.test(value2);
1968
- default:
1969
- return true;
1970
- }
1971
- };
1972
- const handleChange = (e) => {
1973
- const newValue = e.target.value;
1974
- if (newValue && !checkPattern(pattern, newValue)) return;
1975
- if (!isControlled) {
1976
- setInternalValue(newValue);
1977
- }
1978
- onChange?.(e, newValue);
1979
- };
1980
- const classes = inputVariants({ color, label: propsComponent?.label?.display });
1981
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Control, { variant, color, label: propsComponent?.label?.display, ...propsComponent.control, children: [
1982
- propsComponent?.label?.display && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1983
- Label,
1984
- {
1985
- text: label || "",
1986
- className: !!isActive ? "yr3Input--active" : "",
1987
- color,
1988
- ...propsComponent.label
1989
- }
1990
- ),
1991
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1992
- "input",
1993
- {
1994
- ref,
1995
- value: currentValue,
1996
- inputMode: pattern === "currency" ? "numeric" : pattern === "phone" ? "tel" : void 0,
1997
- autoComplete: "off",
1998
- type: "text",
1999
- onChange: handleChange,
2000
- onFocus: () => setFocused(true),
2001
- onBlur: () => setFocused(false),
2002
- className: classes,
2003
- style: composeStyles(ui, style),
2004
- ...props,
2005
- "data-testid": "yr3Input"
2006
- }
2007
- )
2008
- ] });
2009
- }
2010
- );
2011
-
2012
2259
  // src/components/InputArea/InputArea.tsx
2013
- var React13 = __toESM(require("react"), 1);
2260
+ var React14 = __toESM(require("react"), 1);
2014
2261
 
2015
2262
  // src/components/InputArea/inputAreaVariants.ts
2016
2263
  var inputAreaVariants = createVariants({
@@ -2051,7 +2298,7 @@ var inputAreaVariants = createVariants({
2051
2298
  });
2052
2299
 
2053
2300
  // src/components/InputArea/InputArea.tsx
2054
- var import_jsx_runtime25 = require("react/jsx-runtime");
2301
+ var import_jsx_runtime31 = require("react/jsx-runtime");
2055
2302
  var initiaPropsComponent2 = {
2056
2303
  label: {
2057
2304
  display: true,
@@ -2076,8 +2323,8 @@ var InputArea = ({
2076
2323
  rounded = false,
2077
2324
  propsComponent = initiaPropsComponent2
2078
2325
  }) => {
2079
- const ref = React13.useRef(null);
2080
- const [internalValue, setInternalValue] = React13.useState(defaultValue);
2326
+ const ref = React14.useRef(null);
2327
+ const [internalValue, setInternalValue] = React14.useState(defaultValue);
2081
2328
  const isControlled = value !== void 0;
2082
2329
  const currentValue = isControlled ? value : internalValue;
2083
2330
  const handleChange = (e) => {
@@ -2094,8 +2341,8 @@ var InputArea = ({
2094
2341
  el.style.resize = resize;
2095
2342
  }
2096
2343
  const classes = inputAreaVariants({ variant, color, rounded });
2097
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { style: { position: "relative" }, children: [
2098
- propsComponent?.label?.display && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2344
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: { position: "relative" }, children: [
2345
+ propsComponent?.label?.display && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2099
2346
  Label,
2100
2347
  {
2101
2348
  text: label || "",
@@ -2103,7 +2350,7 @@ var InputArea = ({
2103
2350
  ...propsComponent.label
2104
2351
  }
2105
2352
  ),
2106
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2353
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2107
2354
  "textarea",
2108
2355
  {
2109
2356
  className: classes,
@@ -2115,7 +2362,7 @@ var InputArea = ({
2115
2362
  "data-testid": "yr3InputArea"
2116
2363
  }
2117
2364
  ),
2118
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { variant: "helper", color: currentValue.length > maxLength ? "error" : "disabled", ui: { textAlign: "right" }, "data-testid": "yr3InputAreaError", children: validate && maxLength ? `${currentValue.length}/${maxLength}` || propsComponent.helperText : "" })
2365
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { variant: "helper", color: currentValue.length > maxLength ? "error" : "disabled", ui: { textAlign: "right" }, "data-testid": "yr3InputAreaError", children: validate && maxLength ? `${currentValue.length}/${maxLength}` || propsComponent.helperText : "" })
2119
2366
  ] });
2120
2367
  };
2121
2368
 
@@ -2149,8 +2396,8 @@ var loaderSpinnerVariants = createVariants({
2149
2396
  });
2150
2397
 
2151
2398
  // src/components/Loader/Loader.tsx
2152
- var React14 = __toESM(require("react"), 1);
2153
- var import_jsx_runtime26 = require("react/jsx-runtime");
2399
+ var React15 = __toESM(require("react"), 1);
2400
+ var import_jsx_runtime32 = require("react/jsx-runtime");
2154
2401
  var initialComponents2 = {
2155
2402
  loader: {
2156
2403
  ui: {},
@@ -2178,29 +2425,29 @@ var Loader = ({ component, loading = false, propsComponent }) => {
2178
2425
  size: properties?.spinner?.size
2179
2426
  });
2180
2427
  if (!loading) return null;
2181
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "yr3Loader", style: composeStyles(properties?.loader?.ui, properties?.loader?.style), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Flex, { ...properties?.container, children: component || /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: classSpinner, children: properties?.spinner?.type === "dots" && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(React14.Fragment, { children: [
2182
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", {}),
2183
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", {}),
2184
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", {})
2428
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "yr3Loader", style: composeStyles(properties?.loader?.ui, properties?.loader?.style), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Flex, { ...properties?.container, children: component || /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: classSpinner, children: properties?.spinner?.type === "dots" && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(React15.Fragment, { children: [
2429
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", {}),
2430
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", {}),
2431
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", {})
2185
2432
  ] }) }) }) });
2186
2433
  };
2187
2434
 
2188
2435
  // src/components/Modal/Modal.tsx
2189
- var React15 = __toESM(require("react"), 1);
2436
+ var React16 = __toESM(require("react"), 1);
2190
2437
 
2191
2438
  // src/components/Modal/ModalContainer.tsx
2192
- var import_jsx_runtime27 = require("react/jsx-runtime");
2439
+ var import_jsx_runtime33 = require("react/jsx-runtime");
2193
2440
  var ModalContainer = ({ children, size = "sm", ui, style }) => {
2194
2441
  const classes = bem("yr3Modal-container");
2195
2442
  const classComponent = classes(void 0, { [`${size}`]: !!size });
2196
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: classComponent, style: composeStyles(ui, style), "data-testid": "yr3Modal-container", children });
2443
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: classComponent, style: composeStyles(ui, style), "data-testid": "yr3Modal-container", children });
2197
2444
  };
2198
2445
 
2199
2446
  // src/components/Modal/Modal.tsx
2200
- var import_jsx_runtime28 = require("react/jsx-runtime");
2447
+ var import_jsx_runtime34 = require("react/jsx-runtime");
2201
2448
  var Modal = ({ open, onClose, children, propsComponent }) => {
2202
2449
  const { show, hide } = useBackdrop();
2203
- React15.useEffect(() => {
2450
+ React16.useEffect(() => {
2204
2451
  if (open) {
2205
2452
  show("modal");
2206
2453
  } else {
@@ -2209,9 +2456,9 @@ var Modal = ({ open, onClose, children, propsComponent }) => {
2209
2456
  }, [open]);
2210
2457
  const classes = bem("yr3Modal");
2211
2458
  const classComponent = classes(void 0, { "open": !!open });
2212
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: classComponent, onClick: (e) => e.stopPropagation(), "data-testid": "yr3Modal", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ModalContainer, { ...propsComponent?.container, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Flex, { variant: "column", container: true, center: true, gap: 1, children: [
2459
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: classComponent, onClick: (e) => e.stopPropagation(), "data-testid": "yr3Modal", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ModalContainer, { ...propsComponent?.container, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Flex, { variant: "column", container: true, center: true, gap: 1, children: [
2213
2460
  children,
2214
- propsComponent?.close ? propsComponent.close : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Button, { variant: "filled", color: "secondary", onClick: onClose, "data-testid": "yr3Modal-close", children: "Close" })
2461
+ propsComponent?.close ? propsComponent.close : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Button, { variant: "filled", color: "secondary", onClick: onClose, "data-testid": "yr3Modal-close", children: "Close" })
2215
2462
  ] }) }) });
2216
2463
  };
2217
2464
 
@@ -2251,15 +2498,15 @@ var notistackVariants = createVariants({
2251
2498
  });
2252
2499
 
2253
2500
  // src/components/Notistack/Notistack.tsx
2254
- var import_jsx_runtime29 = require("react/jsx-runtime");
2501
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2255
2502
  var Notistack = ({ message, duration = 3e3, variant = "info", color, propsComponent, anchor, exiting = false }) => {
2256
2503
  const classes = notistackVariants({ type: variant, color, exiting, direction: `${anchor?.vertical || "bottom"}-${anchor?.horizontal || "right"}` });
2257
2504
  const containerStyle = composeStyles(propsComponent?.container?.ui, propsComponent?.container?.style);
2258
2505
  const notistackStyle = composeStyles(propsComponent?.notistack?.ui, propsComponent?.notistack?.style);
2259
2506
  const progressStyle = composeStyles(propsComponent?.progress?.ui, propsComponent?.progress?.style);
2260
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: classes, "data-testid": "yr3Notistack", style: notistackStyle, children: [
2261
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { style: containerStyle, children: message }),
2262
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2507
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: classes, "data-testid": "yr3Notistack", style: notistackStyle, children: [
2508
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { style: containerStyle, children: message }),
2509
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2263
2510
  "div",
2264
2511
  {
2265
2512
  className: "yr3Notistack--progress",
@@ -2294,7 +2541,7 @@ var pendingVariants = createVariants({
2294
2541
  });
2295
2542
 
2296
2543
  // src/components/Pending/Pending.tsx
2297
- var import_jsx_runtime30 = require("react/jsx-runtime");
2544
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2298
2545
  var Pending = ({
2299
2546
  variant,
2300
2547
  width,
@@ -2307,7 +2554,7 @@ var Pending = ({
2307
2554
  const widthStyle = variant === "circle" ? size : width;
2308
2555
  const heightStyle = variant === "circle" ? size : height;
2309
2556
  const uiStylePending = uiStyle({ width: widthStyle, height: heightStyle, ...ui });
2310
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2557
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2311
2558
  "div",
2312
2559
  {
2313
2560
  className: pendingVariants({ variant, color }),
@@ -2318,19 +2565,11 @@ var Pending = ({
2318
2565
  };
2319
2566
 
2320
2567
  // src/components/Phone/Phone.tsx
2321
- var React17 = __toESM(require("react"), 1);
2322
-
2323
- // src/components/Selector/Selector.tsx
2324
- var React16 = __toESM(require("react"), 1);
2325
-
2326
- // src/Icons/IconDown.tsx
2327
- var import_jsx_runtime31 = require("react/jsx-runtime");
2328
- var IconDown = (props) => {
2329
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("svg", { width: props.width || "64px", height: props.height || "64px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "data-testid": "yr3Icons", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("path", { d: "M7 10L12 15L17 10", stroke: props.stroke || "#fff", strokeWidth: props.strokeWidth || "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
2330
- };
2568
+ var React18 = __toESM(require("react"), 1);
2331
2569
 
2332
2570
  // src/components/Selector/Selector.tsx
2333
- var import_jsx_runtime32 = require("react/jsx-runtime");
2571
+ var React17 = __toESM(require("react"), 1);
2572
+ var import_jsx_runtime37 = require("react/jsx-runtime");
2334
2573
  var initalPropsComponent2 = {
2335
2574
  text: {
2336
2575
  variant: "caption",
@@ -2343,16 +2582,16 @@ var initalPropsComponent2 = {
2343
2582
  }
2344
2583
  };
2345
2584
  var Selector = ({ ui, style, options, name, value, defaultValue, onChange, iconColor, icon, propsComponent = initalPropsComponent2 }) => {
2346
- const [open, setOpen] = React16.useState(false);
2347
- const [valueState, setValueState] = React16.useState(value || defaultValue || null);
2348
- const ref = React16.useRef(null);
2585
+ const [open, setOpen] = React17.useState(false);
2586
+ const [valueState, setValueState] = React17.useState(value || defaultValue || null);
2587
+ const ref = React17.useRef(null);
2349
2588
  useClickAway(ref, () => setOpen(false));
2350
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "yr3Selector-wrapper", ref, children: [
2351
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: `yr3Selector ${open ? "yr3Selector--open" : ""}`, style: composeStyles(ui, style), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "yr3Selector--control", children: [
2352
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "yr3Selector--icon", onClick: () => setOpen((prev) => !prev), children: icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(IconDown, { stroke: `var(--color-${iconColor || "disabled"})`, width: 24, height: 24 }) }),
2589
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "yr3Selector-wrapper", ref, children: [
2590
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: `yr3Selector ${open ? "yr3Selector--open" : ""}`, style: composeStyles(ui, style), children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "yr3Selector--control", children: [
2591
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "yr3Selector--icon", onClick: () => setOpen((prev) => !prev), children: icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(IconDown, { stroke: `var(--color-${iconColor || "disabled"})`, width: 24, height: 24 }) }),
2353
2592
  valueState
2354
2593
  ] }) }),
2355
- open && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "yr3Selector--menu", style: composeStyles(propsComponent.menu?.ui, propsComponent.menu?.style), children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2594
+ open && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "yr3Selector--menu", style: composeStyles(propsComponent.menu?.ui, propsComponent.menu?.style), children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2356
2595
  "div",
2357
2596
  {
2358
2597
  className: "yr3Selector--option",
@@ -2373,16 +2612,15 @@ var Selector = ({ ui, style, options, name, value, defaultValue, onChange, iconC
2373
2612
  };
2374
2613
  onChange?.(event, opt.value);
2375
2614
  },
2376
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { ...propsComponent?.text, children: propsComponent?.text?.children || opt.label })
2615
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text, { ...propsComponent?.text, children: propsComponent?.text?.children || opt.label })
2377
2616
  },
2378
2617
  opt.value
2379
2618
  )) })
2380
2619
  ] });
2381
2620
  };
2382
- var Selector_default = Selector;
2383
2621
 
2384
2622
  // src/components/Phone/Phone.tsx
2385
- var import_jsx_runtime33 = require("react/jsx-runtime");
2623
+ var import_jsx_runtime38 = require("react/jsx-runtime");
2386
2624
  var Phone = ({
2387
2625
  name,
2388
2626
  value,
@@ -2394,13 +2632,13 @@ var Phone = ({
2394
2632
  }) => {
2395
2633
  const isControlled = value !== void 0;
2396
2634
  const initial = value || defaultValue || "";
2397
- const [prefix, setPrefix] = React17.useState(
2635
+ const [prefix, setPrefix] = React18.useState(
2398
2636
  getDialPhone(initial, countries) || countries[0].dial
2399
2637
  );
2400
- const [number, setNumber] = React17.useState(
2638
+ const [number, setNumber] = React18.useState(
2401
2639
  getNumberPhone(initial, prefix) || ""
2402
2640
  );
2403
- React17.useEffect(() => {
2641
+ React18.useEffect(() => {
2404
2642
  if (isControlled && value) {
2405
2643
  const dial = getDialPhone(value, countries);
2406
2644
  const num = getNumberPhone(value, dial);
@@ -2419,11 +2657,11 @@ var Phone = ({
2419
2657
  setPrefix(val);
2420
2658
  onChange?.(null, `${val}${number}`);
2421
2659
  };
2422
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Control, { variant: "outlined", ui: { height: 50, position: "relative" }, children: [
2423
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Label, { text: label, className: "yr3Input--active" }),
2424
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Flex, { variant: "row", container: true, center: true, children: [
2425
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2426
- Selector_default,
2660
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Control, { variant: "outlined", ui: { height: 50, position: "relative" }, children: [
2661
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Label, { text: label, className: "yr3Input--active" }),
2662
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Flex, { variant: "row", container: true, center: true, children: [
2663
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2664
+ Selector,
2427
2665
  {
2428
2666
  options: countries.map((c) => ({
2429
2667
  value: c.dial,
@@ -2434,7 +2672,7 @@ var Phone = ({
2434
2672
  ...propsComponent?.selector
2435
2673
  }
2436
2674
  ),
2437
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2675
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2438
2676
  Divider,
2439
2677
  {
2440
2678
  orientation: "vertical",
@@ -2443,7 +2681,7 @@ var Phone = ({
2443
2681
  ...propsComponent?.divider
2444
2682
  }
2445
2683
  ),
2446
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2684
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2447
2685
  Input,
2448
2686
  {
2449
2687
  type: "number",
@@ -2459,9 +2697,9 @@ var Phone = ({
2459
2697
  };
2460
2698
 
2461
2699
  // src/components/Places/PlacesAutocomplete.tsx
2462
- var React18 = __toESM(require("react"), 1);
2700
+ var React19 = __toESM(require("react"), 1);
2463
2701
  var import_autocomplete_places = require("@yr3/autocomplete-places");
2464
- var import_jsx_runtime34 = require("react/jsx-runtime");
2702
+ var import_jsx_runtime39 = require("react/jsx-runtime");
2465
2703
  var initPropsComponent = {
2466
2704
  label: {
2467
2705
  display: true,
@@ -2501,9 +2739,9 @@ var PlacesAutocomplete = ({
2501
2739
  keyApi,
2502
2740
  propsComponent = initPropsComponent
2503
2741
  }) => {
2504
- const [value, setValue] = React18.useState(null);
2505
- const inputRef = React18.useRef(null);
2506
- const [anchorEl, setAnchorEl] = React18.useState(null);
2742
+ const [value, setValue] = React19.useState(null);
2743
+ const inputRef = React19.useRef(null);
2744
+ const [anchorEl, setAnchorEl] = React19.useState(null);
2507
2745
  const { suggestions, selectPlace } = (0, import_autocomplete_places.useAutocompletePlaces)({ input: value, apiKey: keyApi, language, provider });
2508
2746
  const handleSelect = async (id) => {
2509
2747
  const place = await selectPlace(id);
@@ -2523,12 +2761,12 @@ var PlacesAutocomplete = ({
2523
2761
  setValue(place.address);
2524
2762
  setAnchorEl(null);
2525
2763
  };
2526
- React18.useEffect(() => {
2764
+ React19.useEffect(() => {
2527
2765
  if (defaultLocation) {
2528
2766
  setValue(defaultLocation);
2529
2767
  }
2530
2768
  }, [defaultLocation]);
2531
- React18.useEffect(() => {
2769
+ React19.useEffect(() => {
2532
2770
  if (value === "") {
2533
2771
  onSelect(null);
2534
2772
  }
@@ -2538,13 +2776,13 @@ var PlacesAutocomplete = ({
2538
2776
  setAnchorEl(e.target.value ? inputRef.current : null);
2539
2777
  };
2540
2778
  const open = suggestions.length > 0 && Boolean(anchorEl);
2541
- React18.useEffect(() => {
2779
+ React19.useEffect(() => {
2542
2780
  if (onChangeForm) {
2543
2781
  onChangeForm({ target: { value } });
2544
2782
  }
2545
2783
  }, [onChangeForm]);
2546
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Control, { ...propsComponent?.control, children: [
2547
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2784
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Control, { ...propsComponent?.control, children: [
2785
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2548
2786
  Input,
2549
2787
  {
2550
2788
  ref: inputRef,
@@ -2558,7 +2796,7 @@ var PlacesAutocomplete = ({
2558
2796
  },
2559
2797
  "input-places"
2560
2798
  ),
2561
- open && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "yr3Places--menu", style: composeStyles(propsComponent.menu?.ui, propsComponent?.menu?.style), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Flex, { container: true, ui: { p: 1 }, children: suggestions.map((s) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Flex, { onClick: () => handleSelect(s.id), ui: { padding: 8, cursor: "pointer", "&:hover": { backgroundColor: "rgba(0,0,0,0.1)" } }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text, { ...propsComponent?.menu?.text, children: s.description }) }, s.id)) }) })
2799
+ open && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "yr3Places--menu", style: composeStyles(propsComponent.menu?.ui, propsComponent?.menu?.style), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Flex, { container: true, ui: { p: 1 }, children: suggestions.map((s) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Flex, { onClick: () => handleSelect(s.id), ui: { padding: 8, cursor: "pointer", "&:hover": { backgroundColor: "rgba(0,0,0,0.1)" } }, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { ...propsComponent?.menu?.text, children: s.description }) }, s.id)) }) })
2562
2800
  ] });
2563
2801
  };
2564
2802
 
@@ -2586,7 +2824,7 @@ var radioVariant = createVariants({
2586
2824
  });
2587
2825
 
2588
2826
  // src/components/Radio/Radio.tsx
2589
- var import_jsx_runtime35 = require("react/jsx-runtime");
2827
+ var import_jsx_runtime40 = require("react/jsx-runtime");
2590
2828
  var Radio = ({
2591
2829
  checked,
2592
2830
  value,
@@ -2602,8 +2840,8 @@ var Radio = ({
2602
2840
  const bemClass = bem("yr3Radio");
2603
2841
  const classes = bemClass(void 0, { [color]: `color-${color}` });
2604
2842
  const variantClass = radioVariant({ variant });
2605
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("label", { className: classes, "data-testid": "yr3Radio", style: composeStyles(propsComponent?.radio?.ui, propsComponent?.radio?.style), children: [
2606
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2843
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("label", { className: classes, "data-testid": "yr3Radio", style: composeStyles(propsComponent?.radio?.ui, propsComponent?.radio?.style), children: [
2844
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2607
2845
  "input",
2608
2846
  {
2609
2847
  type: "radio",
@@ -2615,8 +2853,8 @@ var Radio = ({
2615
2853
  }
2616
2854
  ),
2617
2855
  iconChecked && checked ? iconChecked : !checked && iconUnchecked ? iconUnchecked : null,
2618
- !iconChecked && !iconUnchecked && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: variantClass, "data-testid": "yr3Radio-dot" }),
2619
- typeof label === "string" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2856
+ !iconChecked && !iconUnchecked && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: variantClass, "data-testid": "yr3Radio-dot" }),
2857
+ typeof label === "string" && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2620
2858
  "span",
2621
2859
  {
2622
2860
  className: "yr3Radio--label",
@@ -2629,7 +2867,7 @@ var Radio = ({
2629
2867
  };
2630
2868
 
2631
2869
  // src/components/Select/Select.tsx
2632
- var React19 = __toESM(require("react"), 1);
2870
+ var React20 = __toESM(require("react"), 1);
2633
2871
 
2634
2872
  // src/components/Select/select.variants.ts
2635
2873
  var selectVariants = createVariants({
@@ -2689,7 +2927,7 @@ var selectIconVariants = createVariants({
2689
2927
  });
2690
2928
 
2691
2929
  // src/components/Select/Select.tsx
2692
- var import_jsx_runtime36 = require("react/jsx-runtime");
2930
+ var import_jsx_runtime41 = require("react/jsx-runtime");
2693
2931
  var initiaPropsComponent3 = {
2694
2932
  control: {
2695
2933
  variant: "outlined",
@@ -2729,15 +2967,15 @@ var initiaPropsComponent3 = {
2729
2967
  }
2730
2968
  };
2731
2969
  var Select = ({ label, options, name, value, defaultValue, onChange, propsComponent }) => {
2732
- const [open, setOpen] = React19.useState(false);
2733
- const [valueState, setValueState] = React19.useState(value || defaultValue || null);
2734
- const ref = React19.useRef(null);
2970
+ const [open, setOpen] = React20.useState(false);
2971
+ const [valueState, setValueState] = React20.useState(value || defaultValue || null);
2972
+ const ref = React20.useRef(null);
2735
2973
  useClickAway(ref, () => setOpen(false));
2736
2974
  const properties = mergeDeep(initiaPropsComponent3, propsComponent || {});
2737
2975
  const classesIcon = selectIconVariants({ color: properties?.icon?.color, animated: open, open });
2738
2976
  const classes = selectVariants({ wrapper: true });
2739
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: classes, ref, children: [
2740
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2977
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: classes, ref, children: [
2978
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2741
2979
  Input,
2742
2980
  {
2743
2981
  label,
@@ -2750,14 +2988,14 @@ var Select = ({ label, options, name, value, defaultValue, onChange, propsCompon
2750
2988
  }
2751
2989
  }
2752
2990
  ),
2753
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2991
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2754
2992
  "div",
2755
2993
  {
2756
2994
  className: classesIcon,
2757
2995
  style: properties?.icon?.style,
2758
2996
  onClick: () => setOpen((prev) => !prev),
2759
2997
  "data-testid": "yr3Select-icon",
2760
- children: properties?.icon?.component ? properties?.icon.component : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2998
+ children: properties?.icon?.component ? properties?.icon.component : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2761
2999
  IconDown,
2762
3000
  {
2763
3001
  width: properties?.icon?.style?.width,
@@ -2768,13 +3006,13 @@ var Select = ({ label, options, name, value, defaultValue, onChange, propsCompon
2768
3006
  )
2769
3007
  }
2770
3008
  ),
2771
- open && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3009
+ open && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2772
3010
  "div",
2773
3011
  {
2774
3012
  className: "yr3Select--menu",
2775
3013
  style: composeStyles(properties?.menu?.ui, properties?.menu?.style),
2776
3014
  "data-testid": "yr3Select-menu",
2777
- children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3015
+ children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2778
3016
  "div",
2779
3017
  {
2780
3018
  className: "yr3Select--option",
@@ -2796,7 +3034,7 @@ var Select = ({ label, options, name, value, defaultValue, onChange, propsCompon
2796
3034
  onChange?.(event, opt.value);
2797
3035
  },
2798
3036
  style: composeStyles(properties?.menu?.options?.ui, properties?.menu?.options?.style),
2799
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { as: "span", variant: "caption", color: properties?.menu?.options?.text?.color || "primary", ...properties?.menu?.options?.text, children: opt.label })
3037
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { as: "span", variant: "caption", color: properties?.menu?.options?.text?.color || "primary", ...properties?.menu?.options?.text, children: opt.label })
2800
3038
  },
2801
3039
  opt.value
2802
3040
  ))
@@ -2806,9 +3044,9 @@ var Select = ({ label, options, name, value, defaultValue, onChange, propsCompon
2806
3044
  };
2807
3045
 
2808
3046
  // src/components/Slide/Slide.tsx
2809
- var React20 = __toESM(require("react"), 1);
2810
- var import_jsx_runtime37 = require("react/jsx-runtime");
2811
- var initialPropsComponent4 = {
3047
+ var React21 = __toESM(require("react"), 1);
3048
+ var import_jsx_runtime42 = require("react/jsx-runtime");
3049
+ var initialPropsComponent5 = {
2812
3050
  slide: {
2813
3051
  ui: {},
2814
3052
  style: {}
@@ -2823,14 +3061,14 @@ var Slide = ({
2823
3061
  onTransitionEnd,
2824
3062
  propsComponent
2825
3063
  }) => {
2826
- const properties = mergeDeep(initialPropsComponent4, propsComponent || {});
3064
+ const properties = mergeDeep(initialPropsComponent5, propsComponent || {});
2827
3065
  const bemContent = bem("yr3Slide--content");
2828
3066
  const classNameContent = bemContent(void 0, {
2829
3067
  [direction]: true,
2830
3068
  "in": !!inProp,
2831
3069
  "out": !inProp
2832
3070
  });
2833
- React20.useEffect(() => {
3071
+ React21.useEffect(() => {
2834
3072
  let timeoutId;
2835
3073
  if (inProp) {
2836
3074
  timeoutId = setTimeout(() => {
@@ -2840,19 +3078,19 @@ var Slide = ({
2840
3078
  return () => clearTimeout(timeoutId);
2841
3079
  }, [inProp, duration, onTransitionEnd]);
2842
3080
  const uiStyleContent = uiStyle({ ...properties?.slide?.ui, transitionDuration: `${duration}ms` });
2843
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3081
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2844
3082
  "div",
2845
3083
  {
2846
3084
  className: "yr3Slide",
2847
3085
  style: composeStyles(),
2848
3086
  "data-testid": "yr3Slide",
2849
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3087
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2850
3088
  "div",
2851
3089
  {
2852
3090
  className: classNameContent,
2853
3091
  style: composeStyles(uiStyleContent, properties?.slide?.style || {}),
2854
3092
  "data-testid": "yr3Slide-content",
2855
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Box, { ...properties?.box, "data-testid": "yr3Slide-box", children })
3093
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box, { ...properties?.box, "data-testid": "yr3Slide-box", children })
2856
3094
  }
2857
3095
  )
2858
3096
  }
@@ -2860,7 +3098,7 @@ var Slide = ({
2860
3098
  };
2861
3099
 
2862
3100
  // src/components/Switch/Switch.tsx
2863
- var React21 = __toESM(require("react"), 1);
3101
+ var React22 = __toESM(require("react"), 1);
2864
3102
 
2865
3103
  // src/components/Switch/switch.variants.ts
2866
3104
  var switchVariants = createVariants({
@@ -2897,7 +3135,7 @@ var switchVariants = createVariants({
2897
3135
  });
2898
3136
 
2899
3137
  // src/components/Switch/Switch.tsx
2900
- var import_jsx_runtime38 = require("react/jsx-runtime");
3138
+ var import_jsx_runtime43 = require("react/jsx-runtime");
2901
3139
  var Switch = ({
2902
3140
  checked,
2903
3141
  defaultChecked,
@@ -2909,7 +3147,7 @@ var Switch = ({
2909
3147
  placement = "end",
2910
3148
  propsComponent
2911
3149
  }) => {
2912
- const [internal, setInternal] = React21.useState(defaultChecked || false);
3150
+ const [internal, setInternal] = React22.useState(defaultChecked || false);
2913
3151
  const classname = switchVariants({ colors: color, size, disabled: !!disabled, checked: checked ?? internal, placement });
2914
3152
  const isControlled = checked !== void 0;
2915
3153
  const value = isControlled ? checked : internal;
@@ -2917,13 +3155,13 @@ var Switch = ({
2917
3155
  if (!isControlled) setInternal(e.target.checked);
2918
3156
  onChange?.(e, e.target.checked);
2919
3157
  };
2920
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
3158
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
2921
3159
  "label",
2922
3160
  {
2923
3161
  className: classname,
2924
3162
  "data-testid": "yr3Switch",
2925
3163
  children: [
2926
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3164
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2927
3165
  "input",
2928
3166
  {
2929
3167
  type: "checkbox",
@@ -2932,8 +3170,8 @@ var Switch = ({
2932
3170
  disabled
2933
3171
  }
2934
3172
  ),
2935
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "yr3Switch--track", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "yr3Switch--thumb" }) }),
2936
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3173
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "yr3Switch--track", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "yr3Switch--thumb" }) }),
3174
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2937
3175
  "span",
2938
3176
  {
2939
3177
  className: "yr3Switch--label",
@@ -2947,30 +3185,15 @@ var Switch = ({
2947
3185
  );
2948
3186
  };
2949
3187
 
2950
- // src/Icons/IconSearch.tsx
2951
- var import_jsx_runtime39 = require("react/jsx-runtime");
2952
- var IconSearch = (props) => {
2953
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("svg", { width: props.width || "64px", height: props.height || "64px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2954
- "path",
2955
- {
2956
- d: "M15.7955 15.8111L21 21M18 10.5C18 14.6421 14.6421 18 10.5 18C6.35786 18 3 14.6421 3 10.5C3 6.35786 6.35786 3 10.5 3C14.6421 3 18 6.35786 18 10.5Z",
2957
- stroke: props.stroke || "#fff",
2958
- strokeWidth: props.strokeWidth || "1.5",
2959
- strokeLinecap: "round",
2960
- strokeLinejoin: "round"
2961
- }
2962
- ) });
2963
- };
2964
-
2965
3188
  // src/theme/ThemeProvider.tsx
2966
- var React23 = __toESM(require("react"), 1);
3189
+ var React24 = __toESM(require("react"), 1);
2967
3190
 
2968
3191
  // src/theme/notistackContext.tsx
2969
- var React22 = __toESM(require("react"), 1);
2970
- var import_jsx_runtime40 = require("react/jsx-runtime");
2971
- var NotistackContext = React22.createContext(null);
3192
+ var React23 = __toESM(require("react"), 1);
3193
+ var import_jsx_runtime44 = require("react/jsx-runtime");
3194
+ var NotistackContext = React23.createContext(null);
2972
3195
  var NotistackProvider = ({ children }) => {
2973
- const [snacks, setSnacks] = React22.useState([]);
3196
+ const [snacks, setSnacks] = React23.useState([]);
2974
3197
  const notistack = (snack) => {
2975
3198
  const id = Date.now();
2976
3199
  setSnacks((prev) => [...prev, { ...snack, id, exiting: false }]);
@@ -2985,13 +3208,13 @@ var NotistackProvider = ({ children }) => {
2985
3208
  setSnacks((prev) => prev.filter((s) => s.id !== id));
2986
3209
  }, duration + exitDuration);
2987
3210
  };
2988
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(NotistackContext.Provider, { value: { notistack }, children: [
3211
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(NotistackContext.Provider, { value: { notistack }, children: [
2989
3212
  children,
2990
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "yr3NotistackContainer", children: snacks.map((snack) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Notistack, { ...snack }, snack.id)) })
3213
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "yr3NotistackContainer", children: snacks.map((snack) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Notistack, { ...snack }, snack.id)) })
2991
3214
  ] });
2992
3215
  };
2993
3216
  var useNotistack = () => {
2994
- const ctx = React22.useContext(NotistackContext);
3217
+ const ctx = React23.useContext(NotistackContext);
2995
3218
  if (!ctx) {
2996
3219
  throw new Error("NotistackProvider missing");
2997
3220
  }
@@ -2999,15 +3222,15 @@ var useNotistack = () => {
2999
3222
  };
3000
3223
 
3001
3224
  // src/theme/ThemeProvider.tsx
3002
- var import_jsx_runtime41 = require("react/jsx-runtime");
3003
- var ThemeContext = React23.createContext(null);
3225
+ var import_jsx_runtime45 = require("react/jsx-runtime");
3226
+ var ThemeContext = React24.createContext(null);
3004
3227
  var ThemeProvider = ({ theme, children }) => {
3005
- React23.useEffect(() => {
3228
+ React24.useEffect(() => {
3006
3229
  applyTheme(theme);
3007
3230
  }, [theme]);
3008
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ThemeContext.Provider, { value: theme, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(BackdropProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(NotistackProvider, { children }) }) });
3231
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ThemeContext.Provider, { value: theme, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BackdropProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(NotistackProvider, { children }) }) });
3009
3232
  };
3010
- var useTheme = () => React23.useContext(ThemeContext);
3233
+ var useTheme = () => React24.useContext(ThemeContext);
3011
3234
 
3012
3235
  // src/theme/tokens.ts
3013
3236
  var baseTokens = {
@@ -3028,15 +3251,15 @@ var baseTokens = {
3028
3251
  };
3029
3252
 
3030
3253
  // src/theme/useMediaQuery.tsx
3031
- var React24 = __toESM(require("react"), 1);
3254
+ var React25 = __toESM(require("react"), 1);
3032
3255
  function useMediaQuery(query) {
3033
3256
  const theme = useTheme();
3034
3257
  const computedQuery = typeof query === "function" ? query(theme) : query;
3035
- const [matches, setMatches] = React24.useState(() => {
3258
+ const [matches, setMatches] = React25.useState(() => {
3036
3259
  if (typeof window === "undefined") return false;
3037
3260
  return window.matchMedia(computedQuery).matches;
3038
3261
  });
3039
- React24.useEffect(() => {
3262
+ React25.useEffect(() => {
3040
3263
  if (typeof window === "undefined") return;
3041
3264
  const media = window.matchMedia(computedQuery);
3042
3265
  const listener = () => setMatches(media.matches);
@@ -3070,7 +3293,7 @@ var usePlaces = ({ input, language, apiKey, provider }) => {
3070
3293
  };
3071
3294
 
3072
3295
  // src/hooks/useBreakpoint.ts
3073
- var React25 = __toESM(require("react"), 1);
3296
+ var React26 = __toESM(require("react"), 1);
3074
3297
  var breakUp = (bp) => `(min-width: ${bp}px)`;
3075
3298
  var breakDown = (bp) => `(max-width: ${bp}px)`;
3076
3299
  function useBreakpoint(queryInput) {
@@ -3080,8 +3303,8 @@ function useBreakpoint(queryInput) {
3080
3303
  if (typeof window === "undefined") return false;
3081
3304
  return window.matchMedia(query).matches;
3082
3305
  };
3083
- const [matches, setMatches] = React25.useState(getMatch);
3084
- React25.useEffect(() => {
3306
+ const [matches, setMatches] = React26.useState(getMatch);
3307
+ React26.useEffect(() => {
3085
3308
  if (typeof window === "undefined") return;
3086
3309
  const media = window.matchMedia(query);
3087
3310
  const listener = (e) => {
@@ -3127,8 +3350,10 @@ initTheme();
3127
3350
  Flex,
3128
3351
  Grid,
3129
3352
  Group,
3353
+ IconCalendar,
3130
3354
  IconClose,
3131
3355
  IconDown,
3356
+ IconLeft,
3132
3357
  IconSearch,
3133
3358
  Image,
3134
3359
  ImageDropzone,
@@ -3138,6 +3363,7 @@ initTheme();
3138
3363
  Loader,
3139
3364
  Modal,
3140
3365
  ModalContainer,
3366
+ MonthSelector,
3141
3367
  Notistack,
3142
3368
  NotistackContext,
3143
3369
  NotistackProvider,
@@ -3146,6 +3372,7 @@ initTheme();
3146
3372
  PlacesAutocomplete,
3147
3373
  Radio,
3148
3374
  Select,
3375
+ Selector,
3149
3376
  Slide,
3150
3377
  Switch,
3151
3378
  Text,
@@ -3170,6 +3397,7 @@ initTheme();
3170
3397
  getCountryCodePhone,
3171
3398
  getDialPhone,
3172
3399
  getMonthCalendar,
3400
+ getMonthCalendarProps,
3173
3401
  getNumberPhone,
3174
3402
  hexToRgb,
3175
3403
  initTheme,