thailife-react 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,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=React,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};
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$1 = 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$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
200
+ var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
172
201
 
173
202
  function error(format) {
174
203
  {
@@ -1449,17 +1478,12 @@ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else i
1449
1478
  * Utility function to merge Tailwind CSS classes
1450
1479
  * Uses clsx for conditional classes and basic merging
1451
1480
  */
1452
- function cn() {
1453
- for (var _len = arguments.length, inputs = new Array(_len), _key = 0; _key < _len; _key++) {
1454
- inputs[_key] = arguments[_key];
1455
- }
1481
+ function cn(...inputs) {
1456
1482
  return clsx(inputs);
1457
1483
  }
1458
1484
 
1459
1485
  const _excluded$6 = ["className", "color", "variant", "size", "fullWidth", "loading", "disabled", "children"];
1460
- function ownKeys$6(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
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) => {
1486
+ const Button = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
1463
1487
  let {
1464
1488
  className,
1465
1489
  color = "primary",
@@ -1497,7 +1521,7 @@ const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1497
1521
  md: "px-4 py-2 text-sm",
1498
1522
  lg: "px-6 py-3 text-base"
1499
1523
  };
1500
- return jsxRuntimeExports.jsx("button", _objectSpread$6(_objectSpread$6({
1524
+ return jsxRuntimeExports.jsx("button", _objectSpread2(_objectSpread2({
1501
1525
  className: cn(baseClasses, variants[variant][color], sizes[size], fullWidth && "w-full", (disabled || loading) && "opacity-50 cursor-not-allowed", className),
1502
1526
  ref: ref,
1503
1527
  disabled: disabled || loading
@@ -1508,9 +1532,7 @@ const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1508
1532
  Button.displayName = "Button";
1509
1533
 
1510
1534
  const _excluded$5 = ["className", "type", "label", "error", "helperText", "size", "fullWidth", "id"];
1511
- function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
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) => {
1535
+ const Input = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
1514
1536
  let {
1515
1537
  className,
1516
1538
  type = "text",
@@ -1522,7 +1544,7 @@ const Input = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1522
1544
  id
1523
1545
  } = _ref,
1524
1546
  props = _objectWithoutProperties(_ref, _excluded$5);
1525
- const inputId = id || "input-".concat(Math.random().toString(36).substr(2, 9));
1547
+ const inputId = id || `input-${Math.random().toString(36).substr(2, 9)}`;
1526
1548
  const sizes = {
1527
1549
  sm: "px-3 py-1.5 text-sm",
1528
1550
  md: "px-4 py-2 text-sm",
@@ -1535,7 +1557,7 @@ const Input = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1535
1557
  htmlFor: inputId,
1536
1558
  className: "mb-1 text-sm font-medium text-secondary-700",
1537
1559
  children: label
1538
- }), jsxRuntimeExports.jsx("input", _objectSpread$5({
1560
+ }), jsxRuntimeExports.jsx("input", _objectSpread2({
1539
1561
  type: type,
1540
1562
  className: baseClasses,
1541
1563
  ref: ref,
@@ -1549,9 +1571,7 @@ const Input = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1549
1571
  Input.displayName = "Input";
1550
1572
 
1551
1573
  const _excluded$4 = ["className", "label", "error", "helperText", "size", "fullWidth", "rows", "id"];
1552
- function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
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) => {
1574
+ const Textarea = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
1555
1575
  let {
1556
1576
  className,
1557
1577
  label,
@@ -1563,7 +1583,7 @@ const Textarea = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1563
1583
  id
1564
1584
  } = _ref,
1565
1585
  props = _objectWithoutProperties(_ref, _excluded$4);
1566
- const textareaId = id || "textarea-".concat(Math.random().toString(36).substr(2, 9));
1586
+ const textareaId = id || `textarea-${Math.random().toString(36).substr(2, 9)}`;
1567
1587
  const sizes = {
1568
1588
  sm: "px-3 py-1.5 text-sm",
1569
1589
  md: "px-4 py-2 text-sm",
@@ -1576,7 +1596,7 @@ const Textarea = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1576
1596
  htmlFor: textareaId,
1577
1597
  className: "mb-1 text-sm font-medium text-secondary-700",
1578
1598
  children: label
1579
- }), jsxRuntimeExports.jsx("textarea", _objectSpread$4({
1599
+ }), jsxRuntimeExports.jsx("textarea", _objectSpread2({
1580
1600
  className: baseClasses,
1581
1601
  ref: ref,
1582
1602
  id: textareaId,
@@ -1590,9 +1610,7 @@ const Textarea = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1590
1610
  Textarea.displayName = "Textarea";
1591
1611
 
1592
1612
  const _excluded$3 = ["className", "label", "error", "helperText", "size", "fullWidth", "accept", "multiple", "buttonText", "id"];
1593
- function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
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) => {
1613
+ const InputFile = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
1596
1614
  let {
1597
1615
  className,
1598
1616
  label,
@@ -1606,7 +1624,7 @@ const InputFile = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1606
1624
  id
1607
1625
  } = _ref,
1608
1626
  props = _objectWithoutProperties(_ref, _excluded$3);
1609
- const inputId = id || "file-input-".concat(Math.random().toString(36).substr(2, 9));
1627
+ const inputId = id || `file-input-${Math.random().toString(36).substr(2, 9)}`;
1610
1628
  const sizes = {
1611
1629
  sm: "px-3 py-1.5 text-sm",
1612
1630
  md: "px-4 py-2 text-sm",
@@ -1621,7 +1639,7 @@ const InputFile = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1621
1639
  children: label
1622
1640
  }), jsxRuntimeExports.jsxs("div", {
1623
1641
  className: "relative",
1624
- children: [jsxRuntimeExports.jsx("input", _objectSpread$3({
1642
+ children: [jsxRuntimeExports.jsx("input", _objectSpread2({
1625
1643
  type: "file",
1626
1644
  className: "absolute inset-0 w-full h-full opacity-0 cursor-pointer",
1627
1645
  ref: ref,
@@ -1647,9 +1665,7 @@ const InputFile = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1647
1665
  InputFile.displayName = "InputFile";
1648
1666
 
1649
1667
  const _excluded$2 = ["className", "label", "error", "helperText", "size", "fullWidth", "indeterminate", "id"];
1650
- function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
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) => {
1668
+ const Checkbox = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
1653
1669
  let {
1654
1670
  className,
1655
1671
  label,
@@ -1661,7 +1677,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1661
1677
  id
1662
1678
  } = _ref,
1663
1679
  props = _objectWithoutProperties(_ref, _excluded$2);
1664
- const checkboxId = id || "checkbox-".concat(Math.random().toString(36).substr(2, 9));
1680
+ const checkboxId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
1665
1681
  const sizes = {
1666
1682
  sm: "w-4 h-4",
1667
1683
  md: "w-5 h-5",
@@ -1673,7 +1689,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1673
1689
  lg: "text-base"
1674
1690
  };
1675
1691
  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
- React.useEffect(() => {
1692
+ React__default.useEffect(() => {
1677
1693
  if (ref && typeof ref === "object" && ref.current) {
1678
1694
  ref.current.indeterminate = indeterminate;
1679
1695
  }
@@ -1682,7 +1698,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1682
1698
  className: cn("flex items-start", fullWidth && "w-full"),
1683
1699
  children: [jsxRuntimeExports.jsx("div", {
1684
1700
  className: "flex items-center h-5",
1685
- children: jsxRuntimeExports.jsx("input", _objectSpread$2({
1701
+ children: jsxRuntimeExports.jsx("input", _objectSpread2({
1686
1702
  type: "checkbox",
1687
1703
  className: baseClasses,
1688
1704
  ref: ref,
@@ -1704,9 +1720,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1704
1720
  Checkbox.displayName = "Checkbox";
1705
1721
 
1706
1722
  const _excluded$1 = ["className", "label", "error", "helperText", "size", "fullWidth", "id"];
1707
- function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
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) => {
1723
+ const Radio = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
1710
1724
  let {
1711
1725
  className,
1712
1726
  label,
@@ -1717,7 +1731,7 @@ const Radio = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1717
1731
  id
1718
1732
  } = _ref,
1719
1733
  props = _objectWithoutProperties(_ref, _excluded$1);
1720
- const radioId = id || "radio-".concat(Math.random().toString(36).substr(2, 9));
1734
+ const radioId = id || `radio-${Math.random().toString(36).substr(2, 9)}`;
1721
1735
  const sizes = {
1722
1736
  sm: "w-4 h-4",
1723
1737
  md: "w-5 h-5",
@@ -1733,7 +1747,7 @@ const Radio = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1733
1747
  className: cn("flex items-start", fullWidth && "w-full"),
1734
1748
  children: [jsxRuntimeExports.jsx("div", {
1735
1749
  className: "flex items-center h-5",
1736
- children: jsxRuntimeExports.jsx("input", _objectSpread$1({
1750
+ children: jsxRuntimeExports.jsx("input", _objectSpread2({
1737
1751
  type: "radio",
1738
1752
  className: baseClasses,
1739
1753
  ref: ref,
@@ -1755,9 +1769,7 @@ const Radio = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1755
1769
  Radio.displayName = "Radio";
1756
1770
 
1757
1771
  const _excluded = ["className", "label", "error", "helperText", "size", "fullWidth", "options", "placeholder", "id"];
1758
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
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) => {
1772
+ const Select = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
1761
1773
  let {
1762
1774
  className,
1763
1775
  label,
@@ -1770,7 +1782,7 @@ const Select = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1770
1782
  id
1771
1783
  } = _ref,
1772
1784
  props = _objectWithoutProperties(_ref, _excluded);
1773
- const selectId = id || "select-".concat(Math.random().toString(36).substr(2, 9));
1785
+ const selectId = id || `select-${Math.random().toString(36).substr(2, 9)}`;
1774
1786
  const sizes = {
1775
1787
  sm: "px-3 py-1.5 text-sm",
1776
1788
  md: "px-4 py-2 text-sm",
@@ -1785,7 +1797,7 @@ const Select = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1785
1797
  children: label
1786
1798
  }), jsxRuntimeExports.jsxs("div", {
1787
1799
  className: "relative",
1788
- children: [jsxRuntimeExports.jsxs("select", _objectSpread(_objectSpread({
1800
+ children: [jsxRuntimeExports.jsxs("select", _objectSpread2(_objectSpread2({
1789
1801
  className: baseClasses,
1790
1802
  ref: ref,
1791
1803
  id: selectId