thailife-react 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
+ var styled = require('styled-components');
6
7
 
7
8
  function _interopNamespaceDefault(e) {
8
9
  var n = Object.create(null);
@@ -72,6 +73,13 @@ function _objectWithoutPropertiesLoose(r, e) {
72
73
  }
73
74
  return t;
74
75
  }
76
+ function _taggedTemplateLiteral(e, t) {
77
+ return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
78
+ raw: {
79
+ value: Object.freeze(t)
80
+ }
81
+ }));
82
+ }
75
83
  function _toPrimitive(t, r) {
76
84
  if ("object" != typeof t || !t) return t;
77
85
  var e = t[Symbol.toPrimitive];
@@ -1448,21 +1456,66 @@ if (process.env.NODE_ENV === 'production') {
1448
1456
 
1449
1457
  var jsxRuntimeExports = jsxRuntime.exports;
1450
1458
 
1451
- function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
1452
-
1453
- /**
1454
- * Utility function to merge Tailwind CSS classes
1455
- * Uses clsx for conditional classes and basic merging
1456
- */
1457
- function cn() {
1458
- for (var _len = arguments.length, inputs = new Array(_len), _key = 0; _key < _len; _key++) {
1459
- inputs[_key] = arguments[_key];
1460
- }
1461
- return clsx(inputs);
1462
- }
1463
-
1464
1459
  const _excluded$6 = ["className", "color", "variant", "size", "fullWidth", "loading", "disabled", "children"];
1465
- const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1460
+ var _templateObject$6, _templateObject2$6, _templateObject3$6, _templateObject4$6, _templateObject5$6, _templateObject6$6, _templateObject7$6, _templateObject8$6, _templateObject9$6, _templateObject0$6;
1461
+ const StyledButton = styled.button(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n border-radius: ", ";\n font-family: ", ";\n font-weight: 500;\n cursor: pointer;\n transition: all ", ";\n outline: none;\n\n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n ", "\n\n ", "\n\n ", "\n"])), _ref => {
1462
+ let {
1463
+ theme
1464
+ } = _ref;
1465
+ return theme.borderRadius.md;
1466
+ }, _ref2 => {
1467
+ let {
1468
+ theme
1469
+ } = _ref2;
1470
+ return theme.fontFamily.sans.join(", ");
1471
+ }, _ref3 => {
1472
+ let {
1473
+ theme
1474
+ } = _ref3;
1475
+ return theme.transitions.base;
1476
+ }, _ref4 => {
1477
+ let {
1478
+ theme
1479
+ } = _ref4;
1480
+ return theme.colors.primary;
1481
+ }, _ref5 => {
1482
+ let {
1483
+ variant,
1484
+ color,
1485
+ theme
1486
+ } = _ref5;
1487
+ if (variant === "contained") {
1488
+ return styled.css(_templateObject2$6 || (_templateObject2$6 = _taggedTemplateLiteral(["\n background-color: ", ";\n color: ", ";\n &:hover:not(:disabled) {\n background-color: ", "cc;\n }\n "])), theme.colors[color || "primary"], theme.colors.white, theme.colors[color || "primary"]);
1489
+ }
1490
+ if (variant === "outlined") {
1491
+ return styled.css(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteral(["\n background-color: transparent;\n border: 1px solid ", ";\n color: ", ";\n &:hover:not(:disabled) {\n background-color: ", "1a;\n }\n "])), theme.colors[color || "primary"], theme.colors[color || "primary"], theme.colors[color || "primary"]);
1492
+ }
1493
+ if (variant === "link") {
1494
+ return styled.css(_templateObject4$6 || (_templateObject4$6 = _taggedTemplateLiteral(["\n background-color: transparent;\n color: ", ";\n text-decoration: underline;\n &:hover:not(:disabled) {\n text-decoration: none;\n }\n "])), theme.colors[color || "primary"]);
1495
+ }
1496
+ return styled.css(_templateObject5$6 || (_templateObject5$6 = _taggedTemplateLiteral([""])));
1497
+ }, _ref6 => {
1498
+ let {
1499
+ size,
1500
+ theme
1501
+ } = _ref6;
1502
+ if (size === "sm") {
1503
+ return styled.css(_templateObject6$6 || (_templateObject6$6 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[3], theme.spacing[3], theme.fontSize.sm);
1504
+ }
1505
+ if (size === "md") {
1506
+ return styled.css(_templateObject7$6 || (_templateObject7$6 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[2], theme.spacing[4], theme.fontSize.sm);
1507
+ }
1508
+ if (size === "lg") {
1509
+ return styled.css(_templateObject8$6 || (_templateObject8$6 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[3], theme.spacing[6], theme.fontSize.base);
1510
+ }
1511
+ return styled.css(_templateObject9$6 || (_templateObject9$6 = _taggedTemplateLiteral([""])));
1512
+ }, _ref7 => {
1513
+ let {
1514
+ fullWidth
1515
+ } = _ref7;
1516
+ return fullWidth && styled.css(_templateObject0$6 || (_templateObject0$6 = _taggedTemplateLiteral(["\n width: 100%;\n "])));
1517
+ });
1518
+ const Button = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
1466
1519
  let {
1467
1520
  className,
1468
1521
  color = "primary",
@@ -1472,38 +1525,17 @@ const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1472
1525
  loading = false,
1473
1526
  disabled,
1474
1527
  children
1475
- } = _ref,
1476
- props = _objectWithoutProperties(_ref, _excluded$6);
1477
- const baseClasses = cn(className, "btn transition-all duration-300 flex items-center justify-center");
1478
- const variants = {
1479
- contained: {
1480
- primary: "bg-primary hover:bg-primary/80 text-white",
1481
- error: "bg-error hover:bg-error/80 text-white",
1482
- dark: "bg-dark hover:bg-dark/80 text-white",
1483
- light: "bg-light hover:bg-light/80 text-white"
1484
- },
1485
- outlined: {
1486
- primary: "border border-primary text-primary hover:bg-primary/10",
1487
- error: "border border-error text-error hover:bg-error/10",
1488
- dark: "border border-dark text-dark hover:bg-dark/10",
1489
- light: "border border-light text-light hover:bg-light/10"
1490
- },
1491
- link: {
1492
- primary: "text-primary underline",
1493
- error: "text-error underline",
1494
- dark: "text-dark underline",
1495
- light: "text-light underline"
1496
- }
1497
- };
1498
- const sizes = {
1499
- sm: "px-3 py-1.5 text-sm",
1500
- md: "px-4 py-2 text-sm",
1501
- lg: "px-6 py-3 text-base"
1502
- };
1503
- return jsxRuntimeExports.jsx("button", _objectSpread2(_objectSpread2({
1504
- className: cn(baseClasses, variants[variant][color], sizes[size], fullWidth && "w-full", (disabled || loading) && "opacity-50 cursor-not-allowed", className),
1505
- ref: ref,
1506
- disabled: disabled || loading
1528
+ } = _ref8,
1529
+ props = _objectWithoutProperties(_ref8, _excluded$6);
1530
+ return jsxRuntimeExports.jsx(StyledButton, _objectSpread2(_objectSpread2({
1531
+ className: className,
1532
+ color: color,
1533
+ variant: variant,
1534
+ size: size,
1535
+ fullWidth: fullWidth,
1536
+ loading: loading,
1537
+ disabled: disabled || loading,
1538
+ ref: ref
1507
1539
  }, props), {}, {
1508
1540
  children: children
1509
1541
  }));
@@ -1511,7 +1543,100 @@ const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1511
1543
  Button.displayName = "Button";
1512
1544
 
1513
1545
  const _excluded$5 = ["className", "type", "label", "error", "helperText", "size", "fullWidth", "id"];
1514
- const Input = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1546
+ var _templateObject$5, _templateObject2$5, _templateObject3$5, _templateObject4$5, _templateObject5$5, _templateObject6$5, _templateObject7$5, _templateObject8$5, _templateObject9$5, _templateObject0$5;
1547
+ const InputContainer = styled.div(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n ", "\n"])), _ref => {
1548
+ let {
1549
+ fullWidth
1550
+ } = _ref;
1551
+ return fullWidth && styled.css(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteral(["\n width: 100%;\n "])));
1552
+ });
1553
+ const InputLabel = styled.label(_templateObject3$5 || (_templateObject3$5 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n font-size: ", ";\n font-weight: 500;\n color: ", ";\n"])), _ref2 => {
1554
+ let {
1555
+ theme
1556
+ } = _ref2;
1557
+ return theme.spacing[1];
1558
+ }, _ref3 => {
1559
+ let {
1560
+ theme
1561
+ } = _ref3;
1562
+ return theme.fontSize.sm;
1563
+ }, _ref4 => {
1564
+ let {
1565
+ theme
1566
+ } = _ref4;
1567
+ return theme.colors.gray[700];
1568
+ });
1569
+ const StyledInput = styled.input(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n border-radius: ", ";\n transition: border-color ", ";\n outline: none;\n font-family: ", ";\n\n &:focus {\n border-color: ", ";\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n background-color: ", ";\n }\n\n ", "\n\n ", "\n"])), _ref5 => {
1570
+ let {
1571
+ theme,
1572
+ hasError
1573
+ } = _ref5;
1574
+ return hasError ? theme.colors.error : theme.colors.gray[300];
1575
+ }, _ref6 => {
1576
+ let {
1577
+ theme
1578
+ } = _ref6;
1579
+ return theme.borderRadius.md;
1580
+ }, _ref7 => {
1581
+ let {
1582
+ theme
1583
+ } = _ref7;
1584
+ return theme.transitions.base;
1585
+ }, _ref8 => {
1586
+ let {
1587
+ theme
1588
+ } = _ref8;
1589
+ return theme.fontFamily.sans.join(", ");
1590
+ }, _ref9 => {
1591
+ let {
1592
+ theme,
1593
+ hasError
1594
+ } = _ref9;
1595
+ return hasError ? theme.colors.error : theme.colors.primary;
1596
+ }, _ref0 => {
1597
+ let {
1598
+ theme
1599
+ } = _ref0;
1600
+ return theme.colors.gray[50];
1601
+ }, _ref1 => {
1602
+ let {
1603
+ size,
1604
+ theme
1605
+ } = _ref1;
1606
+ if (size === "sm") {
1607
+ return styled.css(_templateObject5$5 || (_templateObject5$5 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[3], theme.spacing[3], theme.fontSize.sm);
1608
+ }
1609
+ if (size === "md") {
1610
+ return styled.css(_templateObject6$5 || (_templateObject6$5 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[2], theme.spacing[4], theme.fontSize.sm);
1611
+ }
1612
+ if (size === "lg") {
1613
+ return styled.css(_templateObject7$5 || (_templateObject7$5 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[3], theme.spacing[4], theme.fontSize.base);
1614
+ }
1615
+ return styled.css(_templateObject8$5 || (_templateObject8$5 = _taggedTemplateLiteral([""])));
1616
+ }, _ref10 => {
1617
+ let {
1618
+ fullWidth
1619
+ } = _ref10;
1620
+ return fullWidth && styled.css(_templateObject9$5 || (_templateObject9$5 = _taggedTemplateLiteral(["\n width: 100%;\n "])));
1621
+ });
1622
+ const HelperText$5 = styled.p(_templateObject0$5 || (_templateObject0$5 = _taggedTemplateLiteral(["\n margin-top: ", ";\n font-size: ", ";\n color: ", ";\n"])), _ref11 => {
1623
+ let {
1624
+ theme
1625
+ } = _ref11;
1626
+ return theme.spacing[1];
1627
+ }, _ref12 => {
1628
+ let {
1629
+ theme
1630
+ } = _ref12;
1631
+ return theme.fontSize.xs;
1632
+ }, _ref13 => {
1633
+ let {
1634
+ theme,
1635
+ hasError
1636
+ } = _ref13;
1637
+ return hasError ? theme.colors.error : theme.colors.gray[500];
1638
+ });
1639
+ const Input = /*#__PURE__*/React.forwardRef((_ref14, ref) => {
1515
1640
  let {
1516
1641
  className,
1517
1642
  type = "text",
@@ -1521,28 +1646,24 @@ const Input = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1521
1646
  size = "md",
1522
1647
  fullWidth = false,
1523
1648
  id
1524
- } = _ref,
1525
- props = _objectWithoutProperties(_ref, _excluded$5);
1649
+ } = _ref14,
1650
+ props = _objectWithoutProperties(_ref14, _excluded$5);
1526
1651
  const inputId = id || "input-".concat(Math.random().toString(36).substr(2, 9));
1527
- const sizes = {
1528
- sm: "px-3 py-1.5 text-sm",
1529
- md: "px-4 py-2 text-sm",
1530
- lg: "px-4 py-3 text-base"
1531
- };
1532
- const baseClasses = cn("border transition-colors focus:outline-none focus:border-transparent", error ? "border-red-500 focus:ring-red-500" : "border-secondary focus:border-primary", "disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-secondary-50", sizes[size], fullWidth && "w-full", className);
1533
- return jsxRuntimeExports.jsxs("div", {
1534
- className: cn("flex flex-col", fullWidth && "w-full"),
1535
- children: [label && jsxRuntimeExports.jsx("label", {
1652
+ return jsxRuntimeExports.jsxs(InputContainer, {
1653
+ fullWidth: fullWidth,
1654
+ children: [label && jsxRuntimeExports.jsx(InputLabel, {
1536
1655
  htmlFor: inputId,
1537
- className: "mb-1 text-sm font-medium text-secondary-700",
1538
1656
  children: label
1539
- }), jsxRuntimeExports.jsx("input", _objectSpread2({
1657
+ }), jsxRuntimeExports.jsx(StyledInput, _objectSpread2({
1540
1658
  type: type,
1541
- className: baseClasses,
1659
+ size: size,
1660
+ fullWidth: fullWidth,
1661
+ hasError: !!error,
1662
+ className: className,
1542
1663
  ref: ref,
1543
1664
  id: inputId
1544
- }, props)), (error || helperText) && jsxRuntimeExports.jsx("p", {
1545
- className: cn("mt-1 text-xs", error ? "text-red-600" : "text-secondary-500"),
1665
+ }, props)), (error || helperText) && jsxRuntimeExports.jsx(HelperText$5, {
1666
+ hasError: !!error,
1546
1667
  children: error || helperText
1547
1668
  })]
1548
1669
  });
@@ -1550,7 +1671,100 @@ const Input = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1550
1671
  Input.displayName = "Input";
1551
1672
 
1552
1673
  const _excluded$4 = ["className", "label", "error", "helperText", "size", "fullWidth", "rows", "id"];
1553
- const Textarea = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1674
+ var _templateObject$4, _templateObject2$4, _templateObject3$4, _templateObject4$4, _templateObject5$4, _templateObject6$4, _templateObject7$4, _templateObject8$4, _templateObject9$4, _templateObject0$4;
1675
+ const TextareaContainer = styled.div(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n ", "\n"])), _ref => {
1676
+ let {
1677
+ fullWidth
1678
+ } = _ref;
1679
+ return fullWidth && styled.css(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteral(["\n width: 100%;\n "])));
1680
+ });
1681
+ const TextareaLabel = styled.label(_templateObject3$4 || (_templateObject3$4 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n font-size: ", ";\n font-weight: 500;\n color: ", ";\n"])), _ref2 => {
1682
+ let {
1683
+ theme
1684
+ } = _ref2;
1685
+ return theme.spacing[1];
1686
+ }, _ref3 => {
1687
+ let {
1688
+ theme
1689
+ } = _ref3;
1690
+ return theme.fontSize.sm;
1691
+ }, _ref4 => {
1692
+ let {
1693
+ theme
1694
+ } = _ref4;
1695
+ return theme.colors.gray[700];
1696
+ });
1697
+ const StyledTextarea = styled.textarea(_templateObject4$4 || (_templateObject4$4 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n border-radius: ", ";\n transition: border-color ", ";\n outline: none;\n resize: vertical;\n font-family: ", ";\n\n &:focus {\n border-color: ", ";\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n background-color: ", ";\n }\n\n ", "\n\n ", "\n"])), _ref5 => {
1698
+ let {
1699
+ theme,
1700
+ hasError
1701
+ } = _ref5;
1702
+ return hasError ? theme.colors.error : theme.colors.gray[300];
1703
+ }, _ref6 => {
1704
+ let {
1705
+ theme
1706
+ } = _ref6;
1707
+ return theme.borderRadius.md;
1708
+ }, _ref7 => {
1709
+ let {
1710
+ theme
1711
+ } = _ref7;
1712
+ return theme.transitions.base;
1713
+ }, _ref8 => {
1714
+ let {
1715
+ theme
1716
+ } = _ref8;
1717
+ return theme.fontFamily.sans.join(", ");
1718
+ }, _ref9 => {
1719
+ let {
1720
+ theme,
1721
+ hasError
1722
+ } = _ref9;
1723
+ return hasError ? theme.colors.error : theme.colors.primary;
1724
+ }, _ref0 => {
1725
+ let {
1726
+ theme
1727
+ } = _ref0;
1728
+ return theme.colors.gray[50];
1729
+ }, _ref1 => {
1730
+ let {
1731
+ size,
1732
+ theme
1733
+ } = _ref1;
1734
+ if (size === "sm") {
1735
+ return styled.css(_templateObject5$4 || (_templateObject5$4 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[3], theme.spacing[3], theme.fontSize.sm);
1736
+ }
1737
+ if (size === "md") {
1738
+ return styled.css(_templateObject6$4 || (_templateObject6$4 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[2], theme.spacing[4], theme.fontSize.sm);
1739
+ }
1740
+ if (size === "lg") {
1741
+ return styled.css(_templateObject7$4 || (_templateObject7$4 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[3], theme.spacing[4], theme.fontSize.base);
1742
+ }
1743
+ return styled.css(_templateObject8$4 || (_templateObject8$4 = _taggedTemplateLiteral([""])));
1744
+ }, _ref10 => {
1745
+ let {
1746
+ fullWidth
1747
+ } = _ref10;
1748
+ return fullWidth && styled.css(_templateObject9$4 || (_templateObject9$4 = _taggedTemplateLiteral(["\n width: 100%;\n "])));
1749
+ });
1750
+ const HelperText$4 = styled.p(_templateObject0$4 || (_templateObject0$4 = _taggedTemplateLiteral(["\n margin-top: ", ";\n font-size: ", ";\n color: ", ";\n"])), _ref11 => {
1751
+ let {
1752
+ theme
1753
+ } = _ref11;
1754
+ return theme.spacing[1];
1755
+ }, _ref12 => {
1756
+ let {
1757
+ theme
1758
+ } = _ref12;
1759
+ return theme.fontSize.xs;
1760
+ }, _ref13 => {
1761
+ let {
1762
+ theme,
1763
+ hasError
1764
+ } = _ref13;
1765
+ return hasError ? theme.colors.error : theme.colors.gray[500];
1766
+ });
1767
+ const Textarea = /*#__PURE__*/React.forwardRef((_ref14, ref) => {
1554
1768
  let {
1555
1769
  className,
1556
1770
  label,
@@ -1560,28 +1774,24 @@ const Textarea = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1560
1774
  fullWidth = false,
1561
1775
  rows = 3,
1562
1776
  id
1563
- } = _ref,
1564
- props = _objectWithoutProperties(_ref, _excluded$4);
1777
+ } = _ref14,
1778
+ props = _objectWithoutProperties(_ref14, _excluded$4);
1565
1779
  const textareaId = id || "textarea-".concat(Math.random().toString(36).substr(2, 9));
1566
- const sizes = {
1567
- sm: "px-3 py-1.5 text-sm",
1568
- md: "px-4 py-2 text-sm",
1569
- lg: "px-4 py-3 text-base"
1570
- };
1571
- const baseClasses = cn("border transition-colors focus:outline-none focus:border-transparent resize-vertical", error ? "border-red-500 focus:ring-red-500" : "border-secondary focus:border-primary", "disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-secondary-50", sizes[size], fullWidth && "w-full", className);
1572
- return jsxRuntimeExports.jsxs("div", {
1573
- className: cn("flex flex-col", fullWidth && "w-full"),
1574
- children: [label && jsxRuntimeExports.jsx("label", {
1780
+ return jsxRuntimeExports.jsxs(TextareaContainer, {
1781
+ fullWidth: fullWidth,
1782
+ children: [label && jsxRuntimeExports.jsx(TextareaLabel, {
1575
1783
  htmlFor: textareaId,
1576
- className: "mb-1 text-sm font-medium text-secondary-700",
1577
1784
  children: label
1578
- }), jsxRuntimeExports.jsx("textarea", _objectSpread2({
1579
- className: baseClasses,
1785
+ }), jsxRuntimeExports.jsx(StyledTextarea, _objectSpread2({
1786
+ size: size,
1787
+ fullWidth: fullWidth,
1788
+ hasError: !!error,
1789
+ className: className,
1580
1790
  ref: ref,
1581
1791
  id: textareaId,
1582
1792
  rows: rows
1583
- }, props)), (error || helperText) && jsxRuntimeExports.jsx("p", {
1584
- className: cn("mt-1 text-xs", error ? "text-red-600" : "text-secondary-500"),
1793
+ }, props)), (error || helperText) && jsxRuntimeExports.jsx(HelperText$4, {
1794
+ hasError: !!error,
1585
1795
  children: error || helperText
1586
1796
  })]
1587
1797
  });
@@ -1589,7 +1799,115 @@ const Textarea = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1589
1799
  Textarea.displayName = "Textarea";
1590
1800
 
1591
1801
  const _excluded$3 = ["className", "label", "error", "helperText", "size", "fullWidth", "accept", "multiple", "buttonText", "id"];
1592
- const InputFile = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1802
+ var _templateObject$3, _templateObject2$3, _templateObject3$3, _templateObject4$3, _templateObject5$3, _templateObject6$3, _templateObject7$3, _templateObject8$3, _templateObject9$3, _templateObject0$3, _templateObject1$3, _templateObject10$3, _templateObject11$2, _templateObject12$2;
1803
+ const InputFileContainer = styled.div(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n ", "\n"])), _ref => {
1804
+ let {
1805
+ fullWidth
1806
+ } = _ref;
1807
+ return fullWidth && styled.css(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteral(["\n width: 100%;\n "])));
1808
+ });
1809
+ const InputFileLabel = styled.label(_templateObject3$3 || (_templateObject3$3 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n font-size: ", ";\n font-weight: 500;\n color: ", ";\n"])), _ref2 => {
1810
+ let {
1811
+ theme
1812
+ } = _ref2;
1813
+ return theme.spacing[1];
1814
+ }, _ref3 => {
1815
+ let {
1816
+ theme
1817
+ } = _ref3;
1818
+ return theme.fontSize.sm;
1819
+ }, _ref4 => {
1820
+ let {
1821
+ theme
1822
+ } = _ref4;
1823
+ return theme.colors.gray[700];
1824
+ });
1825
+ const InputFileWrapper = styled.div(_templateObject4$3 || (_templateObject4$3 = _taggedTemplateLiteral(["\n position: relative;\n"])));
1826
+ const HiddenInput = styled.input(_templateObject5$3 || (_templateObject5$3 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n"])));
1827
+ const FileUploadArea = styled.div(_templateObject6$3 || (_templateObject6$3 = _taggedTemplateLiteral(["\n border: 2px dashed ", ";\n transition: all ", ";\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &:hover {\n border-color: ", ";\n }\n\n &:focus-within {\n border-color: ", ";\n }\n\n ", "\n\n ", "\n"])), _ref5 => {
1828
+ let {
1829
+ theme,
1830
+ hasError
1831
+ } = _ref5;
1832
+ return hasError ? theme.colors.error : theme.colors.gray[300];
1833
+ }, _ref6 => {
1834
+ let {
1835
+ theme
1836
+ } = _ref6;
1837
+ return theme.transitions.base;
1838
+ }, _ref7 => {
1839
+ let {
1840
+ theme,
1841
+ hasError
1842
+ } = _ref7;
1843
+ return hasError ? theme.colors.error : theme.colors.primary;
1844
+ }, _ref8 => {
1845
+ let {
1846
+ theme,
1847
+ hasError
1848
+ } = _ref8;
1849
+ return hasError ? theme.colors.error : theme.colors.primary;
1850
+ }, _ref9 => {
1851
+ let {
1852
+ size,
1853
+ theme
1854
+ } = _ref9;
1855
+ if (size === "sm") {
1856
+ return styled.css(_templateObject7$3 || (_templateObject7$3 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[3], theme.spacing[3], theme.fontSize.sm);
1857
+ }
1858
+ if (size === "md") {
1859
+ return styled.css(_templateObject8$3 || (_templateObject8$3 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[2], theme.spacing[4], theme.fontSize.base);
1860
+ }
1861
+ if (size === "lg") {
1862
+ return styled.css(_templateObject9$3 || (_templateObject9$3 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[3], theme.spacing[4], theme.fontSize.base);
1863
+ }
1864
+ return styled.css(_templateObject0$3 || (_templateObject0$3 = _taggedTemplateLiteral([""])));
1865
+ }, _ref0 => {
1866
+ let {
1867
+ fullWidth
1868
+ } = _ref0;
1869
+ return fullWidth && styled.css(_templateObject1$3 || (_templateObject1$3 = _taggedTemplateLiteral(["\n width: 100%;\n "])));
1870
+ });
1871
+ const ButtonText = styled.span(_templateObject10$3 || (_templateObject10$3 = _taggedTemplateLiteral(["\n color: ", ";\n"])), _ref1 => {
1872
+ let {
1873
+ theme
1874
+ } = _ref1;
1875
+ return theme.colors.gray[600];
1876
+ });
1877
+ const MultipleText = styled.span(_templateObject11$2 || (_templateObject11$2 = _taggedTemplateLiteral(["\n margin-left: ", ";\n font-size: ", ";\n color: ", ";\n"])), _ref10 => {
1878
+ let {
1879
+ theme
1880
+ } = _ref10;
1881
+ return theme.spacing[1];
1882
+ }, _ref11 => {
1883
+ let {
1884
+ theme
1885
+ } = _ref11;
1886
+ return theme.fontSize.xs;
1887
+ }, _ref12 => {
1888
+ let {
1889
+ theme
1890
+ } = _ref12;
1891
+ return theme.colors.gray[500];
1892
+ });
1893
+ const HelperText$3 = styled.p(_templateObject12$2 || (_templateObject12$2 = _taggedTemplateLiteral(["\n margin-top: ", ";\n font-size: ", ";\n color: ", ";\n"])), _ref13 => {
1894
+ let {
1895
+ theme
1896
+ } = _ref13;
1897
+ return theme.spacing[1];
1898
+ }, _ref14 => {
1899
+ let {
1900
+ theme
1901
+ } = _ref14;
1902
+ return theme.fontSize.xs;
1903
+ }, _ref15 => {
1904
+ let {
1905
+ theme,
1906
+ hasError
1907
+ } = _ref15;
1908
+ return hasError ? theme.colors.error : theme.colors.gray[500];
1909
+ });
1910
+ const InputFile = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
1593
1911
  let {
1594
1912
  className,
1595
1913
  label,
@@ -1601,42 +1919,34 @@ const InputFile = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1601
1919
  multiple = false,
1602
1920
  buttonText = "Choose File",
1603
1921
  id
1604
- } = _ref,
1605
- props = _objectWithoutProperties(_ref, _excluded$3);
1922
+ } = _ref16,
1923
+ props = _objectWithoutProperties(_ref16, _excluded$3);
1606
1924
  const inputId = id || "file-input-".concat(Math.random().toString(36).substr(2, 9));
1607
- const sizes = {
1608
- sm: "px-3 py-1.5 text-sm",
1609
- md: "px-4 py-2 text-sm",
1610
- lg: "px-4 py-3 text-base"
1611
- };
1612
- const baseClasses = cn("border-2 border-dashed transition-colors focus:outline-none focus:border-transparent cursor-pointer", error ? "border-red-500 focus:ring-red-500 hover:border-red-400" : "border-secondary focus:border-primary hover:border-primary/60", "disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-secondary-50", sizes[size], fullWidth && "w-full", className);
1613
- return jsxRuntimeExports.jsxs("div", {
1614
- className: cn("flex flex-col", fullWidth && "w-full"),
1615
- children: [label && jsxRuntimeExports.jsx("label", {
1925
+ return jsxRuntimeExports.jsxs(InputFileContainer, {
1926
+ fullWidth: fullWidth,
1927
+ children: [label && jsxRuntimeExports.jsx(InputFileLabel, {
1616
1928
  htmlFor: inputId,
1617
- className: "mb-1 text-sm font-medium text-secondary-700",
1618
1929
  children: label
1619
- }), jsxRuntimeExports.jsxs("div", {
1620
- className: "relative",
1621
- children: [jsxRuntimeExports.jsx("input", _objectSpread2({
1930
+ }), jsxRuntimeExports.jsxs(InputFileWrapper, {
1931
+ children: [jsxRuntimeExports.jsx(HiddenInput, _objectSpread2({
1622
1932
  type: "file",
1623
- className: "absolute inset-0 w-full h-full opacity-0 cursor-pointer",
1624
1933
  ref: ref,
1625
1934
  id: inputId,
1626
1935
  accept: accept,
1627
1936
  multiple: multiple
1628
- }, props)), jsxRuntimeExports.jsxs("div", {
1629
- className: cn(baseClasses, "flex items-center justify-center"),
1630
- children: [jsxRuntimeExports.jsx("span", {
1631
- className: "text-secondary-600",
1937
+ }, props)), jsxRuntimeExports.jsxs(FileUploadArea, {
1938
+ size: size,
1939
+ fullWidth: fullWidth,
1940
+ hasError: !!error,
1941
+ className: className,
1942
+ children: [jsxRuntimeExports.jsx(ButtonText, {
1632
1943
  children: buttonText
1633
- }), multiple && jsxRuntimeExports.jsx("span", {
1634
- className: "ml-1 text-xs text-secondary-500",
1944
+ }), multiple && jsxRuntimeExports.jsx(MultipleText, {
1635
1945
  children: "(Multiple)"
1636
1946
  })]
1637
1947
  })]
1638
- }), (error || helperText) && jsxRuntimeExports.jsx("p", {
1639
- className: cn("mt-1 text-xs", error ? "text-red-600" : "text-secondary-500"),
1948
+ }), (error || helperText) && jsxRuntimeExports.jsx(HelperText$3, {
1949
+ hasError: !!error,
1640
1950
  children: error || helperText
1641
1951
  })]
1642
1952
  });
@@ -1644,7 +1954,102 @@ const InputFile = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1644
1954
  InputFile.displayName = "InputFile";
1645
1955
 
1646
1956
  const _excluded$2 = ["className", "label", "error", "helperText", "size", "fullWidth", "indeterminate", "id"];
1647
- const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1957
+ var _templateObject$2, _templateObject2$2, _templateObject3$2, _templateObject4$2, _templateObject5$2, _templateObject6$2, _templateObject7$2, _templateObject8$2, _templateObject9$2, _templateObject0$2, _templateObject1$2, _templateObject10$2, _templateObject11$1, _templateObject12$1, _templateObject13$1;
1958
+ const CheckboxContainer = styled.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: flex-start;\n ", "\n"])), _ref => {
1959
+ let {
1960
+ fullWidth
1961
+ } = _ref;
1962
+ return fullWidth && styled.css(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral(["\n width: 100%;\n "])));
1963
+ });
1964
+ const CheckboxWrapper = styled.div(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n height: ", ";\n"])), _ref2 => {
1965
+ let {
1966
+ theme
1967
+ } = _ref2;
1968
+ return theme.spacing[5];
1969
+ });
1970
+ const StyledCheckbox = styled.input(_templateObject4$2 || (_templateObject4$2 = _taggedTemplateLiteral(["\n border-radius: ", ";\n border: 1px solid ", ";\n transition: all ", ";\n outline: none;\n\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n ", "\n"])), _ref3 => {
1971
+ let {
1972
+ theme
1973
+ } = _ref3;
1974
+ return theme.borderRadius.md;
1975
+ }, _ref4 => {
1976
+ let {
1977
+ theme,
1978
+ hasError
1979
+ } = _ref4;
1980
+ return hasError ? theme.colors.error : theme.colors.gray[300];
1981
+ }, _ref5 => {
1982
+ let {
1983
+ theme
1984
+ } = _ref5;
1985
+ return theme.transitions.base;
1986
+ }, _ref6 => {
1987
+ let {
1988
+ theme,
1989
+ hasError
1990
+ } = _ref6;
1991
+ return hasError ? theme.colors.error : theme.colors.primary;
1992
+ }, _ref7 => {
1993
+ let {
1994
+ size,
1995
+ theme
1996
+ } = _ref7;
1997
+ if (size === "sm") {
1998
+ return styled.css(_templateObject5$2 || (_templateObject5$2 = _taggedTemplateLiteral(["\n width: ", ";\n height: ", ";\n "])), theme.spacing[4], theme.spacing[4]);
1999
+ }
2000
+ if (size === "md") {
2001
+ return styled.css(_templateObject6$2 || (_templateObject6$2 = _taggedTemplateLiteral(["\n width: ", ";\n height: ", ";\n "])), theme.spacing[5], theme.spacing[5]);
2002
+ }
2003
+ if (size === "lg") {
2004
+ return styled.css(_templateObject7$2 || (_templateObject7$2 = _taggedTemplateLiteral(["\n width: ", ";\n height: ", ";\n "])), theme.spacing[6], theme.spacing[6]);
2005
+ }
2006
+ return styled.css(_templateObject8$2 || (_templateObject8$2 = _taggedTemplateLiteral([""])));
2007
+ });
2008
+ const LabelContainer$1 = styled.div(_templateObject9$2 || (_templateObject9$2 = _taggedTemplateLiteral(["\n margin-left: ", ";\n"])), _ref8 => {
2009
+ let {
2010
+ theme
2011
+ } = _ref8;
2012
+ return theme.spacing[3];
2013
+ });
2014
+ const CheckboxLabel = styled.label(_templateObject0$2 || (_templateObject0$2 = _taggedTemplateLiteral(["\n font-weight: 500;\n color: ", ";\n cursor: pointer;\n\n ", "\n"])), _ref9 => {
2015
+ let {
2016
+ theme
2017
+ } = _ref9;
2018
+ return theme.colors.gray[700];
2019
+ }, _ref0 => {
2020
+ let {
2021
+ size,
2022
+ theme
2023
+ } = _ref0;
2024
+ if (size === "sm") {
2025
+ return styled.css(_templateObject1$2 || (_templateObject1$2 = _taggedTemplateLiteral(["\n font-size: ", ";\n "])), theme.fontSize.sm);
2026
+ }
2027
+ if (size === "md") {
2028
+ return styled.css(_templateObject10$2 || (_templateObject10$2 = _taggedTemplateLiteral(["\n font-size: ", ";\n "])), theme.fontSize.sm);
2029
+ }
2030
+ if (size === "lg") {
2031
+ return styled.css(_templateObject11$1 || (_templateObject11$1 = _taggedTemplateLiteral(["\n font-size: ", ";\n "])), theme.fontSize.base);
2032
+ }
2033
+ return styled.css(_templateObject12$1 || (_templateObject12$1 = _taggedTemplateLiteral([""])));
2034
+ });
2035
+ const HelperText$2 = styled.p(_templateObject13$1 || (_templateObject13$1 = _taggedTemplateLiteral(["\n margin-top: ", ";\n font-size: ", ";\n color: ", ";\n"])), _ref1 => {
2036
+ let {
2037
+ theme
2038
+ } = _ref1;
2039
+ return theme.spacing[1];
2040
+ }, _ref10 => {
2041
+ let {
2042
+ theme
2043
+ } = _ref10;
2044
+ return theme.fontSize.xs;
2045
+ }, _ref11 => {
2046
+ let {
2047
+ theme,
2048
+ hasError
2049
+ } = _ref11;
2050
+ return hasError ? theme.colors.error : theme.colors.gray[500];
2051
+ });
2052
+ const Checkbox = /*#__PURE__*/React.forwardRef((_ref12, ref) => {
1648
2053
  let {
1649
2054
  className,
1650
2055
  label,
@@ -1654,43 +2059,32 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1654
2059
  fullWidth = false,
1655
2060
  indeterminate = false,
1656
2061
  id
1657
- } = _ref,
1658
- props = _objectWithoutProperties(_ref, _excluded$2);
2062
+ } = _ref12,
2063
+ props = _objectWithoutProperties(_ref12, _excluded$2);
1659
2064
  const checkboxId = id || "checkbox-".concat(Math.random().toString(36).substr(2, 9));
1660
- const sizes = {
1661
- sm: "w-4 h-4",
1662
- md: "w-5 h-5",
1663
- lg: "w-6 h-6"
1664
- };
1665
- const labelSizes = {
1666
- sm: "text-sm",
1667
- md: "text-sm",
1668
- lg: "text-base"
1669
- };
1670
- const baseClasses = cn("rounded border transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2", error ? "border-red-500 focus:ring-red-500" : "border-secondary focus:ring-primary", "disabled:opacity-50 disabled:cursor-not-allowed", sizes[size], className);
1671
2065
  React.useEffect(() => {
1672
2066
  if (ref && typeof ref === "object" && ref.current) {
1673
2067
  ref.current.indeterminate = indeterminate;
1674
2068
  }
1675
2069
  }, [indeterminate, ref]);
1676
- return jsxRuntimeExports.jsxs("div", {
1677
- className: cn("flex items-start", fullWidth && "w-full"),
1678
- children: [jsxRuntimeExports.jsx("div", {
1679
- className: "flex items-center h-5",
1680
- children: jsxRuntimeExports.jsx("input", _objectSpread2({
2070
+ return jsxRuntimeExports.jsxs(CheckboxContainer, {
2071
+ fullWidth: fullWidth,
2072
+ children: [jsxRuntimeExports.jsx(CheckboxWrapper, {
2073
+ children: jsxRuntimeExports.jsx(StyledCheckbox, _objectSpread2({
1681
2074
  type: "checkbox",
1682
- className: baseClasses,
2075
+ size: size,
2076
+ hasError: !!error,
2077
+ className: className,
1683
2078
  ref: ref,
1684
2079
  id: checkboxId
1685
2080
  }, props))
1686
- }), jsxRuntimeExports.jsxs("div", {
1687
- className: "ml-3",
1688
- children: [label && jsxRuntimeExports.jsx("label", {
2081
+ }), jsxRuntimeExports.jsxs(LabelContainer$1, {
2082
+ children: [label && jsxRuntimeExports.jsx(CheckboxLabel, {
1689
2083
  htmlFor: checkboxId,
1690
- className: cn("font-medium text-secondary-700 cursor-pointer", labelSizes[size]),
2084
+ size: size,
1691
2085
  children: label
1692
- }), (error || helperText) && jsxRuntimeExports.jsx("p", {
1693
- className: cn("mt-1 text-xs", error ? "text-red-600" : "text-secondary-500"),
2086
+ }), (error || helperText) && jsxRuntimeExports.jsx(HelperText$2, {
2087
+ hasError: !!error,
1694
2088
  children: error || helperText
1695
2089
  })]
1696
2090
  })]
@@ -1699,7 +2093,97 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1699
2093
  Checkbox.displayName = "Checkbox";
1700
2094
 
1701
2095
  const _excluded$1 = ["className", "label", "error", "helperText", "size", "fullWidth", "id"];
1702
- const Radio = /*#__PURE__*/React.forwardRef((_ref, ref) => {
2096
+ var _templateObject$1, _templateObject2$1, _templateObject3$1, _templateObject4$1, _templateObject5$1, _templateObject6$1, _templateObject7$1, _templateObject8$1, _templateObject9$1, _templateObject0$1, _templateObject1$1, _templateObject10$1, _templateObject11, _templateObject12, _templateObject13;
2097
+ const RadioContainer = styled.div(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n display: flex;\n align-items: flex-start;\n ", "\n"])), _ref => {
2098
+ let {
2099
+ fullWidth
2100
+ } = _ref;
2101
+ return fullWidth && styled.css(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteral(["\n width: 100%;\n "])));
2102
+ });
2103
+ const RadioWrapper = styled.div(_templateObject3$1 || (_templateObject3$1 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n height: ", ";\n"])), _ref2 => {
2104
+ let {
2105
+ theme
2106
+ } = _ref2;
2107
+ return theme.spacing[5];
2108
+ });
2109
+ const StyledRadio = styled.input(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n border: 2px solid ", ";\n transition: all ", ";\n outline: none;\n\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n ", "\n"])), _ref3 => {
2110
+ let {
2111
+ theme,
2112
+ hasError
2113
+ } = _ref3;
2114
+ return hasError ? theme.colors.error : theme.colors.gray[300];
2115
+ }, _ref4 => {
2116
+ let {
2117
+ theme
2118
+ } = _ref4;
2119
+ return theme.transitions.base;
2120
+ }, _ref5 => {
2121
+ let {
2122
+ theme,
2123
+ hasError
2124
+ } = _ref5;
2125
+ return hasError ? theme.colors.error : theme.colors.primary;
2126
+ }, _ref6 => {
2127
+ let {
2128
+ size,
2129
+ theme
2130
+ } = _ref6;
2131
+ if (size === "sm") {
2132
+ return styled.css(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteral(["\n width: ", ";\n height: ", ";\n "])), theme.spacing[4], theme.spacing[4]);
2133
+ }
2134
+ if (size === "md") {
2135
+ return styled.css(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteral(["\n width: ", ";\n height: ", ";\n "])), theme.spacing[5], theme.spacing[5]);
2136
+ }
2137
+ if (size === "lg") {
2138
+ return styled.css(_templateObject7$1 || (_templateObject7$1 = _taggedTemplateLiteral(["\n width: ", ";\n height: ", ";\n "])), theme.spacing[6], theme.spacing[6]);
2139
+ }
2140
+ return styled.css(_templateObject8$1 || (_templateObject8$1 = _taggedTemplateLiteral([""])));
2141
+ });
2142
+ const LabelContainer = styled.div(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteral(["\n margin-left: ", ";\n"])), _ref7 => {
2143
+ let {
2144
+ theme
2145
+ } = _ref7;
2146
+ return theme.spacing[3];
2147
+ });
2148
+ const RadioLabel = styled.label(_templateObject0$1 || (_templateObject0$1 = _taggedTemplateLiteral(["\n font-weight: 500;\n color: ", ";\n cursor: pointer;\n\n ", "\n"])), _ref8 => {
2149
+ let {
2150
+ theme
2151
+ } = _ref8;
2152
+ return theme.colors.gray[700];
2153
+ }, _ref9 => {
2154
+ let {
2155
+ size,
2156
+ theme
2157
+ } = _ref9;
2158
+ if (size === "sm") {
2159
+ return styled.css(_templateObject1$1 || (_templateObject1$1 = _taggedTemplateLiteral(["\n font-size: ", ";\n "])), theme.fontSize.sm);
2160
+ }
2161
+ if (size === "md") {
2162
+ return styled.css(_templateObject10$1 || (_templateObject10$1 = _taggedTemplateLiteral(["\n font-size: ", ";\n "])), theme.fontSize.sm);
2163
+ }
2164
+ if (size === "lg") {
2165
+ return styled.css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n font-size: ", ";\n "])), theme.fontSize.base);
2166
+ }
2167
+ return styled.css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral([""])));
2168
+ });
2169
+ const HelperText$1 = styled.p(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-top: ", ";\n font-size: ", ";\n color: ", ";\n"])), _ref0 => {
2170
+ let {
2171
+ theme
2172
+ } = _ref0;
2173
+ return theme.spacing[1];
2174
+ }, _ref1 => {
2175
+ let {
2176
+ theme
2177
+ } = _ref1;
2178
+ return theme.fontSize.xs;
2179
+ }, _ref10 => {
2180
+ let {
2181
+ theme,
2182
+ hasError
2183
+ } = _ref10;
2184
+ return hasError ? theme.colors.error : theme.colors.gray[500];
2185
+ });
2186
+ const Radio = /*#__PURE__*/React.forwardRef((_ref11, ref) => {
1703
2187
  let {
1704
2188
  className,
1705
2189
  label,
@@ -1708,38 +2192,27 @@ const Radio = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1708
2192
  size = "md",
1709
2193
  fullWidth = false,
1710
2194
  id
1711
- } = _ref,
1712
- props = _objectWithoutProperties(_ref, _excluded$1);
2195
+ } = _ref11,
2196
+ props = _objectWithoutProperties(_ref11, _excluded$1);
1713
2197
  const radioId = id || "radio-".concat(Math.random().toString(36).substr(2, 9));
1714
- const sizes = {
1715
- sm: "w-4 h-4",
1716
- md: "w-5 h-5",
1717
- lg: "w-6 h-6"
1718
- };
1719
- const labelSizes = {
1720
- sm: "text-sm",
1721
- md: "text-sm",
1722
- lg: "text-base"
1723
- };
1724
- const baseClasses = cn("border-2 transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2", error ? "border-red-500 focus:ring-red-500" : "border-secondary focus:ring-primary", "disabled:opacity-50 disabled:cursor-not-allowed", sizes[size], className);
1725
- return jsxRuntimeExports.jsxs("div", {
1726
- className: cn("flex items-start", fullWidth && "w-full"),
1727
- children: [jsxRuntimeExports.jsx("div", {
1728
- className: "flex items-center h-5",
1729
- children: jsxRuntimeExports.jsx("input", _objectSpread2({
2198
+ return jsxRuntimeExports.jsxs(RadioContainer, {
2199
+ fullWidth: fullWidth,
2200
+ children: [jsxRuntimeExports.jsx(RadioWrapper, {
2201
+ children: jsxRuntimeExports.jsx(StyledRadio, _objectSpread2({
1730
2202
  type: "radio",
1731
- className: baseClasses,
2203
+ size: size,
2204
+ hasError: !!error,
2205
+ className: className,
1732
2206
  ref: ref,
1733
2207
  id: radioId
1734
2208
  }, props))
1735
- }), jsxRuntimeExports.jsxs("div", {
1736
- className: "ml-3",
1737
- children: [label && jsxRuntimeExports.jsx("label", {
2209
+ }), jsxRuntimeExports.jsxs(LabelContainer, {
2210
+ children: [label && jsxRuntimeExports.jsx(RadioLabel, {
1738
2211
  htmlFor: radioId,
1739
- className: cn("font-medium text-secondary-700 cursor-pointer", labelSizes[size]),
2212
+ size: size,
1740
2213
  children: label
1741
- }), (error || helperText) && jsxRuntimeExports.jsx("p", {
1742
- className: cn("mt-1 text-xs", error ? "text-red-600" : "text-secondary-500"),
2214
+ }), (error || helperText) && jsxRuntimeExports.jsx(HelperText$1, {
2215
+ hasError: !!error,
1743
2216
  children: error || helperText
1744
2217
  })]
1745
2218
  })]
@@ -1748,7 +2221,112 @@ const Radio = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1748
2221
  Radio.displayName = "Radio";
1749
2222
 
1750
2223
  const _excluded = ["className", "label", "error", "helperText", "size", "fullWidth", "options", "placeholder", "id"];
1751
- const Select = /*#__PURE__*/React.forwardRef((_ref, ref) => {
2224
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0, _templateObject1, _templateObject10;
2225
+ const SelectContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n ", "\n"])), _ref => {
2226
+ let {
2227
+ fullWidth
2228
+ } = _ref;
2229
+ return fullWidth && styled.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n "])));
2230
+ });
2231
+ const SelectLabel = styled.label(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n font-size: ", ";\n font-weight: 500;\n color: ", ";\n"])), _ref2 => {
2232
+ let {
2233
+ theme
2234
+ } = _ref2;
2235
+ return theme.spacing[1];
2236
+ }, _ref3 => {
2237
+ let {
2238
+ theme
2239
+ } = _ref3;
2240
+ return theme.fontSize.sm;
2241
+ }, _ref4 => {
2242
+ let {
2243
+ theme
2244
+ } = _ref4;
2245
+ return theme.colors.gray[700];
2246
+ });
2247
+ const SelectWrapper = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: relative;\n"])));
2248
+ const StyledSelect = styled.select(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n border-radius: ", ";\n transition: border-color ", ";\n outline: none;\n appearance: none;\n background-color: ", ";\n font-family: ", ";\n\n &:focus {\n border-color: ", ";\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n background-color: ", ";\n }\n\n ", "\n\n ", "\n"])), _ref5 => {
2249
+ let {
2250
+ theme,
2251
+ hasError
2252
+ } = _ref5;
2253
+ return hasError ? theme.colors.error : theme.colors.gray[300];
2254
+ }, _ref6 => {
2255
+ let {
2256
+ theme
2257
+ } = _ref6;
2258
+ return theme.borderRadius.md;
2259
+ }, _ref7 => {
2260
+ let {
2261
+ theme
2262
+ } = _ref7;
2263
+ return theme.transitions.base;
2264
+ }, _ref8 => {
2265
+ let {
2266
+ theme
2267
+ } = _ref8;
2268
+ return theme.colors.white;
2269
+ }, _ref9 => {
2270
+ let {
2271
+ theme
2272
+ } = _ref9;
2273
+ return theme.fontFamily.sans.join(", ");
2274
+ }, _ref0 => {
2275
+ let {
2276
+ theme,
2277
+ hasError
2278
+ } = _ref0;
2279
+ return hasError ? theme.colors.error : theme.colors.primary;
2280
+ }, _ref1 => {
2281
+ let {
2282
+ theme
2283
+ } = _ref1;
2284
+ return theme.colors.gray[50];
2285
+ }, _ref10 => {
2286
+ let {
2287
+ size,
2288
+ theme
2289
+ } = _ref10;
2290
+ if (size === "sm") {
2291
+ return styled.css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[3], theme.spacing[3], theme.fontSize.sm);
2292
+ }
2293
+ if (size === "md") {
2294
+ return styled.css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[2], theme.spacing[4], theme.fontSize.sm);
2295
+ }
2296
+ if (size === "lg") {
2297
+ return styled.css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[3], theme.spacing[4], theme.fontSize.base);
2298
+ }
2299
+ return styled.css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral([""])));
2300
+ }, _ref11 => {
2301
+ let {
2302
+ fullWidth
2303
+ } = _ref11;
2304
+ return fullWidth && styled.css(_templateObject0 || (_templateObject0 = _taggedTemplateLiteral(["\n width: 100%;\n "])));
2305
+ });
2306
+ const SelectIcon = styled.div(_templateObject1 || (_templateObject1 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n padding-right: ", ";\n pointer-events: none;\n"])), _ref12 => {
2307
+ let {
2308
+ theme
2309
+ } = _ref12;
2310
+ return theme.spacing[3];
2311
+ });
2312
+ const HelperText = styled.p(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin-top: ", ";\n font-size: ", ";\n color: ", ";\n"])), _ref13 => {
2313
+ let {
2314
+ theme
2315
+ } = _ref13;
2316
+ return theme.spacing[1];
2317
+ }, _ref14 => {
2318
+ let {
2319
+ theme
2320
+ } = _ref14;
2321
+ return theme.fontSize.xs;
2322
+ }, _ref15 => {
2323
+ let {
2324
+ theme,
2325
+ hasError
2326
+ } = _ref15;
2327
+ return hasError ? theme.colors.error : theme.colors.gray[500];
2328
+ });
2329
+ const Select = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
1752
2330
  let {
1753
2331
  className,
1754
2332
  label,
@@ -1759,25 +2337,20 @@ const Select = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1759
2337
  options,
1760
2338
  placeholder,
1761
2339
  id
1762
- } = _ref,
1763
- props = _objectWithoutProperties(_ref, _excluded);
2340
+ } = _ref16,
2341
+ props = _objectWithoutProperties(_ref16, _excluded);
1764
2342
  const selectId = id || "select-".concat(Math.random().toString(36).substr(2, 9));
1765
- const sizes = {
1766
- sm: "px-3 py-1.5 text-sm",
1767
- md: "px-4 py-2 text-sm",
1768
- lg: "px-4 py-3 text-base"
1769
- };
1770
- const baseClasses = cn("border transition-colors focus:outline-none focus:border-transparent appearance-none bg-white", error ? "border-red-500 focus:ring-red-500" : "border-secondary focus:border-primary", "disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-secondary-50", sizes[size], fullWidth && "w-full", className);
1771
- return jsxRuntimeExports.jsxs("div", {
1772
- className: cn("flex flex-col", fullWidth && "w-full"),
1773
- children: [label && jsxRuntimeExports.jsx("label", {
2343
+ return jsxRuntimeExports.jsxs(SelectContainer, {
2344
+ fullWidth: fullWidth,
2345
+ children: [label && jsxRuntimeExports.jsx(SelectLabel, {
1774
2346
  htmlFor: selectId,
1775
- className: "mb-1 text-sm font-medium text-secondary-700",
1776
2347
  children: label
1777
- }), jsxRuntimeExports.jsxs("div", {
1778
- className: "relative",
1779
- children: [jsxRuntimeExports.jsxs("select", _objectSpread2(_objectSpread2({
1780
- className: baseClasses,
2348
+ }), jsxRuntimeExports.jsxs(SelectWrapper, {
2349
+ children: [jsxRuntimeExports.jsxs(StyledSelect, _objectSpread2(_objectSpread2({
2350
+ size: size,
2351
+ fullWidth: fullWidth,
2352
+ hasError: !!error,
2353
+ className: className,
1781
2354
  ref: ref,
1782
2355
  id: selectId
1783
2356
  }, props), {}, {
@@ -1790,13 +2363,16 @@ const Select = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1790
2363
  disabled: option.disabled,
1791
2364
  children: option.label
1792
2365
  }, option.value))]
1793
- })), jsxRuntimeExports.jsx("div", {
1794
- className: "absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none",
2366
+ })), jsxRuntimeExports.jsx(SelectIcon, {
1795
2367
  children: jsxRuntimeExports.jsx("svg", {
1796
- className: "w-4 h-4 text-secondary-400",
2368
+ width: "16",
2369
+ height: "16",
1797
2370
  fill: "none",
1798
2371
  stroke: "currentColor",
1799
2372
  viewBox: "0 0 24 24",
2373
+ style: {
2374
+ color: "#9ca3af"
2375
+ },
1800
2376
  children: jsxRuntimeExports.jsx("path", {
1801
2377
  strokeLinecap: "round",
1802
2378
  strokeLinejoin: "round",
@@ -1805,19 +2381,107 @@ const Select = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1805
2381
  })
1806
2382
  })
1807
2383
  })]
1808
- }), (error || helperText) && jsxRuntimeExports.jsx("p", {
1809
- className: cn("mt-1 text-xs", error ? "text-red-600" : "text-secondary-500"),
2384
+ }), (error || helperText) && jsxRuntimeExports.jsx(HelperText, {
2385
+ hasError: !!error,
1810
2386
  children: error || helperText
1811
2387
  })]
1812
2388
  });
1813
2389
  });
1814
2390
  Select.displayName = "Select";
1815
2391
 
1816
- // CSS Entry Point
1817
- // Export CSS for manual import
1818
- const styles = {
1819
- globals: "./styles.css",
1820
- components: "./components.css"
2392
+ const theme = {
2393
+ colors: {
2394
+ primary: "#007AC2",
2395
+ error: "#ff1100",
2396
+ dark: "#333333",
2397
+ light: "#666666",
2398
+ white: "#ffffff",
2399
+ black: "#000000",
2400
+ gray: {
2401
+ 50: "#f9fafb",
2402
+ 100: "#f3f4f6",
2403
+ 200: "#e5e7eb",
2404
+ 300: "#d1d5db",
2405
+ 400: "#9ca3af",
2406
+ 500: "#6b7280",
2407
+ 600: "#4b5563",
2408
+ 700: "#374151",
2409
+ 800: "#1f2937",
2410
+ 900: "#111827"
2411
+ }
2412
+ },
2413
+ spacing: {
2414
+ 0: "0",
2415
+ 1: "0.25rem",
2416
+ 2: "0.5rem",
2417
+ 3: "0.75rem",
2418
+ 4: "1rem",
2419
+ 5: "1.25rem",
2420
+ 6: "1.5rem",
2421
+ 8: "2rem",
2422
+ 10: "2.5rem",
2423
+ 12: "3rem",
2424
+ 16: "4rem",
2425
+ 18: "4.5rem",
2426
+ 20: "5rem",
2427
+ 24: "6rem",
2428
+ 32: "8rem",
2429
+ 40: "10rem",
2430
+ 48: "12rem",
2431
+ 56: "14rem",
2432
+ 64: "16rem",
2433
+ 88: "22rem"
2434
+ },
2435
+ fontSize: {
2436
+ xs: "0.75rem",
2437
+ sm: "0.875rem",
2438
+ base: "1rem",
2439
+ lg: "1.125rem",
2440
+ xl: "1.25rem",
2441
+ "2xl": "1.5rem",
2442
+ "3xl": "1.875rem",
2443
+ "4xl": "2.25rem",
2444
+ "5xl": "3rem",
2445
+ "6xl": "3.75rem"
2446
+ },
2447
+ fontFamily: {
2448
+ sans: ["Inter", "system-ui", "sans-serif"],
2449
+ serif: ["Georgia", "Cambria", "Times New Roman", "Times", "serif"],
2450
+ mono: ["Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", "monospace"]
2451
+ },
2452
+ borderRadius: {
2453
+ none: "0",
2454
+ sm: "0.125rem",
2455
+ base: "0.25rem",
2456
+ md: "0.375rem",
2457
+ lg: "0.5rem",
2458
+ xl: "0.75rem",
2459
+ "2xl": "1rem",
2460
+ "3xl": "1.5rem",
2461
+ full: "9999px"
2462
+ },
2463
+ shadows: {
2464
+ sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
2465
+ base: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
2466
+ md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
2467
+ lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
2468
+ xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"
2469
+ },
2470
+ transitions: {
2471
+ fast: "150ms ease-in-out",
2472
+ base: "300ms ease-in-out",
2473
+ slow: "500ms ease-in-out"
2474
+ }
2475
+ };
2476
+
2477
+ const ThemeProvider = _ref => {
2478
+ let {
2479
+ children
2480
+ } = _ref;
2481
+ return jsxRuntimeExports.jsx(styled.ThemeProvider, {
2482
+ theme: theme,
2483
+ children: children
2484
+ });
1821
2485
  };
1822
2486
 
1823
2487
  // Ensure React is available before importing components
@@ -1831,6 +2495,6 @@ exports.InputFile = InputFile;
1831
2495
  exports.Radio = Radio;
1832
2496
  exports.Select = Select;
1833
2497
  exports.Textarea = Textarea;
1834
- exports.cn = cn;
1835
- exports.styles = styles;
2498
+ exports.ThemeProvider = ThemeProvider;
2499
+ exports.theme = theme;
1836
2500
  //# sourceMappingURL=index.js.map