thailife-react 0.0.17 → 0.0.18

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,8 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
- var styled = require('@emotion/styled');
7
- var react = require('@emotion/react');
8
6
 
9
7
  function _interopNamespaceDefault(e) {
10
8
  var n = Object.create(null);
@@ -74,13 +72,6 @@ function _objectWithoutPropertiesLoose(r, e) {
74
72
  }
75
73
  return t;
76
74
  }
77
- function _taggedTemplateLiteral(e, t) {
78
- return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
79
- raw: {
80
- value: Object.freeze(t)
81
- }
82
- }));
83
- }
84
75
  function _toPrimitive(t, r) {
85
76
  if ("object" != typeof t || !t) return t;
86
77
  var e = t[Symbol.toPrimitive];
@@ -1457,157 +1448,92 @@ if (process.env.NODE_ENV === 'production') {
1457
1448
 
1458
1449
  var jsxRuntimeExports = jsxRuntime.exports;
1459
1450
 
1460
- const theme = {
1461
- colors: {
1462
- primary: "#007AC2",
1463
- error: "#ff1100",
1464
- dark: "#333333",
1465
- light: "#666666",
1466
- white: "#ffffff",
1467
- black: "#000000",
1468
- gray: {
1469
- 50: "#f9fafb",
1470
- 100: "#f3f4f6",
1471
- 200: "#e5e7eb",
1472
- 300: "#d1d5db",
1473
- 400: "#9ca3af",
1474
- 500: "#6b7280",
1475
- 600: "#4b5563",
1476
- 700: "#374151",
1477
- 800: "#1f2937",
1478
- 900: "#111827"
1479
- }
1480
- },
1481
- spacing: {
1482
- 0: "0",
1483
- 1: "0.25rem",
1484
- 2: "0.5rem",
1485
- 3: "0.75rem",
1486
- 4: "1rem",
1487
- 5: "1.25rem",
1488
- 6: "1.5rem",
1489
- 8: "2rem",
1490
- 10: "2.5rem",
1491
- 12: "3rem",
1492
- 16: "4rem",
1493
- 18: "4.5rem",
1494
- 20: "5rem",
1495
- 24: "6rem",
1496
- 32: "8rem",
1497
- 40: "10rem",
1498
- 48: "12rem",
1499
- 56: "14rem",
1500
- 64: "16rem",
1501
- 88: "22rem"
1502
- },
1503
- fontSize: {
1504
- xs: "0.75rem",
1505
- sm: "0.875rem",
1506
- base: "1rem",
1507
- lg: "1.125rem",
1508
- xl: "1.25rem",
1509
- "2xl": "1.5rem",
1510
- "3xl": "1.875rem",
1511
- "4xl": "2.25rem",
1512
- "5xl": "3rem",
1513
- "6xl": "3.75rem"
1514
- },
1515
- fontFamily: {
1516
- sans: ["Inter", "system-ui", "sans-serif"],
1517
- serif: ["Georgia", "Cambria", "Times New Roman", "Times", "serif"],
1518
- mono: ["Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", "monospace"]
1519
- },
1520
- borderRadius: {
1521
- none: "0",
1522
- sm: "0.125rem",
1523
- base: "0.25rem",
1524
- md: "0.375rem",
1525
- lg: "0.5rem",
1526
- xl: "0.75rem",
1527
- "2xl": "1rem",
1528
- "3xl": "1.5rem",
1529
- full: "9999px"
1530
- },
1531
- shadows: {
1532
- sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
1533
- base: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
1534
- md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.05)",
1535
- lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
1536
- xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"
1537
- },
1538
- transitions: {
1539
- fast: "150ms ease-in-out",
1540
- base: "300ms ease-in-out",
1541
- slow: "500ms ease-in-out"
1542
- }
1451
+ // Export CSS classes for external usage
1452
+ const cssClasses = {
1453
+ // Button
1454
+ button: "btn",
1455
+ buttonContained: "btn--contained",
1456
+ buttonOutlined: "btn--outlined",
1457
+ buttonLink: "btn--link",
1458
+ buttonSmall: "btn--sm",
1459
+ buttonMedium: "btn--md",
1460
+ buttonLarge: "btn--lg",
1461
+ buttonError: "btn--error",
1462
+ buttonDark: "btn--dark",
1463
+ buttonLight: "btn--light",
1464
+ buttonFullWidth: "btn--full-width",
1465
+ // Input
1466
+ inputContainer: "input-container",
1467
+ inputContainerFullWidth: "input-container--full-width",
1468
+ inputLabel: "input-label",
1469
+ input: "input",
1470
+ inputError: "input--error",
1471
+ inputFullWidth: "input--full-width",
1472
+ inputHelperText: "input-helper-text",
1473
+ inputHelperTextError: "input-helper-text--error",
1474
+ // Checkbox
1475
+ checkboxContainer: "checkbox-container",
1476
+ checkboxContainerFullWidth: "checkbox-container--full-width",
1477
+ checkboxWrapper: "checkbox-wrapper",
1478
+ checkbox: "checkbox",
1479
+ checkboxError: "checkbox--error",
1480
+ checkboxLabelContainer: "checkbox-label-container",
1481
+ checkboxLabel: "checkbox-label",
1482
+ // Radio
1483
+ radioContainer: "radio-container",
1484
+ radioContainerFullWidth: "radio-container--full-width",
1485
+ radioWrapper: "radio-wrapper",
1486
+ radio: "radio",
1487
+ radioError: "radio--error",
1488
+ radioLabelContainer: "radio-label-container",
1489
+ radioLabel: "radio-label",
1490
+ // Select
1491
+ selectContainer: "select-container",
1492
+ selectContainerFullWidth: "select-container--full-width",
1493
+ selectLabel: "select-label",
1494
+ selectWrapper: "select-wrapper",
1495
+ select: "select",
1496
+ selectError: "select--error",
1497
+ selectFullWidth: "select--full-width",
1498
+ selectIcon: "select-icon",
1499
+ // Textarea
1500
+ textareaContainer: "textarea-container",
1501
+ textareaContainerFullWidth: "textarea-container--full-width",
1502
+ textareaLabel: "textarea-label",
1503
+ textarea: "textarea",
1504
+ textareaError: "textarea--error",
1505
+ textareaFullWidth: "textarea--full-width",
1506
+ // InputFile
1507
+ inputFileContainer: "input-file-container",
1508
+ inputFileContainerFullWidth: "input-file-container--full-width",
1509
+ inputFileLabel: "input-file-label",
1510
+ inputFileWrapper: "input-file-wrapper",
1511
+ inputFileHidden: "input-file-hidden",
1512
+ inputFileUploadArea: "input-file-upload-area",
1513
+ inputFileUploadAreaError: "input-file-upload-area--error",
1514
+ inputFileUploadAreaFullWidth: "input-file-upload-area--full-width",
1515
+ inputFileButtonText: "input-file-button-text",
1516
+ inputFileMultipleText: "input-file-multiple-text",
1517
+ // Utility
1518
+ textCenter: "text-center",
1519
+ textLeft: "text-left",
1520
+ textRight: "text-right",
1521
+ fontBold: "font-bold",
1522
+ fontNormal: "font-normal",
1523
+ fontLight: "font-light",
1524
+ rounded: "rounded",
1525
+ roundedSm: "rounded-sm",
1526
+ roundedLg: "rounded-lg",
1527
+ roundedFull: "rounded-full",
1528
+ shadow: "shadow",
1529
+ shadowSm: "shadow-sm",
1530
+ shadowMd: "shadow-md",
1531
+ shadowLg: "shadow-lg",
1532
+ shadowXl: "shadow-xl"
1543
1533
  };
1544
1534
 
1545
1535
  const _excluded$6 = ["className", "color", "variant", "size", "fullWidth", "loading", "disabled", "children"];
1546
- var _templateObject$6;
1547
- 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 => {
1548
- var _theme$borderRadius;
1549
- let {
1550
- theme: theme$1
1551
- } = _ref;
1552
- return (theme$1 === null || theme$1 === void 0 || (_theme$borderRadius = theme$1.borderRadius) === null || _theme$borderRadius === void 0 ? void 0 : _theme$borderRadius.md) || theme.borderRadius.md;
1553
- }, _ref2 => {
1554
- var _theme$fontFamily;
1555
- let {
1556
- theme: theme$1
1557
- } = _ref2;
1558
- return (theme$1 === null || theme$1 === void 0 || (_theme$fontFamily = theme$1.fontFamily) === null || _theme$fontFamily === void 0 || (_theme$fontFamily = _theme$fontFamily.sans) === null || _theme$fontFamily === void 0 ? void 0 : _theme$fontFamily.join(", ")) || theme.fontFamily.sans.join(", ");
1559
- }, _ref3 => {
1560
- var _theme$transitions;
1561
- let {
1562
- theme: theme$1
1563
- } = _ref3;
1564
- return (theme$1 === null || theme$1 === void 0 || (_theme$transitions = theme$1.transitions) === null || _theme$transitions === void 0 ? void 0 : _theme$transitions.base) || theme.transitions.base;
1565
- }, _ref4 => {
1566
- var _theme$colors;
1567
- let {
1568
- theme: theme$1
1569
- } = _ref4;
1570
- return (theme$1 === null || theme$1 === void 0 || (_theme$colors = theme$1.colors) === null || _theme$colors === void 0 ? void 0 : _theme$colors.primary) || theme.colors.primary;
1571
- }, _ref5 => {
1572
- let {
1573
- variant,
1574
- color,
1575
- theme: theme$1
1576
- } = _ref5;
1577
- const currentTheme = theme$1 || theme;
1578
- if (variant === "contained") {
1579
- return "\n background-color: ".concat(currentTheme.colors[color || "primary"], ";\n color: ").concat(currentTheme.colors.white, ";\n &:hover:not(:disabled) {\n background-color: ").concat(currentTheme.colors[color || "primary"], "cc;\n }\n ");
1580
- }
1581
- if (variant === "outlined") {
1582
- return "\n background-color: transparent;\n border: 1px solid ".concat(currentTheme.colors[color || "primary"], ";\n color: ").concat(currentTheme.colors[color || "primary"], ";\n &:hover:not(:disabled) {\n background-color: ").concat(currentTheme.colors[color || "primary"], "1a;\n }\n ");
1583
- }
1584
- if (variant === "link") {
1585
- return "\n background-color: transparent;\n color: ".concat(currentTheme.colors[color || "primary"], ";\n text-decoration: underline;\n &:hover:not(:disabled) {\n text-decoration: none;\n }\n ");
1586
- }
1587
- return "";
1588
- }, _ref6 => {
1589
- let {
1590
- size,
1591
- theme: theme$1
1592
- } = _ref6;
1593
- const currentTheme = theme$1 || theme;
1594
- if (size === "sm") {
1595
- return "\n padding: ".concat(currentTheme.spacing[3], " ").concat(currentTheme.spacing[3], ";\n font-size: ").concat(currentTheme.fontSize.sm, ";\n ");
1596
- }
1597
- if (size === "md") {
1598
- return "\n padding: ".concat(currentTheme.spacing[2], " ").concat(currentTheme.spacing[4], ";\n font-size: ").concat(currentTheme.fontSize.sm, ";\n ");
1599
- }
1600
- if (size === "lg") {
1601
- return "\n padding: ".concat(currentTheme.spacing[3], " ").concat(currentTheme.spacing[6], ";\n font-size: ").concat(currentTheme.fontSize.base, ";\n ");
1602
- }
1603
- return "";
1604
- }, _ref7 => {
1605
- let {
1606
- fullWidth
1607
- } = _ref7;
1608
- return fullWidth && "\n width: 100%;\n ";
1609
- });
1610
- const Button = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
1536
+ const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1611
1537
  let {
1612
1538
  className,
1613
1539
  color = "primary",
@@ -1617,15 +1543,16 @@ const Button = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
1617
1543
  loading = false,
1618
1544
  disabled,
1619
1545
  children
1620
- } = _ref8,
1621
- props = _objectWithoutProperties(_ref8, _excluded$6);
1622
- return jsxRuntimeExports.jsx(StyledButton, _objectSpread2(_objectSpread2({
1623
- className: className,
1624
- color: color,
1625
- variant: variant,
1626
- size: size,
1627
- fullWidth: fullWidth,
1628
- loading: loading,
1546
+ } = _ref,
1547
+ props = _objectWithoutProperties(_ref, _excluded$6);
1548
+ const baseClass = cssClasses.button;
1549
+ const variantClass = variant === "contained" ? cssClasses.buttonContained : variant === "outlined" ? cssClasses.buttonOutlined : cssClasses.buttonLink;
1550
+ const sizeClass = size === "sm" ? cssClasses.buttonSmall : size === "md" ? cssClasses.buttonMedium : cssClasses.buttonLarge;
1551
+ const colorClass = color === "error" ? cssClasses.buttonError : color === "dark" ? cssClasses.buttonDark : color === "light" ? cssClasses.buttonLight : "";
1552
+ const fullWidthClass = fullWidth ? cssClasses.buttonFullWidth : "";
1553
+ const combinedClasses = [baseClass, variantClass, sizeClass, colorClass, fullWidthClass, className].filter(Boolean).join(" ");
1554
+ return jsxRuntimeExports.jsx("button", _objectSpread2(_objectSpread2({
1555
+ className: combinedClasses,
1629
1556
  disabled: disabled || loading,
1630
1557
  ref: ref
1631
1558
  }, props), {}, {
@@ -1635,115 +1562,7 @@ const Button = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
1635
1562
  Button.displayName = "Button";
1636
1563
 
1637
1564
  const _excluded$5 = ["className", "type", "label", "error", "helperText", "size", "fullWidth", "id"];
1638
- var _templateObject$5, _templateObject2$5, _templateObject3$5, _templateObject4$5;
1639
- const InputContainer = styled.div(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n ", "\n"])), _ref => {
1640
- let {
1641
- fullWidth
1642
- } = _ref;
1643
- return fullWidth && "\n width: 100%;\n ";
1644
- });
1645
- const InputLabel = styled.label(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n font-size: ", ";\n font-weight: 500;\n color: ", ";\n"])), _ref2 => {
1646
- var _theme$spacing;
1647
- let {
1648
- theme: theme$1
1649
- } = _ref2;
1650
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing = theme$1.spacing) === null || _theme$spacing === void 0 ? void 0 : _theme$spacing[1]) || theme.spacing[1];
1651
- }, _ref3 => {
1652
- var _theme$fontSize;
1653
- let {
1654
- theme: theme$1
1655
- } = _ref3;
1656
- return (theme$1 === null || theme$1 === void 0 || (_theme$fontSize = theme$1.fontSize) === null || _theme$fontSize === void 0 ? void 0 : _theme$fontSize.sm) || theme.fontSize.sm;
1657
- }, _ref4 => {
1658
- var _theme$colors;
1659
- let {
1660
- theme: theme$1
1661
- } = _ref4;
1662
- return (theme$1 === null || theme$1 === void 0 || (_theme$colors = theme$1.colors) === null || _theme$colors === void 0 || (_theme$colors = _theme$colors.gray) === null || _theme$colors === void 0 ? void 0 : _theme$colors[700]) || theme.colors.gray[700];
1663
- });
1664
- const StyledInput = styled.input(_templateObject3$5 || (_templateObject3$5 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n border-radius: ", ";\n transition: border-color ", ";\n outline: none;\n font-family: ", ";\n padding: ", " ", ";\n font-size: ", ";\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"])), _ref5 => {
1665
- var _theme$colors2, _theme$colors3;
1666
- let {
1667
- theme: theme$1,
1668
- hasError
1669
- } = _ref5;
1670
- return hasError ? (theme$1 === null || theme$1 === void 0 || (_theme$colors2 = theme$1.colors) === null || _theme$colors2 === void 0 ? void 0 : _theme$colors2.error) || theme.colors.error : (theme$1 === null || theme$1 === void 0 || (_theme$colors3 = theme$1.colors) === null || _theme$colors3 === void 0 || (_theme$colors3 = _theme$colors3.gray) === null || _theme$colors3 === void 0 ? void 0 : _theme$colors3[300]) || theme.colors.gray[300];
1671
- }, _ref6 => {
1672
- var _theme$borderRadius;
1673
- let {
1674
- theme: theme$1
1675
- } = _ref6;
1676
- return (theme$1 === null || theme$1 === void 0 || (_theme$borderRadius = theme$1.borderRadius) === null || _theme$borderRadius === void 0 ? void 0 : _theme$borderRadius.md) || theme.borderRadius.md;
1677
- }, _ref7 => {
1678
- var _theme$transitions;
1679
- let {
1680
- theme: theme$1
1681
- } = _ref7;
1682
- return (theme$1 === null || theme$1 === void 0 || (_theme$transitions = theme$1.transitions) === null || _theme$transitions === void 0 ? void 0 : _theme$transitions.base) || theme.transitions.base;
1683
- }, _ref8 => {
1684
- var _theme$fontFamily;
1685
- let {
1686
- theme: theme$1
1687
- } = _ref8;
1688
- return (theme$1 === null || theme$1 === void 0 || (_theme$fontFamily = theme$1.fontFamily) === null || _theme$fontFamily === void 0 || (_theme$fontFamily = _theme$fontFamily.sans) === null || _theme$fontFamily === void 0 ? void 0 : _theme$fontFamily.join(", ")) || theme.fontFamily.sans.join(", ");
1689
- }, _ref9 => {
1690
- var _theme$spacing2;
1691
- let {
1692
- theme: theme$1
1693
- } = _ref9;
1694
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing2 = theme$1.spacing) === null || _theme$spacing2 === void 0 ? void 0 : _theme$spacing2[2]) || theme.spacing[2];
1695
- }, _ref0 => {
1696
- var _theme$spacing3;
1697
- let {
1698
- theme: theme$1
1699
- } = _ref0;
1700
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing3 = theme$1.spacing) === null || _theme$spacing3 === void 0 ? void 0 : _theme$spacing3[4]) || theme.spacing[4];
1701
- }, _ref1 => {
1702
- var _theme$fontSize2;
1703
- let {
1704
- theme: theme$1
1705
- } = _ref1;
1706
- return (theme$1 === null || theme$1 === void 0 || (_theme$fontSize2 = theme$1.fontSize) === null || _theme$fontSize2 === void 0 ? void 0 : _theme$fontSize2.sm) || theme.fontSize.sm;
1707
- }, _ref10 => {
1708
- var _theme$colors4, _theme$colors5;
1709
- let {
1710
- theme: theme$1,
1711
- hasError
1712
- } = _ref10;
1713
- return hasError ? (theme$1 === null || theme$1 === void 0 || (_theme$colors4 = theme$1.colors) === null || _theme$colors4 === void 0 ? void 0 : _theme$colors4.error) || theme.colors.error : (theme$1 === null || theme$1 === void 0 || (_theme$colors5 = theme$1.colors) === null || _theme$colors5 === void 0 ? void 0 : _theme$colors5.primary) || theme.colors.primary;
1714
- }, _ref11 => {
1715
- var _theme$colors6;
1716
- let {
1717
- theme: theme$1
1718
- } = _ref11;
1719
- return (theme$1 === null || theme$1 === void 0 || (_theme$colors6 = theme$1.colors) === null || _theme$colors6 === void 0 || (_theme$colors6 = _theme$colors6.gray) === null || _theme$colors6 === void 0 ? void 0 : _theme$colors6[50]) || theme.colors.gray[50];
1720
- }, _ref12 => {
1721
- let {
1722
- fullWidth
1723
- } = _ref12;
1724
- return fullWidth && "\n width: 100%;\n ";
1725
- });
1726
- const HelperText$5 = styled.p(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteral(["\n margin-top: ", ";\n font-size: ", ";\n color: ", ";\n"])), _ref13 => {
1727
- var _theme$spacing4;
1728
- let {
1729
- theme: theme$1
1730
- } = _ref13;
1731
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing4 = theme$1.spacing) === null || _theme$spacing4 === void 0 ? void 0 : _theme$spacing4[1]) || theme.spacing[1];
1732
- }, _ref14 => {
1733
- var _theme$fontSize3;
1734
- let {
1735
- theme: theme$1
1736
- } = _ref14;
1737
- return (theme$1 === null || theme$1 === void 0 || (_theme$fontSize3 = theme$1.fontSize) === null || _theme$fontSize3 === void 0 ? void 0 : _theme$fontSize3.xs) || theme.fontSize.xs;
1738
- }, _ref15 => {
1739
- var _theme$colors7, _theme$colors8;
1740
- let {
1741
- theme: theme$1,
1742
- hasError
1743
- } = _ref15;
1744
- return hasError ? (theme$1 === null || theme$1 === void 0 || (_theme$colors7 = theme$1.colors) === null || _theme$colors7 === void 0 ? void 0 : _theme$colors7.error) || theme.colors.error : (theme$1 === null || theme$1 === void 0 || (_theme$colors8 = theme$1.colors) === null || _theme$colors8 === void 0 || (_theme$colors8 = _theme$colors8.gray) === null || _theme$colors8 === void 0 ? void 0 : _theme$colors8[500]) || theme.colors.gray[500];
1745
- });
1746
- const Input = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
1565
+ const Input = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1747
1566
  let {
1748
1567
  className,
1749
1568
  type = "text",
@@ -1753,23 +1572,26 @@ const Input = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
1753
1572
  size = "md",
1754
1573
  fullWidth = false,
1755
1574
  id
1756
- } = _ref16,
1757
- props = _objectWithoutProperties(_ref16, _excluded$5);
1575
+ } = _ref,
1576
+ props = _objectWithoutProperties(_ref, _excluded$5);
1758
1577
  const inputId = id || "input-".concat(Math.random().toString(36).substr(2, 9));
