thailife-react 0.0.17 → 0.0.19

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