thailife-react 0.0.13 → 0.0.15
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/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.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.esm.js +457 -407
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +458 -408
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
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
|
|
4
|
+
import styled from '@emotion/styled';
|
|
5
|
+
import { ThemeProvider as ThemeProvider$1 } from '@emotion/react';
|
|
5
6
|
|
|
6
7
|
function _defineProperty(e, r, t) {
|
|
7
8
|
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
@@ -1435,64 +1436,155 @@ if (process.env.NODE_ENV === 'production') {
|
|
|
1435
1436
|
|
|
1436
1437
|
var jsxRuntimeExports = jsxRuntime.exports;
|
|
1437
1438
|
|
|
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.06)",
|
|
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
|
+
}
|
|
1522
|
+
};
|
|
1523
|
+
|
|
1438
1524
|
const _excluded$6 = ["className", "color", "variant", "size", "fullWidth", "loading", "disabled", "children"];
|
|
1439
|
-
var _templateObject$6
|
|
1525
|
+
var _templateObject$6;
|
|
1440
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;
|
|
1441
1528
|
let {
|
|
1442
|
-
theme
|
|
1529
|
+
theme: theme$1
|
|
1443
1530
|
} = _ref;
|
|
1444
|
-
return theme.borderRadius.md;
|
|
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;
|
|
1445
1532
|
}, _ref2 => {
|
|
1533
|
+
var _theme$fontFamily;
|
|
1446
1534
|
let {
|
|
1447
|
-
theme
|
|
1535
|
+
theme: theme$1
|
|
1448
1536
|
} = _ref2;
|
|
1449
|
-
return theme.fontFamily.sans.join(", ");
|
|
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(", ");
|
|
1450
1538
|
}, _ref3 => {
|
|
1539
|
+
var _theme$transitions;
|
|
1451
1540
|
let {
|
|
1452
|
-
theme
|
|
1541
|
+
theme: theme$1
|
|
1453
1542
|
} = _ref3;
|
|
1454
|
-
return theme.transitions.base;
|
|
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;
|
|
1455
1544
|
}, _ref4 => {
|
|
1545
|
+
var _theme$colors;
|
|
1456
1546
|
let {
|
|
1457
|
-
theme
|
|
1547
|
+
theme: theme$1
|
|
1458
1548
|
} = _ref4;
|
|
1459
|
-
return theme.colors.primary;
|
|
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;
|
|
1460
1550
|
}, _ref5 => {
|
|
1461
1551
|
let {
|
|
1462
1552
|
variant,
|
|
1463
1553
|
color,
|
|
1464
|
-
theme
|
|
1554
|
+
theme: theme$1
|
|
1465
1555
|
} = _ref5;
|
|
1556
|
+
const currentTheme = theme$1 || theme;
|
|
1466
1557
|
if (variant === "contained") {
|
|
1467
|
-
return
|
|
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 ");
|
|
1468
1559
|
}
|
|
1469
1560
|
if (variant === "outlined") {
|
|
1470
|
-
return
|
|
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 ");
|
|
1471
1562
|
}
|
|
1472
1563
|
if (variant === "link") {
|
|
1473
|
-
return
|
|
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 ");
|
|
1474
1565
|
}
|
|
1475
|
-
return
|
|
1566
|
+
return "";
|
|
1476
1567
|
}, _ref6 => {
|
|
1477
1568
|
let {
|
|
1478
1569
|
size,
|
|
1479
|
-
theme
|
|
1570
|
+
theme: theme$1
|
|
1480
1571
|
} = _ref6;
|
|
1572
|
+
const currentTheme = theme$1 || theme;
|
|
1481
1573
|
if (size === "sm") {
|
|
1482
|
-
return
|
|
1574
|
+
return "\n padding: ".concat(currentTheme.spacing[3], " ").concat(currentTheme.spacing[3], ";\n font-size: ").concat(currentTheme.fontSize.sm, ";\n ");
|
|
1483
1575
|
}
|
|
1484
1576
|
if (size === "md") {
|
|
1485
|
-
return
|
|
1577
|
+
return "\n padding: ".concat(currentTheme.spacing[2], " ").concat(currentTheme.spacing[4], ";\n font-size: ").concat(currentTheme.fontSize.sm, ";\n ");
|
|
1486
1578
|
}
|
|
1487
1579
|
if (size === "lg") {
|
|
1488
|
-
return
|
|
1580
|
+
return "\n padding: ".concat(currentTheme.spacing[3], " ").concat(currentTheme.spacing[6], ";\n font-size: ").concat(currentTheme.fontSize.base, ";\n ");
|
|
1489
1581
|
}
|
|
1490
|
-
return
|
|
1582
|
+
return "";
|
|
1491
1583
|
}, _ref7 => {
|
|
1492
1584
|
let {
|
|
1493
1585
|
fullWidth
|
|
1494
1586
|
} = _ref7;
|
|
1495
|
-
return fullWidth &&
|
|
1587
|
+
return fullWidth && "\n width: 100%;\n ";
|
|
1496
1588
|
});
|
|
1497
1589
|
const Button = /*#__PURE__*/React__default.forwardRef((_ref8, ref) => {
|
|
1498
1590
|
let {
|
|
@@ -1522,100 +1614,115 @@ const Button = /*#__PURE__*/React__default.forwardRef((_ref8, ref) => {
|
|
|
1522
1614
|
Button.displayName = "Button";
|
|
1523
1615
|
|
|
1524
1616
|
const _excluded$5 = ["className", "type", "label", "error", "helperText", "size", "fullWidth", "id"];
|
|
1525
|
-
var _templateObject$5, _templateObject2$5, _templateObject3$5, _templateObject4$5
|
|
1617
|
+
var _templateObject$5, _templateObject2$5, _templateObject3$5, _templateObject4$5;
|
|
1526
1618
|
const InputContainer = styled.div(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n ", "\n"])), _ref => {
|
|
1527
1619
|
let {
|
|
1528
1620
|
fullWidth
|
|
1529
1621
|
} = _ref;
|
|
1530
|
-
return fullWidth &&
|
|
1622
|
+
return fullWidth && "\n width: 100%;\n ";
|
|
1531
1623
|
});
|
|
1532
|
-
const InputLabel = styled.label(
|
|
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;
|
|
1533
1626
|
let {
|
|
1534
|
-
theme
|
|
1627
|
+
theme: theme$1
|
|
1535
1628
|
} = _ref2;
|
|
1536
|
-
return theme.spacing[1];
|
|
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];
|
|
1537
1630
|
}, _ref3 => {
|
|
1631
|
+
var _theme$fontSize;
|
|
1538
1632
|
let {
|
|
1539
|
-
theme
|
|
1633
|
+
theme: theme$1
|
|
1540
1634
|
} = _ref3;
|
|
1541
|
-
return theme.fontSize.sm;
|
|
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;
|
|
1542
1636
|
}, _ref4 => {
|
|
1637
|
+
var _theme$colors;
|
|
1543
1638
|
let {
|
|
1544
|
-
theme
|
|
1639
|
+
theme: theme$1
|
|
1545
1640
|
} = _ref4;
|
|
1546
|
-
return theme.colors.gray[700];
|
|
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];
|
|
1547
1642
|
});
|
|
1548
|
-
const StyledInput = styled.input(
|
|
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;
|
|
1549
1645
|
let {
|
|
1550
|
-
theme,
|
|
1646
|
+
theme: theme$1,
|
|
1551
1647
|
hasError
|
|
1552
1648
|
} = _ref5;
|
|
1553
|
-
return hasError ? theme.colors.error : theme.colors.gray[300];
|
|
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];
|
|
1554
1650
|
}, _ref6 => {
|
|
1651
|
+
var _theme$borderRadius;
|
|
1555
1652
|
let {
|
|
1556
|
-
theme
|
|
1653
|
+
theme: theme$1
|
|
1557
1654
|
} = _ref6;
|
|
1558
|
-
return theme.borderRadius.md;
|
|
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;
|
|
1559
1656
|
}, _ref7 => {
|
|
1657
|
+
var _theme$transitions;
|
|
1560
1658
|
let {
|
|
1561
|
-
theme
|
|
1659
|
+
theme: theme$1
|
|
1562
1660
|
} = _ref7;
|
|
1563
|
-
return theme.transitions.base;
|
|
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;
|
|
1564
1662
|
}, _ref8 => {
|
|
1663
|
+
var _theme$fontFamily;
|
|
1565
1664
|
let {
|
|
1566
|
-
theme
|
|
1665
|
+
theme: theme$1
|
|
1567
1666
|
} = _ref8;
|
|
1568
|
-
return theme.fontFamily.sans.join(", ");
|
|
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(", ");
|
|
1569
1668
|
}, _ref9 => {
|
|
1669
|
+
var _theme$spacing2;
|
|
1570
1670
|
let {
|
|
1571
|
-
theme
|
|
1572
|
-
hasError
|
|
1671
|
+
theme: theme$1
|
|
1573
1672
|
} = _ref9;
|
|
1574
|
-
return
|
|
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];
|
|
1575
1674
|
}, _ref0 => {
|
|
1675
|
+
var _theme$spacing3;
|
|
1576
1676
|
let {
|
|
1577
|
-
theme
|
|
1677
|
+
theme: theme$1
|
|
1578
1678
|
} = _ref0;
|
|
1579
|
-
return theme.
|
|
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];
|
|
1580
1680
|
}, _ref1 => {
|
|
1681
|
+
var _theme$fontSize2;
|
|
1581
1682
|
let {
|
|
1582
|
-
|
|
1583
|
-
theme
|
|
1683
|
+
theme: theme$1
|
|
1584
1684
|
} = _ref1;
|
|
1585
|
-
|
|
1586
|
-
return css(_templateObject5$5 || (_templateObject5$5 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[3], theme.spacing[3], theme.fontSize.sm);
|
|
1587
|
-
}
|
|
1588
|
-
if (size === "md") {
|
|
1589
|
-
return css(_templateObject6$5 || (_templateObject6$5 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[2], theme.spacing[4], theme.fontSize.sm);
|
|
1590
|
-
}
|
|
1591
|
-
if (size === "lg") {
|
|
1592
|
-
return css(_templateObject7$5 || (_templateObject7$5 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[3], theme.spacing[4], theme.fontSize.base);
|
|
1593
|
-
}
|
|
1594
|
-
return css(_templateObject8$5 || (_templateObject8$5 = _taggedTemplateLiteral([""])));
|
|
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;
|
|
1595
1686
|
}, _ref10 => {
|
|
1687
|
+
var _theme$colors4, _theme$colors5;
|
|
1596
1688
|
let {
|
|
1597
|
-
|
|
1689
|
+
theme: theme$1,
|
|
1690
|
+
hasError
|
|
1598
1691
|
} = _ref10;
|
|
1599
|
-
return
|
|
1600
|
-
}
|
|
1601
|
-
|
|
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;
|
|
1602
1695
|
let {
|
|
1603
|
-
theme
|
|
1696
|
+
theme: theme$1
|
|
1604
1697
|
} = _ref11;
|
|
1605
|
-
return theme.
|
|
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];
|
|
1606
1699
|
}, _ref12 => {
|
|
1607
1700
|
let {
|
|
1608
|
-
|
|
1701
|
+
fullWidth
|
|
1609
1702
|
} = _ref12;
|
|
1610
|
-
return
|
|
1611
|
-
}
|
|
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;
|
|
1612
1707
|
let {
|
|
1613
|
-
theme
|
|
1614
|
-
hasError
|
|
1708
|
+
theme: theme$1
|
|
1615
1709
|
} = _ref13;
|
|
1616
|
-
return
|
|
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];
|
|
1617
1724
|
});
|
|
1618
|
-
const Input = /*#__PURE__*/React__default.forwardRef((
|
|
1725
|
+
const Input = /*#__PURE__*/React__default.forwardRef((_ref16, ref) => {
|
|
1619
1726
|
let {
|
|
1620
1727
|
className,
|
|
1621
1728
|
type = "text",
|
|
@@ -1625,8 +1732,8 @@ const Input = /*#__PURE__*/React__default.forwardRef((_ref14, ref) => {
|
|
|
1625
1732
|
size = "md",
|
|
1626
1733
|
fullWidth = false,
|
|
1627
1734
|
id
|
|
1628
|
-
} =
|
|
1629
|
-
props = _objectWithoutProperties(
|
|
1735
|
+
} = _ref16,
|
|
1736
|
+
props = _objectWithoutProperties(_ref16, _excluded$5);
|
|
1630
1737
|
const inputId = id || "input-".concat(Math.random().toString(36).substr(2, 9));
|
|
1631
1738
|
return jsxRuntimeExports.jsxs(InputContainer, {
|
|
1632
1739
|
fullWidth: fullWidth,
|
|
@@ -1635,7 +1742,6 @@ const Input = /*#__PURE__*/React__default.forwardRef((_ref14, ref) => {
|
|
|
1635
1742
|
children: label
|
|
1636
1743
|
}), jsxRuntimeExports.jsx(StyledInput, _objectSpread2({
|
|
1637
1744
|
type: type,
|
|
1638
|
-
size: size,
|
|
1639
1745
|
fullWidth: fullWidth,
|
|
1640
1746
|
hasError: !!error,
|
|
1641
1747
|
className: className,
|
|
@@ -1650,98 +1756,111 @@ const Input = /*#__PURE__*/React__default.forwardRef((_ref14, ref) => {
|
|
|
1650
1756
|
Input.displayName = "Input";
|
|
1651
1757
|
|
|
1652
1758
|
const _excluded$4 = ["className", "label", "error", "helperText", "size", "fullWidth", "rows", "id"];
|
|
1653
|
-
var _templateObject$4, _templateObject2$4, _templateObject3$4, _templateObject4$4
|
|
1759
|
+
var _templateObject$4, _templateObject2$4, _templateObject3$4, _templateObject4$4;
|
|
1654
1760
|
const TextareaContainer = styled.div(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n ", "\n"])), _ref => {
|
|
1655
1761
|
let {
|
|
1656
1762
|
fullWidth
|
|
1657
1763
|
} = _ref;
|
|
1658
|
-
return fullWidth &&
|
|
1764
|
+
return fullWidth && "\n width: 100%;\n ";
|
|
1659
1765
|
});
|
|
1660
|
-
const TextareaLabel = styled.label(
|
|
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;
|
|
1661
1768
|
let {
|
|
1662
|
-
theme
|
|
1769
|
+
theme: theme$1
|
|
1663
1770
|
} = _ref2;
|
|
1664
|
-
return theme.spacing[1];
|
|
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];
|
|
1665
1772
|
}, _ref3 => {
|
|
1773
|
+
var _theme$fontSize;
|
|
1666
1774
|
let {
|
|
1667
|
-
theme
|
|
1775
|
+
theme: theme$1
|
|
1668
1776
|
} = _ref3;
|
|
1669
|
-
return theme.fontSize.sm;
|
|
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;
|
|
1670
1778
|
}, _ref4 => {
|
|
1779
|
+
var _theme$colors;
|
|
1671
1780
|
let {
|
|
1672
|
-
theme
|
|
1781
|
+
theme: theme$1
|
|
1673
1782
|
} = _ref4;
|
|
1674
|
-
return theme.colors.gray[700];
|
|
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];
|
|
1675
1784
|
});
|
|
1676
|
-
const StyledTextarea = styled.textarea(
|
|
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;
|
|
1677
1787
|
let {
|
|
1678
|
-
theme,
|
|
1788
|
+
theme: theme$1,
|
|
1679
1789
|
hasError
|
|
1680
1790
|
} = _ref5;
|
|
1681
|
-
return hasError ? theme.colors.error : theme.colors.gray[300];
|
|
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];
|
|
1682
1792
|
}, _ref6 => {
|
|
1793
|
+
var _theme$borderRadius;
|
|
1683
1794
|
let {
|
|
1684
|
-
theme
|
|
1795
|
+
theme: theme$1
|
|
1685
1796
|
} = _ref6;
|
|
1686
|
-
return theme.borderRadius.md;
|
|
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;
|
|
1687
1798
|
}, _ref7 => {
|
|
1799
|
+
var _theme$transitions;
|
|
1688
1800
|
let {
|
|
1689
|
-
theme
|
|
1801
|
+
theme: theme$1
|
|
1690
1802
|
} = _ref7;
|
|
1691
|
-
return theme.transitions.base;
|
|
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;
|
|
1692
1804
|
}, _ref8 => {
|
|
1805
|
+
var _theme$fontFamily;
|
|
1693
1806
|
let {
|
|
1694
|
-
theme
|
|
1807
|
+
theme: theme$1
|
|
1695
1808
|
} = _ref8;
|
|
1696
|
-
return theme.fontFamily.sans.join(", ");
|
|
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(", ");
|
|
1697
1810
|
}, _ref9 => {
|
|
1811
|
+
var _theme$colors4, _theme$colors5;
|
|
1698
1812
|
let {
|
|
1699
|
-
theme,
|
|
1813
|
+
theme: theme$1,
|
|
1700
1814
|
hasError
|
|
1701
1815
|
} = _ref9;
|
|
1702
|
-
return hasError ? theme.colors.error : theme.colors.primary;
|
|
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;
|
|
1703
1817
|
}, _ref0 => {
|
|
1818
|
+
var _theme$colors6;
|
|
1704
1819
|
let {
|
|
1705
|
-
theme
|
|
1820
|
+
theme: theme$1
|
|
1706
1821
|
} = _ref0;
|
|
1707
|
-
return theme.colors.gray[50];
|
|
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];
|
|
1708
1823
|
}, _ref1 => {
|
|
1709
1824
|
let {
|
|
1710
1825
|
size,
|
|
1711
|
-
theme
|
|
1826
|
+
theme: theme$1
|
|
1712
1827
|
} = _ref1;
|
|
1828
|
+
const currentTheme = theme$1 || theme;
|
|
1713
1829
|
if (size === "sm") {
|
|
1714
|
-
return
|
|
1830
|
+
return "\n padding: ".concat(currentTheme.spacing[3], " ").concat(currentTheme.spacing[3], ";\n font-size: ").concat(currentTheme.fontSize.sm, ";\n ");
|
|
1715
1831
|
}
|
|
1716
1832
|
if (size === "md") {
|
|
1717
|
-
return
|
|
1833
|
+
return "\n padding: ".concat(currentTheme.spacing[2], " ").concat(currentTheme.spacing[4], ";\n font-size: ").concat(currentTheme.fontSize.sm, ";\n ");
|
|
1718
1834
|
}
|
|
1719
1835
|
if (size === "lg") {
|
|
1720
|
-
return
|
|
1836
|
+
return "\n padding: ".concat(currentTheme.spacing[3], " ").concat(currentTheme.spacing[4], ";\n font-size: ").concat(currentTheme.fontSize.base, ";\n ");
|
|
1721
1837
|
}
|
|
1722
|
-
return
|
|
1838
|
+
return "";
|
|
1723
1839
|
}, _ref10 => {
|
|
1724
1840
|
let {
|
|
1725
1841
|
fullWidth
|
|
1726
1842
|
} = _ref10;
|
|
1727
|
-
return fullWidth &&
|
|
1843
|
+
return fullWidth && "\n width: 100%;\n ";
|
|
1728
1844
|
});
|
|
1729
|
-
const HelperText$4 = styled.p(
|
|
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;
|
|
1730
1847
|
let {
|
|
1731
|
-
theme
|
|
1848
|
+
theme: theme$1
|
|
1732
1849
|
} = _ref11;
|
|
1733
|
-
return theme.spacing[1];
|
|
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];
|
|
1734
1851
|
}, _ref12 => {
|
|
1852
|
+
var _theme$fontSize2;
|
|
1735
1853
|
let {
|
|
1736
|
-
theme
|
|
1854
|
+
theme: theme$1
|
|
1737
1855
|
} = _ref12;
|
|
1738
|
-
return theme.fontSize.xs;
|
|
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;
|
|
1739
1857
|
}, _ref13 => {
|
|
1858
|
+
var _theme$colors7, _theme$colors8;
|
|
1740
1859
|
let {
|
|
1741
|
-
theme,
|
|
1860
|
+
theme: theme$1,
|
|
1742
1861
|
hasError
|
|
1743
1862
|
} = _ref13;
|
|
1744
|
-
return hasError ? theme.colors.error : theme.colors.gray[500];
|
|
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];
|
|
1745
1864
|
});
|
|
1746
1865
|
const Textarea = /*#__PURE__*/React__default.forwardRef((_ref14, ref) => {
|
|
1747
1866
|
let {
|
|
@@ -1778,113 +1897,128 @@ const Textarea = /*#__PURE__*/React__default.forwardRef((_ref14, ref) => {
|
|
|
1778
1897
|
Textarea.displayName = "Textarea";
|
|
1779
1898
|
|
|
1780
1899
|
const _excluded$3 = ["className", "label", "error", "helperText", "size", "fullWidth", "accept", "multiple", "buttonText", "id"];
|
|
1781
|
-
var _templateObject$3, _templateObject2$3, _templateObject3$3, _templateObject4$3, _templateObject5$3, _templateObject6$3, _templateObject7
|
|
1900
|
+
var _templateObject$3, _templateObject2$3, _templateObject3$3, _templateObject4$3, _templateObject5$3, _templateObject6$3, _templateObject7, _templateObject8;
|
|
1782
1901
|
const InputFileContainer = styled.div(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n ", "\n"])), _ref => {
|
|
1783
1902
|
let {
|
|
1784
1903
|
fullWidth
|
|
1785
1904
|
} = _ref;
|
|
1786
|
-
return fullWidth &&
|
|
1905
|
+
return fullWidth && "\n width: 100%;\n ";
|
|
1787
1906
|
});
|
|
1788
|
-
const InputFileLabel = styled.label(
|
|
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;
|
|
1789
1909
|
let {
|
|
1790
|
-
theme
|
|
1910
|
+
theme: theme$1
|
|
1791
1911
|
} = _ref2;
|
|
1792
|
-
return theme.spacing[1];
|
|
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];
|
|
1793
1913
|
}, _ref3 => {
|
|
1914
|
+
var _theme$fontSize;
|
|
1794
1915
|
let {
|
|
1795
|
-
theme
|
|
1916
|
+
theme: theme$1
|
|
1796
1917
|
} = _ref3;
|
|
1797
|
-
return theme.fontSize.sm;
|
|
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;
|
|
1798
1919
|
}, _ref4 => {
|
|
1920
|
+
var _theme$colors;
|
|
1799
1921
|
let {
|
|
1800
|
-
theme
|
|
1922
|
+
theme: theme$1
|
|
1801
1923
|
} = _ref4;
|
|
1802
|
-
return theme.colors.gray[700];
|
|
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];
|
|
1803
1925
|
});
|
|
1804
|
-
const InputFileWrapper = styled.div(
|
|
1805
|
-
const HiddenInput = styled.input(
|
|
1806
|
-
const FileUploadArea = styled.div(
|
|
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;
|
|
1807
1930
|
let {
|
|
1808
|
-
theme,
|
|
1931
|
+
theme: theme$1,
|
|
1809
1932
|
hasError
|
|
1810
1933
|
} = _ref5;
|
|
1811
|
-
return hasError ? theme.colors.error : theme.colors.gray[300];
|
|
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];
|
|
1812
1935
|
}, _ref6 => {
|
|
1936
|
+
var _theme$transitions;
|
|
1813
1937
|
let {
|
|
1814
|
-
theme
|
|
1938
|
+
theme: theme$1
|
|
1815
1939
|
} = _ref6;
|
|
1816
|
-
return theme.transitions.base;
|
|
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;
|
|
1817
1941
|
}, _ref7 => {
|
|
1942
|
+
var _theme$colors4, _theme$colors5;
|
|
1818
1943
|
let {
|
|
1819
|
-
theme,
|
|
1944
|
+
theme: theme$1,
|
|
1820
1945
|
hasError
|
|
1821
1946
|
} = _ref7;
|
|
1822
|
-
return hasError ? theme.colors.error : theme.colors.primary;
|
|
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;
|
|
1823
1948
|
}, _ref8 => {
|
|
1949
|
+
var _theme$colors6, _theme$colors7;
|
|
1824
1950
|
let {
|
|
1825
|
-
theme,
|
|
1951
|
+
theme: theme$1,
|
|
1826
1952
|
hasError
|
|
1827
1953
|
} = _ref8;
|
|
1828
|
-
return hasError ? theme.colors.error : theme.colors.primary;
|
|
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;
|
|
1829
1955
|
}, _ref9 => {
|
|
1830
1956
|
let {
|
|
1831
1957
|
size,
|
|
1832
|
-
theme
|
|
1958
|
+
theme: theme$1
|
|
1833
1959
|
} = _ref9;
|
|
1960
|
+
const currentTheme = theme$1 || theme;
|
|
1834
1961
|
if (size === "sm") {
|
|
1835
|
-
return
|
|
1962
|
+
return "\n padding: ".concat(currentTheme.spacing[3], " ").concat(currentTheme.spacing[3], ";\n font-size: ").concat(currentTheme.fontSize.sm, ";\n ");
|
|
1836
1963
|
}
|
|
1837
1964
|
if (size === "md") {
|
|
1838
|
-
return
|
|
1965
|
+
return "\n padding: ".concat(currentTheme.spacing[2], " ").concat(currentTheme.spacing[4], ";\n font-size: ").concat(currentTheme.fontSize.base, ";\n ");
|
|
1839
1966
|
}
|
|
1840
1967
|
if (size === "lg") {
|
|
1841
|
-
return
|
|
1968
|
+
return "\n padding: ".concat(currentTheme.spacing[3], " ").concat(currentTheme.spacing[4], ";\n font-size: ").concat(currentTheme.fontSize.base, ";\n ");
|
|
1842
1969
|
}
|
|
1843
|
-
return
|
|
1970
|
+
return "";
|
|
1844
1971
|
}, _ref0 => {
|
|
1845
1972
|
let {
|
|
1846
1973
|
fullWidth
|
|
1847
1974
|
} = _ref0;
|
|
1848
|
-
return fullWidth &&
|
|
1975
|
+
return fullWidth && "\n width: 100%;\n ";
|
|
1849
1976
|
});
|
|
1850
|
-
const ButtonText = styled.span(
|
|
1977
|
+
const ButtonText = styled.span(_templateObject6$3 || (_templateObject6$3 = _taggedTemplateLiteral(["\n color: ", ";\n"])), _ref1 => {
|
|
1978
|
+
var _theme$colors8;
|
|
1851
1979
|
let {
|
|
1852
|
-
theme
|
|
1980
|
+
theme: theme$1
|
|
1853
1981
|
} = _ref1;
|
|
1854
|
-
return theme.colors.gray[600];
|
|
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];
|
|
1855
1983
|
});
|
|
1856
|
-
const MultipleText = styled.span(
|
|
1984
|
+
const MultipleText = styled.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-left: ", ";\n font-size: ", ";\n color: ", ";\n"])), _ref10 => {
|
|
1985
|
+
var _theme$spacing2;
|
|
1857
1986
|
let {
|
|
1858
|
-
theme
|
|
1987
|
+
theme: theme$1
|
|
1859
1988
|
} = _ref10;
|
|
1860
|
-
return theme.spacing[1];
|
|
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];
|
|
1861
1990
|
}, _ref11 => {
|
|
1991
|
+
var _theme$fontSize2;
|
|
1862
1992
|
let {
|
|
1863
|
-
theme
|
|
1993
|
+
theme: theme$1
|
|
1864
1994
|
} = _ref11;
|
|
1865
|
-
return theme.fontSize.xs;
|
|
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;
|
|
1866
1996
|
}, _ref12 => {
|
|
1997
|
+
var _theme$colors9;
|
|
1867
1998
|
let {
|
|
1868
|
-
theme
|
|
1999
|
+
theme: theme$1
|
|
1869
2000
|
} = _ref12;
|
|
1870
|
-
return theme.colors.gray[500];
|
|
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];
|
|
1871
2002
|
});
|
|
1872
|
-
const HelperText$3 = styled.p(
|
|
2003
|
+
const HelperText$3 = styled.p(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-top: ", ";\n font-size: ", ";\n color: ", ";\n"])), _ref13 => {
|
|
2004
|
+
var _theme$spacing3;
|
|
1873
2005
|
let {
|
|
1874
|
-
theme
|
|
2006
|
+
theme: theme$1
|
|
1875
2007
|
} = _ref13;
|
|
1876
|
-
return theme.spacing[1];
|
|
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];
|
|
1877
2009
|
}, _ref14 => {
|
|
2010
|
+
var _theme$fontSize3;
|
|
1878
2011
|
let {
|
|
1879
|
-
theme
|
|
2012
|
+
theme: theme$1
|
|
1880
2013
|
} = _ref14;
|
|
1881
|
-
return theme.fontSize.xs;
|
|
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;
|
|
1882
2015
|
}, _ref15 => {
|
|
2016
|
+
var _theme$colors0, _theme$colors1;
|
|
1883
2017
|
let {
|
|
1884
|
-
theme,
|
|
2018
|
+
theme: theme$1,
|
|
1885
2019
|
hasError
|
|
1886
2020
|
} = _ref15;
|
|
1887
|
-
return hasError ? theme.colors.error : theme.colors.gray[500];
|
|
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];
|
|
1888
2022
|
});
|
|
1889
2023
|
const InputFile = /*#__PURE__*/React__default.forwardRef((_ref16, ref) => {
|
|
1890
2024
|
let {
|
|
@@ -1933,100 +2067,92 @@ const InputFile = /*#__PURE__*/React__default.forwardRef((_ref16, ref) => {
|
|
|
1933
2067
|
InputFile.displayName = "InputFile";
|
|
1934
2068
|
|
|
1935
2069
|
const _excluded$2 = ["className", "label", "error", "helperText", "size", "fullWidth", "indeterminate", "id"];
|
|
1936
|
-
var _templateObject$2, _templateObject2$2, _templateObject3$2, _templateObject4$2, _templateObject5$2, _templateObject6$2
|
|
2070
|
+
var _templateObject$2, _templateObject2$2, _templateObject3$2, _templateObject4$2, _templateObject5$2, _templateObject6$2;
|
|
1937
2071
|
const CheckboxContainer = styled.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: flex-start;\n ", "\n"])), _ref => {
|
|
1938
2072
|
let {
|
|
1939
2073
|
fullWidth
|
|
1940
2074
|
} = _ref;
|
|
1941
|
-
return fullWidth &&
|
|
2075
|
+
return fullWidth && "\n width: 100%;\n ";
|
|
1942
2076
|
});
|
|
1943
|
-
const CheckboxWrapper = styled.div(
|
|
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;
|
|
1944
2079
|
let {
|
|
1945
|
-
theme
|
|
2080
|
+
theme: theme$1
|
|
1946
2081
|
} = _ref2;
|
|
1947
|
-
return theme.spacing[5];
|
|
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];
|
|
1948
2083
|
});
|
|
1949
|
-
const StyledCheckbox = styled.input(
|
|
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;
|
|
1950
2086
|
let {
|
|
1951
|
-
theme
|
|
2087
|
+
theme: theme$1
|
|
1952
2088
|
} = _ref3;
|
|
1953
|
-
return theme.borderRadius.md;
|
|
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;
|
|
1954
2090
|
}, _ref4 => {
|
|
2091
|
+
var _theme$colors, _theme$colors2;
|
|
1955
2092
|
let {
|
|
1956
|
-
theme,
|
|
2093
|
+
theme: theme$1,
|
|
1957
2094
|
hasError
|
|
1958
2095
|
} = _ref4;
|
|
1959
|
-
return hasError ? theme.colors.error : theme.colors.gray[300];
|
|
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];
|
|
1960
2097
|
}, _ref5 => {
|
|
2098
|
+
var _theme$transitions;
|
|
1961
2099
|
let {
|
|
1962
|
-
theme
|
|
2100
|
+
theme: theme$1
|
|
1963
2101
|
} = _ref5;
|
|
1964
|
-
return theme.transitions.base;
|
|
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;
|
|
1965
2103
|
}, _ref6 => {
|
|
2104
|
+
var _theme$colors3, _theme$colors4;
|
|
1966
2105
|
let {
|
|
1967
|
-
theme,
|
|
2106
|
+
theme: theme$1,
|
|
1968
2107
|
hasError
|
|
1969
2108
|
} = _ref6;
|
|
1970
|
-
return hasError ? theme.colors.error : theme.colors.primary;
|
|
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;
|
|
1971
2110
|
}, _ref7 => {
|
|
1972
2111
|
let {
|
|
1973
|
-
|
|
1974
|
-
theme
|
|
2112
|
+
theme: theme$1
|
|
1975
2113
|
} = _ref7;
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
}
|
|
1979
|
-
if (size === "md") {
|
|
1980
|
-
return css(_templateObject6$2 || (_templateObject6$2 = _taggedTemplateLiteral(["\n width: ", ";\n height: ", ";\n "])), theme.spacing[5], theme.spacing[5]);
|
|
1981
|
-
}
|
|
1982
|
-
if (size === "lg") {
|
|
1983
|
-
return css(_templateObject7$2 || (_templateObject7$2 = _taggedTemplateLiteral(["\n width: ", ";\n height: ", ";\n "])), theme.spacing[6], theme.spacing[6]);
|
|
1984
|
-
}
|
|
1985
|
-
return css(_templateObject8$2 || (_templateObject8$2 = _taggedTemplateLiteral([""])));
|
|
2114
|
+
const currentTheme = theme$1 || theme;
|
|
2115
|
+
return "\n width: ".concat(currentTheme.spacing[5], ";\n height: ").concat(currentTheme.spacing[5], ";\n ");
|
|
1986
2116
|
});
|
|
1987
|
-
const LabelContainer$1 = styled.div(
|
|
2117
|
+
const LabelContainer$1 = styled.div(_templateObject4$2 || (_templateObject4$2 = _taggedTemplateLiteral(["\n margin-left: ", ";\n"])), _ref8 => {
|
|
2118
|
+
var _theme$spacing2;
|
|
1988
2119
|
let {
|
|
1989
|
-
theme
|
|
2120
|
+
theme: theme$1
|
|
1990
2121
|
} = _ref8;
|
|
1991
|
-
return theme.spacing[3];
|
|
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];
|
|
1992
2123
|
});
|
|
1993
|
-
const CheckboxLabel = styled.label(
|
|
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;
|
|
1994
2126
|
let {
|
|
1995
|
-
theme
|
|
2127
|
+
theme: theme$1
|
|
1996
2128
|
} = _ref9;
|
|
1997
|
-
return theme.colors.gray[700];
|
|
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];
|
|
1998
2130
|
}, _ref0 => {
|
|
2131
|
+
var _theme$fontSize;
|
|
1999
2132
|
let {
|
|
2000
|
-
|
|
2001
|
-
theme
|
|
2133
|
+
theme: theme$1
|
|
2002
2134
|
} = _ref0;
|
|
2003
|
-
|
|
2004
|
-
return css(_templateObject1$2 || (_templateObject1$2 = _taggedTemplateLiteral(["\n font-size: ", ";\n "])), theme.fontSize.sm);
|
|
2005
|
-
}
|
|
2006
|
-
if (size === "md") {
|
|
2007
|
-
return css(_templateObject10$2 || (_templateObject10$2 = _taggedTemplateLiteral(["\n font-size: ", ";\n "])), theme.fontSize.sm);
|
|
2008
|
-
}
|
|
2009
|
-
if (size === "lg") {
|
|
2010
|
-
return css(_templateObject11$1 || (_templateObject11$1 = _taggedTemplateLiteral(["\n font-size: ", ";\n "])), theme.fontSize.base);
|
|
2011
|
-
}
|
|
2012
|
-
return css(_templateObject12$1 || (_templateObject12$1 = _taggedTemplateLiteral([""])));
|
|
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;
|
|
2013
2136
|
});
|
|
2014
|
-
const HelperText$2 = styled.p(
|
|
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;
|
|
2015
2139
|
let {
|
|
2016
|
-
theme
|
|
2140
|
+
theme: theme$1
|
|
2017
2141
|
} = _ref1;
|
|
2018
|
-
return theme.spacing[1];
|
|
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];
|
|
2019
2143
|
}, _ref10 => {
|
|
2144
|
+
var _theme$fontSize2;
|
|
2020
2145
|
let {
|
|
2021
|
-
theme
|
|
2146
|
+
theme: theme$1
|
|
2022
2147
|
} = _ref10;
|
|
2023
|
-
return theme.fontSize.xs;
|
|
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;
|
|
2024
2149
|
}, _ref11 => {
|
|
2150
|
+
var _theme$colors6, _theme$colors7;
|
|
2025
2151
|
let {
|
|
2026
|
-
theme,
|
|
2152
|
+
theme: theme$1,
|
|
2027
2153
|
hasError
|
|
2028
2154
|
} = _ref11;
|
|
2029
|
-
return hasError ? theme.colors.error : theme.colors.gray[500];
|
|
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];
|
|
2030
2156
|
});
|
|
2031
2157
|
const Checkbox = /*#__PURE__*/React__default.forwardRef((_ref12, ref) => {
|
|
2032
2158
|
let {
|
|
@@ -2051,7 +2177,6 @@ const Checkbox = /*#__PURE__*/React__default.forwardRef((_ref12, ref) => {
|
|
|
2051
2177
|
children: [jsxRuntimeExports.jsx(CheckboxWrapper, {
|
|
2052
2178
|
children: jsxRuntimeExports.jsx(StyledCheckbox, _objectSpread2({
|
|
2053
2179
|
type: "checkbox",
|
|
2054
|
-
size: size,
|
|
2055
2180
|
hasError: !!error,
|
|
2056
2181
|
className: className,
|
|
2057
2182
|
ref: ref,
|
|
@@ -2060,7 +2185,6 @@ const Checkbox = /*#__PURE__*/React__default.forwardRef((_ref12, ref) => {
|
|
|
2060
2185
|
}), jsxRuntimeExports.jsxs(LabelContainer$1, {
|
|
2061
2186
|
children: [label && jsxRuntimeExports.jsx(CheckboxLabel, {
|
|
2062
2187
|
htmlFor: checkboxId,
|
|
2063
|
-
size: size,
|
|
2064
2188
|
children: label
|
|
2065
2189
|
}), (error || helperText) && jsxRuntimeExports.jsx(HelperText$2, {
|
|
2066
2190
|
hasError: !!error,
|
|
@@ -2072,97 +2196,94 @@ const Checkbox = /*#__PURE__*/React__default.forwardRef((_ref12, ref) => {
|
|
|
2072
2196
|
Checkbox.displayName = "Checkbox";
|
|
2073
2197
|
|
|
2074
2198
|
const _excluded$1 = ["className", "label", "error", "helperText", "size", "fullWidth", "id"];
|
|
2075
|
-
var _templateObject$1, _templateObject2$1, _templateObject3$1, _templateObject4$1, _templateObject5$1, _templateObject6$1
|
|
2199
|
+
var _templateObject$1, _templateObject2$1, _templateObject3$1, _templateObject4$1, _templateObject5$1, _templateObject6$1;
|
|
2076
2200
|
const RadioContainer = styled.div(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n display: flex;\n align-items: flex-start;\n ", "\n"])), _ref => {
|
|
2077
2201
|
let {
|
|
2078
2202
|
fullWidth
|
|
2079
2203
|
} = _ref;
|
|
2080
|
-
return fullWidth &&
|
|
2204
|
+
return fullWidth && "\n width: 100%;\n ";
|
|
2081
2205
|
});
|
|
2082
|
-
const RadioWrapper = styled.div(
|
|
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;
|
|
2083
2208
|
let {
|
|
2084
|
-
theme
|
|
2209
|
+
theme: theme$1
|
|
2085
2210
|
} = _ref2;
|
|
2086
|
-
return theme.spacing[5];
|
|
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];
|
|
2087
2212
|
});
|
|
2088
|
-
const StyledRadio = styled.input(
|
|
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;
|
|
2089
2215
|
let {
|
|
2090
|
-
theme,
|
|
2216
|
+
theme: theme$1,
|
|
2091
2217
|
hasError
|
|
2092
2218
|
} = _ref3;
|
|
2093
|
-
return hasError ? theme.colors.error : theme.colors.gray[300];
|
|
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];
|
|
2094
2220
|
}, _ref4 => {
|
|
2221
|
+
var _theme$transitions;
|
|
2095
2222
|
let {
|
|
2096
|
-
theme
|
|
2223
|
+
theme: theme$1
|
|
2097
2224
|
} = _ref4;
|
|
2098
|
-
return theme.transitions.base;
|
|
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;
|
|
2099
2226
|
}, _ref5 => {
|
|
2227
|
+
var _theme$spacing2;
|
|
2100
2228
|
let {
|
|
2101
|
-
theme
|
|
2102
|
-
hasError
|
|
2229
|
+
theme: theme$1
|
|
2103
2230
|
} = _ref5;
|
|
2104
|
-
return
|
|
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];
|
|
2105
2232
|
}, _ref6 => {
|
|
2233
|
+
var _theme$spacing3;
|
|
2106
2234
|
let {
|
|
2107
|
-
|
|
2108
|
-
theme
|
|
2235
|
+
theme: theme$1
|
|
2109
2236
|
} = _ref6;
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
if (size === "md") {
|
|
2114
|
-
return css(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteral(["\n width: ", ";\n height: ", ";\n "])), theme.spacing[5], theme.spacing[5]);
|
|
2115
|
-
}
|
|
2116
|
-
if (size === "lg") {
|
|
2117
|
-
return css(_templateObject7$1 || (_templateObject7$1 = _taggedTemplateLiteral(["\n width: ", ";\n height: ", ";\n "])), theme.spacing[6], theme.spacing[6]);
|
|
2118
|
-
}
|
|
2119
|
-
return css(_templateObject8$1 || (_templateObject8$1 = _taggedTemplateLiteral([""])));
|
|
2120
|
-
});
|
|
2121
|
-
const LabelContainer = styled.div(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteral(["\n margin-left: ", ";\n"])), _ref7 => {
|
|
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;
|
|
2122
2240
|
let {
|
|
2123
|
-
theme
|
|
2241
|
+
theme: theme$1,
|
|
2242
|
+
hasError
|
|
2124
2243
|
} = _ref7;
|
|
2125
|
-
return theme.
|
|
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;
|
|
2126
2245
|
});
|
|
2127
|
-
const
|
|
2246
|
+
const LabelContainer = styled.div(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n margin-left: ", ";\n"])), _ref8 => {
|
|
2247
|
+
var _theme$spacing4;
|
|
2128
2248
|
let {
|
|
2129
|
-
theme
|
|
2249
|
+
theme: theme$1
|
|
2130
2250
|
} = _ref8;
|
|
2131
|
-
return theme.
|
|
2132
|
-
}
|
|
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;
|
|
2133
2255
|
let {
|
|
2134
|
-
|
|
2135
|
-
theme
|
|
2256
|
+
theme: theme$1
|
|
2136
2257
|
} = _ref9;
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
if (size === "md") {
|
|
2141
|
-
return css(_templateObject10$1 || (_templateObject10$1 = _taggedTemplateLiteral(["\n font-size: ", ";\n "])), theme.fontSize.sm);
|
|
2142
|
-
}
|
|
2143
|
-
if (size === "lg") {
|
|
2144
|
-
return css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n font-size: ", ";\n "])), theme.fontSize.base);
|
|
2145
|
-
}
|
|
2146
|
-
return css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral([""])));
|
|
2147
|
-
});
|
|
2148
|
-
const HelperText$1 = styled.p(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-top: ", ";\n font-size: ", ";\n color: ", ";\n"])), _ref0 => {
|
|
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;
|
|
2149
2261
|
let {
|
|
2150
|
-
theme
|
|
2262
|
+
theme: theme$1
|
|
2151
2263
|
} = _ref0;
|
|
2152
|
-
return theme.
|
|
2153
|
-
}
|
|
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;
|
|
2154
2268
|
let {
|
|
2155
|
-
theme
|
|
2269
|
+
theme: theme$1
|
|
2156
2270
|
} = _ref1;
|
|
2157
|
-
return theme.
|
|
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];
|
|
2158
2272
|
}, _ref10 => {
|
|
2273
|
+
var _theme$fontSize2;
|
|
2159
2274
|
let {
|
|
2160
|
-
theme
|
|
2161
|
-
hasError
|
|
2275
|
+
theme: theme$1
|
|
2162
2276
|
} = _ref10;
|
|
2163
|
-
return
|
|
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];
|
|
2164
2285
|
});
|
|
2165
|
-
const Radio = /*#__PURE__*/React__default.forwardRef((
|
|
2286
|
+
const Radio = /*#__PURE__*/React__default.forwardRef((_ref12, ref) => {
|
|
2166
2287
|
let {
|
|
2167
2288
|
className,
|
|
2168
2289
|
label,
|
|
@@ -2171,15 +2292,14 @@ const Radio = /*#__PURE__*/React__default.forwardRef((_ref11, ref) => {
|
|
|
2171
2292
|
size = "md",
|
|
2172
2293
|
fullWidth = false,
|
|
2173
2294
|
id
|
|
2174
|
-
} =
|
|
2175
|
-
props = _objectWithoutProperties(
|
|
2295
|
+
} = _ref12,
|
|
2296
|
+
props = _objectWithoutProperties(_ref12, _excluded$1);
|
|
2176
2297
|
const radioId = id || "radio-".concat(Math.random().toString(36).substr(2, 9));
|
|
2177
2298
|
return jsxRuntimeExports.jsxs(RadioContainer, {
|
|
2178
2299
|
fullWidth: fullWidth,
|
|
2179
2300
|
children: [jsxRuntimeExports.jsx(RadioWrapper, {
|
|
2180
2301
|
children: jsxRuntimeExports.jsx(StyledRadio, _objectSpread2({
|
|
2181
2302
|
type: "radio",
|
|
2182
|
-
size: size,
|
|
2183
2303
|
hasError: !!error,
|
|
2184
2304
|
className: className,
|
|
2185
2305
|
ref: ref,
|
|
@@ -2188,7 +2308,6 @@ const Radio = /*#__PURE__*/React__default.forwardRef((_ref11, ref) => {
|
|
|
2188
2308
|
}), jsxRuntimeExports.jsxs(LabelContainer, {
|
|
2189
2309
|
children: [label && jsxRuntimeExports.jsx(RadioLabel, {
|
|
2190
2310
|
htmlFor: radioId,
|
|
2191
|
-
size: size,
|
|
2192
2311
|
children: label
|
|
2193
2312
|
}), (error || helperText) && jsxRuntimeExports.jsx(HelperText$1, {
|
|
2194
2313
|
hasError: !!error,
|
|
@@ -2200,112 +2319,129 @@ const Radio = /*#__PURE__*/React__default.forwardRef((_ref11, ref) => {
|
|
|
2200
2319
|
Radio.displayName = "Radio";
|
|
2201
2320
|
|
|
2202
2321
|
const _excluded = ["className", "label", "error", "helperText", "size", "fullWidth", "options", "placeholder", "id"];
|
|
2203
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6
|
|
2322
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
2204
2323
|
const SelectContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n ", "\n"])), _ref => {
|
|
2205
2324
|
let {
|
|
2206
2325
|
fullWidth
|
|
2207
2326
|
} = _ref;
|
|
2208
|
-
return fullWidth &&
|
|
2327
|
+
return fullWidth && "\n width: 100%;\n ";
|
|
2209
2328
|
});
|
|
2210
|
-
const SelectLabel = styled.label(
|
|
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;
|
|
2211
2331
|
let {
|
|
2212
|
-
theme
|
|
2332
|
+
theme: theme$1
|
|
2213
2333
|
} = _ref2;
|
|
2214
|
-
return theme.spacing[1];
|
|
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];
|
|
2215
2335
|
}, _ref3 => {
|
|
2336
|
+
var _theme$fontSize;
|
|
2216
2337
|
let {
|
|
2217
|
-
theme
|
|
2338
|
+
theme: theme$1
|
|
2218
2339
|
} = _ref3;
|
|
2219
|
-
return theme.fontSize.sm;
|
|
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;
|
|
2220
2341
|
}, _ref4 => {
|
|
2342
|
+
var _theme$colors;
|
|
2221
2343
|
let {
|
|
2222
|
-
theme
|
|
2344
|
+
theme: theme$1
|
|
2223
2345
|
} = _ref4;
|
|
2224
|
-
return theme.colors.gray[700];
|
|
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];
|
|
2225
2347
|
});
|
|
2226
|
-
const SelectWrapper = styled.div(
|
|
2227
|
-
const StyledSelect = styled.select(
|
|
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;
|
|
2228
2351
|
let {
|
|
2229
|
-
theme,
|
|
2352
|
+
theme: theme$1,
|
|
2230
2353
|
hasError
|
|
2231
2354
|
} = _ref5;
|
|
2232
|
-
return hasError ? theme.colors.error : theme.colors.gray[300];
|
|
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];
|
|
2233
2356
|
}, _ref6 => {
|
|
2357
|
+
var _theme$borderRadius;
|
|
2234
2358
|
let {
|
|
2235
|
-
theme
|
|
2359
|
+
theme: theme$1
|
|
2236
2360
|
} = _ref6;
|
|
2237
|
-
return theme.borderRadius.md;
|
|
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;
|
|
2238
2362
|
}, _ref7 => {
|
|
2363
|
+
var _theme$transitions;
|
|
2239
2364
|
let {
|
|
2240
|
-
theme
|
|
2365
|
+
theme: theme$1
|
|
2241
2366
|
} = _ref7;
|
|
2242
|
-
return theme.transitions.base;
|
|
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;
|
|
2243
2368
|
}, _ref8 => {
|
|
2369
|
+
var _theme$colors4;
|
|
2244
2370
|
let {
|
|
2245
|
-
theme
|
|
2371
|
+
theme: theme$1
|
|
2246
2372
|
} = _ref8;
|
|
2247
|
-
return theme.colors.white;
|
|
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;
|
|
2248
2374
|
}, _ref9 => {
|
|
2375
|
+
var _theme$fontFamily;
|
|
2249
2376
|
let {
|
|
2250
|
-
theme
|
|
2377
|
+
theme: theme$1
|
|
2251
2378
|
} = _ref9;
|
|
2252
|
-
return theme.fontFamily.sans.join(", ");
|
|
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(", ");
|
|
2253
2380
|
}, _ref0 => {
|
|
2381
|
+
var _theme$spacing2;
|
|
2254
2382
|
let {
|
|
2255
|
-
theme
|
|
2256
|
-
hasError
|
|
2383
|
+
theme: theme$1
|
|
2257
2384
|
} = _ref0;
|
|
2258
|
-
return
|
|
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];
|
|
2259
2386
|
}, _ref1 => {
|
|
2387
|
+
var _theme$spacing3;
|
|
2260
2388
|
let {
|
|
2261
|
-
theme
|
|
2389
|
+
theme: theme$1
|
|
2262
2390
|
} = _ref1;
|
|
2263
|
-
return theme.
|
|
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];
|
|
2264
2392
|
}, _ref10 => {
|
|
2393
|
+
var _theme$fontSize2;
|
|
2265
2394
|
let {
|
|
2266
|
-
|
|
2267
|
-
theme
|
|
2395
|
+
theme: theme$1
|
|
2268
2396
|
} = _ref10;
|
|
2269
|
-
|
|
2270
|
-
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[3], theme.spacing[3], theme.fontSize.sm);
|
|
2271
|
-
}
|
|
2272
|
-
if (size === "md") {
|
|
2273
|
-
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[2], theme.spacing[4], theme.fontSize.sm);
|
|
2274
|
-
}
|
|
2275
|
-
if (size === "lg") {
|
|
2276
|
-
return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n font-size: ", ";\n "])), theme.spacing[3], theme.spacing[4], theme.fontSize.base);
|
|
2277
|
-
}
|
|
2278
|
-
return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral([""])));
|
|
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;
|
|
2279
2398
|
}, _ref11 => {
|
|
2399
|
+
var _theme$colors5, _theme$colors6;
|
|
2280
2400
|
let {
|
|
2281
|
-
|
|
2401
|
+
theme: theme$1,
|
|
2402
|
+
hasError
|
|
2282
2403
|
} = _ref11;
|
|
2283
|
-
return
|
|
2284
|
-
}
|
|
2285
|
-
|
|
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;
|
|
2286
2407
|
let {
|
|
2287
|
-
theme
|
|
2408
|
+
theme: theme$1
|
|
2288
2409
|
} = _ref12;
|
|
2289
|
-
return theme.
|
|
2290
|
-
}
|
|
2291
|
-
const HelperText = styled.p(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin-top: ", ";\n font-size: ", ";\n color: ", ";\n"])), _ref13 => {
|
|
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 => {
|
|
2292
2412
|
let {
|
|
2293
|
-
|
|
2413
|
+
fullWidth
|
|
2294
2414
|
} = _ref13;
|
|
2295
|
-
return
|
|
2296
|
-
}
|
|
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;
|
|
2297
2419
|
let {
|
|
2298
|
-
theme
|
|
2420
|
+
theme: theme$1
|
|
2299
2421
|
} = _ref14;
|
|
2300
|
-
return theme.
|
|
2301
|
-
}
|
|
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;
|
|
2302
2426
|
let {
|
|
2303
|
-
theme
|
|
2304
|
-
hasError
|
|
2427
|
+
theme: theme$1
|
|
2305
2428
|
} = _ref15;
|
|
2306
|
-
return
|
|
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];
|
|
2307
2443
|
});
|
|
2308
|
-
const Select = /*#__PURE__*/React__default.forwardRef((
|
|
2444
|
+
const Select = /*#__PURE__*/React__default.forwardRef((_ref18, ref) => {
|
|
2309
2445
|
let {
|
|
2310
2446
|
className,
|
|
2311
2447
|
label,
|
|
@@ -2316,8 +2452,8 @@ const Select = /*#__PURE__*/React__default.forwardRef((_ref16, ref) => {
|
|
|
2316
2452
|
options,
|
|
2317
2453
|
placeholder,
|
|
2318
2454
|
id
|
|
2319
|
-
} =
|
|
2320
|
-
props = _objectWithoutProperties(
|
|
2455
|
+
} = _ref18,
|
|
2456
|
+
props = _objectWithoutProperties(_ref18, _excluded);
|
|
2321
2457
|
const selectId = id || "select-".concat(Math.random().toString(36).substr(2, 9));
|
|
2322
2458
|
return jsxRuntimeExports.jsxs(SelectContainer, {
|
|
2323
2459
|
fullWidth: fullWidth,
|
|
@@ -2326,7 +2462,6 @@ const Select = /*#__PURE__*/React__default.forwardRef((_ref16, ref) => {
|
|
|
2326
2462
|
children: label
|
|
2327
2463
|
}), jsxRuntimeExports.jsxs(SelectWrapper, {
|
|
2328
2464
|
children: [jsxRuntimeExports.jsxs(StyledSelect, _objectSpread2(_objectSpread2({
|
|
2329
|
-
size: size,
|
|
2330
2465
|
fullWidth: fullWidth,
|
|
2331
2466
|
hasError: !!error,
|
|
2332
2467
|
className: className,
|
|
@@ -2368,91 +2503,6 @@ const Select = /*#__PURE__*/React__default.forwardRef((_ref16, ref) => {
|
|
|
2368
2503
|
});
|
|
2369
2504
|
Select.displayName = "Select";
|
|
2370
2505
|
|
|
2371
|
-
const theme = {
|
|
2372
|
-
colors: {
|
|
2373
|
-
primary: "#007AC2",
|
|
2374
|
-
error: "#ff1100",
|
|
2375
|
-
dark: "#333333",
|
|
2376
|
-
light: "#666666",
|
|
2377
|
-
white: "#ffffff",
|
|
2378
|
-
black: "#000000",
|
|
2379
|
-
gray: {
|
|
2380
|
-
50: "#f9fafb",
|
|
2381
|
-
100: "#f3f4f6",
|
|
2382
|
-
200: "#e5e7eb",
|
|
2383
|
-
300: "#d1d5db",
|
|
2384
|
-
400: "#9ca3af",
|
|
2385
|
-
500: "#6b7280",
|
|
2386
|
-
600: "#4b5563",
|
|
2387
|
-
700: "#374151",
|
|
2388
|
-
800: "#1f2937",
|
|
2389
|
-
900: "#111827"
|
|
2390
|
-
}
|
|
2391
|
-
},
|
|
2392
|
-
spacing: {
|
|
2393
|
-
0: "0",
|
|
2394
|
-
1: "0.25rem",
|
|
2395
|
-
2: "0.5rem",
|
|
2396
|
-
3: "0.75rem",
|
|
2397
|
-
4: "1rem",
|
|
2398
|
-
5: "1.25rem",
|
|
2399
|
-
6: "1.5rem",
|
|
2400
|
-
8: "2rem",
|
|
2401
|
-
10: "2.5rem",
|
|
2402
|
-
12: "3rem",
|
|
2403
|
-
16: "4rem",
|
|
2404
|
-
18: "4.5rem",
|
|
2405
|
-
20: "5rem",
|
|
2406
|
-
24: "6rem",
|
|
2407
|
-
32: "8rem",
|
|
2408
|
-
40: "10rem",
|
|
2409
|
-
48: "12rem",
|
|
2410
|
-
56: "14rem",
|
|
2411
|
-
64: "16rem",
|
|
2412
|
-
88: "22rem"
|
|
2413
|
-
},
|
|
2414
|
-
fontSize: {
|
|
2415
|
-
xs: "0.75rem",
|
|
2416
|
-
sm: "0.875rem",
|
|
2417
|
-
base: "1rem",
|
|
2418
|
-
lg: "1.125rem",
|
|
2419
|
-
xl: "1.25rem",
|
|
2420
|
-
"2xl": "1.5rem",
|
|
2421
|
-
"3xl": "1.875rem",
|
|
2422
|
-
"4xl": "2.25rem",
|
|
2423
|
-
"5xl": "3rem",
|
|
2424
|
-
"6xl": "3.75rem"
|
|
2425
|
-
},
|
|
2426
|
-
fontFamily: {
|
|
2427
|
-
sans: ["Inter", "system-ui", "sans-serif"],
|
|
2428
|
-
serif: ["Georgia", "Cambria", "Times New Roman", "Times", "serif"],
|
|
2429
|
-
mono: ["Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", "monospace"]
|
|
2430
|
-
},
|
|
2431
|
-
borderRadius: {
|
|
2432
|
-
none: "0",
|
|
2433
|
-
sm: "0.125rem",
|
|
2434
|
-
base: "0.25rem",
|
|
2435
|
-
md: "0.375rem",
|
|
2436
|
-
lg: "0.5rem",
|
|
2437
|
-
xl: "0.75rem",
|
|
2438
|
-
"2xl": "1rem",
|
|
2439
|
-
"3xl": "1.5rem",
|
|
2440
|
-
full: "9999px"
|
|
2441
|
-
},
|
|
2442
|
-
shadows: {
|
|
2443
|
-
sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
|
|
2444
|
-
base: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
|
|
2445
|
-
md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
|
|
2446
|
-
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
|
|
2447
|
-
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"
|
|
2448
|
-
},
|
|
2449
|
-
transitions: {
|
|
2450
|
-
fast: "150ms ease-in-out",
|
|
2451
|
-
base: "300ms ease-in-out",
|
|
2452
|
-
slow: "500ms ease-in-out"
|
|
2453
|
-
}
|
|
2454
|
-
};
|
|
2455
|
-
|
|
2456
2506
|
const ThemeProvider = _ref => {
|
|
2457
2507
|
let {
|
|
2458
2508
|
children
|