thailife-react 0.0.5 → 0.0.6

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.d.ts CHANGED
@@ -1,5 +1,19 @@
1
+ import React from "react";
1
2
  import "./styles/globals.css";
2
3
  export { Button } from "./components/Button/Button";
3
4
  export type { ButtonProps } from "./components/Button/Button";
5
+ export { Input } from "./components/Input/Input";
6
+ export type { InputProps } from "./components/Input/Input";
7
+ export { Textarea } from "./components/Textarea/Textarea";
8
+ export type { TextareaProps } from "./components/Textarea/Textarea";
9
+ export { InputFile } from "./components/InputFile/InputFile";
10
+ export type { InputFileProps } from "./components/InputFile/InputFile";
11
+ export { Checkbox } from "./components/Checkbox/Checkbox";
12
+ export type { CheckboxProps } from "./components/Checkbox/Checkbox";
13
+ export { Radio } from "./components/Radio/Radio";
14
+ export type { RadioProps } from "./components/Radio/Radio";
15
+ export { Select } from "./components/Select/Select";
16
+ export type { SelectProps, SelectOption } from "./components/Select/Select";
4
17
  export { cn } from "./utils/cn";
18
+ export { React };
5
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,sBAAsB,CAAC;AAG9B,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAqB9D,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,sBAAsB,CAAC;AAG9B,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,YAAY,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,YAAY,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,YAAY,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,YAAY,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAkB5E,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAGhC,OAAO,EAAE,KAAK,EAAE,CAAC"}
package/dist/index.esm.js CHANGED
@@ -1,4 +1,5 @@
1
- import require$$0 from 'react';
1
+ import React from 'react';
2
+ export { default as React } from 'react';
2
3
 
3
4
  function styleInject(css, ref) {
4
5
  if ( ref === void 0 ) ref = {};
@@ -30,35 +31,51 @@ function styleInject(css, ref) {
30
31
  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}";
31
32
  styleInject(css_248z,{"insertAt":"top"});
32
33
 
34
+ function _typeof(o) {
35
+ "@babel/helpers - typeof";
36
+
37
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
38
+ return typeof o;
39
+ } : function (o) {
40
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
41
+ }, _typeof(o);
42
+ }
43
+
44
+ function toPrimitive(t, r) {
45
+ if ("object" != _typeof(t) || !t) return t;
46
+ var e = t[Symbol.toPrimitive];
47
+ if (void 0 !== e) {
48
+ var i = e.call(t, r);
49
+ if ("object" != _typeof(i)) return i;
50
+ throw new TypeError("@@toPrimitive must return a primitive value.");
51
+ }
52
+ return ("string" === r ? String : Number)(t);
53
+ }
54
+
55
+ function toPropertyKey(t) {
56
+ var i = toPrimitive(t, "string");
57
+ return "symbol" == _typeof(i) ? i : i + "";
58
+ }
59
+
33
60
  function _defineProperty(e, r, t) {
34
- return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
61
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
35
62
  value: t,
36
63
  enumerable: true,
37
64
  configurable: true,
38
65
  writable: true
39
66
  }) : e[r] = t, e;
40
67
  }
41
- function ownKeys(e, r) {
42
- var t = Object.keys(e);
43
- if (Object.getOwnPropertySymbols) {
44
- var o = Object.getOwnPropertySymbols(e);
45
- r && (o = o.filter(function (r) {
46
- return Object.getOwnPropertyDescriptor(e, r).enumerable;
47
- })), t.push.apply(t, o);
68
+
69
+ function _objectWithoutPropertiesLoose(r, e) {
70
+ if (null == r) return {};
71
+ var t = {};
72
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
73
+ if (-1 !== e.indexOf(n)) continue;
74
+ t[n] = r[n];
48
75
  }
49
76
  return t;
50
77
  }
51
- function _objectSpread2(e) {
52
- for (var r = 1; r < arguments.length; r++) {
53
- var t = null != arguments[r] ? arguments[r] : {};
54
- r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
55
- _defineProperty(e, r, t[r]);
56
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
57
- Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
58
- });
59
- }
60
- return e;
61
- }
78
+
62
79
  function _objectWithoutProperties(e, t) {
63
80
  if (null == e) return {};
64
81
  var o,
@@ -70,29 +87,6 @@ function _objectWithoutProperties(e, t) {
70
87
  }
71
88
  return i;
72
89
  }
