thailife-react 0.0.5 → 0.0.7

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.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var require$$0 = require('react');
3
+ var React = require('react');
4
4
 
5
5
  function styleInject(css, ref) {
6
6
  if ( ref === void 0 ) ref = {};
@@ -32,35 +32,51 @@ function styleInject(css, ref) {
32
32
  var css_248z = "*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:Inter,system-ui,sans-serif;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-y-0{bottom:0;top:0}.right-0{right:0}.mb-1{margin-bottom:.25rem}.ml-1{margin-left:.25rem}.ml-3{margin-left:.75rem}.mt-1{margin-top:.25rem}.flex{display:flex}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-full{height:100%}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.rounded{border-radius:.25rem}.border{border-width:1px}.border-2{border-width:2px}.border-dashed{border-style:dashed}.border-dark{--tw-border-opacity:1;border-color:rgb(51 51 51/var(--tw-border-opacity,1))}.border-error{--tw-border-opacity:1;border-color:rgb(255 17 0/var(--tw-border-opacity,1))}.border-light{--tw-border-opacity:1;border-color:rgb(102 102 102/var(--tw-border-opacity,1))}.border-primary{--tw-border-opacity:1;border-color:rgb(0 122 194/var(--tw-border-opacity,1))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.bg-dark{--tw-bg-opacity:1;background-color:rgb(51 51 51/var(--tw-bg-opacity,1))}.bg-error{--tw-bg-opacity:1;background-color:rgb(255 17 0/var(--tw-bg-opacity,1))}.bg-light{--tw-bg-opacity:1;background-color:rgb(102 102 102/var(--tw-bg-opacity,1))}.bg-primary{--tw-bg-opacity:1;background-color:rgb(0 122 194/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.pr-3{padding-right:.75rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.text-dark{--tw-text-opacity:1;color:rgb(51 51 51/var(--tw-text-opacity,1))}.text-error{--tw-text-opacity:1;color:rgb(255 17 0/var(--tw-text-opacity,1))}.text-light{--tw-text-opacity:1;color:rgb(102 102 102/var(--tw-text-opacity,1))}.text-primary{--tw-text-opacity:1;color:rgb(0 122 194/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-50{opacity:.5}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.hover\\:border-primary\\/60:hover{border-color:rgba(0,122,194,.6)}.hover\\:border-red-400:hover{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.hover\\:bg-dark\\/10:hover{background-color:rgba(51,51,51,.1)}.hover\\:bg-dark\\/80:hover{background-color:rgba(51,51,51,.8)}.hover\\:bg-error\\/10:hover{background-color:rgba(255,17,0,.1)}.hover\\:bg-error\\/80:hover{background-color:rgba(255,17,0,.8)}.hover\\:bg-light\\/10:hover{background-color:hsla(0,0%,40%,.1)}.hover\\:bg-light\\/80:hover{background-color:hsla(0,0%,40%,.8)}.hover\\:bg-primary\\/10:hover{background-color:rgba(0,122,194,.1)}.hover\\:bg-primary\\/80:hover{background-color:rgba(0,122,194,.8)}.focus\\:border-primary:focus{--tw-border-opacity:1;border-color:rgb(0 122 194/var(--tw-border-opacity,1))}.focus\\:border-transparent:focus{border-color:transparent}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-primary:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(0 122 194/var(--tw-ring-opacity,1))}.focus\\:ring-red-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity,1))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}";
33
33
  styleInject(css_248z,{"insertAt":"top"});
34
34
 
35
+ function _typeof(o) {
36
+ "@babel/helpers - typeof";
37
+
38
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
39
+ return typeof o;
40
+ } : function (o) {
41
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
42
+ }, _typeof(o);
43
+ }
44
+
45
+ function toPrimitive(t, r) {
46
+ if ("object" != _typeof(t) || !t) return t;
47
+ var e = t[Symbol.toPrimitive];
48
+ if (void 0 !== e) {
49
+ var i = e.call(t, r);
50
+ if ("object" != _typeof(i)) return i;
51
+ throw new TypeError("@@toPrimitive must return a primitive value.");
52
+ }
53
+ return ("string" === r ? String : Number)(t);
54
+ }
55
+
56
+ function toPropertyKey(t) {
57
+ var i = toPrimitive(t, "string");
58
+ return "symbol" == _typeof(i) ? i : i + "";
59
+ }
60
+
35
61
  function _defineProperty(e, r, t) {
36
- return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
62
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
37
63
  value: t,
38
64
  enumerable: true,
39
65
  configurable: true,
40
66
  writable: true
41
67
  }) : e[r] = t, e;
