thailife-react 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +48 -33
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +57 -24
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
2
3
|
export { default as React } from 'react';
|
|
3
4
|
|
|
4
5
|
function styleInject(css, ref) {
|
|
@@ -66,6 +67,28 @@ function _defineProperty(e, r, t) {
|
|
|
66
67
|
}) : e[r] = t, e;
|
|
67
68
|
}
|
|
68
69
|
|
|
70
|
+
function ownKeys(e, r) {
|
|
71
|
+
var t = Object.keys(e);
|
|
72
|
+
if (Object.getOwnPropertySymbols) {
|
|
73
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
74
|
+
r && (o = o.filter(function (r) {
|
|
75
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
76
|
+
})), t.push.apply(t, o);
|
|
77
|
+
}
|
|
78
|
+
return t;
|
|
79
|
+
}
|
|
80
|
+
function _objectSpread2(e) {
|
|
81
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
82
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
83
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
84
|
+
_defineProperty(e, r, t[r]);
|
|
85
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
86
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return e;
|
|
90
|
+
}
|
|
91
|
+
|
|
69
92
|
function _objectWithoutPropertiesLoose(r, e) {
|
|
70
93
|
if (null == r) return {};
|
|
71
94
|
var t = {};
|
|
@@ -88,10 +111,16 @@ function _objectWithoutProperties(e, t) {
|
|
|
88
111
|
return i;
|
|
89
112
|
}
|
|
90
113
|
|
|
114
|
+
function getDefaultExportFromNamespaceIfNotNamed (n) {
|
|
115
|
+
return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
|
|
116
|
+
}
|
|
117
|
+
|
|
91
118
|
var jsxRuntime = {exports: {}};
|
|
92
119
|
|
|
93
120
|
var reactJsxRuntime_production_min = {};
|
|
94
121
|
|
|
122
|
+
var require$$0 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(React);
|
|
123
|
+
|
|
95
124
|
/**
|
|
96
125
|
* @license React
|
|
97
126
|
* react-jsx-runtime.production.min.js
|
|
@@ -107,7 +136,7 @@ var hasRequiredReactJsxRuntime_production_min;
|
|
|
107
136
|
function requireReactJsxRuntime_production_min () {
|
|
108
137
|
if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
|
|
109
138
|
hasRequiredReactJsxRuntime_production_min = 1;
|
|
110
|
-
var f=
|
|
139
|
+
var f=require$$0,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:true,ref:true,__self:true,__source:true};
|
|
111
140
|
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a) void 0===d[b]&&(d[b]=a[b]);return {$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;
|
|
112
141
|
return reactJsxRuntime_production_min;
|
|
113
142
|
}
|
|
@@ -133,7 +162,7 @@ function requireReactJsxRuntime_development () {
|
|
|
133
162
|
if (process.env.NODE_ENV !== "production") {
|
|
134
163
|
(function() {
|
|
135
164
|
|
|
136
|
-
var React
|
|
165
|
+
var React = require$$0;
|
|
137
166
|
|
|
138
167
|
// ATTENTION
|
|
139
168
|
// When adding new symbols to this file,
|
|
@@ -168,7 +197,7 @@ function requireReactJsxRuntime_development () {
|
|
|
168
197
|
return null;
|
|
169
198
|
}
|
|
170
199
|
|
|
171
|
-
var ReactSharedInternals = React
|
|
200
|
+
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
172
201
|
|
|
173
202
|
function error(format) {
|
|
174
203
|
{
|
|
@@ -1457,9 +1486,7 @@ function cn() {
|
|
|
1457
1486
|
}
|
|
1458
1487
|
|
|
1459
1488
|
const _excluded$6 = ["className", "color", "variant", "size", "fullWidth", "loading", "disabled", "children"];
|
|
1460
|
-
|
|
1461
|
-
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1462
|
-
const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
1489
|
+
const Button = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
1463
1490
|
let {
|
|
1464
1491
|
className,
|
|
1465
1492
|
color = "primary",
|
|
@@ -1497,7 +1524,7 @@ const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1497
1524
|
md: "px-4 py-2 text-sm",
|
|
1498
1525
|
lg: "px-6 py-3 text-base"
|
|
1499
1526
|
};
|
|
1500
|
-
return jsxRuntimeExports.jsx("button",
|
|
1527
|
+
return jsxRuntimeExports.jsx("button", _objectSpread2(_objectSpread2({
|
|
1501
1528
|
className: cn(baseClasses, variants[variant][color], sizes[size], fullWidth && "w-full", (disabled || loading) && "opacity-50 cursor-not-allowed", className),
|
|
1502
1529
|
ref: ref,
|
|
1503
1530
|
disabled: disabled || loading
|
|
@@ -1508,9 +1535,7 @@ const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1508
1535
|
Button.displayName = "Button";
|
|
1509
1536
|
|
|
1510
1537
|
const _excluded$5 = ["className", "type", "label", "error", "helperText", "size", "fullWidth", "id"];
|
|
1511
|
-
|
|
1512
|
-
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1513
|
-
const Input = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
1538
|
+
const Input = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
1514
1539
|
let {
|
|
1515
1540
|
className,
|
|
1516
1541
|
type = "text",
|
|
@@ -1535,7 +1560,7 @@ const Input = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1535
1560
|
htmlFor: inputId,
|
|
1536
1561
|
className: "mb-1 text-sm font-medium text-secondary-700",
|
|
1537
1562
|
children: label
|
|
1538
|
-
}), jsxRuntimeExports.jsx("input",
|
|
1563
|
+
}), jsxRuntimeExports.jsx("input", _objectSpread2({
|
|
1539
1564
|
type: type,
|
|
1540
1565
|
className: baseClasses,
|
|
1541
1566
|
ref: ref,
|
|
@@ -1549,9 +1574,7 @@ const Input = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1549
1574
|
Input.displayName = "Input";
|
|
1550
1575
|
|
|
1551
1576
|
const _excluded$4 = ["className", "label", "error", "helperText", "size", "fullWidth", "rows", "id"];
|
|
1552
|
-
|
|
1553
|
-
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1554
|
-
const Textarea = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
1577
|
+
const Textarea = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
1555
1578
|
let {
|
|
1556
1579
|
className,
|
|
1557
1580
|
label,
|
|
@@ -1576,7 +1599,7 @@ const Textarea = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1576
1599
|
htmlFor: textareaId,
|
|
1577
1600
|
className: "mb-1 text-sm font-medium text-secondary-700",
|
|
1578
1601
|
children: label
|
|
1579
|
-
}), jsxRuntimeExports.jsx("textarea",
|
|
1602
|
+
}), jsxRuntimeExports.jsx("textarea", _objectSpread2({
|
|
1580
1603
|
className: baseClasses,
|
|
1581
1604
|
ref: ref,
|
|
1582
1605
|
id: textareaId,
|
|
@@ -1590,9 +1613,7 @@ const Textarea = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1590
1613
|
Textarea.displayName = "Textarea";
|
|
1591
1614
|
|
|
1592
1615
|
const _excluded$3 = ["className", "label", "error", "helperText", "size", "fullWidth", "accept", "multiple", "buttonText", "id"];
|
|
1593
|
-
|
|
1594
|
-
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1595
|
-
const InputFile = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
1616
|
+
const InputFile = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
1596
1617
|
let {
|
|
1597
1618
|
className,
|
|
1598
1619
|
label,
|
|
@@ -1621,7 +1642,7 @@ const InputFile = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1621
1642
|
children: label
|
|
1622
1643
|
}), jsxRuntimeExports.jsxs("div", {
|
|
1623
1644
|
className: "relative",
|
|
1624
|
-
children: [jsxRuntimeExports.jsx("input",
|
|
1645
|
+
children: [jsxRuntimeExports.jsx("input", _objectSpread2({
|
|
1625
1646
|
type: "file",
|
|
1626
1647
|
className: "absolute inset-0 w-full h-full opacity-0 cursor-pointer",
|
|
1627
1648
|
ref: ref,
|
|
@@ -1647,9 +1668,7 @@ const InputFile = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1647
1668
|
InputFile.displayName = "InputFile";
|
|
1648
1669
|
|
|
1649
1670
|
const _excluded$2 = ["className", "label", "error", "helperText", "size", "fullWidth", "indeterminate", "id"];
|
|
1650
|
-
|
|
1651
|
-
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1652
|
-
const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
1671
|
+
const Checkbox = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
1653
1672
|
let {
|
|
1654
1673
|
className,
|
|
1655
1674
|
label,
|
|
@@ -1673,7 +1692,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1673
1692
|
lg: "text-base"
|
|
1674
1693
|
};
|
|
1675
1694
|
const baseClasses = cn("rounded border transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2", error ? "border-red-500 focus:ring-red-500" : "border-secondary focus:ring-primary", "disabled:opacity-50 disabled:cursor-not-allowed", sizes[size], className);
|
|
1676
|
-
|
|
1695
|
+
React__default.useEffect(() => {
|
|
1677
1696
|
if (ref && typeof ref === "object" && ref.current) {
|
|
1678
1697
|
ref.current.indeterminate = indeterminate;
|
|
1679
1698
|
}
|
|
@@ -1682,7 +1701,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1682
1701
|
className: cn("flex items-start", fullWidth && "w-full"),
|
|
1683
1702
|
children: [jsxRuntimeExports.jsx("div", {
|
|
1684
1703
|
className: "flex items-center h-5",
|
|
1685
|
-
children: jsxRuntimeExports.jsx("input",
|
|
1704
|
+
children: jsxRuntimeExports.jsx("input", _objectSpread2({
|
|
1686
1705
|
type: "checkbox",
|
|
1687
1706
|
className: baseClasses,
|
|
1688
1707
|
ref: ref,
|
|
@@ -1704,9 +1723,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1704
1723
|
Checkbox.displayName = "Checkbox";
|
|
1705
1724
|
|
|
1706
1725
|
const _excluded$1 = ["className", "label", "error", "helperText", "size", "fullWidth", "id"];
|
|
1707
|
-
|
|
1708
|
-
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1709
|
-
const Radio = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
1726
|
+
const Radio = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
1710
1727
|
let {
|
|
1711
1728
|
className,
|
|
1712
1729
|
label,
|
|
@@ -1733,7 +1750,7 @@ const Radio = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1733
1750
|
className: cn("flex items-start", fullWidth && "w-full"),
|
|
1734
1751
|
children: [jsxRuntimeExports.jsx("div", {
|
|
1735
1752
|
className: "flex items-center h-5",
|
|
1736
|
-
children: jsxRuntimeExports.jsx("input",
|
|
1753
|
+
children: jsxRuntimeExports.jsx("input", _objectSpread2({
|
|
1737
1754
|
type: "radio",
|
|
1738
1755
|
className: baseClasses,
|
|
1739
1756
|
ref: ref,
|
|
@@ -1755,9 +1772,7 @@ const Radio = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1755
1772
|
Radio.displayName = "Radio";
|
|
1756
1773
|
|
|
1757
1774
|
const _excluded = ["className", "label", "error", "helperText", "size", "fullWidth", "options", "placeholder", "id"];
|
|
1758
|
-
|
|
1759
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1760
|
-
const Select = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
1775
|
+
const Select = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
1761
1776
|
let {
|
|
1762
1777
|
className,
|
|
1763
1778
|
label,
|
|
@@ -1785,7 +1800,7 @@ const Select = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1785
1800
|
children: label
|
|
1786
1801
|
}), jsxRuntimeExports.jsxs("div", {
|
|
1787
1802
|
className: "relative",
|
|
1788
|
-
children: [jsxRuntimeExports.jsxs("select",
|
|
1803
|
+
children: [jsxRuntimeExports.jsxs("select", _objectSpread2(_objectSpread2({
|
|
1789
1804
|
className: baseClasses,
|
|
1790
1805
|
ref: ref,
|
|
1791
1806
|
id: selectId
|