73
- function _objectWithoutPropertiesLoose(r, e) {
74
- if (null == r) return {};
75
- var t = {};
76
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
77
- if (-1 !== e.indexOf(n)) continue;
78
- t[n] = r[n];
79
- }
80
- return t;
81
- }
82
- function _toPrimitive(t, r) {
83
- if ("object" != typeof t || !t) return t;
84
- var e = t[Symbol.toPrimitive];
85
- if (void 0 !== e) {
86
- var i = e.call(t, r);
87
- if ("object" != typeof i) return i;
88
- throw new TypeError("@@toPrimitive must return a primitive value.");
89
- }
90
- return ("string" === r ? String : Number)(t);
91
- }
92
- function _toPropertyKey(t) {
93
- var i = _toPrimitive(t, "string");
94
- return "symbol" == typeof i ? i : i + "";
95
- }
96
90
 
97
91
  var jsxRuntime = {exports: {}};
98
92
 
@@ -113,7 +107,7 @@ var hasRequiredReactJsxRuntime_production_min;
113
107
  function requireReactJsxRuntime_production_min () {
114
108
  if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
115
109
  hasRequiredReactJsxRuntime_production_min = 1;
116
- 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};
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};
117
111
  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;
118
112
  return reactJsxRuntime_production_min;
119
113
  }
