@yr3/ui 1.0.3 → 1.0.4

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.js CHANGED
@@ -1371,16 +1371,72 @@ var Image = ({
1371
1371
  );
1372
1372
  };
1373
1373
 
1374
- // src/components/Input/Input.tsx
1374
+ // src/components/ImageDropzone/ImageDropzone.tsx
1375
1375
  import * as React11 from "react";
1376
+ import { jsx as jsx22, jsxs as jsxs5 } from "react/jsx-runtime";
1377
+ var ImageDropzone = ({ onChange, multiple, ui, style, propsComponent, bordered, component, defaultImage, variant = "outlined" }) => {
1378
+ const [dragging, setDragging] = React11.useState(false);
1379
+ const [files, setFiles] = React11.useState([]);
1380
+ const inputRef = React11.useRef(null);
1381
+ const handleFiles = (fileList) => {
1382
+ if (!fileList) return;
1383
+ const newFiles = Array.from(fileList);
1384
+ setFiles((prev) => {
1385
+ const updated = multiple ? [...prev, ...newFiles] : newFiles;
1386
+ onChange?.(updated);
1387
+ return updated;
1388
+ });
1389
+ };
1390
+ const classes = bem("yr3Dropzone");
1391
+ const classComponent = classes(void 0, { "dragging": !!dragging, "bordered": !!bordered, variant });
1392
+ return /* @__PURE__ */ jsx22(Box, { as: "div", position: "relative", content: "center", ...propsComponent?.box, children: /* @__PURE__ */ jsxs5(
1393
+ "div",
1394
+ {
1395
+ className: classComponent,
1396
+ onDragOver: (e) => {
1397
+ e.preventDefault();
1398
+ setDragging(true);
1399
+ },
1400
+ onDragLeave: () => setDragging(false),
1401
+ onDrop: (e) => {
1402
+ e.preventDefault();
1403
+ setDragging(false);
1404
+ handleFiles(e.dataTransfer.files);
1405
+ },
1406
+ onClick: () => inputRef.current?.click(),
1407
+ style: composeStyles(ui, style),
1408
+ children: [
1409
+ /* @__PURE__ */ jsx22(
1410
+ "input",
1411
+ {
1412
+ ref: inputRef,
1413
+ type: "file",
1414
+ hidden: true,
1415
+ multiple,
1416
+ accept: "image/*",
1417
+ onChange: (e) => handleFiles(e.target.files)
1418
+ }
1419
+ ),
1420
+ isEmpty(files) && /* @__PURE__ */ jsx22("div", { className: "yr3Dropzone--content", children: /* @__PURE__ */ jsx22(Text, { variant: "helper", color: "disabled", ...propsComponent?.text, children: propsComponent?.text?.primary || "Drag and drop an image here, or click to select one" }) }),
1421
+ multiple && /* @__PURE__ */ jsx22("div", { className: "yr3Dropzone--previews", children: files.map((file, i) => /* @__PURE__ */ jsx22("img", { src: URL.createObjectURL(file) }, i)) }),
1422
+ !multiple && /* @__PURE__ */ jsx22("div", { className: "yr3Dropzone--preview", children: files.map((file, i) => /* @__PURE__ */ jsx22("img", { src: URL.createObjectURL(file) }, i)) }),
1423
+ !!defaultImage && /* @__PURE__ */ jsx22("div", { className: "yr3Dropzone--preview", children: /* @__PURE__ */ jsx22("img", { src: defaultImage }) }),
1424
+ component
1425
+ ]
1426
+ }
1427
+ ) });
1428
+ };
1429
+
1430
+ // src/components/Input/Input.tsx
1431
+ import * as React12 from "react";
1376
1432
 
1377
1433
  // src/components/Label/Label.tsx
