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/README.md +93 -66
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/InputFile/InputFile.d.ts +7 -7
- package/dist/components/InputFile/InputFile.d.ts.map +1 -1
- package/dist/components/Radio/Radio.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +208 -905
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +208 -906
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +601 -0
- package/dist/styles/index.d.ts +76 -3
- package/dist/styles/index.d.ts.map +1 -1
- package/package.json +5 -7
- package/dist/styles/ThemeProvider.d.ts +0 -7
- package/dist/styles/ThemeProvider.d.ts.map +0 -1
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
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
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
|
-
|
|
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
|
-
} =
|
|
1621
|
-
props = _objectWithoutProperties(
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
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
|
-
|
|
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
|
-
} =
|
|
1757
|
-
props = _objectWithoutProperties(
|
|
1575
|
+
} = _ref,
|
|
1576
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
1758
1577
|
const inputId = id || "input-".concat(Math.random().toString(36).substr(2, 9));
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
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(
|
|
1588
|
+
}), jsxRuntimeExports.jsx("input", _objectSpread2({
|
|
1765
1589
|
type: type,
|
|
1766
|
-
|
|
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(
|
|
1772
|
-
|
|
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
|
-
|
|
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
|
-
} =
|
|
1897
|
-
props = _objectWithoutProperties(
|
|
1612
|
+
} = _ref,
|
|
1613
|
+
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
1898
1614
|
const textareaId = id || "textarea-".concat(Math.random().toString(36).substr(2, 9));
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
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(
|
|
1905
|
-
|
|
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(
|
|
1913
|
-
|
|
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", "
|
|
1921
|
-
|
|
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
|
-
} =
|
|
2057
|
-
props = _objectWithoutProperties(
|
|
2058
|
-
const inputId = id || "file-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
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(
|
|
2065
|
-
|
|
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
|
-
|
|
2070
|
-
|
|
2071
|
-
}, props)), jsxRuntimeExports.jsxs(
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
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(
|
|
2079
|
-
|
|
1678
|
+
}), multiple && jsxRuntimeExports.jsx("span", {
|
|
1679
|
+
className: cssClasses.inputFileMultipleText,
|
|
1680
|
+
children: "or drag and drop"
|
|
2080
1681
|
})]
|
|
2081
1682
|
})]
|
|
2082
|
-
}), (error || helperText) && jsxRuntimeExports.jsx(
|
|
2083
|
-
|
|
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
|
-
|
|
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
|
-
} =
|
|
2189
|
-
props = _objectWithoutProperties(
|
|
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
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
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
|
-
|
|
2202
|
-
className: className,
|
|
1719
|
+
className: checkboxClass,
|
|
2203
1720
|
ref: ref,
|
|
2204
1721
|
id: checkboxId
|
|
2205
1722
|
}, props))
|
|
2206
|
-
}), jsxRuntimeExports.jsxs(
|
|
2207
|
-
|
|
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(
|
|
2211
|
-
|
|
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
|
-
|
|
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
|
-
} =
|
|
2317
|
-
props = _objectWithoutProperties(
|
|
1748
|
+
} = _ref,
|
|
1749
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
2318
1750
|
const radioId = id || "radio-".concat(Math.random().toString(36).substr(2, 9));
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
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
|
-
|
|
2325
|
-
className: className,
|
|
1760
|
+
className: radioClass,
|
|
2326
1761
|
ref: ref,
|
|
2327
1762
|
id: radioId
|
|
2328
1763
|
}, props))
|
|
2329
|
-
}), jsxRuntimeExports.jsxs(
|
|
2330
|
-
|
|
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(
|
|
2334
|
-
|
|
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
|
-
|
|
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
|
-
} =
|
|
2477
|
-
props = _objectWithoutProperties(
|
|
1791
|
+
} = _ref,
|
|
1792
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
2478
1793
|
const selectId = id || "select-".concat(Math.random().toString(36).substr(2, 9));
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
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(
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
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(
|
|
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(
|
|
2520
|
-
|
|
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.
|
|
2556
|
-
exports.theme = theme;
|
|
1858
|
+
exports.cssClasses = cssClasses;
|
|
2557
1859
|
//# sourceMappingURL=index.js.map
|