@@ -139,7 +133,7 @@ function requireReactJsxRuntime_development () {
139
133
  if (process.env.NODE_ENV !== "production") {
140
134
  (function() {
141
135
 
142
- var React = require$$0;
136
+ var React$1 = React;
143
137
 
144
138
  // ATTENTION
145
139
  // When adding new symbols to this file,
@@ -174,7 +168,7 @@ function requireReactJsxRuntime_development () {
174
168
  return null;
175
169
  }
176
170
 
177
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
171
+ var ReactSharedInternals = React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
178
172
 
179
173
  function error(format) {
180
174
  {
@@ -1462,8 +1456,10 @@ function cn() {
1462
1456
  return clsx(inputs);
1463
1457
  }
1464
1458
 
1465
- const _excluded = ["className", "color", "variant", "size", "fullWidth", "loading", "disabled", "children"];
1466
- const Button = /*#__PURE__*/require$$0.forwardRef((_ref, ref) => {
1459
+ 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) => {
1467
1463
  let {
1468
1464
  className,
1469
1465
  color = "primary",
@@ -1474,7 +1470,7 @@ const Button = /*#__PURE__*/require$$0.forwardRef((_ref, ref) => {
1474
1470
  disabled,
1475
1471
  children
1476
1472
  } = _ref,
1477
- props = _objectWithoutProperties(_ref, _excluded);
1473
+ props = _objectWithoutProperties(_ref, _excluded$6);
1478
1474
  const baseClasses = cn(className, "btn transition-all duration-300 flex items-center justify-center");
1479
1475
  const variants = {
1480
1476
  contained: {
@@ -1501,7 +1497,7 @@ const Button = /*#__PURE__*/require$$0.forwardRef((_ref, ref) => {
1501
1497
  md: "px-4 py-2 text-sm",
1502
1498
  lg: "px-6 py-3 text-base"
1503
1499
  };
1504
- return jsxRuntimeExports.jsx("button", _objectSpread2(_objectSpread2({
1500
+ return jsxRuntimeExports.jsx("button", _objectSpread$6(_objectSpread$6({
1505
1501
  className: cn(baseClasses, variants[variant][color], sizes[size], fullWidth && "w-full", (disabled || loading) && "opacity-50 cursor-not-allowed", className),
1506
1502
  ref: ref,
1507
1503
  disabled: disabled || loading
@@ -1511,5 +1507,320 @@ const Button = /*#__PURE__*/require$$0.forwardRef((_ref, ref) => {
1511
1507
  });
1512
1508
  Button.displayName = "Button";
1513
1509
 
1514
- export { Button, cn };
1510
+ 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) => {
1514
+ let {
1515
+ className,
1516
+ type = "text",
1517
+ label,
1518
+ error,
1519
+ helperText,
1520
+ size = "md",
1521
+ fullWidth = false,
1522
+ id
1523
+ } = _ref,
1524
+ props = _objectWithoutProperties(_ref, _excluded$5);
1525
+ const inputId = id || "input-".concat(Math.random().toString(36).substr(2, 9));
1526
+ const sizes = {
1527
+ sm: "px-3 py-1.5 text-sm",
1528
+ md: "px-4 py-2 text-sm",
1529
+ lg: "px-4 py-3 text-base"
1530
+ };
1531
+ 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);
1532
+ return jsxRuntimeExports.jsxs("div", {
1533
+ className: cn("flex flex-col", fullWidth && "w-full"),
1534
+ children: [label && jsxRuntimeExports.jsx("label", {
1535
+ htmlFor: inputId,
1536
+ className: "mb-1 text-sm font-medium text-secondary-700",
1537
+ children: label
1538
+ }), jsxRuntimeExports.jsx("input", _objectSpread$5({
1539
+ type: type,
1540
+ className: baseClasses,
1541
+ ref: ref,
1542
+ id: inputId
1543
+ }, props)), (error || helperText) && jsxRuntimeExports.jsx("p", {
1544
+ className: cn("mt-1 text-xs", error ? "text-red-600" : "text-secondary-500"),
1545
+ children: error || helperText
1546
+ })]
1547
+ });
1548
+ });
1549
+ Input.displayName = "Input";
1550
+
1551
+ 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) => {
1555
+ let {
1556
+ className,
1557
+ label,
1558
+ error,
1559
+ helperText,
1560
+ size = "md",
1561
+ fullWidth = false,
1562
+ rows = 3,
1563
+ id
1564
+ } = _ref,
1565
+ props = _objectWithoutProperties(_ref, _excluded$4);
1566
+ const textareaId = id || "textarea-".concat(Math.random().toString(36).substr(2, 9));
1567
+ const sizes = {
1568
+ sm: "px-3 py-1.5 text-sm",
1569
+ md: "px-4 py-2 text-sm",
1570
+ lg: "px-4 py-3 text-base"
1571
+ };
1572
+ 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);
1573
+ return jsxRuntimeExports.jsxs("div", {
1574
+ className: cn("flex flex-col", fullWidth && "w-full"),
1575
+ children: [label && jsxRuntimeExports.jsx("label", {
1576
+ htmlFor: textareaId,
1577
+ className: "mb-1 text-sm font-medium text-secondary-700",
1578
+ children: label
1579
+ }), jsxRuntimeExports.jsx("textarea", _objectSpread$4({
1580
+ className: baseClasses,
1581
+ ref: ref,
1582
+ id: textareaId,
1583
+ rows: rows
1584
+ }, props)), (error || helperText) && jsxRuntimeExports.jsx("p", {
1585
+ className: cn("mt-1 text-xs", error ? "text-red-600" : "text-secondary-500"),
1586
+ children: error || helperText
1587
+ })]
1588
+ });
1589
+ });
1590
+ Textarea.displayName = "Textarea";
1591
+
1592
+ 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) => {
1596
+ let {
1597
+ className,
1598
+ label,
1599
+ error,
1600
+ helperText,
1601
+ size = "md",
1602
+ fullWidth = false,
1603
+ accept,
1604
+ multiple = false,
1605
+ buttonText = "Choose File",
1606
+ id
1607
+ } = _ref,
1608
+ props = _objectWithoutProperties(_ref, _excluded$3);
1609
+ const inputId = id || "file-input-".concat(Math.random().toString(36).substr(2, 9));
1610
+ const sizes = {
1611
+ sm: "px-3 py-1.5 text-sm",
1612
+ md: "px-4 py-2 text-sm",
1613
+ lg: "px-4 py-3 text-base"
1614
+ };
1615
+ 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);
1616
+ return jsxRuntimeExports.jsxs("div", {
1617
+ className: cn("flex flex-col", fullWidth && "w-full"),
1618
+ children: [label && jsxRuntimeExports.jsx("label", {
1619
+ htmlFor: inputId,
1620
+ className: "mb-1 text-sm font-medium text-secondary-700",
1621
+ children: label
1622
+ }), jsxRuntimeExports.jsxs("div", {
1623
+ className: "relative",
1624
+ children: [jsxRuntimeExports.jsx("input", _objectSpread$3({
1625
+ type: "file",
1626
+ className: "absolute inset-0 w-full h-full opacity-0 cursor-pointer",
1627
+ ref: ref,
1628
+ id: inputId,
1629
+ accept: accept,
1630
+ multiple: multiple
1631
+ }, props)), jsxRuntimeExports.jsxs("div", {
1632
+ className: cn(baseClasses, "flex items-center justify-center"),
1633
+ children: [jsxRuntimeExports.jsx("span", {
1634
+ className: "text-secondary-600",
1635
+ children: buttonText
1636
+ }), multiple && jsxRuntimeExports.jsx("span", {
1637
+ className: "ml-1 text-xs text-secondary-500",
1638
+ children: "(Multiple)"
1639
+ })]
1640
+ })]
1641
+ }), (error || helperText) && jsxRuntimeExports.jsx("p", {
1642
+ className: cn("mt-1 text-xs", error ? "text-red-600" : "text-secondary-500"),
1643
+ children: error || helperText
1644
+ })]
1645
+ });
1646
+ });
1647
+ InputFile.displayName = "InputFile";
1648
+
1649
+ 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) => {
1653
+ let {
1654
+ className,
1655
+ label,
1656
+ error,
1657
+ helperText,
1658
+ size = "md",
1659
+ fullWidth = false,
1660
+ indeterminate = false,
1661
+ id
1662
+ } = _ref,
1663
+ props = _objectWithoutProperties(_ref, _excluded$2);
1664
+ const checkboxId = id || "checkbox-".concat(Math.random().toString(36).substr(2, 9));
1665
+ const sizes = {
1666
+ sm: "w-4 h-4",
1667
+ md: "w-5 h-5",
1668
+ lg: "w-6 h-6"
1669
+ };
1670
+ const labelSizes = {
1671
+ sm: "text-sm",
1672
+ md: "text-sm",
1673
+ lg: "text-base"
1674
+ };
1675
+ 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(() => {
1677
+ if (ref && typeof ref === "object" && ref.current) {
1678
+ ref.current.indeterminate = indeterminate;
1679
+ }
1680
+ }, [indeterminate, ref]);
1681
+ return jsxRuntimeExports.jsxs("div", {
1682
+ className: cn("flex items-start", fullWidth && "w-full"),
1683
+ children: [jsxRuntimeExports.jsx("div", {
1684
+ className: "flex items-center h-5",
1685
+ children: jsxRuntimeExports.jsx("input", _objectSpread$2({
1686
+ type: "checkbox",
1687
+ className: baseClasses,
1688
+ ref: ref,
1689
+ id: checkboxId
1690
+ }, props))
1691
+ }), jsxRuntimeExports.jsxs("div", {
1692
+ className: "ml-3",
1693
+ children: [label && jsxRuntimeExports.jsx("label", {
1694
+ htmlFor: checkboxId,
1695
+ className: cn("font-medium text-secondary-700 cursor-pointer", labelSizes[size]),
1696
+ children: label
1697
+ }), (error || helperText) && jsxRuntimeExports.jsx("p", {
1698
+ className: cn("mt-1 text-xs", error ? "text-red-600" : "text-secondary-500"),
1699
+ children: error || helperText
1700
+ })]
1701
+ })]
1702
+ });
1703
+ });
1704
+ Checkbox.displayName = "Checkbox";
1705
+
1706
+ 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) => {
1710
+ let {
1711
+ className,
1712
+ label,
1713
+ error,
1714
+ helperText,
1715
+ size = "md",
1716
+ fullWidth = false,
1717
+ id
1718
+ } = _ref,
1719
+ props = _objectWithoutProperties(_ref, _excluded$1);
1720
+ const radioId = id || "radio-".concat(Math.random().toString(36).substr(2, 9));
1721
+ const sizes = {
1722
+ sm: "w-4 h-4",
1723
+ md: "w-5 h-5",
1724
+ lg: "w-6 h-6"
1725
+ };
1726
+ const labelSizes = {
1727
+ sm: "text-sm",
1728
+ md: "text-sm",
1729
+ lg: "text-base"
1730
+ };
1731
+ 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);
1732
+ return jsxRuntimeExports.jsxs("div", {
1733
+ className: cn("flex items-start", fullWidth && "w-full"),
1734
+ children: [jsxRuntimeExports.jsx("div", {
1735
+ className: "flex items-center h-5",
1736
+ children: jsxRuntimeExports.jsx("input", _objectSpread$1({
1737
+ type: "radio",
1738
+ className: baseClasses,
1739
+ ref: ref,
1740
+ id: radioId
1741
+ }, props))
1742
+ }), jsxRuntimeExports.jsxs("div", {
1743
+ className: "ml-3",
1744
+ children: [label && jsxRuntimeExports.jsx("label", {
1745
+ htmlFor: radioId,
1746
+ className: cn("font-medium text-secondary-700 cursor-pointer", labelSizes[size]),
1747
+ children: label
1748
+ }), (error || helperText) && jsxRuntimeExports.jsx("p", {
1749
+ className: cn("mt-1 text-xs", error ? "text-red-600" : "text-secondary-500"),
1750
+ children: error || helperText
1751
+ })]
1752
+ })]
1753
+ });
1754
+ });
1755
+ Radio.displayName = "Radio";
1756
+
1757
+ 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) => {
1761
+ let {
1762
+ className,
1763
+ label,
1764
+ error,
1765
+ helperText,
1766
+ size = "md",
1767
+ fullWidth = false,
1768
+ options,
1769
+ placeholder,
1770
+ id
1771
+ } = _ref,
1772
+ props = _objectWithoutProperties(_ref, _excluded);
1773
+ const selectId = id || "select-".concat(Math.random().toString(36).substr(2, 9));
1774
+ const sizes = {
1775
+ sm: "px-3 py-1.5 text-sm",
1776
+ md: "px-4 py-2 text-sm",
1777
+ lg: "px-4 py-3 text-base"
1778
+ };
1779
+ 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);
1780
+ return jsxRuntimeExports.jsxs("div", {
1781
+ className: cn("flex flex-col", fullWidth && "w-full"),
1782
+ children: [label && jsxRuntimeExports.jsx("label", {
1783
+ htmlFor: selectId,
1784
+ className: "mb-1 text-sm font-medium text-secondary-700",
1785
+ children: label
1786
+ }), jsxRuntimeExports.jsxs("div", {
1787
+ className: "relative",
1788
+ children: [jsxRuntimeExports.jsxs("select", _objectSpread(_objectSpread({
1789
+ className: baseClasses,
1790
+ ref: ref,
1791
+ id: selectId
1792
+ }, props), {}, {
1793
+ children: [placeholder && jsxRuntimeExports.jsx("option", {
1794
+ value: "",
1795
+ disabled: true,
1796
+ children: placeholder
1797
+ }), options.map(option => jsxRuntimeExports.jsx("option", {
1798
+ value: option.value,
1799
+ disabled: option.disabled,
1800
+ children: option.label
1801
+ }, option.value))]
1802
+ })), jsxRuntimeExports.jsx("div", {
1803
+ className: "absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none",
1804
+ children: jsxRuntimeExports.jsx("svg", {
1805
+ className: "w-4 h-4 text-secondary-400",
1806
+ fill: "none",
1807
+ stroke: "currentColor",
1808
+ viewBox: "0 0 24 24",
1809
+ children: jsxRuntimeExports.jsx("path", {
1810
+ strokeLinecap: "round",
1811
+ strokeLinejoin: "round",
1812
+ strokeWidth: 2,
1813
+ d: "M19 9l-7 7-7-7"
1814
+ })
1815
+ })
1816
+ })]
1817
+ }), (error || helperText) && jsxRuntimeExports.jsx("p", {
1818
+ className: cn("mt-1 text-xs", error ? "text-red-600" : "text-secondary-500"),
1819
+ children: error || helperText
1820
+ })]
1821
+ });
1822
+ });
1823
+ Select.displayName = "Select";
1824
+
1825
+ export { Button, Checkbox, Input, InputFile, Radio, Select, Textarea, cn };
1515
1826
  //# sourceMappingURL=index.esm.js.map