1378
- import { jsx as jsx22 } from "react/jsx-runtime";
1434
+ import { jsx as jsx23 } from "react/jsx-runtime";
1379
1435
  var Label = ({ text: text2, children, className, color = "primary", ui, style }) => {
1380
1436
  const classes = bem("yr3Label");
1381
1437
  const classComponent = classes(void 0, { color: `color-${color}` });
1382
1438
  const classnames = bemMerge(classComponent, className);
1383
- return /* @__PURE__ */ jsx22(
1439
+ return /* @__PURE__ */ jsx23(
1384
1440
  "span",
1385
1441
  {
1386
1442
  className: classnames,
@@ -1432,7 +1488,7 @@ var inputVariants = createVariants({
1432
1488
  });
1433
1489
 
1434
1490
  // src/components/Input/Input.tsx
1435
- import { jsx as jsx23, jsxs as jsxs5 } from "react/jsx-runtime";
1491
+ import { jsx as jsx24, jsxs as jsxs6 } from "react/jsx-runtime";
1436
1492
  var initiaPropsComponent = {
1437
1493
  label: {
1438
1494
  display: true,
@@ -1440,7 +1496,7 @@ var initiaPropsComponent = {
1440
1496
  style: {}
1441
1497
  }
1442
1498
  };
1443
- var Input = React11.forwardRef(
1499
+ var Input = React12.forwardRef(
1444
1500
  ({
1445
1501
  label,
1446
1502
  value,
@@ -1455,9 +1511,9 @@ var Input = React11.forwardRef(
1455
1511
  color = "primary",
1456
1512
  ...props
1457
1513
  }, ref) => {
1458
- const [focused, setFocused] = React11.useState(false);
1459
- const [internalValue, setInternalValue] = React11.useState(defaultValue);
1460
- const [internalError, setInternalError] = React11.useState(null);
1514
+ const [focused, setFocused] = React12.useState(false);
1515
+ const [internalValue, setInternalValue] = React12.useState(defaultValue);
1516
+ const [internalError, setInternalError] = React12.useState(null);
1461
1517
  const isControlled = value !== void 0;
1462
1518
  const currentValue = isControlled ? value : internalValue;
1463
1519
  const isActive = focused || !!currentValue;
@@ -1487,8 +1543,8 @@ var Input = React11.forwardRef(
1487
1543
  onChange?.(e, newValue);
1488
1544
  };
1489
1545
  const classes = inputVariants({ color, label: propsComponent?.label?.display });
1490
- return /* @__PURE__ */ jsxs5(Control, { variant, color, label: propsComponent?.label?.display, children: [
1491
- propsComponent?.label?.display && /* @__PURE__ */ jsx23(
1546
+ return /* @__PURE__ */ jsxs6(Control, { variant, color, label: propsComponent?.label?.display, children: [
1547
+ propsComponent?.label?.display && /* @__PURE__ */ jsx24(
1492
1548
  Label,
1493
1549
  {
1494
1550
  text: label || "",
@@ -1497,7 +1553,7 @@ var Input = React11.forwardRef(
1497
1553
  ...propsComponent.label
1498
1554
  }
1499
1555
  ),
1500
- /* @__PURE__ */ jsx23(
1556
+ /* @__PURE__ */ jsx24(
1501
1557
  "input",
1502
1558
  {
1503
1559
  ref,
@@ -1513,36 +1569,36 @@ var Input = React11.forwardRef(
1513
1569
  "data-testid": "yr3Input"
1514
1570
  }
1515
1571
  ),
1516
- /* @__PURE__ */ jsx23(Text, { variant: "helper", "data-testid": "yr3Input-helper", children: error || internalError || "" })
1572
+ /* @__PURE__ */ jsx24(Text, { variant: "helper", "data-testid": "yr3Input-helper", children: error || internalError || "" })
1517
1573
  ] });
1518
1574
  }
1519
1575
  );
1520
1576
 
1521
1577
  // src/components/Input/InputPhone.tsx
1522
- import * as React14 from "react";
1578
+ import * as React15 from "react";
1523
1579
 
1524
1580
  // src/components/Select/Selector.tsx
1525
- import * as React12 from "react";
1581
+ import * as React13 from "react";
1526
1582
 
1527
1583
  // src/Icons/IconDown.tsx
1528
- import { jsx as jsx24 } from "react/jsx-runtime";
1584
+ import { jsx as jsx25 } from "react/jsx-runtime";
1529
1585
  var IconDown = (props) => {
1530
- return /* @__PURE__ */ jsx24("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__ */ jsx24("path", { d: "M7 10L12 15L17 10", stroke: props.stroke || "#fff", strokeWidth: props.strokeWidth || "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
1586
+ return /* @__PURE__ */ jsx25("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__ */ jsx25("path", { d: "M7 10L12 15L17 10", stroke: props.stroke || "#fff", strokeWidth: props.strokeWidth || "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
1531
1587
  };
1532
1588
 
1533
1589
  // src/components/Select/Selector.tsx
1534
- import { jsx as jsx25, jsxs as jsxs6 } from "react/jsx-runtime";
1590
+ import { jsx as jsx26, jsxs as jsxs7 } from "react/jsx-runtime";
1535
1591
  var Selector = ({ ui, style, options, name, value, defaultValue, onChange, iconColor, icon }) => {
1536
- const [open, setOpen] = React12.useState(false);
1537
- const [valueState, setValueState] = React12.useState(value || defaultValue || null);
1538
- const ref = React12.useRef(null);
1592
+ const [open, setOpen] = React13.useState(false);
1593
+ const [valueState, setValueState] = React13.useState(value || defaultValue || null);
1594
+ const ref = React13.useRef(null);
1539
1595
  useClickAway(ref, () => setOpen(false));
1540
- return /* @__PURE__ */ jsxs6("div", { className: "yr3Selector-wrapper", ref, children: [
1541
- /* @__PURE__ */ jsx25("div", { className: `yr3Selector ${open ? "yr3Selector--open" : ""}`, style: composeStyles(ui, style), children: /* @__PURE__ */ jsxs6("div", { className: "yr3Selector--control", children: [
1542
- /* @__PURE__ */ jsx25("div", { className: "yr3Selector--icon", onClick: () => setOpen((prev) => !prev), children: icon ? icon : /* @__PURE__ */ jsx25(IconDown, { stroke: `var(--color-${iconColor || "disabled"})`, width: 24, height: 24 }) }),
1596
+ return /* @__PURE__ */ jsxs7("div", { className: "yr3Selector-wrapper", ref, children: [
1597
+ /* @__PURE__ */ jsx26("div", { className: `yr3Selector ${open ? "yr3Selector--open" : ""}`, style: composeStyles(ui, style), children: /* @__PURE__ */ jsxs7("div", { className: "yr3Selector--control", children: [
1598
+ /* @__PURE__ */ jsx26("div", { className: "yr3Selector--icon", onClick: () => setOpen((prev) => !prev), children: icon ? icon : /* @__PURE__ */ jsx26(IconDown, { stroke: `var(--color-${iconColor || "disabled"})`, width: 24, height: 24 }) }),
1543
1599
  valueState
1544
1600
  ] }) }),
1545
- open && /* @__PURE__ */ jsx25("div", { className: "yr3Select--menu", children: options.map((opt) => /* @__PURE__ */ jsx25(
1601
+ open && /* @__PURE__ */ jsx26("div", { className: "yr3Select--menu", children: options.map((opt) => /* @__PURE__ */ jsx26(
1546
1602
  "div",
1547
1603
  {
1548
1604
  className: "yr3Select--option",
@@ -1572,19 +1628,19 @@ var Selector = ({ ui, style, options, name, value, defaultValue, onChange, iconC
1572
1628
  var Selector_default = Selector;
1573
1629
 
1574
1630
  // src/theme/ThemeProvider.tsx
1575
- import * as React13 from "react";
1576
- import { jsx as jsx26 } from "react/jsx-runtime";
1577
- var ThemeContext = React13.createContext(null);
1631
+ import * as React14 from "react";
1632
+ import { jsx as jsx27 } from "react/jsx-runtime";
1633
+ var ThemeContext = React14.createContext(null);
1578
1634
  var ThemeProvider = ({ theme, children }) => {
1579
- React13.useEffect(() => {
1635
+ React14.useEffect(() => {
1580
1636
  applyTheme(theme);
1581
1637
  }, [theme]);
1582
- return /* @__PURE__ */ jsx26(ThemeContext.Provider, { value: theme, children: /* @__PURE__ */ jsx26(BackdropProvider, { children }) });
1638
+ return /* @__PURE__ */ jsx27(ThemeContext.Provider, { value: theme, children: /* @__PURE__ */ jsx27(BackdropProvider, { children }) });
1583
1639
  };
1584
- var useTheme = () => React13.useContext(ThemeContext);
1640
+ var useTheme = () => React14.useContext(ThemeContext);
1585
1641
 
1586
1642
  // src/components/Input/InputPhone.tsx
1587
- import { jsx as jsx27, jsxs as jsxs7 } from "react/jsx-runtime";
1643
+ import { jsx as jsx28, jsxs as jsxs8 } from "react/jsx-runtime";
1588
1644
  var Phone = ({
1589
1645
  name,
1590
1646
  value,
@@ -1594,8 +1650,8 @@ var Phone = ({
1594
1650
  countries = [],
1595
1651
  propsComponent
1596
1652
  }) => {
1597
- const [prefixValue, setPrefixValue] = React14.useState(prefix);
1598
- const [number, setNumber] = React14.useState(Number(value) || null);
1653
+ const [prefixValue, setPrefixValue] = React15.useState(prefix);
1654
+ const [number, setNumber] = React15.useState(Number(value) || null);
1599
1655
  const theme = useTheme();
1600
1656
  const handleChange = (newPrefix, newNumber) => {
1601
1657
  const full = `${newPrefix}${newNumber.toString()}`;
@@ -1607,10 +1663,10 @@ var Phone = ({
1607
1663
  };
1608
1664
  onChange?.(event, full);
1609
1665
  };
1610
- return /* @__PURE__ */ jsxs7(Control, { variant: "outlined", children: [
1611
- /* @__PURE__ */ jsx27(Label, { text: label, className: "yr3Input--active" }),
1612
- /* @__PURE__ */ jsx27("div", { className: "yr3PhoneInput", "data-testid": "yr3Phone", children: /* @__PURE__ */ jsxs7(Flex, { variant: "row", container: true, center: true, children: [
1613
- /* @__PURE__ */ jsx27(
1666
+ return /* @__PURE__ */ jsxs8(Control, { variant: "outlined", children: [
1667
+ /* @__PURE__ */ jsx28(Label, { text: label, className: "yr3Input--active" }),
1668
+ /* @__PURE__ */ jsx28("div", { className: "yr3PhoneInput", "data-testid": "yr3Phone", children: /* @__PURE__ */ jsxs8(Flex, { variant: "row", container: true, center: true, children: [
1669
+ /* @__PURE__ */ jsx28(
1614
1670
  Selector_default,
1615
1671
  {
1616
1672
  options: countries.map((c) => ({
@@ -1630,8 +1686,8 @@ var Phone = ({
1630
1686
  style: propsComponent?.selector?.style
1631
1687
  }
1632
1688
  ),
1633
- /* @__PURE__ */ jsx27(Divider, { orientation: "vertical", ...propsComponent?.divider }),
1634
- /* @__PURE__ */ jsx27(
1689
+ /* @__PURE__ */ jsx28(Divider, { orientation: "vertical", ...propsComponent?.divider }),
1690
+ /* @__PURE__ */ jsx28(
1635
1691
  Input,
1636
1692
  {
1637
1693
  type: "phone",
@@ -1648,22 +1704,127 @@ var Phone = ({
1648
1704
  ] });
1649
1705
  };
1650
1706
 
1707
+ // src/components/InputArea/InputArea.tsx
1708
+ import * as React16 from "react";
1709
+
1710
+ // src/components/InputArea/inputAreaVariants.ts
1711
+ var inputAreaVariants = createVariants({
1712
+ base: "yr3InputArea",
1713
+ variants: {
1714
+ variant: {
1715
+ filled: "yr3InputArea--filled",
1716
+ outlined: "yr3InputArea--outlined",
1717
+ base: "yr3InputArea--base",
1718
+ lined: "yr3InputArea--lined"
1719
+ },
1720
+ color: {
1721
+ primary: "yr3InputArea--color-primary",
1722
+ secondary: "yr3InputArea--color-secondary",
1723
+ success: "yr3InputArea--color-success",
1724
+ text: "yr3InputArea--color-text",
1725
+ disabled: "yr3InputArea--color-disabled"
1726
+ },
1727
+ size: {
1728
+ auto: "yr3InputArea--size-auto",
1729
+ full: "yr3InputArea--size-full"
1730
+ },
1731
+ rounded: {
1732
+ true: "yr3InputArea--rounded"
1733
+ },
1734
+ disabled: {
1735
+ true: "yr3InputArea--disabled"
1736
+ },
1737
+ animated: {
1738
+ true: "yr3InputArea--animated"
1739
+ }
1740
+ }
1741
+ });
1742
+
1743
+ // src/components/InputArea/InputArea.tsx
1744
+ import { jsx as jsx29, jsxs as jsxs9 } from "react/jsx-runtime";
1745
+ var initiaPropsComponent2 = {
1746
+ label: {
1747
+ display: true,
1748
+ ui: {},
1749
+ style: {}
1750
+ },
1751
+ helperText: ""
1752
+ };
1753
+ var InputArea = ({
1754
+ value,
1755
+ defaultValue = "",
1756
+ onChange,
1757
+ rows = 1,
1758
+ ui,
1759
+ style,
1760
+ label,
1761
+ validate,
1762
+ color = "primary",
1763
+ maxLength = 0,
1764
+ resize = "vertical",
1765
+ variant = "outlined",
1766
+ rounded = false,
1767
+ propsComponent = initiaPropsComponent2
1768
+ }) => {
1769
+ const ref = React16.useRef(null);
1770
+ const [internalValue, setInternalValue] = React16.useState(defaultValue);
1771
+ const isControlled = value !== void 0;
1772
+ const currentValue = isControlled ? value : internalValue;
1773
+ const handleChange = (e) => {
1774
+ const newValue = e.target.value;
1775
+ if (!isControlled) {
1776
+ setInternalValue(newValue);
1777
+ }
1778
+ onChange?.(e, newValue);
1779
+ };
1780
+ const el = ref.current;
1781
+ if (el) {
1782
+ el.style.height = "auto";
1783
+ el.style.height = el.scrollHeight + "px";
1784
+ el.style.resize = resize;
1785
+ }
1786
+ const classes = inputAreaVariants({ variant, color, rounded });
1787
+ return /* @__PURE__ */ jsxs9("div", { style: { position: "relative" }, children: [
1788
+ propsComponent?.label?.display && /* @__PURE__ */ jsx29(
1789
+ Label,
1790
+ {
1791
+ text: label || "",
1792
+ className: "yr3Input--active",
1793
+ ...propsComponent.label
1794
+ }
1795
+ ),
1796
+ /* @__PURE__ */ jsx29(
1797
+ "textarea",
1798
+ {
1799
+ className: classes,
1800
+ ref,
1801
+ value: currentValue,
1802
+ rows,
1803
+ onChange: handleChange,
1804
+ style: composeStyles(ui, style),
1805
+ "data-testid": "yr3InputArea"
1806
+ }
1807
+ ),
1808
+ /* @__PURE__ */ jsx29(Text, { variant: "helper", color: currentValue.length > maxLength ? "error" : "disabled", ui: { textAlign: "right" }, "data-testid": "yr3InputAreaError", children: validate && maxLength ? `${currentValue.length}/${maxLength}` || propsComponent.helperText : "" })
1809
+ ] });
1810
+ };
1811
+
1651
1812
  // src/components/Modal/Modal.tsx
1652
- import * as React15 from "react";
1813
+ import * as React17 from "react";
1653
1814
 
1654
1815
  // src/components/Modal/ModalContainer.tsx
1655
- import { jsx as jsx28 } from "react/jsx-runtime";
1816
+ import { jsx as jsx30 } from "react/jsx-runtime";
1656
1817
  var ModalContainer = ({ children, size = "sm", ui, style }) => {
1657
1818
  const classes = bem("yr3Modal-container");
1658
1819
  const classComponent = classes(void 0, { [`${size}`]: !!size });
1659
- return /* @__PURE__ */ jsx28("div", { className: classComponent, style: composeStyles(ui, style), "data-testid": "yr3Modal-container", children });
1820
+ return /* @__PURE__ */ jsx30("div", { className: classComponent, style: composeStyles(ui, style), "data-testid": "yr3Modal-container", children });
1660
1821
  };
1661
1822
 
1662
1823
  // src/components/Modal/Modal.tsx
1663
- import { jsx as jsx29, jsxs as jsxs8 } from "react/jsx-runtime";
1824
+ import { jsx as jsx31, jsxs as jsxs10 } from "react/jsx-runtime";
1664
1825
  var Modal = ({ open, onClose, children, propsComponent }) => {
1665
1826
  const { show, hide } = useBackdrop();
1666
- React15.useEffect(() => {
1827
+ React17.useEffect(() => {
1667
1828
  if (open) {
1668
1829
  show();
1669
1830
  } else {
@@ -1672,9 +1833,9 @@ var Modal = ({ open, onClose, children, propsComponent }) => {
1672
1833
  }, [open, show]);
1673
1834
  const classes = bem("yr3Modal");
1674
1835
  const classComponent = classes(void 0, { "open": !!open });
1675
- return /* @__PURE__ */ jsx29("div", { className: classComponent, onClick: (e) => e.stopPropagation(), "data-testid": "yr3Modal", children: /* @__PURE__ */ jsx29(ModalContainer, { ...propsComponent?.container, children: /* @__PURE__ */ jsxs8(Flex, { variant: "column", container: true, center: true, gap: 1, children: [
1836
+ return /* @__PURE__ */ jsx31("div", { className: classComponent, onClick: (e) => e.stopPropagation(), "data-testid": "yr3Modal", children: /* @__PURE__ */ jsx31(ModalContainer, { ...propsComponent?.container, children: /* @__PURE__ */ jsxs10(Flex, { variant: "column", container: true, center: true, gap: 1, children: [
1676
1837
  children,
1677
- propsComponent?.close ? propsComponent.close : /* @__PURE__ */ jsx29(Button, { variant: "filled", color: "secondary", onClick: onClose, "data-testid": "yr3Modal-close", children: "Close" })
1838
+ propsComponent?.close ? propsComponent.close : /* @__PURE__ */ jsx31(Button, { variant: "filled", color: "secondary", onClick: onClose, "data-testid": "yr3Modal-close", children: "Close" })
1678
1839
  ] }) }) });
1679
1840
  };
1680
1841
 
@@ -1714,15 +1875,15 @@ var notistackVariants = createVariants({
1714
1875
  });
1715
1876
 
1716
1877
  // src/components/Notistack/Notistack.tsx
1717
- import { jsx as jsx30, jsxs as jsxs9 } from "react/jsx-runtime";
1878
+ import { jsx as jsx32, jsxs as jsxs11 } from "react/jsx-runtime";
1718
1879
  var Notistack = ({ message, duration = 3e3, variant = "info", color, propsComponent, anchor, exiting = false }) => {
1719
1880
  const classes = notistackVariants({ type: variant, color, exiting, direction: `${anchor?.vertical || "bottom"}-${anchor?.horizontal || "right"}` });
1720
1881
  const containerStyle = composeStyles(propsComponent?.container?.ui, propsComponent?.container?.style);
1721
1882
  const notistackStyle = composeStyles(propsComponent?.notistack?.ui, propsComponent?.notistack?.style);
1722
1883
  const progressStyle = composeStyles(propsComponent?.progress?.ui, propsComponent?.progress?.style);
1723
- return /* @__PURE__ */ jsxs9("div", { className: classes, "data-testid": "yr3Notistack", style: notistackStyle, children: [
1724
- /* @__PURE__ */ jsx30("span", { style: containerStyle, children: message }),
1725
- /* @__PURE__ */ jsx30(
1884
+ return /* @__PURE__ */ jsxs11("div", { className: classes, "data-testid": "yr3Notistack", style: notistackStyle, children: [
1885
+ /* @__PURE__ */ jsx32("span", { style: containerStyle, children: message }),
1886
+ /* @__PURE__ */ jsx32(
1726
1887
  "div",
1727
1888
  {
1728
1889
  className: "yr3Notistack--progress",
@@ -1756,7 +1917,7 @@ var pendingVariants = createVariants({
1756
1917
  });
1757
1918
 
1758
1919
  // src/components/Pending/Pending.tsx
1759
- import { jsx as jsx31 } from "react/jsx-runtime";
1920
+ import { jsx as jsx33 } from "react/jsx-runtime";
1760
1921
  var Pending = ({
1761
1922
  variant,
1762
1923
  width,
@@ -1769,7 +1930,7 @@ var Pending = ({
1769
1930
  const widthStyle = variant === "circle" ? size : width;
1770
1931
  const heightStyle = variant === "circle" ? size : height;
1771
1932
  const uiStylePending = uiStyle({ width: widthStyle, height: heightStyle, ...ui });
1772
- return /* @__PURE__ */ jsx31(
1933
+ return /* @__PURE__ */ jsx33(
1773
1934
  "div",
1774
1935
  {
1775
1936
  className: pendingVariants({ variant, color }),
@@ -1798,7 +1959,7 @@ var radioVariant = createVariants({
1798
1959
  });
1799
1960
 
1800
1961
  // src/components/Radio/Radio.tsx
1801
- import { jsx as jsx32, jsxs as jsxs10 } from "react/jsx-runtime";
1962
+ import { jsx as jsx34, jsxs as jsxs12 } from "react/jsx-runtime";
1802
1963
  var Radio = ({
1803
1964
  checked,
1804
1965
  value,
@@ -1814,8 +1975,8 @@ var Radio = ({
1814
1975
  const bemClass = bem("yr3Radio");
1815
1976
  const classes = bemClass(void 0, { [color]: `color-${color}` });
1816
1977
  const variantClass = radioVariant({ variant });
1817
- return /* @__PURE__ */ jsxs10("label", { className: classes, "data-testid": "yr3Radio", style: composeStyles(propsComponent?.radio?.ui, propsComponent?.radio?.style), children: [
1818
- /* @__PURE__ */ jsx32(
1978
+ return /* @__PURE__ */ jsxs12("label", { className: classes, "data-testid": "yr3Radio", style: composeStyles(propsComponent?.radio?.ui, propsComponent?.radio?.style), children: [
1979
+ /* @__PURE__ */ jsx34(
1819
1980
  "input",
1820
1981
  {
1821
1982
  type: "radio",
@@ -1827,8 +1988,8 @@ var Radio = ({
1827
1988
  }
1828
1989
  ),
1829
1990
  iconChecked && checked ? iconChecked : !checked && iconUnchecked ? iconUnchecked : null,
1830
- !iconChecked && !iconUnchecked && /* @__PURE__ */ jsx32("span", { className: variantClass, "data-testid": "yr3Radio-dot" }),
1831
- typeof label === "string" && /* @__PURE__ */ jsx32(
1991
+ !iconChecked && !iconUnchecked && /* @__PURE__ */ jsx34("span", { className: variantClass, "data-testid": "yr3Radio-dot" }),
1992
+ typeof label === "string" && /* @__PURE__ */ jsx34(
1832
1993
  "span",
1833
1994
  {
1834
1995
  className: "yr3Radio--label",
@@ -1841,15 +2002,15 @@ var Radio = ({
1841
2002
  };
1842
2003
 
1843
2004
  // src/components/Select/Select.tsx
1844
- import * as React16 from "react";
1845
- import { jsx as jsx33, jsxs as jsxs11 } from "react/jsx-runtime";
2005
+ import * as React18 from "react";
2006
+ import { jsx as jsx35, jsxs as jsxs13 } from "react/jsx-runtime";
1846
2007
  var Select = ({ label, options, name, value, defaultValue, onChange, propsComponent }) => {
1847
- const [open, setOpen] = React16.useState(false);
1848
- const [valueState, setValueState] = React16.useState(value || defaultValue || null);
1849
- const ref = React16.useRef(null);
2008
+ const [open, setOpen] = React18.useState(false);
2009
+ const [valueState, setValueState] = React18.useState(value || defaultValue || null);
2010
+ const ref = React18.useRef(null);
1850
2011
  useClickAway(ref, () => setOpen(false));
1851
- return /* @__PURE__ */ jsxs11(Control, { ...propsComponent?.control, children: [
1852
- /* @__PURE__ */ jsx33(
2012
+ return /* @__PURE__ */ jsxs13(Control, { ...propsComponent?.control, children: [
2013
+ /* @__PURE__ */ jsx35(
1853
2014
  Label,
1854
2015
  {
1855
2016
  ...propsComponent?.label,
@@ -1857,10 +2018,10 @@ var Select = ({ label, options, name, value, defaultValue, onChange, propsCompon
1857
2018
  className: open || valueState ? "yr3Input--active" : ""
1858
2019
  }
1859
2020
  ),
1860
- /* @__PURE__ */ jsxs11("div", { className: "yr3Select-wrapper", ref, children: [
1861
- /* @__PURE__ */ jsxs11("div", { className: `yr3Select ${open ? "yr3Select--open" : ""}`, "data-testid": "yr3Select-wrapper", style: composeStyles(propsComponent?.wrapper?.ui, propsComponent?.wrapper?.style), children: [
1862
- /* @__PURE__ */ jsx33("div", { className: "yr3Select--control", children: valueState }),
1863
- /* @__PURE__ */ jsx33("div", { className: "yr3Select--icon", onClick: () => setOpen((prev) => !prev), "data-testid": "yr3Select-icon", children: propsComponent?.icon?.component ? propsComponent.icon.component : /* @__PURE__ */ jsx33(
2021
+ /* @__PURE__ */ jsxs13("div", { className: "yr3Select-wrapper", ref, children: [
2022
+ /* @__PURE__ */ jsxs13("div", { className: `yr3Select ${open ? "yr3Select--open" : ""}`, "data-testid": "yr3Select-wrapper", style: composeStyles(propsComponent?.wrapper?.ui, propsComponent?.wrapper?.style), children: [
2023
+ /* @__PURE__ */ jsx35("div", { className: "yr3Select--control", children: valueState }),
2024
+ /* @__PURE__ */ jsx35("div", { className: "yr3Select--icon", onClick: () => setOpen((prev) => !prev), "data-testid": "yr3Select-icon", children: propsComponent?.icon?.component ? propsComponent.icon.component : /* @__PURE__ */ jsx35(
1864
2025
  IconDown,
1865
2026
  {
1866
2027
  width: propsComponent?.icon?.style?.width || 26,
@@ -1870,13 +2031,13 @@ var Select = ({ label, options, name, value, defaultValue, onChange, propsCompon
1870
2031
  }
1871
2032
  ) })
1872
2033
  ] }),
1873
- open && /* @__PURE__ */ jsx33(
2034
+ open && /* @__PURE__ */ jsx35(
1874
2035
  "div",
1875
2036
  {
1876
2037
  className: "yr3Select--menu",
1877
2038
  style: composeStyles(propsComponent?.menu?.ui, propsComponent?.menu?.style),
1878
2039
  "data-testid": "yr3Select-menu",
1879
- children: options.map((opt) => /* @__PURE__ */ jsx33(
2040
+ children: options.map((opt) => /* @__PURE__ */ jsx35(
1880
2041
  "div",
1881
2042
  {
1882
2043
  className: "yr3Select--option",
@@ -1908,8 +2069,8 @@ var Select = ({ label, options, name, value, defaultValue, onChange, propsCompon
1908
2069
  };
1909
2070
 
1910
2071
  // src/components/Slide/Slide.tsx
1911
- import * as React17 from "react";
1912
- import { jsx as jsx34 } from "react/jsx-runtime";
2072
+ import * as React19 from "react";
2073
+ import { jsx as jsx36 } from "react/jsx-runtime";
1913
2074
  var Slide = ({
1914
2075
  in: inProp,
1915
2076
  children,
@@ -1923,7 +2084,7 @@ var Slide = ({
1923
2084
  [direction]: true,
1924
2085
  "in": !!inProp
1925
2086
  });
1926
- React17.useEffect(() => {
2087
+ React19.useEffect(() => {
1927
2088
  let timeoutId;
1928
2089
  if (inProp) {
1929
2090
  timeoutId = setTimeout(() => {
@@ -1933,19 +2094,19 @@ var Slide = ({
1933
2094
  return () => clearTimeout(timeoutId);
1934
2095
  }, [inProp, duration, onTransitionEnd]);
1935
2096
  const uiStyleContent = uiStyle({ ...propsComponent?.slide?.ui, transitionDuration: `${duration}ms` });
1936
- return /* @__PURE__ */ jsx34(
2097
+ return /* @__PURE__ */ jsx36(
1937
2098
  "div",
1938
2099
  {
1939
2100
  className: "yr3Slide",
1940
2101
  style: uiStyle({ position: "relative", zIndex: 4, overflow: "hidden" }),
1941
2102
  "data-testid": "yr3Slide",
1942
- children: /* @__PURE__ */ jsx34(
2103
+ children: /* @__PURE__ */ jsx36(
1943
2104
  "div",
1944
2105
  {
1945
2106
  className: classNameContent,
1946
2107
  style: composeStyles(uiStyleContent, propsComponent?.slide?.style || {}),
1947
2108
  "data-testid": "yr3Slide-content",
1948
- children: /* @__PURE__ */ jsx34(Box, { ...propsComponent?.box, "data-testid": "yr3Slide-box", children })
2109
+ children: /* @__PURE__ */ jsx36(Box, { ...propsComponent?.box, "data-testid": "yr3Slide-box", children })
1949
2110
  }
1950
2111
  )
1951
2112
  }
@@ -1953,7 +2114,7 @@ var Slide = ({
1953
2114
  };
1954
2115
 
1955
2116
  // src/components/Switch/Switch.tsx
1956
- import * as React18 from "react";
2117
+ import * as React20 from "react";
1957
2118
 
1958
2119
  // src/components/Switch/switch.variants.ts
1959
2120
  var switchVariants = createVariants({
@@ -1982,7 +2143,7 @@ var switchVariants = createVariants({
1982
2143
  });
1983
2144
 
1984
2145
  // src/components/Switch/Switch.tsx
1985
- import { jsx as jsx35, jsxs as jsxs12 } from "react/jsx-runtime";
2146
+ import { jsx as jsx37, jsxs as jsxs14 } from "react/jsx-runtime";
1986
2147
  var Switch = ({
1987
2148
  checked,
1988
2149
  defaultChecked,
@@ -1992,7 +2153,7 @@ var Switch = ({
1992
2153
  size = "sm",
1993
2154
  label
1994
2155
  }) => {
1995
- const [internal, setInternal] = React18.useState(defaultChecked || false);
2156
+ const [internal, setInternal] = React20.useState(defaultChecked || false);
1996
2157
  const classname = switchVariants({ colors: color, size, disabled: !!disabled, checked: checked ?? internal });
1997
2158
  const isControlled = checked !== void 0;
1998
2159
  const value = isControlled ? checked : internal;
@@ -2000,13 +2161,13 @@ var Switch = ({
2000
2161
  if (!isControlled) setInternal(e.target.checked);
2001
2162
  onChange?.(e, e.target.checked);
2002
2163
  };
2003
- return /* @__PURE__ */ jsxs12(
2164
+ return /* @__PURE__ */ jsxs14(
2004
2165
  "label",
2005
2166
  {
2006
2167
  className: classname,
2007
2168
  "data-testid": "yr3Switch",
2008
2169
  children: [
2009
- /* @__PURE__ */ jsx35(
2170
+ /* @__PURE__ */ jsx37(
2010
2171
  "input",
2011
2172
  {
2012
2173
  type: "checkbox",
@@ -2015,17 +2176,17 @@ var Switch = ({
2015
2176
  disabled
2016
2177
  }
2017
2178
  ),
2018
- /* @__PURE__ */ jsx35("span", { className: "yr3Switch--track", children: /* @__PURE__ */ jsx35("span", { className: "yr3Switch--thumb" }) }),
2019
- /* @__PURE__ */ jsx35("span", { className: "yr3Switch--label", "data-testid": "yr3Switch-label", children: label })
2179
+ /* @__PURE__ */ jsx37("span", { className: "yr3Switch--track", children: /* @__PURE__ */ jsx37("span", { className: "yr3Switch--thumb" }) }),
2180
+ /* @__PURE__ */ jsx37("span", { className: "yr3Switch--label", "data-testid": "yr3Switch-label", children: label })
2020
2181
  ]
2021
2182
  }
2022
2183
  );
2023
2184
  };
2024
2185
 
2025
2186
  // src/Icons/IconSearch.tsx
2026
- import { jsx as jsx36 } from "react/jsx-runtime";
2187
+ import { jsx as jsx38 } from "react/jsx-runtime";
2027
2188
  var IconSearch = (props) => {
2028
- return /* @__PURE__ */ jsx36("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__ */ jsx36(
2189
+ return /* @__PURE__ */ jsx38("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__ */ jsx38(
2029
2190
  "path",
2030
2191
  {
2031
2192
  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",
@@ -2056,11 +2217,11 @@ var baseTokens = {
2056
2217
  };
2057
2218
 
2058
2219
  // src/theme/notistackContext.tsx
2059
- import * as React19 from "react";
2060
- import { jsx as jsx37, jsxs as jsxs13 } from "react/jsx-runtime";
2061
- var NotistackContext = React19.createContext(null);
2220
+ import * as React21 from "react";
2221
+ import { jsx as jsx39, jsxs as jsxs15 } from "react/jsx-runtime";
2222
+ var NotistackContext = React21.createContext(null);
2062
2223
  var NotistackProvider = ({ children }) => {
2063
- const [snacks, setSnacks] = React19.useState([]);
2224
+ const [snacks, setSnacks] = React21.useState([]);
2064
2225
  const enqueueNotistack = (snack) => {
2065
2226
  const id = Date.now();
2066
2227
  setSnacks((prev) => [...prev, { ...snack, id, exiting: false }]);
@@ -2075,23 +2236,23 @@ var NotistackProvider = ({ children }) => {
2075
2236
  setSnacks((prev) => prev.filter((s) => s.id !== id));
2076
2237
  }, duration + exitDuration);
2077
2238
  };
2078
- return /* @__PURE__ */ jsxs13(NotistackContext.Provider, { value: { enqueueNotistack }, children: [
2239
+ return /* @__PURE__ */ jsxs15(NotistackContext.Provider, { value: { enqueueNotistack }, children: [
2079
2240
  children,
2080
- /* @__PURE__ */ jsx37("div", { className: "yr3NotistackContainer", children: snacks.map((snack) => /* @__PURE__ */ jsx37(Notistack, { ...snack }, snack.id)) })
2241
+ /* @__PURE__ */ jsx39("div", { className: "yr3NotistackContainer", children: snacks.map((snack) => /* @__PURE__ */ jsx39(Notistack, { ...snack }, snack.id)) })
2081
2242
  ] });
2082
2243
  };
2083
- var useNotistack = () => React19.useContext(NotistackContext);
2244
+ var useNotistack = () => React21.useContext(NotistackContext);
2084
2245
 
2085
2246
  // src/theme/useMediaQuery.tsx
2086
- import * as React20 from "react";
2247
+ import * as React22 from "react";
2087
2248
  function useMediaQuery(query) {
2088
2249
  const theme = useTheme();
2089
2250
  const computedQuery = typeof query === "function" ? query(theme) : query;
2090
- const [matches, setMatches] = React20.useState(() => {
2251
+ const [matches, setMatches] = React22.useState(() => {
2091
2252
  if (typeof window === "undefined") return false;
2092
2253
  return window.matchMedia(computedQuery).matches;
2093
2254
  });
2094
- React20.useEffect(() => {
2255
+ React22.useEffect(() => {
2095
2256
  if (typeof window === "undefined") return;
2096
2257
  const media = window.matchMedia(computedQuery);
2097
2258
  const listener = () => setMatches(media.matches);
@@ -2140,7 +2301,9 @@ export {
2140
2301
  IconDown,
2141
2302
  IconSearch,
2142
2303
  Image,
2304
+ ImageDropzone,
2143
2305
  Input,
2306
+ InputArea,
2144
2307
  Label,
2145
2308
  Modal,
2146
2309
  ModalContainer,