42
68
  }
43
- function ownKeys(e, r) {
44
- var t = Object.keys(e);
45
- if (Object.getOwnPropertySymbols) {
46
- var o = Object.getOwnPropertySymbols(e);
47
- r && (o = o.filter(function (r) {
48
- return Object.getOwnPropertyDescriptor(e, r).enumerable;
49
- })), t.push.apply(t, o);
69
+
70
+ function _objectWithoutPropertiesLoose(r, e) {
71
+ if (null == r) return {};
72
+ var t = {};
73
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
74
+ if (-1 !== e.indexOf(n)) continue;
75
+ t[n] = r[n];
50
76
  }
51
77
  return t;
52
78
  }
53
- function _objectSpread2(e) {
54
- for (var r = 1; r < arguments.length; r++) {
55
- var t = null != arguments[r] ? arguments[r] : {};
56
- r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
57
- _defineProperty(e, r, t[r]);
58
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
59
- Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
60
- });
61
- }
62
- return e;
63
- }
79
+
64
80
  function _objectWithoutProperties(e, t) {
65
81
  if (null == e) return {};
66
82
  var o,
@@ -72,29 +88,6 @@ function _objectWithoutProperties(e, t) {
72
88
  }
73
89
  return i;
74
90
  }
75
- function _objectWithoutPropertiesLoose(r, e) {
76
- if (null == r) return {};
77
- var t = {};
78
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
79
- if (-1 !== e.indexOf(n)) continue;
80
- t[n] = r[n];
81
- }
82
- return t;
83
- }
84
- function _toPrimitive(t, r) {
85
- if ("object" != typeof t || !t) return t;
86
- var e = t[Symbol.toPrimitive];
87
- if (void 0 !== e) {
88
- var i = e.call(t, r);
89
- if ("object" != typeof i) return i;
90
- throw new TypeError("@@toPrimitive must return a primitive value.");
91
- }
92
- return ("string" === r ? String : Number)(t);
93
- }
94
- function _toPropertyKey(t) {
95
- var i = _toPrimitive(t, "string");
96
- return "symbol" == typeof i ? i : i + "";
97
- }
98
91
 
99
92
  var jsxRuntime = {exports: {}};
100
93
 
@@ -115,7 +108,7 @@ var hasRequiredReactJsxRuntime_production_min;
115
108
  function requireReactJsxRuntime_production_min () {
116
109
  if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
117
110
  hasRequiredReactJsxRuntime_production_min = 1;
118
- 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
+ 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};
119
112
  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;
120
113
  return reactJsxRuntime_production_min;
121
114
  }