1759
- return jsxRuntimeExports.jsxs(InputContainer, {
1760
- fullWidth: fullWidth,
1761
- children: [label && jsxRuntimeExports.jsx(InputLabel, {
1578
+ const containerClass = fullWidth ? cssClasses.inputContainerFullWidth : cssClasses.inputContainer;
1579
+ const inputClass = error ? "".concat(cssClasses.input, " ").concat(cssClasses.inputError) : cssClasses.input;
1580
+ const inputFullWidthClass = fullWidth ? cssClasses.inputFullWidth : "";
1581
+ const helperTextClass = error ? cssClasses.inputHelperTextError : cssClasses.inputHelperText;
1582
+ return jsxRuntimeExports.jsxs("div", {
1583
+ className: containerClass,
1584
+ children: [label && jsxRuntimeExports.jsx("label", {
1585
+ className: cssClasses.inputLabel,
1762
1586
  htmlFor: inputId,
1763
1587
  children: label
1764
- }), jsxRuntimeExports.jsx(StyledInput, _objectSpread2({
1588
+ }), jsxRuntimeExports.jsx("input", _objectSpread2({
1765
1589
  type: type,
1766
- fullWidth: fullWidth,
1767
- hasError: !!error,
1768
- className: className,
1590
+ className: "".concat(inputClass, " ").concat(inputFullWidthClass),
1769
1591
  ref: ref,
1770
1592
  id: inputId
1771
- }, props)), (error || helperText) && jsxRuntimeExports.jsx(HelperText$5, {
1772
- hasError: !!error,
1593
+ }, props)), (error || helperText) && jsxRuntimeExports.jsx("p", {
1594
+ className: helperTextClass,
1773
1595
  children: error || helperText
1774
1596
  })]
1775
1597
  });
@@ -1777,113 +1599,7 @@ const Input = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
1777
1599
  Input.displayName = "Input";
1778
1600
 
1779
1601
  const _excluded$4 = ["className", "label", "error", "helperText", "size", "fullWidth", "rows", "id"];
1780
- var _templateObject$4, _templateObject2$4, _templateObject3$4, _templateObject4$4;
1781
- const TextareaContainer = styled.div(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n ", "\n"])), _ref => {
1782
- let {
1783
- fullWidth
1784
- } = _ref;
1785
- return fullWidth && "\n width: 100%;\n ";
1786
- });
1787
- const TextareaLabel = styled.label(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n font-size: ", ";\n font-weight: 500;\n color: ", ";\n"])), _ref2 => {
1788
- var _theme$spacing;
1789
- let {
1790
- theme: theme$1
1791
- } = _ref2;
1792
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing = theme$1.spacing) === null || _theme$spacing === void 0 ? void 0 : _theme$spacing[1]) || theme.spacing[1];
1793
- }, _ref3 => {
1794
- var _theme$fontSize;
1795
- let {
1796
- theme: theme$1
1797
- } = _ref3;
1798
- return (theme$1 === null || theme$1 === void 0 || (_theme$fontSize = theme$1.fontSize) === null || _theme$fontSize === void 0 ? void 0 : _theme$fontSize.sm) || theme.fontSize.sm;
1799
- }, _ref4 => {
1800
- var _theme$colors;
1801
- let {
1802
- theme: theme$1
1803
- } = _ref4;
1804
- return (theme$1 === null || theme$1 === void 0 || (_theme$colors = theme$1.colors) === null || _theme$colors === void 0 || (_theme$colors = _theme$colors.gray) === null || _theme$colors === void 0 ? void 0 : _theme$colors[700]) || theme.colors.gray[700];
1805
- });
1806
- const StyledTextarea = styled.textarea(_templateObject3$4 || (_templateObject3$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 => {
1807
- var _theme$colors2, _theme$colors3;
1808
- let {
1809
- theme: theme$1,
1810
- hasError
1811
- } = _ref5;
1812
- return hasError ? (theme$1 === null || theme$1 === void 0 || (_theme$colors2 = theme$1.colors) === null || _theme$colors2 === void 0 ? void 0 : _theme$colors2.error) || theme.colors.error : (theme$1 === null || theme$1 === void 0 || (_theme$colors3 = theme$1.colors) === null || _theme$colors3 === void 0 || (_theme$colors3 = _theme$colors3.gray) === null || _theme$colors3 === void 0 ? void 0 : _theme$colors3[300]) || theme.colors.gray[300];
1813
- }, _ref6 => {
1814
- var _theme$borderRadius;
1815
- let {
1816
- theme: theme$1
1817
- } = _ref6;
1818
- return (theme$1 === null || theme$1 === void 0 || (_theme$borderRadius = theme$1.borderRadius) === null || _theme$borderRadius === void 0 ? void 0 : _theme$borderRadius.md) || theme.borderRadius.md;
1819
- }, _ref7 => {
1820
- var _theme$transitions;
1821
- let {
1822
- theme: theme$1
1823
- } = _ref7;
1824
- return (theme$1 === null || theme$1 === void 0 || (_theme$transitions = theme$1.transitions) === null || _theme$transitions === void 0 ? void 0 : _theme$transitions.base) || theme.transitions.base;
1825
- }, _ref8 => {
1826
- var _theme$fontFamily;
1827
- let {
1828
- theme: theme$1
1829
- } = _ref8;
1830
- return (theme$1 === null || theme$1 === void 0 || (_theme$fontFamily = theme$1.fontFamily) === null || _theme$fontFamily === void 0 || (_theme$fontFamily = _theme$fontFamily.sans) === null || _theme$fontFamily === void 0 ? void 0 : _theme$fontFamily.join(", ")) || theme.fontFamily.sans.join(", ");
1831
- }, _ref9 => {
1832
- var _theme$colors4, _theme$colors5;
1833
- let {
1834
- theme: theme$1,
1835
- hasError
1836
- } = _ref9;
1837
- return hasError ? (theme$1 === null || theme$1 === void 0 || (_theme$colors4 = theme$1.colors) === null || _theme$colors4 === void 0 ? void 0 : _theme$colors4.error) || theme.colors.error : (theme$1 === null || theme$1 === void 0 || (_theme$colors5 = theme$1.colors) === null || _theme$colors5 === void 0 ? void 0 : _theme$colors5.primary) || theme.colors.primary;
1838
- }, _ref0 => {
1839
- var _theme$colors6;
1840
- let {
1841
- theme: theme$1
1842
- } = _ref0;
1843
- return (theme$1 === null || theme$1 === void 0 || (_theme$colors6 = theme$1.colors) === null || _theme$colors6 === void 0 || (_theme$colors6 = _theme$colors6.gray) === null || _theme$colors6 === void 0 ? void 0 : _theme$colors6[50]) || theme.colors.gray[50];
1844
- }, _ref1 => {
1845
- let {
1846
- size,
1847
- theme: theme$1
1848
- } = _ref1;
1849
- const currentTheme = theme$1 || theme;
1850
- if (size === "sm") {
1851
- return "\n padding: ".concat(currentTheme.spacing[3], " ").concat(currentTheme.spacing[3], ";\n font-size: ").concat(currentTheme.fontSize.sm, ";\n ");
1852
- }
1853
- if (size === "md") {
1854
- return "\n padding: ".concat(currentTheme.spacing[2], " ").concat(currentTheme.spacing[4], ";\n font-size: ").concat(currentTheme.fontSize.sm, ";\n ");
1855
- }
1856
- if (size === "lg") {
1857
- return "\n padding: ".concat(currentTheme.spacing[3], " ").concat(currentTheme.spacing[4], ";\n font-size: ").concat(currentTheme.fontSize.base, ";\n ");
1858
- }
1859
- return "";
1860
- }, _ref10 => {
1861
- let {
1862
- fullWidth
1863
- } = _ref10;
1864
- return fullWidth && "\n width: 100%;\n ";
1865
- });
1866
- const HelperText$4 = styled.p(_templateObject4$4 || (_templateObject4$4 = _taggedTemplateLiteral(["\n margin-top: ", ";\n font-size: ", ";\n color: ", ";\n"])), _ref11 => {
1867
- var _theme$spacing2;
1868
- let {
1869
- theme: theme$1
1870
- } = _ref11;
1871
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing2 = theme$1.spacing) === null || _theme$spacing2 === void 0 ? void 0 : _theme$spacing2[1]) || theme.spacing[1];
1872
- }, _ref12 => {
1873
- var _theme$fontSize2;
1874
- let {
1875
- theme: theme$1
1876
- } = _ref12;
1877
- return (theme$1 === null || theme$1 === void 0 || (_theme$fontSize2 = theme$1.fontSize) === null || _theme$fontSize2 === void 0 ? void 0 : _theme$fontSize2.xs) || theme.fontSize.xs;
1878
- }, _ref13 => {
1879
- var _theme$colors7, _theme$colors8;
1880
- let {
1881
- theme: theme$1,
1882
- hasError
1883
- } = _ref13;
1884
- return hasError ? (theme$1 === null || theme$1 === void 0 || (_theme$colors7 = theme$1.colors) === null || _theme$colors7 === void 0 ? void 0 : _theme$colors7.error) || theme.colors.error : (theme$1 === null || theme$1 === void 0 || (_theme$colors8 = theme$1.colors) === null || _theme$colors8 === void 0 || (_theme$colors8 = _theme$colors8.gray) === null || _theme$colors8 === void 0 ? void 0 : _theme$colors8[500]) || theme.colors.gray[500];
1885
- });
1886
- const Textarea = /*#__PURE__*/React.forwardRef((_ref14, ref) => {
1602
+ const Textarea = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1887
1603
  let {
1888
1604
  className,
1889
1605
  label,
@@ -1893,155 +1609,34 @@ const Textarea = /*#__PURE__*/React.forwardRef((_ref14, ref) => {
1893
1609
  fullWidth = false,
1894
1610
  rows = 3,
1895
1611
  id
1896
- } = _ref14,
1897
- props = _objectWithoutProperties(_ref14, _excluded$4);
1612
+ } = _ref,
1613
+ props = _objectWithoutProperties(_ref, _excluded$4);
1898
1614
  const textareaId = id || "textarea-".concat(Math.random().toString(36).substr(2, 9));
1899
- return jsxRuntimeExports.jsxs(TextareaContainer, {
1900
- fullWidth: fullWidth,
1901
- children: [label && jsxRuntimeExports.jsx(TextareaLabel, {
1615
+ const containerClass = fullWidth ? cssClasses.textareaContainerFullWidth : cssClasses.textareaContainer;
1616
+ const textareaClass = error ? "".concat(cssClasses.textarea, " ").concat(cssClasses.textareaError) : cssClasses.textarea;
1617
+ const textareaFullWidthClass = fullWidth ? cssClasses.textareaFullWidth : "";
1618
+ const helperTextClass = error ? cssClasses.inputHelperTextError : cssClasses.inputHelperText;
1619
+ return jsxRuntimeExports.jsxs("div", {
1620
+ className: containerClass,
1621
+ children: [label && jsxRuntimeExports.jsx("label", {
1622
+ className: cssClasses.textareaLabel,
1902
1623
  htmlFor: textareaId,
1903
1624
  children: label
1904
- }), jsxRuntimeExports.jsx(StyledTextarea, _objectSpread2({
1905
- size: size,
1906
- fullWidth: fullWidth,
1907
- hasError: !!error,
1908
- className: className,
1625
+ }), jsxRuntimeExports.jsx("textarea", _objectSpread2({
1626
+ className: "".concat(textareaClass, " ").concat(textareaFullWidthClass),
1909
1627
  ref: ref,
1910
1628
  id: textareaId,
1911
1629
  rows: rows
1912
- }, props)), (error || helperText) && jsxRuntimeExports.jsx(HelperText$4, {
1913
- hasError: !!error,
1630
+ }, props)), (error || helperText) && jsxRuntimeExports.jsx("p", {
1631
+ className: helperTextClass,
1914
1632
  children: error || helperText
1915
1633
  })]
1916
1634
  });
1917
1635
  });
1918
1636
  Textarea.displayName = "Textarea";
1919
1637
 
1920
- const _excluded$3 = ["className", "label", "error", "helperText", "size", "fullWidth", "accept", "multiple", "buttonText", "id"];
1921
- var _templateObject$3, _templateObject2$3, _templateObject3$3, _templateObject4$3, _templateObject5$3, _templateObject6$3, _templateObject7, _templateObject8;
1922
- const InputFileContainer = styled.div(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n ", "\n"])), _ref => {
1923
- let {
1924
- fullWidth
1925
- } = _ref;
1926
- return fullWidth && "\n width: 100%;\n ";
1927
- });
1928
- const InputFileLabel = styled.label(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n font-size: ", ";\n font-weight: 500;\n color: ", ";\n"])), _ref2 => {
1929
- var _theme$spacing;
1930
- let {
1931
- theme: theme$1
1932
- } = _ref2;
1933
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing = theme$1.spacing) === null || _theme$spacing === void 0 ? void 0 : _theme$spacing[1]) || theme.spacing[1];
1934
- }, _ref3 => {
1935
- var _theme$fontSize;
1936
- let {
1937
- theme: theme$1
1938
- } = _ref3;
1939
- return (theme$1 === null || theme$1 === void 0 || (_theme$fontSize = theme$1.fontSize) === null || _theme$fontSize === void 0 ? void 0 : _theme$fontSize.sm) || theme.fontSize.sm;
1940
- }, _ref4 => {
1941
- var _theme$colors;
1942
- let {
1943
- theme: theme$1
1944
- } = _ref4;
1945
- return (theme$1 === null || theme$1 === void 0 || (_theme$colors = theme$1.colors) === null || _theme$colors === void 0 || (_theme$colors = _theme$colors.gray) === null || _theme$colors === void 0 ? void 0 : _theme$colors[700]) || theme.colors.gray[700];
1946
- });
1947
- const InputFileWrapper = styled.div(_templateObject3$3 || (_templateObject3$3 = _taggedTemplateLiteral(["\n position: relative;\n"])));
1948
- const HiddenInput = styled.input(_templateObject4$3 || (_templateObject4$3 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n"])));
1949
- const FileUploadArea = styled.div(_templateObject5$3 || (_templateObject5$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 => {
1950
- var _theme$colors2, _theme$colors3;
1951
- let {
1952
- theme: theme$1,
1953
- hasError
1954
- } = _ref5;
1955
- return hasError ? (theme$1 === null || theme$1 === void 0 || (_theme$colors2 = theme$1.colors) === null || _theme$colors2 === void 0 ? void 0 : _theme$colors2.error) || theme.colors.error : (theme$1 === null || theme$1 === void 0 || (_theme$colors3 = theme$1.colors) === null || _theme$colors3 === void 0 || (_theme$colors3 = _theme$colors3.gray) === null || _theme$colors3 === void 0 ? void 0 : _theme$colors3[300]) || theme.colors.gray[300];
1956
- }, _ref6 => {
1957
- var _theme$transitions;
1958
- let {
1959
- theme: theme$1
1960
- } = _ref6;
1961
- return (theme$1 === null || theme$1 === void 0 || (_theme$transitions = theme$1.transitions) === null || _theme$transitions === void 0 ? void 0 : _theme$transitions.base) || theme.transitions.base;
1962
- }, _ref7 => {
1963
- var _theme$colors4, _theme$colors5;
1964
- let {
1965
- theme: theme$1,
1966
- hasError
1967
- } = _ref7;
1968
- return hasError ? (theme$1 === null || theme$1 === void 0 || (_theme$colors4 = theme$1.colors) === null || _theme$colors4 === void 0 ? void 0 : _theme$colors4.error) || theme.colors.error : (theme$1 === null || theme$1 === void 0 || (_theme$colors5 = theme$1.colors) === null || _theme$colors5 === void 0 ? void 0 : _theme$colors5.primary) || theme.colors.primary;
1969
- }, _ref8 => {
1970
- var _theme$colors6, _theme$colors7;
1971
- let {
1972
- theme: theme$1,
1973
- hasError
1974
- } = _ref8;
1975
- return hasError ? (theme$1 === null || theme$1 === void 0 || (_theme$colors6 = theme$1.colors) === null || _theme$colors6 === void 0 ? void 0 : _theme$colors6.error) || theme.colors.error : (theme$1 === null || theme$1 === void 0 || (_theme$colors7 = theme$1.colors) === null || _theme$colors7 === void 0 ? void 0 : _theme$colors7.primary) || theme.colors.primary;
1976
- }, _ref9 => {
1977
- let {
1978
- size,
1979
- theme: theme$1
1980
- } = _ref9;
1981
- const currentTheme = theme$1 || theme;
1982
- if (size === "sm") {
1983
- return "\n padding: ".concat(currentTheme.spacing[3], " ").concat(currentTheme.spacing[3], ";\n font-size: ").concat(currentTheme.fontSize.sm, ";\n ");
1984
- }
1985
- if (size === "md") {
1986
- return "\n padding: ".concat(currentTheme.spacing[2], " ").concat(currentTheme.spacing[4], ";\n font-size: ").concat(currentTheme.fontSize.base, ";\n ");
1987
- }
1988
- if (size === "lg") {
1989
- return "\n padding: ".concat(currentTheme.spacing[3], " ").concat(currentTheme.spacing[4], ";\n font-size: ").concat(currentTheme.fontSize.base, ";\n ");
1990
- }
1991
- return "";
1992
- }, _ref0 => {
1993
- let {
1994
- fullWidth
1995
- } = _ref0;
1996
- return fullWidth && "\n width: 100%;\n ";
1997
- });
1998
- const ButtonText = styled.span(_templateObject6$3 || (_templateObject6$3 = _taggedTemplateLiteral(["\n color: ", ";\n"])), _ref1 => {
1999
- var _theme$colors8;
2000
- let {
2001
- theme: theme$1
2002
- } = _ref1;
2003
- return (theme$1 === null || theme$1 === void 0 || (_theme$colors8 = theme$1.colors) === null || _theme$colors8 === void 0 || (_theme$colors8 = _theme$colors8.gray) === null || _theme$colors8 === void 0 ? void 0 : _theme$colors8[600]) || theme.colors.gray[600];
2004
- });
2005
- const MultipleText = styled.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-left: ", ";\n font-size: ", ";\n color: ", ";\n"])), _ref10 => {
2006
- var _theme$spacing2;
2007
- let {
2008
- theme: theme$1
2009
- } = _ref10;
2010
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing2 = theme$1.spacing) === null || _theme$spacing2 === void 0 ? void 0 : _theme$spacing2[1]) || theme.spacing[1];
2011
- }, _ref11 => {
2012
- var _theme$fontSize2;
2013
- let {
2014
- theme: theme$1
2015
- } = _ref11;
2016
- return (theme$1 === null || theme$1 === void 0 || (_theme$fontSize2 = theme$1.fontSize) === null || _theme$fontSize2 === void 0 ? void 0 : _theme$fontSize2.xs) || theme.fontSize.xs;
2017
- }, _ref12 => {
2018
- var _theme$colors9;
2019
- let {
2020
- theme: theme$1
2021
- } = _ref12;
2022
- return (theme$1 === null || theme$1 === void 0 || (_theme$colors9 = theme$1.colors) === null || _theme$colors9 === void 0 || (_theme$colors9 = _theme$colors9.gray) === null || _theme$colors9 === void 0 ? void 0 : _theme$colors9[500]) || theme.colors.gray[500];
2023
- });
2024
- const HelperText$3 = styled.p(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-top: ", ";\n font-size: ", ";\n color: ", ";\n"])), _ref13 => {
2025
- var _theme$spacing3;
2026
- let {
2027
- theme: theme$1
2028
- } = _ref13;
2029
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing3 = theme$1.spacing) === null || _theme$spacing3 === void 0 ? void 0 : _theme$spacing3[1]) || theme.spacing[1];
2030
- }, _ref14 => {
2031
- var _theme$fontSize3;
2032
- let {
2033
- theme: theme$1
2034
- } = _ref14;
2035
- return (theme$1 === null || theme$1 === void 0 || (_theme$fontSize3 = theme$1.fontSize) === null || _theme$fontSize3 === void 0 ? void 0 : _theme$fontSize3.xs) || theme.fontSize.xs;
2036
- }, _ref15 => {
2037
- var _theme$colors0, _theme$colors1;
2038
- let {
2039
- theme: theme$1,
2040
- hasError
2041
- } = _ref15;
2042
- return hasError ? (theme$1 === null || theme$1 === void 0 || (_theme$colors0 = theme$1.colors) === null || _theme$colors0 === void 0 ? void 0 : _theme$colors0.error) || theme.colors.error : (theme$1 === null || theme$1 === void 0 || (_theme$colors1 = theme$1.colors) === null || _theme$colors1 === void 0 || (_theme$colors1 = _theme$colors1.gray) === null || _theme$colors1 === void 0 ? void 0 : _theme$colors1[500]) || theme.colors.gray[500];
2043
- });
2044
- const InputFile = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
1638
+ const _excluded$3 = ["className", "label", "error", "helperText", "size", "fullWidth", "multiple", "accept", "buttonText", "id"];
1639
+ const InputFile = /*#__PURE__*/React.forwardRef((_ref, ref) => {
2045
1640
  let {
2046
1641
  className,
2047
1642
  label,
@@ -2049,38 +1644,44 @@ const InputFile = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
2049
1644
  helperText,
2050
1645
  size = "md",
2051
1646
  fullWidth = false,
2052
- accept,
2053
1647
  multiple = false,
1648
+ accept,
2054
1649
  buttonText = "Choose File",
2055
1650
  id
2056
- } = _ref16,
2057
- props = _objectWithoutProperties(_ref16, _excluded$3);
2058
- const inputId = id || "file-input-".concat(Math.random().toString(36).substr(2, 9));
2059
- return jsxRuntimeExports.jsxs(InputFileContainer, {
2060
- fullWidth: fullWidth,
2061
- children: [label && jsxRuntimeExports.jsx(InputFileLabel, {
1651
+ } = _ref,
1652
+ props = _objectWithoutProperties(_ref, _excluded$3);
1653
+ const inputId = id || "input-file-".concat(Math.random().toString(36).substr(2, 9));
1654
+ const containerClass = fullWidth ? cssClasses.inputFileContainerFullWidth : cssClasses.inputFileContainer;
1655
+ const uploadAreaClass = error ? "".concat(cssClasses.inputFileUploadArea, " ").concat(cssClasses.inputFileUploadAreaError) : cssClasses.inputFileUploadArea;
1656
+ const uploadAreaFullWidthClass = fullWidth ? cssClasses.inputFileUploadAreaFullWidth : "";
1657
+ const helperTextClass = error ? cssClasses.inputHelperTextError : cssClasses.inputHelperText;
1658
+ return jsxRuntimeExports.jsxs("div", {
1659
+ className: containerClass,
1660
+ children: [label && jsxRuntimeExports.jsx("label", {
1661
+ className: cssClasses.inputFileLabel,
2062
1662
  htmlFor: inputId,
2063
1663
  children: label
2064
- }), jsxRuntimeExports.jsxs(InputFileWrapper, {
2065
- children: [jsxRuntimeExports.jsx(HiddenInput, _objectSpread2({
1664
+ }), jsxRuntimeExports.jsxs("div", {
1665
+ className: cssClasses.inputFileWrapper,
1666
+ children: [jsxRuntimeExports.jsx("input", _objectSpread2({
2066
1667
  type: "file",
1668
+ className: cssClasses.inputFileHidden,
2067
1669
  ref: ref,
2068
1670
  id: inputId,
2069
- accept: accept,
2070
- multiple: multiple
2071
- }, props)), jsxRuntimeExports.jsxs(FileUploadArea, {
2072
- size: size,
2073
- fullWidth: fullWidth,
2074
- hasError: !!error,
2075
- className: className,
2076
- children: [jsxRuntimeExports.jsx(ButtonText, {
1671
+ multiple: multiple,
1672
+ accept: accept
1673
+ }, props)), jsxRuntimeExports.jsxs("div", {
1674
+ className: "".concat(uploadAreaClass, " ").concat(uploadAreaFullWidthClass),
1675
+ children: [jsxRuntimeExports.jsx("span", {
1676
+ className: cssClasses.inputFileButtonText,
2077
1677
  children: buttonText
2078
- }), multiple && jsxRuntimeExports.jsx(MultipleText, {
2079
- children: "(Multiple)"
1678
+ }), multiple && jsxRuntimeExports.jsx("span", {
1679
+ className: cssClasses.inputFileMultipleText,
1680
+ children: "or drag and drop"
2080
1681
  })]
2081
1682
  })]
2082
- }), (error || helperText) && jsxRuntimeExports.jsx(HelperText$3, {
2083
- hasError: !!error,
1683
+ }), (error || helperText) && jsxRuntimeExports.jsx("p", {
1684
+ className: helperTextClass,
2084
1685
  children: error || helperText
2085
1686
  })]
2086
1687
  });
@@ -2088,94 +1689,7 @@ const InputFile = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
2088
1689
  InputFile.displayName = "InputFile";
2089
1690
 
2090
1691
  const _excluded$2 = ["className", "label", "error", "helperText", "size", "fullWidth", "indeterminate", "id"];
2091
- var _templateObject$2, _templateObject2$2, _templateObject3$2, _templateObject4$2, _templateObject5$2, _templateObject6$2;
2092
- const CheckboxContainer = styled.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: flex-start;\n ", "\n"])), _ref => {
2093
- let {
2094
- fullWidth
2095
- } = _ref;
2096
- return fullWidth && "\n width: 100%;\n ";
2097
- });
2098
- const CheckboxWrapper = styled.div(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n height: ", ";\n"])), _ref2 => {
2099
- var _theme$spacing;
2100
- let {
2101
- theme: theme$1
2102
- } = _ref2;
2103
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing = theme$1.spacing) === null || _theme$spacing === void 0 ? void 0 : _theme$spacing[5]) || theme.spacing[5];
2104
- });
2105
- const StyledCheckbox = styled.input(_templateObject3$2 || (_templateObject3$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 => {
2106
- var _theme$borderRadius;
2107
- let {
2108
- theme: theme$1
2109
- } = _ref3;
2110
- return (theme$1 === null || theme$1 === void 0 || (_theme$borderRadius = theme$1.borderRadius) === null || _theme$borderRadius === void 0 ? void 0 : _theme$borderRadius.md) || theme.borderRadius.md;
2111
- }, _ref4 => {
2112
- var _theme$colors, _theme$colors2;
2113
- let {
2114
- theme: theme$1,
2115
- hasError
2116
- } = _ref4;
2117
- return hasError ? (theme$1 === null || theme$1 === void 0 || (_theme$colors = theme$1.colors) === null || _theme$colors === void 0 ? void 0 : _theme$colors.error) || theme.colors.error : (theme$1 === null || theme$1 === void 0 || (_theme$colors2 = theme$1.colors) === null || _theme$colors2 === void 0 || (_theme$colors2 = _theme$colors2.gray) === null || _theme$colors2 === void 0 ? void 0 : _theme$colors2[300]) || theme.colors.gray[300];
2118
- }, _ref5 => {
2119
- var _theme$transitions;
2120
- let {
2121
- theme: theme$1
2122
- } = _ref5;
2123
- return (theme$1 === null || theme$1 === void 0 || (_theme$transitions = theme$1.transitions) === null || _theme$transitions === void 0 ? void 0 : _theme$transitions.base) || theme.transitions.base;
2124
- }, _ref6 => {
2125
- var _theme$colors3, _theme$colors4;
2126
- let {
2127
- theme: theme$1,
2128
- hasError
2129
- } = _ref6;
2130
- return hasError ? (theme$1 === null || theme$1 === void 0 || (_theme$colors3 = theme$1.colors) === null || _theme$colors3 === void 0 ? void 0 : _theme$colors3.error) || theme.colors.error : (theme$1 === null || theme$1 === void 0 || (_theme$colors4 = theme$1.colors) === null || _theme$colors4 === void 0 ? void 0 : _theme$colors4.primary) || theme.colors.primary;
2131
- }, _ref7 => {
2132
- let {
2133
- theme: theme$1
2134
- } = _ref7;
2135
- const currentTheme = theme$1 || theme;
2136
- return "\n width: ".concat(currentTheme.spacing[5], ";\n height: ").concat(currentTheme.spacing[5], ";\n ");
2137
- });
2138
- const LabelContainer$1 = styled.div(_templateObject4$2 || (_templateObject4$2 = _taggedTemplateLiteral(["\n margin-left: ", ";\n"])), _ref8 => {
2139
- var _theme$spacing2;
2140
- let {
2141
- theme: theme$1
2142
- } = _ref8;
2143
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing2 = theme$1.spacing) === null || _theme$spacing2 === void 0 ? void 0 : _theme$spacing2[3]) || theme.spacing[3];
2144
- });
2145
- const CheckboxLabel = styled.label(_templateObject5$2 || (_templateObject5$2 = _taggedTemplateLiteral(["\n font-weight: 500;\n color: ", ";\n cursor: pointer;\n font-size: ", ";\n"])), _ref9 => {
2146
- var _theme$colors5;
2147
- let {
2148
- theme: theme$1
2149
- } = _ref9;
2150
- return (theme$1 === null || theme$1 === void 0 || (_theme$colors5 = theme$1.colors) === null || _theme$colors5 === void 0 || (_theme$colors5 = _theme$colors5.gray) === null || _theme$colors5 === void 0 ? void 0 : _theme$colors5[700]) || theme.colors.gray[700];
2151
- }, _ref0 => {
2152
- var _theme$fontSize;
2153
- let {
2154
- theme: theme$1
2155
- } = _ref0;
2156
- return (theme$1 === null || theme$1 === void 0 || (_theme$fontSize = theme$1.fontSize) === null || _theme$fontSize === void 0 ? void 0 : _theme$fontSize.sm) || theme.fontSize.sm;
2157
- });
2158
- const HelperText$2 = styled.p(_templateObject6$2 || (_templateObject6$2 = _taggedTemplateLiteral(["\n margin-top: ", ";\n font-size: ", ";\n color: ", ";\n"])), _ref1 => {
2159
- var _theme$spacing3;
2160
- let {
2161
- theme: theme$1
2162
- } = _ref1;
2163
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing3 = theme$1.spacing) === null || _theme$spacing3 === void 0 ? void 0 : _theme$spacing3[1]) || theme.spacing[1];
2164
- }, _ref10 => {
2165
- var _theme$fontSize2;
2166
- let {
2167
- theme: theme$1
2168
- } = _ref10;
2169
- return (theme$1 === null || theme$1 === void 0 || (_theme$fontSize2 = theme$1.fontSize) === null || _theme$fontSize2 === void 0 ? void 0 : _theme$fontSize2.xs) || theme.fontSize.xs;
2170
- }, _ref11 => {
2171
- var _theme$colors6, _theme$colors7;
2172
- let {
2173
- theme: theme$1,
2174
- hasError
2175
- } = _ref11;
2176
- return hasError ? (theme$1 === null || theme$1 === void 0 || (_theme$colors6 = theme$1.colors) === null || _theme$colors6 === void 0 ? void 0 : _theme$colors6.error) || theme.colors.error : (theme$1 === null || theme$1 === void 0 || (_theme$colors7 = theme$1.colors) === null || _theme$colors7 === void 0 || (_theme$colors7 = _theme$colors7.gray) === null || _theme$colors7 === void 0 ? void 0 : _theme$colors7[500]) || theme.colors.gray[500];
2177
- });
2178
- const Checkbox = /*#__PURE__*/React.forwardRef((_ref12, ref) => {
1692
+ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
2179
1693
  let {
2180
1694
  className,
2181
1695
  label,
@@ -2185,30 +1699,35 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref12, ref) => {
2185
1699
  fullWidth = false,
2186
1700
  indeterminate = false,
2187
1701
  id
2188
- } = _ref12,
2189
- props = _objectWithoutProperties(_ref12, _excluded$2);
1702
+ } = _ref,
1703
+ props = _objectWithoutProperties(_ref, _excluded$2);
2190
1704
  const checkboxId = id || "checkbox-".concat(Math.random().toString(36).substr(2, 9));
2191
1705
  React.useEffect(() => {
2192
1706
  if (ref && typeof ref === "object" && ref.current) {
2193
1707
  ref.current.indeterminate = indeterminate;
2194
1708
  }
2195
1709
  }, [indeterminate, ref]);
2196
- return jsxRuntimeExports.jsxs(CheckboxContainer, {
2197
- fullWidth: fullWidth,
2198
- children: [jsxRuntimeExports.jsx(CheckboxWrapper, {
2199
- children: jsxRuntimeExports.jsx(StyledCheckbox, _objectSpread2({
1710
+ const containerClass = fullWidth ? cssClasses.checkboxContainerFullWidth : cssClasses.checkboxContainer;
1711
+ const checkboxClass = error ? "".concat(cssClasses.checkbox, " ").concat(cssClasses.checkboxError) : cssClasses.checkbox;
1712
+ const helperTextClass = error ? cssClasses.inputHelperTextError : cssClasses.inputHelperText;
1713
+ return jsxRuntimeExports.jsxs("div", {
1714
+ className: containerClass,
1715
+ children: [jsxRuntimeExports.jsx("div", {
1716
+ className: cssClasses.checkboxWrapper,
1717
+ children: jsxRuntimeExports.jsx("input", _objectSpread2({
2200
1718
  type: "checkbox",
2201
- hasError: !!error,
2202
- className: className,
1719
+ className: checkboxClass,
2203
1720
  ref: ref,
2204
1721
  id: checkboxId
2205
1722
  }, props))
2206
- }), jsxRuntimeExports.jsxs(LabelContainer$1, {
2207
- children: [label && jsxRuntimeExports.jsx(CheckboxLabel, {
1723
+ }), jsxRuntimeExports.jsxs("div", {
1724
+ className: cssClasses.checkboxLabelContainer,
1725
+ children: [label && jsxRuntimeExports.jsx("label", {
1726
+ className: cssClasses.checkboxLabel,
2208
1727
  htmlFor: checkboxId,
2209
1728
  children: label
2210
- }), (error || helperText) && jsxRuntimeExports.jsx(HelperText$2, {
2211
- hasError: !!error,
1729
+ }), (error || helperText) && jsxRuntimeExports.jsx("p", {
1730
+ className: helperTextClass,
2212
1731
  children: error || helperText
2213
1732
  })]
2214
1733
  })]
@@ -2217,94 +1736,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref12, ref) => {
2217
1736
  Checkbox.displayName = "Checkbox";
2218
1737
 
2219
1738
  const _excluded$1 = ["className", "label", "error", "helperText", "size", "fullWidth", "id"];
2220
- var _templateObject$1, _templateObject2$1, _templateObject3$1, _templateObject4$1, _templateObject5$1, _templateObject6$1;
2221
- const RadioContainer = styled.div(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n display: flex;\n align-items: flex-start;\n ", "\n"])), _ref => {
2222
- let {
2223
- fullWidth
2224
- } = _ref;
2225
- return fullWidth && "\n width: 100%;\n ";
2226
- });
2227
- const RadioWrapper = styled.div(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n height: ", ";\n"])), _ref2 => {
2228
- var _theme$spacing;
2229
- let {
2230
- theme: theme$1
2231
- } = _ref2;
2232
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing = theme$1.spacing) === null || _theme$spacing === void 0 ? void 0 : _theme$spacing[5]) || theme.spacing[5];
2233
- });
2234
- const StyledRadio = styled.input(_templateObject3$1 || (_templateObject3$1 = _taggedTemplateLiteral(["\n border: 2px solid ", ";\n transition: all ", ";\n outline: none;\n width: ", ";\n height: ", ";\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"])), _ref3 => {
2235
- var _theme$colors, _theme$colors2;
2236
- let {
2237
- theme: theme$1,
2238
- hasError
2239
- } = _ref3;
2240
- return hasError ? (theme$1 === null || theme$1 === void 0 || (_theme$colors = theme$1.colors) === null || _theme$colors === void 0 ? void 0 : _theme$colors.error) || theme.colors.error : (theme$1 === null || theme$1 === void 0 || (_theme$colors2 = theme$1.colors) === null || _theme$colors2 === void 0 || (_theme$colors2 = _theme$colors2.gray) === null || _theme$colors2 === void 0 ? void 0 : _theme$colors2[300]) || theme.colors.gray[300];
2241
- }, _ref4 => {
2242
- var _theme$transitions;
2243
- let {
2244
- theme: theme$1
2245
- } = _ref4;
2246
- return (theme$1 === null || theme$1 === void 0 || (_theme$transitions = theme$1.transitions) === null || _theme$transitions === void 0 ? void 0 : _theme$transitions.base) || theme.transitions.base;
2247
- }, _ref5 => {
2248
- var _theme$spacing2;
2249
- let {
2250
- theme: theme$1
2251
- } = _ref5;
2252
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing2 = theme$1.spacing) === null || _theme$spacing2 === void 0 ? void 0 : _theme$spacing2[5]) || theme.spacing[5];
2253
- }, _ref6 => {
2254
- var _theme$spacing3;
2255
- let {
2256
- theme: theme$1
2257
- } = _ref6;
2258
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing3 = theme$1.spacing) === null || _theme$spacing3 === void 0 ? void 0 : _theme$spacing3[5]) || theme.spacing[5];
2259
- }, _ref7 => {
2260
- var _theme$colors3, _theme$colors4;
2261
- let {
2262
- theme: theme$1,
2263
- hasError
2264
- } = _ref7;
2265
- return hasError ? (theme$1 === null || theme$1 === void 0 || (_theme$colors3 = theme$1.colors) === null || _theme$colors3 === void 0 ? void 0 : _theme$colors3.error) || theme.colors.error : (theme$1 === null || theme$1 === void 0 || (_theme$colors4 = theme$1.colors) === null || _theme$colors4 === void 0 ? void 0 : _theme$colors4.primary) || theme.colors.primary;
2266
- });
2267
- const LabelContainer = styled.div(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n margin-left: ", ";\n"])), _ref8 => {
2268
- var _theme$spacing4;
2269
- let {
2270
- theme: theme$1
2271
- } = _ref8;
2272
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing4 = theme$1.spacing) === null || _theme$spacing4 === void 0 ? void 0 : _theme$spacing4[3]) || theme.spacing[3];
2273
- });
2274
- const RadioLabel = styled.label(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteral(["\n font-weight: 500;\n color: ", ";\n cursor: pointer;\n font-size: ", ";\n"])), _ref9 => {
2275
- var _theme$colors5;
2276
- let {
2277
- theme: theme$1
2278
- } = _ref9;
2279
- return (theme$1 === null || theme$1 === void 0 || (_theme$colors5 = theme$1.colors) === null || _theme$colors5 === void 0 || (_theme$colors5 = _theme$colors5.gray) === null || _theme$colors5 === void 0 ? void 0 : _theme$colors5[700]) || theme.colors.gray[700];
2280
- }, _ref0 => {
2281
- var _theme$fontSize;
2282
- let {
2283
- theme: theme$1
2284
- } = _ref0;
2285
- return (theme$1 === null || theme$1 === void 0 || (_theme$fontSize = theme$1.fontSize) === null || _theme$fontSize === void 0 ? void 0 : _theme$fontSize.sm) || theme.fontSize.sm;
2286
- });
2287
- const HelperText$1 = styled.p(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteral(["\n margin-top: ", ";\n font-size: ", ";\n color: ", ";\n"])), _ref1 => {
2288
- var _theme$spacing5;
2289
- let {
2290
- theme: theme$1
2291
- } = _ref1;
2292
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing5 = theme$1.spacing) === null || _theme$spacing5 === void 0 ? void 0 : _theme$spacing5[1]) || theme.spacing[1];
2293
- }, _ref10 => {
2294
- var _theme$fontSize2;
2295
- let {
2296
- theme: theme$1
2297
- } = _ref10;
2298
- return (theme$1 === null || theme$1 === void 0 || (_theme$fontSize2 = theme$1.fontSize) === null || _theme$fontSize2 === void 0 ? void 0 : _theme$fontSize2.xs) || theme.fontSize.xs;
2299
- }, _ref11 => {
2300
- var _theme$colors6, _theme$colors7;
2301
- let {
2302
- theme: theme$1,
2303
- hasError
2304
- } = _ref11;
2305
- return hasError ? (theme$1 === null || theme$1 === void 0 || (_theme$colors6 = theme$1.colors) === null || _theme$colors6 === void 0 ? void 0 : _theme$colors6.error) || theme.colors.error : (theme$1 === null || theme$1 === void 0 || (_theme$colors7 = theme$1.colors) === null || _theme$colors7 === void 0 || (_theme$colors7 = _theme$colors7.gray) === null || _theme$colors7 === void 0 ? void 0 : _theme$colors7[500]) || theme.colors.gray[500];
2306
- });
2307
- const Radio = /*#__PURE__*/React.forwardRef((_ref12, ref) => {
1739
+ const Radio = /*#__PURE__*/React.forwardRef((_ref, ref) => {
2308
1740
  let {
2309
1741
  className,
2310
1742
  label,
@@ -2313,25 +1745,30 @@ const Radio = /*#__PURE__*/React.forwardRef((_ref12, ref) => {
2313
1745
  size = "md",
2314
1746
  fullWidth = false,
2315
1747
  id
2316
- } = _ref12,
2317
- props = _objectWithoutProperties(_ref12, _excluded$1);
1748
+ } = _ref,
1749
+ props = _objectWithoutProperties(_ref, _excluded$1);
2318
1750
  const radioId = id || "radio-".concat(Math.random().toString(36).substr(2, 9));
2319
- return jsxRuntimeExports.jsxs(RadioContainer, {
2320
- fullWidth: fullWidth,
2321
- children: [jsxRuntimeExports.jsx(RadioWrapper, {
2322
- children: jsxRuntimeExports.jsx(StyledRadio, _objectSpread2({
1751
+ const containerClass = fullWidth ? cssClasses.radioContainerFullWidth : cssClasses.radioContainer;
1752
+ const radioClass = error ? "".concat(cssClasses.radio, " ").concat(cssClasses.radioError) : cssClasses.radio;
1753
+ const helperTextClass = error ? cssClasses.inputHelperTextError : cssClasses.inputHelperText;
1754
+ return jsxRuntimeExports.jsxs("div", {
1755
+ className: containerClass,
1756
+ children: [jsxRuntimeExports.jsx("div", {
1757
+ className: cssClasses.radioWrapper,
1758
+ children: jsxRuntimeExports.jsx("input", _objectSpread2({
2323
1759
  type: "radio",
2324
- hasError: !!error,
2325
- className: className,
1760
+ className: radioClass,
2326
1761
  ref: ref,
2327
1762
  id: radioId
2328
1763
  }, props))
2329
- }), jsxRuntimeExports.jsxs(LabelContainer, {
2330
- children: [label && jsxRuntimeExports.jsx(RadioLabel, {
1764
+ }), jsxRuntimeExports.jsxs("div", {
1765
+ className: cssClasses.radioLabelContainer,
1766
+ children: [label && jsxRuntimeExports.jsx("label", {
1767
+ className: cssClasses.radioLabel,
2331
1768
  htmlFor: radioId,
2332
1769
  children: label
2333
- }), (error || helperText) && jsxRuntimeExports.jsx(HelperText$1, {
2334
- hasError: !!error,
1770
+ }), (error || helperText) && jsxRuntimeExports.jsx("p", {
1771
+ className: helperTextClass,
2335
1772
  children: error || helperText
2336
1773
  })]
2337
1774
  })]
@@ -2340,129 +1777,7 @@ const Radio = /*#__PURE__*/React.forwardRef((_ref12, ref) => {
2340
1777
  Radio.displayName = "Radio";
2341
1778
 
2342
1779
  const _excluded = ["className", "label", "error", "helperText", "size", "fullWidth", "options", "placeholder", "id"];
2343
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
2344
- const SelectContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n ", "\n"])), _ref => {
2345
- let {
2346
- fullWidth
2347
- } = _ref;
2348
- return fullWidth && "\n width: 100%;\n ";
2349
- });
2350
- const SelectLabel = styled.label(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n font-size: ", ";\n font-weight: 500;\n color: ", ";\n"])), _ref2 => {
2351
- var _theme$spacing;
2352
- let {
2353
- theme: theme$1
2354
- } = _ref2;
2355
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing = theme$1.spacing) === null || _theme$spacing === void 0 ? void 0 : _theme$spacing[1]) || theme.spacing[1];
2356
- }, _ref3 => {
2357
- var _theme$fontSize;
2358
- let {
2359
- theme: theme$1
2360
- } = _ref3;
2361
- return (theme$1 === null || theme$1 === void 0 || (_theme$fontSize = theme$1.fontSize) === null || _theme$fontSize === void 0 ? void 0 : _theme$fontSize.sm) || theme.fontSize.sm;
2362
- }, _ref4 => {
2363
- var _theme$colors;
2364
- let {
2365
- theme: theme$1
2366
- } = _ref4;
2367
- return (theme$1 === null || theme$1 === void 0 || (_theme$colors = theme$1.colors) === null || _theme$colors === void 0 || (_theme$colors = _theme$colors.gray) === null || _theme$colors === void 0 ? void 0 : _theme$colors[700]) || theme.colors.gray[700];
2368
- });
2369
- const SelectWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n"])));
2370
- const StyledSelect = styled.select(_templateObject4 || (_templateObject4 = _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 padding: ", " ", ";\n font-size: ", ";\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"])), _ref5 => {
2371
- var _theme$colors2, _theme$colors3;
2372
- let {
2373
- theme: theme$1,
2374
- hasError
2375
- } = _ref5;
2376
- return hasError ? (theme$1 === null || theme$1 === void 0 || (_theme$colors2 = theme$1.colors) === null || _theme$colors2 === void 0 ? void 0 : _theme$colors2.error) || theme.colors.error : (theme$1 === null || theme$1 === void 0 || (_theme$colors3 = theme$1.colors) === null || _theme$colors3 === void 0 || (_theme$colors3 = _theme$colors3.gray) === null || _theme$colors3 === void 0 ? void 0 : _theme$colors3[300]) || theme.colors.gray[300];
2377
- }, _ref6 => {
2378
- var _theme$borderRadius;
2379
- let {
2380
- theme: theme$1
2381
- } = _ref6;
2382
- return (theme$1 === null || theme$1 === void 0 || (_theme$borderRadius = theme$1.borderRadius) === null || _theme$borderRadius === void 0 ? void 0 : _theme$borderRadius.md) || theme.borderRadius.md;
2383
- }, _ref7 => {
2384
- var _theme$transitions;
2385
- let {
2386
- theme: theme$1
2387
- } = _ref7;
2388
- return (theme$1 === null || theme$1 === void 0 || (_theme$transitions = theme$1.transitions) === null || _theme$transitions === void 0 ? void 0 : _theme$transitions.base) || theme.transitions.base;
2389
- }, _ref8 => {
2390
- var _theme$colors4;
2391
- let {
2392
- theme: theme$1
2393
- } = _ref8;
2394
- return (theme$1 === null || theme$1 === void 0 || (_theme$colors4 = theme$1.colors) === null || _theme$colors4 === void 0 ? void 0 : _theme$colors4.white) || theme.colors.white;
2395
- }, _ref9 => {
2396
- var _theme$fontFamily;
2397
- let {
2398
- theme: theme$1
2399
- } = _ref9;
2400
- return (theme$1 === null || theme$1 === void 0 || (_theme$fontFamily = theme$1.fontFamily) === null || _theme$fontFamily === void 0 || (_theme$fontFamily = _theme$fontFamily.sans) === null || _theme$fontFamily === void 0 ? void 0 : _theme$fontFamily.join(", ")) || theme.fontFamily.sans.join(", ");
2401
- }, _ref0 => {
2402
- var _theme$spacing2;
2403
- let {
2404
- theme: theme$1
2405
- } = _ref0;
2406
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing2 = theme$1.spacing) === null || _theme$spacing2 === void 0 ? void 0 : _theme$spacing2[2]) || theme.spacing[2];
2407
- }, _ref1 => {
2408
- var _theme$spacing3;
2409
- let {
2410
- theme: theme$1
2411
- } = _ref1;
2412
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing3 = theme$1.spacing) === null || _theme$spacing3 === void 0 ? void 0 : _theme$spacing3[4]) || theme.spacing[4];
2413
- }, _ref10 => {
2414
- var _theme$fontSize2;
2415
- let {
2416
- theme: theme$1
2417
- } = _ref10;
2418
- return (theme$1 === null || theme$1 === void 0 || (_theme$fontSize2 = theme$1.fontSize) === null || _theme$fontSize2 === void 0 ? void 0 : _theme$fontSize2.sm) || theme.fontSize.sm;
2419
- }, _ref11 => {
2420
- var _theme$colors5, _theme$colors6;
2421
- let {
2422
- theme: theme$1,
2423
- hasError
2424
- } = _ref11;
2425
- return hasError ? (theme$1 === null || theme$1 === void 0 || (_theme$colors5 = theme$1.colors) === null || _theme$colors5 === void 0 ? void 0 : _theme$colors5.error) || theme.colors.error : (theme$1 === null || theme$1 === void 0 || (_theme$colors6 = theme$1.colors) === null || _theme$colors6 === void 0 ? void 0 : _theme$colors6.primary) || theme.colors.primary;
2426
- }, _ref12 => {
2427
- var _theme$colors7;
2428
- let {
2429
- theme: theme$1
2430
- } = _ref12;
2431
- return (theme$1 === null || theme$1 === void 0 || (_theme$colors7 = theme$1.colors) === null || _theme$colors7 === void 0 || (_theme$colors7 = _theme$colors7.gray) === null || _theme$colors7 === void 0 ? void 0 : _theme$colors7[50]) || theme.colors.gray[50];
2432
- }, _ref13 => {
2433
- let {
2434
- fullWidth
2435
- } = _ref13;
2436
- return fullWidth && "\n width: 100%;\n ";
2437
- });
2438
- const SelectIcon = styled.div(_templateObject5 || (_templateObject5 = _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"])), _ref14 => {
2439
- var _theme$spacing4;
2440
- let {
2441
- theme: theme$1
2442
- } = _ref14;
2443
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing4 = theme$1.spacing) === null || _theme$spacing4 === void 0 ? void 0 : _theme$spacing4[3]) || theme.spacing[3];
2444
- });
2445
- const HelperText = styled.p(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-top: ", ";\n font-size: ", ";\n color: ", ";\n"])), _ref15 => {
2446
- var _theme$spacing5;
2447
- let {
2448
- theme: theme$1
2449
- } = _ref15;
2450
- return (theme$1 === null || theme$1 === void 0 || (_theme$spacing5 = theme$1.spacing) === null || _theme$spacing5 === void 0 ? void 0 : _theme$spacing5[1]) || theme.spacing[1];
2451
- }, _ref16 => {
2452
- var _theme$fontSize3;
2453
- let {
2454
- theme: theme$1
2455
- } = _ref16;
2456
- return (theme$1 === null || theme$1 === void 0 || (_theme$fontSize3 = theme$1.fontSize) === null || _theme$fontSize3 === void 0 ? void 0 : _theme$fontSize3.xs) || theme.fontSize.xs;
2457
- }, _ref17 => {
2458
- var _theme$colors8, _theme$colors9;
2459
- let {
2460
- theme: theme$1,
2461
- hasError
2462
- } = _ref17;
2463
- return hasError ? (theme$1 === null || theme$1 === void 0 || (_theme$colors8 = theme$1.colors) === null || _theme$colors8 === void 0 ? void 0 : _theme$colors8.error) || theme.colors.error : (theme$1 === null || theme$1 === void 0 || (_theme$colors9 = theme$1.colors) === null || _theme$colors9 === void 0 || (_theme$colors9 = _theme$colors9.gray) === null || _theme$colors9 === void 0 ? void 0 : _theme$colors9[500]) || theme.colors.gray[500];
2464
- });
2465
- const Select = /*#__PURE__*/React.forwardRef((_ref18, ref) => {
1780
+ const Select = /*#__PURE__*/React.forwardRef((_ref, ref) => {
2466
1781
  let {
2467
1782
  className,
2468
1783
  label,
@@ -2473,19 +1788,23 @@ const Select = /*#__PURE__*/React.forwardRef((_ref18, ref) => {
2473
1788
  options,
2474
1789
  placeholder,
2475
1790
  id
2476
- } = _ref18,
2477
- props = _objectWithoutProperties(_ref18, _excluded);
1791
+ } = _ref,
1792
+ props = _objectWithoutProperties(_ref, _excluded);
2478
1793
  const selectId = id || "select-".concat(Math.random().toString(36).substr(2, 9));
2479
- return jsxRuntimeExports.jsxs(SelectContainer, {
2480
- fullWidth: fullWidth,
2481
- children: [label && jsxRuntimeExports.jsx(SelectLabel, {
1794
+ const containerClass = fullWidth ? cssClasses.selectContainerFullWidth : cssClasses.selectContainer;
1795
+ const selectClass = error ? "".concat(cssClasses.select, " ").concat(cssClasses.selectError) : cssClasses.select;
1796
+ const selectFullWidthClass = fullWidth ? cssClasses.selectFullWidth : "";
1797
+ const helperTextClass = error ? cssClasses.inputHelperTextError : cssClasses.inputHelperText;
1798
+ return jsxRuntimeExports.jsxs("div", {
1799
+ className: containerClass,
1800
+ children: [label && jsxRuntimeExports.jsx("label", {
1801
+ className: cssClasses.selectLabel,
2482
1802
  htmlFor: selectId,
2483
1803
  children: label
2484
- }), jsxRuntimeExports.jsxs(SelectWrapper, {
2485
- children: [jsxRuntimeExports.jsxs(StyledSelect, _objectSpread2(_objectSpread2({
2486
- fullWidth: fullWidth,
2487
- hasError: !!error,
2488
- className: className,
1804
+ }), jsxRuntimeExports.jsxs("div", {
1805
+ className: cssClasses.selectWrapper,
1806
+ children: [jsxRuntimeExports.jsxs("select", _objectSpread2(_objectSpread2({
1807
+ className: "".concat(selectClass, " ").concat(selectFullWidthClass),
2489
1808
  ref: ref,
2490
1809
  id: selectId
2491
1810
  }, props), {}, {
@@ -2498,7 +1817,8 @@ const Select = /*#__PURE__*/React.forwardRef((_ref18, ref) => {
2498
1817
  disabled: option.disabled,
2499
1818
  children: option.label
2500
1819
  }, option.value))]
2501
- })), jsxRuntimeExports.jsx(SelectIcon, {
1820
+ })), jsxRuntimeExports.jsx("div", {
1821
+ className: cssClasses.selectIcon,
2502
1822
  children: jsxRuntimeExports.jsx("svg", {
2503
1823
  width: "16",
2504
1824
  height: "16",
@@ -2516,31 +1836,14 @@ const Select = /*#__PURE__*/React.forwardRef((_ref18, ref) => {
2516
1836
  })
2517
1837
  })
2518
1838
  })]
2519
- }), (error || helperText) && jsxRuntimeExports.jsx(HelperText, {
2520
- hasError: !!error,
1839
+ }), (error || helperText) && jsxRuntimeExports.jsx("p", {
1840
+ className: helperTextClass,
2521
1841
  children: error || helperText
2522
1842
  })]
2523
1843
  });
2524
1844
  });
2525
1845
  Select.displayName = "Select";
2526
1846
 
2527
- const ThemeProvider = _ref => {
2528
- let {
2529
- children
2530
- } = _ref;
2531
- // Ensure theme is properly defined
2532
- if (!theme) {
2533
- console.error("Theme is undefined!");
2534
- return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {
2535
- children: children
2536
- });
2537
- }
2538
- return jsxRuntimeExports.jsx(react.ThemeProvider, {
2539
- theme: theme,
2540
- children: children
2541
- });
2542
- };
2543
-
2544
1847
  // Ensure React is available before importing components
2545
1848
 
2546
1849
  exports.React = React;
@@ -2552,6 +1855,5 @@ exports.InputFile = InputFile;
2552
1855
  exports.Radio = Radio;
2553
1856
  exports.Select = Select;
2554
1857
  exports.Textarea = Textarea;
2555
- exports.ThemeProvider = ThemeProvider;
2556
- exports.theme = theme;
1858
+ exports.cssClasses = cssClasses;
2557
1859
  //# sourceMappingURL=index.js.map