@@ -141,7 +134,7 @@ function requireReactJsxRuntime_development () {
141
134
  if (process.env.NODE_ENV !== "production") {
142
135
  (function() {
143
136
 
144
- var React = require$$0;
137
+ var React$1 = React;
145
138
 
146
139
  // ATTENTION
147
140
  // When adding new symbols to this file,
@@ -176,7 +169,7 @@ function requireReactJsxRuntime_development () {
176
169
  return null;
177
170
  }
178
171
 
179
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
172
+ var ReactSharedInternals = React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
180
173
 
181
174
  function error(format) {
182
175
  {
@@ -1464,8 +1457,10 @@ function cn() {
1464
1457
  return clsx(inputs);
1465
1458
  }
1466
1459
 
1467
- const _excluded = ["className", "color", "variant", "size", "fullWidth", "loading", "disabled", "children"];
1468
- const Button = /*#__PURE__*/require$$0.forwardRef((_ref, ref) => {
1460
+ const _excluded$6 = ["className", "color", "variant", "size", "fullWidth", "loading", "disabled", "children"];
1461
+ 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; }
1462
+ 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; }
1463
+ const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1469
1464
  let {
1470
1465
  className,
1471
1466
  color = "primary",
@@ -1476,7 +1471,7 @@ const Button = /*#__PURE__*/require$$0.forwardRef((_ref, ref) => {
1476
1471
  disabled,
1477
1472
  children
1478
1473
  } = _ref,
1479
- props = _objectWithoutProperties(_ref, _excluded);
1474
+ props = _objectWithoutProperties(_ref, _excluded$6);
1480
1475
  const baseClasses = cn(className, "btn transition-all duration-300 flex items-center justify-center");
1481
1476
  const variants = {
1482
1477
  contained: {
@@ -1503,7 +1498,7 @@ const Button = /*#__PURE__*/require$$0.forwardRef((_ref, ref) => {
1503
1498
  md: "px-4 py-2 text-sm",
1504
1499
  lg: "px-6 py-3 text-base"
1505
1500
  };
1506
- return jsxRuntimeExports.jsx("button", _objectSpread2(_objectSpread2({
1501
+ return jsxRuntimeExports.jsx("button", _objectSpread$6(_objectSpread$6({
1507
1502
  className: cn(baseClasses, variants[variant][color], sizes[size], fullWidth && "w-full", (disabled || loading) && "opacity-50 cursor-not-allowed", className),
1508
1503
  ref: ref,
1509
1504
  disabled: disabled || loading
@@ -1513,6 +1508,328 @@ const Button = /*#__PURE__*/require$$0.forwardRef((_ref, ref) => {
1513
1508
  });
1514
1509
  Button.displayName = "Button";
1515
1510
 
1511
+ const _excluded$5 = ["className", "type", "label", "error", "helperText", "size", "fullWidth", "id"];
1512
+ 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; }
1513
+ 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; }
1514
+ const Input = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1515
+ let {
1516
+ className,
1517
+ type = "text",
1518
+ label,
1519
+ error,
1520
+ helperText,
1521
+ size = "md",
1522
+ fullWidth = false,
1523
+ id
1524
+ } = _ref,
1525
+ props = _objectWithoutProperties(_ref, _excluded$5);
1526
+ const inputId = id || "input-".concat(Math.random().toString(36).substr(2, 9));
1527
+ const sizes = {
1528
+ sm: "px-3 py-1.5 text-sm",
1529
+ md: "px-4 py-2 text-sm",
1530
+ lg: "px-4 py-3 text-base"
1531
+ };
1532
+ const baseClasses = cn("border transition-colors focus:outline-none focus:border-transparent", error ? "border-red-500 focus:ring-red-500" : "border-secondary focus:border-primary", "disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-secondary-50", sizes[size], fullWidth && "w-full", className);
1533
+ return jsxRuntimeExports.jsxs("div", {
1534
+ className: cn("flex flex-col", fullWidth && "w-full"),
1535
+ children: [label && jsxRuntimeExports.jsx("label", {
1536
+ htmlFor: inputId,
1537
+ className: "mb-1 text-sm font-medium text-secondary-700",
1538
+ children: label
1539
+ }), jsxRuntimeExports.jsx("input", _objectSpread$5({
1540
+ type: type,
1541
+ className: baseClasses,
1542
+ ref: ref,
1543
+ id: inputId
1544
+ }, props)), (error || helperText) && jsxRuntimeExports.jsx("p", {
1545
+ className: cn("mt-1 text-xs", error ? "text-red-600" : "text-secondary-500"),
1546
+ children: error || helperText
1547
+ })]
1548
+ });
1549
+ });
1550
+ Input.displayName = "Input";
1551
+
1552
+ const _excluded$4 = ["className", "label", "error", "helperText", "size", "fullWidth", "rows", "id"];
1553
+ 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; }
1554
+ 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; }
1555
+ const Textarea = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1556
+ let {
1557
+ className,
1558
+ label,
1559
+ error,
1560
+ helperText,
1561
+ size = "md",
1562
+ fullWidth = false,
1563
+ rows = 3,
1564
+ id
1565
+ } = _ref,
1566
+ props = _objectWithoutProperties(_ref, _excluded$4);
1567
+ const textareaId = id || "textarea-".concat(Math.random().toString(36).substr(2, 9));
1568
+ const sizes = {
1569
+ sm: "px-3 py-1.5 text-sm",
1570
+ md: "px-4 py-2 text-sm",
1571
+ lg: "px-4 py-3 text-base"
1572
+ };
1573
+ const baseClasses = cn("border transition-colors focus:outline-none focus:border-transparent resize-vertical", error ? "border-red-500 focus:ring-red-500" : "border-secondary focus:border-primary", "disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-secondary-50", sizes[size], fullWidth && "w-full", className);
1574
+ return jsxRuntimeExports.jsxs("div", {
1575
+ className: cn("flex flex-col", fullWidth && "w-full"),
1576
+ children: [label && jsxRuntimeExports.jsx("label", {
1577
+ htmlFor: textareaId,
1578
+ className: "mb-1 text-sm font-medium text-secondary-700",
1579
+ children: label
1580
+ }), jsxRuntimeExports.jsx("textarea", _objectSpread$4({
1581
+ className: baseClasses,
1582
+ ref: ref,
1583
+ id: textareaId,
1584
+ rows: rows
1585
+ }, props)), (error || helperText) && jsxRuntimeExports.jsx("p", {
1586
+ className: cn("mt-1 text-xs", error ? "text-red-600" : "text-secondary-500"),
1587
+ children: error || helperText
1588
+ })]
1589
+ });
1590
+ });
1591
+ Textarea.displayName = "Textarea";
1592
+
1593
+ const _excluded$3 = ["className", "label", "error", "helperText", "size", "fullWidth", "accept", "multiple", "buttonText", "id"];
1594
+ 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; }
1595
+ 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; }
1596
+ const InputFile = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1597
+ let {
1598
+ className,
1599
+ label,
1600
+ error,
1601
+ helperText,
1602
+ size = "md",
1603
+ fullWidth = false,
1604
+ accept,
1605
+ multiple = false,
1606
+ buttonText = "Choose File",
1607
+ id
1608
+ } = _ref,
1609
+ props = _objectWithoutProperties(_ref, _excluded$3);
1610
+ const inputId = id || "file-input-".concat(Math.random().toString(36).substr(2, 9));
1611
+ const sizes = {
1612
+ sm: "px-3 py-1.5 text-sm",
1613
+ md: "px-4 py-2 text-sm",
1614
+ lg: "px-4 py-3 text-base"
1615
+ };
1616
+ const baseClasses = cn("border-2 border-dashed transition-colors focus:outline-none focus:border-transparent cursor-pointer", error ? "border-red-500 focus:ring-red-500 hover:border-red-400" : "border-secondary focus:border-primary hover:border-primary/60", "disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-secondary-50", sizes[size], fullWidth && "w-full", className);
1617
+ return jsxRuntimeExports.jsxs("div", {
1618
+ className: cn("flex flex-col", fullWidth && "w-full"),
1619
+ children: [label && jsxRuntimeExports.jsx("label", {
1620
+ htmlFor: inputId,
1621
+ className: "mb-1 text-sm font-medium text-secondary-700",
1622
+ children: label
1623
+ }), jsxRuntimeExports.jsxs("div", {
1624
+ className: "relative",
1625
+ children: [jsxRuntimeExports.jsx("input", _objectSpread$3({
1626
+ type: "file",
1627
+ className: "absolute inset-0 w-full h-full opacity-0 cursor-pointer",
1628
+ ref: ref,
1629
+ id: inputId,
1630
+ accept: accept,
1631
+ multiple: multiple
1632
+ }, props)), jsxRuntimeExports.jsxs("div", {
1633
+ className: cn(baseClasses, "flex items-center justify-center"),
1634
+ children: [jsxRuntimeExports.jsx("span", {
1635
+ className: "text-secondary-600",
1636
+ children: buttonText
1637
+ }), multiple && jsxRuntimeExports.jsx("span", {
1638
+ className: "ml-1 text-xs text-secondary-500",
1639
+ children: "(Multiple)"
1640
+ })]
1641
+ })]
1642
+ }), (error || helperText) && jsxRuntimeExports.jsx("p", {
1643
+ className: cn("mt-1 text-xs", error ? "text-red-600" : "text-secondary-500"),
1644
+ children: error || helperText
1645
+ })]
1646
+ });
1647
+ });
1648
+ InputFile.displayName = "InputFile";
1649
+
1650
+ const _excluded$2 = ["className", "label", "error", "helperText", "size", "fullWidth", "indeterminate", "id"];
1651
+ 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; }
1652
+ 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; }
1653
+ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1654
+ let {
1655
+ className,
1656
+ label,
1657
+ error,
1658
+ helperText,
1659
+ size = "md",
1660
+ fullWidth = false,
1661
+ indeterminate = false,
1662
+ id
1663
+ } = _ref,
1664
+ props = _objectWithoutProperties(_ref, _excluded$2);
1665
+ const checkboxId = id || "checkbox-".concat(Math.random().toString(36).substr(2, 9));
1666
+ const sizes = {
1667
+ sm: "w-4 h-4",
1668
+ md: "w-5 h-5",
1669
+ lg: "w-6 h-6"
1670
+ };
1671
+ const labelSizes = {
1672
+ sm: "text-sm",
1673
+ md: "text-sm",
1674
+ lg: "text-base"
1675
+ };
1676
+ 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);
1677
+ React.useEffect(() => {
1678
+ if (ref && typeof ref === "object" && ref.current) {
1679
+ ref.current.indeterminate = indeterminate;
1680
+ }
1681
+ }, [indeterminate, ref]);
1682
+ return jsxRuntimeExports.jsxs("div", {
1683
+ className: cn("flex items-start", fullWidth && "w-full"),
1684
+ children: [jsxRuntimeExports.jsx("div", {
1685
+ className: "flex items-center h-5",
1686
+ children: jsxRuntimeExports.jsx("input", _objectSpread$2({
1687
+ type: "checkbox",
1688
+ className: baseClasses,
1689
+ ref: ref,
1690
+ id: checkboxId
1691
+ }, props))
1692
+ }), jsxRuntimeExports.jsxs("div", {
1693
+ className: "ml-3",
1694
+ children: [label && jsxRuntimeExports.jsx("label", {
1695
+ htmlFor: checkboxId,
1696
+ className: cn("font-medium text-secondary-700 cursor-pointer", labelSizes[size]),
1697
+ children: label
1698
+ }), (error || helperText) && jsxRuntimeExports.jsx("p", {
1699
+ className: cn("mt-1 text-xs", error ? "text-red-600" : "text-secondary-500"),
1700
+ children: error || helperText
1701
+ })]
1702
+ })]
1703
+ });
1704
+ });
1705
+ Checkbox.displayName = "Checkbox";
1706
+
1707
+ const _excluded$1 = ["className", "label", "error", "helperText", "size", "fullWidth", "id"];
1708
+ 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; }
1709
+ 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; }
1710
+ const Radio = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1711
+ let {
1712
+ className,
1713
+ label,
1714
+ error,
1715
+ helperText,
1716
+ size = "md",
1717
+ fullWidth = false,
1718
+ id
1719
+ } = _ref,
1720
+ props = _objectWithoutProperties(_ref, _excluded$1);
1721
+ const radioId = id || "radio-".concat(Math.random().toString(36).substr(2, 9));
1722
+ const sizes = {
1723
+ sm: "w-4 h-4",
1724
+ md: "w-5 h-5",
1725
+ lg: "w-6 h-6"
1726
+ };
1727
+ const labelSizes = {
1728
+ sm: "text-sm",
1729
+ md: "text-sm",
1730
+ lg: "text-base"
1731
+ };
1732
+ const baseClasses = cn("border-2 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);
1733
+ return jsxRuntimeExports.jsxs("div", {
1734
+ className: cn("flex items-start", fullWidth && "w-full"),
1735
+ children: [jsxRuntimeExports.jsx("div", {
1736
+ className: "flex items-center h-5",
1737
+ children: jsxRuntimeExports.jsx("input", _objectSpread$1({
1738
+ type: "radio",
1739
+ className: baseClasses,
1740
+ ref: ref,
1741
+ id: radioId
1742
+ }, props))
1743
+ }), jsxRuntimeExports.jsxs("div", {
1744
+ className: "ml-3",
1745
+ children: [label && jsxRuntimeExports.jsx("label", {
1746
+ htmlFor: radioId,
1747
+ className: cn("font-medium text-secondary-700 cursor-pointer", labelSizes[size]),
1748
+ children: label
1749
+ }), (error || helperText) && jsxRuntimeExports.jsx("p", {
1750
+ className: cn("mt-1 text-xs", error ? "text-red-600" : "text-secondary-500"),
1751
+ children: error || helperText
1752
+ })]
1753
+ })]
1754
+ });
1755
+ });
1756
+ Radio.displayName = "Radio";
1757
+
1758
+ const _excluded = ["className", "label", "error", "helperText", "size", "fullWidth", "options", "placeholder", "id"];
1759
+ 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; }
1760
+ 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; }
1761
+ const Select = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1762
+ let {
1763
+ className,
1764
+ label,
1765
+ error,
1766
+ helperText,
1767
+ size = "md",
1768
+ fullWidth = false,
1769
+ options,
1770
+ placeholder,
1771
+ id
1772
+ } = _ref,
1773
+ props = _objectWithoutProperties(_ref, _excluded);
1774
+ const selectId = id || "select-".concat(Math.random().toString(36).substr(2, 9));
1775
+ const sizes = {
1776
+ sm: "px-3 py-1.5 text-sm",
1777
+ md: "px-4 py-2 text-sm",
1778
+ lg: "px-4 py-3 text-base"
1779
+ };
1780
+ const baseClasses = cn("border transition-colors focus:outline-none focus:border-transparent appearance-none bg-white", error ? "border-red-500 focus:ring-red-500" : "border-secondary focus:border-primary", "disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-secondary-50", sizes[size], fullWidth && "w-full", className);
1781
+ return jsxRuntimeExports.jsxs("div", {
1782
+ className: cn("flex flex-col", fullWidth && "w-full"),
1783
+ children: [label && jsxRuntimeExports.jsx("label", {
1784
+ htmlFor: selectId,
1785
+ className: "mb-1 text-sm font-medium text-secondary-700",
1786
+ children: label
1787
+ }), jsxRuntimeExports.jsxs("div", {
1788
+ className: "relative",
1789
+ children: [jsxRuntimeExports.jsxs("select", _objectSpread(_objectSpread({
1790
+ className: baseClasses,
1791
+ ref: ref,
1792
+ id: selectId
1793
+ }, props), {}, {
1794
+ children: [placeholder && jsxRuntimeExports.jsx("option", {
1795
+ value: "",
1796
+ disabled: true,
1797
+ children: placeholder
1798
+ }), options.map(option => jsxRuntimeExports.jsx("option", {
1799
+ value: option.value,
1800
+ disabled: option.disabled,
1801
+ children: option.label
1802
+ }, option.value))]
1803
+ })), jsxRuntimeExports.jsx("div", {
1804
+ className: "absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none",
1805
+ children: jsxRuntimeExports.jsx("svg", {
1806
+ className: "w-4 h-4 text-secondary-400",
1807
+ fill: "none",
1808
+ stroke: "currentColor",
1809
+ viewBox: "0 0 24 24",
1810
+ children: jsxRuntimeExports.jsx("path", {
1811
+ strokeLinecap: "round",
1812
+ strokeLinejoin: "round",
1813
+ strokeWidth: 2,
1814
+ d: "M19 9l-7 7-7-7"
1815
+ })
1816
+ })
1817
+ })]
1818
+ }), (error || helperText) && jsxRuntimeExports.jsx("p", {
1819
+ className: cn("mt-1 text-xs", error ? "text-red-600" : "text-secondary-500"),
1820
+ children: error || helperText
1821
+ })]
1822
+ });
1823
+ });
1824
+ Select.displayName = "Select";
1825
+
1826
+ exports.React = React;
1516
1827
  exports.Button = Button;
1828
+ exports.Checkbox = Checkbox;
1829
+ exports.Input = Input;
1830
+ exports.InputFile = InputFile;
1831
+ exports.Radio = Radio;
1832
+ exports.Select = Select;
1833
+ exports.Textarea = Textarea;
1517
1834
  exports.cn = cn;
1518
1835
  //# sourceMappingURL=index.js.map