@onehaul/ui 0.1.0 → 0.1.2

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/README.md CHANGED
@@ -1,9 +1,58 @@
1
1
  # @onehaul/ui
2
2
 
3
- A lightweight UI component library wrapping Ant Design components with custom styles and behavior.
3
+ ## About
4
+
5
+ A lightweight UI component library designed and developed by OneHaul for the world, featuring custom styles and behavior. This library provides a set of reusable React components built on top of Ant Design, offering a consistent and modern user interface.
6
+
7
+ ## Features
8
+
9
+ - 🎨 Custom-styled components based on Ant Design
10
+ - 🚀 Lightweight and optimized bundle size
11
+ - 🌲 Tree-shakeable exports
12
+ - 📦 Support for both CommonJS and ES Modules
13
+ - 🎯 Simple and intuitive API
14
+ - 💅 Customizable styles
15
+ - ⚡️ Built with React and modern JavaScript
4
16
 
5
17
  ## Installation
6
18
 
7
19
  ```bash
8
20
  npm install @onehaul/ui
9
- ```
21
+ ```
22
+
23
+ ## Theming
24
+
25
+ OneHaul UI supports two ways of theming:
26
+
27
+ 1. **Default Theme**
28
+ - Pre-configured theme matching OneHaul's design system
29
+ - Just wrap your app with `ThemeProvider`
30
+
31
+ ```jsx
32
+ import { ThemeProvider } from "@onehaul/ui";
33
+
34
+ function App() {
35
+ return (
36
+ <ThemeProvider>
37
+ <YourComponents />
38
+ </ThemeProvider>
39
+ );
40
+ }
41
+ ```
42
+
43
+ ```jsx
44
+ const customTheme = {
45
+ token: {
46
+ colorPrimary: "#your-color",
47
+ // ... other customizations
48
+ },
49
+ };
50
+
51
+ function App() {
52
+ return (
53
+ <ThemeProvider theme={customTheme}>
54
+ <YourComponents />
55
+ </ThemeProvider>
56
+ );
57
+ }
58
+ ```
package/dist/index.esm.js CHANGED
@@ -1,2 +1,2 @@
1
- import"react";import{Button as r}from"antd";import{jsx as e}from"react/jsx-runtime";function t(r,e,t){return(e=function(r){var e=function(r,e){if("object"!=typeof r||!r)return r;var t=r[Symbol.toPrimitive];if(void 0!==t){var n=t.call(r,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"==typeof e?e:e+""}(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function n(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function o(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){t(r,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var i=["children","className"],c=function(t){var n=t.children,c=t.className,u=void 0===c?"":c,a=function(r,e){if(null==r)return{};var t,n,o=function(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n]}return t}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(n=0;n<i.length;n++)t=i[n],-1===e.indexOf(t)&&{}.propertyIsEnumerable.call(r,t)&&(o[t]=r[t])}return o}(t,i);return e(r,o(o({className:"onehaul-button ".concat(u)},a),{},{children:n}))};export{c as Button};
1
+ import{useState as r}from"react";import{Button as e,Dropdown as t,Input as n}from"antd";import{jsx as o,jsxs as a}from"react/jsx-runtime";function l(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function i(r,e,t){return(e=function(r){var e=function(r,e){if("object"!=typeof r||!r)return r;var t=r[Symbol.toPrimitive];if(void 0!==t){var n=t.call(r,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"==typeof e?e:e+""}(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function c(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function u(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?c(Object(t),!0).forEach((function(e){i(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}function f(r,e){if(null==r)return{};var t,n,o=function(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n]}return t}(r,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(n=0;n<a.length;n++)t=a[n],-1===e.indexOf(t)&&{}.propertyIsEnumerable.call(r,t)&&(o[t]=r[t])}return o}function s(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var n,o,a,l,i=[],c=!0,u=!1;try{if(a=(t=t.call(r)).next,0===e){if(Object(t)!==t)return;c=!1}else for(;!(c=(n=a.call(t)).done)&&(i.push(n.value),i.length!==e);c=!0);}catch(r){u=!0,o=r}finally{try{if(!c&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(u)throw o}}return i}}(r,e)||function(r,e){if(r){if("string"==typeof r)return l(r,e);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?l(r,e):void 0}}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var p=["children","className"],m=function(r){var t=r.children,n=r.className,a=void 0===n?"":n,l=f(r,p);return o(e,u(u({className:"onehaul-button ".concat(a)},l),{},{children:t}))},v=["children","className"],b=function(r){var e=r.children,n=r.className,a=void 0===n?"":n,l=f(r,v);return o(t,u(u({className:"onehaul-dropdown ".concat(a)},l),{},{children:e}))},y=["placeholder","className"],d=function(e){var t=e.placeholder,l=e.className,i=void 0===l?"":l,c=f(e,y),p=s(r(!1),2),m=p[0],v=p[1],b=s(r(!1),2),d=b[0],h=b[1];return a("div",{className:"onehaul-input-wrapper ".concat(m?"focused":""," ").concat(d?"has-value":""),children:[o(n,u(u({},c),{},{className:"onehaul-input ".concat(i),onFocus:function(r){var e;v(!0),null===(e=c.onFocus)||void 0===e||e.call(c,r)},onBlur:function(r){var e;v(!1),h(!!r.target.value),null===(e=c.onBlur)||void 0===e||e.call(c,r)},onChange:function(r){var e;h(!!r.target.value),null===(e=c.onChange)||void 0===e||e.call(c,r)}})),t&&o("label",{className:"onehaul-input-label",children:t})]})};export{m as Button,b as Dropdown,d as Input};
2
2
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../src/components/Button/Button.js"],"sourcesContent":["import React from 'react';\nimport { Button as AntButton } from 'antd';\nimport './Button.css';\n\nconst Button = ({ children, className = '', ...props }) => (\n <AntButton \n className={`onehaul-button ${className}`} \n {...props}\n >\n {children}\n </AntButton>\n);\n\nexport default Button;"],"names":["Button$1","_ref","children","_ref$className","className","props","_objectWithoutProperties","_excluded","_jsx","AntButton","_objectSpread","concat"],"mappings":"+mCAaAA,EATe,SAAHC,GAAA,IAAMC,EAAQD,EAARC,SAAQC,EAAAF,EAAEG,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAKE,+WAAKC,CAAAL,EAAAM,GAAA,OAClDC,EAACC,EAASC,EAAAA,EAAA,CACRN,UAAS,kBAAAO,OAAoBP,IACzBC,GAAK,GAAA,CAAAH,SAERA,IACS"}
1
+ {"version":3,"file":"index.esm.js","sources":["../src/components/Button/index.jsx","../src/components/Dropdown/index.jsx","../src/components/Input/index.jsx"],"sourcesContent":["import React from 'react';\nimport { Button as AntButton } from 'antd';\nimport './Button.css';\n\nconst Button = ({ children, className = '', ...props }) => (\n <AntButton \n className={`onehaul-button ${className}`} \n {...props}\n >\n {children}\n </AntButton>\n);\n\nexport default Button;","import React from 'react';\nimport { Dropdown as AntDropdown } from 'antd';\nimport './Dropdown.css';\n\nconst Dropdown = ({ children, className = '', ...props }) => (\n <AntDropdown \n className={`onehaul-dropdown ${className}`} \n {...props}\n >\n {children}\n </AntDropdown>\n);\n\nexport default Dropdown;","import React, { useState } from 'react';\nimport { Input as AntInput } from 'antd';\nimport './Input.css';\n\nconst Input = ({ placeholder, className = '', ...props }) => {\n const [isFocused, setIsFocused] = useState(false);\n const [hasValue, setHasValue] = useState(false);\n\n const handleFocus = (e) => {\n setIsFocused(true);\n props.onFocus?.(e);\n };\n\n const handleBlur = (e) => {\n setIsFocused(false);\n setHasValue(!!e.target.value);\n props.onBlur?.(e);\n };\n\n const handleChange = (e) => {\n setHasValue(!!e.target.value);\n props.onChange?.(e);\n };\n\n return (\n <div className={`onehaul-input-wrapper ${isFocused ? 'focused' : ''} ${hasValue ? 'has-value' : ''}`}>\n <AntInput\n {...props}\n className={`onehaul-input ${className}`}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChange={handleChange}\n />\n {placeholder && <label className=\"onehaul-input-label\">{placeholder}</label>}\n </div>\n );\n};\n\nexport default Input;"],"names":["Button$1","_ref","children","_ref$className","className","props","_objectWithoutProperties","_excluded","_jsx","AntButton","_objectSpread","concat","Dropdown$1","AntDropdown","Input$1","placeholder","_useState2","_slicedToArray","useState","isFocused","setIsFocused","_useState4","hasValue","setHasValue","_jsxs","AntInput","onFocus","e","_props$onFocus","call","onBlur","_props$onBlur","target","value","onChange","_props$onChange"],"mappings":"ohFAaAA,EATe,SAAHC,GAAA,IAAMC,EAAQD,EAARC,SAAQC,EAAAF,EAAEG,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAKE,EAAKC,EAAAL,EAAAM,GAAA,OAClDC,EAACC,EAASC,EAAAA,EAAA,CACRN,UAAS,kBAAAO,OAAoBP,IACzBC,GAAK,GAAA,CAAAH,SAERA,IACS,6BCGdU,EATiB,SAAHX,GAAA,IAAMC,EAAQD,EAARC,SAAQC,EAAAF,EAAEG,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAKE,EAAKC,EAAAL,EAAAM,GAAA,OACpDC,EAACK,EAAWH,EAAAA,EAAA,CACVN,UAAS,oBAAAO,OAAsBP,IAC3BC,GAAK,GAAA,CAAAH,SAERA,IACW,gCC4BhBY,EAlCc,SAAHb,GAAkD,IAA5Cc,EAAWd,EAAXc,YAAWZ,EAAAF,EAAEG,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAKE,EAAKC,EAAAL,EAAAM,GACHS,EAAAC,EAAfC,GAAS,GAAM,GAA1CC,EAASH,EAAA,GAAEI,EAAYJ,EAAA,GACiBK,EAAAJ,EAAfC,GAAS,GAAM,GAAxCI,EAAQD,EAAA,GAAEE,EAAWF,EAAA,GAkB5B,OACEG,EAAA,MAAA,CAAKpB,mCAASO,OAA2BQ,EAAY,UAAY,GAAER,KAAAA,OAAIW,EAAW,YAAc,IAAKpB,SAAA,CACnGM,EAACiB,EAAQf,EAAAA,EAAA,CAAA,EACHL,GAAK,GAAA,CACTD,UAASO,iBAAAA,OAAmBP,GAC5BsB,QArBc,SAACC,GAAM,IAAAC,EACzBR,GAAa,GACAQ,QAAbA,EAAAvB,EAAMqB,eAANE,IAAaA,GAAbA,EAAAC,KAAAxB,EAAgBsB,IAoBZG,OAjBa,SAACH,GAAM,IAAAI,EACxBX,GAAa,GACbG,IAAcI,EAAEK,OAAOC,OACXF,QAAZA,EAAA1B,EAAMyB,cAANC,IAAYA,GAAZA,EAAAF,KAAAxB,EAAesB,IAeXO,SAZe,SAACP,GAAM,IAAAQ,EAC1BZ,IAAcI,EAAEK,OAAOC,OACTE,QAAdA,EAAA9B,EAAM6B,gBAANC,IAAcA,GAAdA,EAAAN,KAAAxB,EAAiBsB,OAYdZ,GAAeP,EAAA,QAAA,CAAOJ,UAAU,sBAAqBF,SAAEa,MAG9D"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("react");var e=require("antd"),r=require("react/jsx-runtime");function t(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:r+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function n(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function o(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?n(Object(o),!0).forEach((function(r){t(e,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}var i=["children","className"],c=function(t){var n=t.children,c=t.className,u=void 0===c?"":c,a=function(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==r.indexOf(n))continue;t[n]=e[n]}return t}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],-1===r.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(t,i);return r.jsx(e.Button,o(o({className:"onehaul-button ".concat(u)},a),{},{children:n}))};exports.Button=c;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("react"),e=require("antd"),t=require("react/jsx-runtime");function n(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function o(r,e,t){return(e=function(r){var e=function(r,e){if("object"!=typeof r||!r)return r;var t=r[Symbol.toPrimitive];if(void 0!==t){var n=t.call(r,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"==typeof e?e:e+""}(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function a(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function l(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?a(Object(t),!0).forEach((function(e){o(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}function u(r,e){if(null==r)return{};var t,n,o=function(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n]}return t}(r,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(n=0;n<a.length;n++)t=a[n],-1===e.indexOf(t)&&{}.propertyIsEnumerable.call(r,t)&&(o[t]=r[t])}return o}function i(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var n,o,a,l,u=[],i=!0,c=!1;try{if(a=(t=t.call(r)).next,0===e){if(Object(t)!==t)return;i=!1}else for(;!(i=(n=a.call(t)).done)&&(u.push(n.value),u.length!==e);i=!0);}catch(r){c=!0,o=r}finally{try{if(!i&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(c)throw o}}return u}}(r,e)||function(r,e){if(r){if("string"==typeof r)return n(r,e);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?n(r,e):void 0}}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var c=["children","className"],s=function(r){var n=r.children,o=r.className,a=void 0===o?"":o,i=u(r,c);return t.jsx(e.Button,l(l({className:"onehaul-button ".concat(a)},i),{},{children:n}))},f=["children","className"],p=function(r){var n=r.children,o=r.className,a=void 0===o?"":o,i=u(r,f);return t.jsx(e.Dropdown,l(l({className:"onehaul-dropdown ".concat(a)},i),{},{children:n}))},v=["placeholder","className"],b=function(n){var o=n.placeholder,a=n.className,c=void 0===a?"":a,s=u(n,v),f=i(r.useState(!1),2),p=f[0],b=f[1],d=i(r.useState(!1),2),y=d[0],m=d[1];return t.jsxs("div",{className:"onehaul-input-wrapper ".concat(p?"focused":""," ").concat(y?"has-value":""),children:[t.jsx(e.Input,l(l({},s),{},{className:"onehaul-input ".concat(c),onFocus:function(r){var e;b(!0),null===(e=s.onFocus)||void 0===e||e.call(s,r)},onBlur:function(r){var e;b(!1),m(!!r.target.value),null===(e=s.onBlur)||void 0===e||e.call(s,r)},onChange:function(r){var e;m(!!r.target.value),null===(e=s.onChange)||void 0===e||e.call(s,r)}})),o&&t.jsx("label",{className:"onehaul-input-label",children:o})]})};exports.Button=s,exports.Dropdown=p,exports.Input=b;
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/components/Button/Button.js"],"sourcesContent":["import React from 'react';\nimport { Button as AntButton } from 'antd';\nimport './Button.css';\n\nconst Button = ({ children, className = '', ...props }) => (\n <AntButton \n className={`onehaul-button ${className}`} \n {...props}\n >\n {children}\n </AntButton>\n);\n\nexport default Button;"],"names":["Button$1","_ref","children","_ref$className","className","props","_objectWithoutProperties","_excluded","_jsx","AntButton","_objectSpread","concat"],"mappings":"qqCAaAA,EATe,SAAHC,GAAA,IAAMC,EAAQD,EAARC,SAAQC,EAAAF,EAAEG,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAKE,+WAAKC,CAAAL,EAAAM,GAAA,OAClDC,MAACC,EAAAA,OAASC,EAAAA,EAAA,CACRN,UAAS,kBAAAO,OAAoBP,IACzBC,GAAK,GAAA,CAAAH,SAERA,IACS"}
1
+ {"version":3,"file":"index.js","sources":["../src/components/Button/index.jsx","../src/components/Dropdown/index.jsx","../src/components/Input/index.jsx"],"sourcesContent":["import React from 'react';\nimport { Button as AntButton } from 'antd';\nimport './Button.css';\n\nconst Button = ({ children, className = '', ...props }) => (\n <AntButton \n className={`onehaul-button ${className}`} \n {...props}\n >\n {children}\n </AntButton>\n);\n\nexport default Button;","import React from 'react';\nimport { Dropdown as AntDropdown } from 'antd';\nimport './Dropdown.css';\n\nconst Dropdown = ({ children, className = '', ...props }) => (\n <AntDropdown \n className={`onehaul-dropdown ${className}`} \n {...props}\n >\n {children}\n </AntDropdown>\n);\n\nexport default Dropdown;","import React, { useState } from 'react';\nimport { Input as AntInput } from 'antd';\nimport './Input.css';\n\nconst Input = ({ placeholder, className = '', ...props }) => {\n const [isFocused, setIsFocused] = useState(false);\n const [hasValue, setHasValue] = useState(false);\n\n const handleFocus = (e) => {\n setIsFocused(true);\n props.onFocus?.(e);\n };\n\n const handleBlur = (e) => {\n setIsFocused(false);\n setHasValue(!!e.target.value);\n props.onBlur?.(e);\n };\n\n const handleChange = (e) => {\n setHasValue(!!e.target.value);\n props.onChange?.(e);\n };\n\n return (\n <div className={`onehaul-input-wrapper ${isFocused ? 'focused' : ''} ${hasValue ? 'has-value' : ''}`}>\n <AntInput\n {...props}\n className={`onehaul-input ${className}`}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChange={handleChange}\n />\n {placeholder && <label className=\"onehaul-input-label\">{placeholder}</label>}\n </div>\n );\n};\n\nexport default Input;"],"names":["Button$1","_ref","children","_ref$className","className","props","_objectWithoutProperties","_excluded","_jsx","AntButton","_objectSpread","concat","Dropdown$1","AntDropdown","Input$1","placeholder","_useState2","_slicedToArray","useState","isFocused","setIsFocused","_useState4","hasValue","setHasValue","_jsxs","jsx","AntInput","onFocus","e","_props$onFocus","call","onBlur","_props$onBlur","target","value","onChange","_props$onChange"],"mappings":"shFAaAA,EATe,SAAHC,GAAA,IAAMC,EAAQD,EAARC,SAAQC,EAAAF,EAAEG,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAKE,EAAKC,EAAAL,EAAAM,GAAA,OAClDC,MAACC,EAAAA,OAASC,EAAAA,EAAA,CACRN,UAAS,kBAAAO,OAAoBP,IACzBC,GAAK,GAAA,CAAAH,SAERA,IACS,6BCGdU,EATiB,SAAHX,GAAA,IAAMC,EAAQD,EAARC,SAAQC,EAAAF,EAAEG,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAKE,EAAKC,EAAAL,EAAAM,GAAA,OACpDC,MAACK,EAAAA,SAAWH,EAAAA,EAAA,CACVN,UAAS,oBAAAO,OAAsBP,IAC3BC,GAAK,GAAA,CAAAH,SAERA,IACW,gCC4BhBY,EAlCc,SAAHb,GAAkD,IAA5Cc,EAAWd,EAAXc,YAAWZ,EAAAF,EAAEG,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAKE,EAAKC,EAAAL,EAAAM,GACHS,EAAAC,EAAfC,EAAQA,UAAC,GAAM,GAA1CC,EAASH,EAAA,GAAEI,EAAYJ,EAAA,GACiBK,EAAAJ,EAAfC,EAAQA,UAAC,GAAM,GAAxCI,EAAQD,EAAA,GAAEE,EAAWF,EAAA,GAkB5B,OACEG,EAAAA,KAAA,MAAA,CAAKpB,mCAASO,OAA2BQ,EAAY,UAAY,GAAER,KAAAA,OAAIW,EAAW,YAAc,IAAKpB,SAAA,CACnGM,EAAAiB,IAACC,QAAQhB,EAAAA,EAAA,CAAA,EACHL,GAAK,GAAA,CACTD,UAASO,iBAAAA,OAAmBP,GAC5BuB,QArBc,SAACC,GAAM,IAAAC,EACzBT,GAAa,GACAS,QAAbA,EAAAxB,EAAMsB,eAANE,IAAaA,GAAbA,EAAAC,KAAAzB,EAAgBuB,IAoBZG,OAjBa,SAACH,GAAM,IAAAI,EACxBZ,GAAa,GACbG,IAAcK,EAAEK,OAAOC,OACXF,QAAZA,EAAA3B,EAAM0B,cAANC,IAAYA,GAAZA,EAAAF,KAAAzB,EAAeuB,IAeXO,SAZe,SAACP,GAAM,IAAAQ,EAC1Bb,IAAcK,EAAEK,OAAOC,OACTE,QAAdA,EAAA/B,EAAM8B,gBAANC,IAAcA,GAAdA,EAAAN,KAAAzB,EAAiBuB,OAYdb,GAAeP,EAAAiB,IAAA,QAAA,CAAOrB,UAAU,sBAAqBF,SAAEa,MAG9D"}
package/package.json CHANGED
@@ -1,17 +1,20 @@
1
1
  {
2
2
  "name": "@onehaul/ui",
3
- "version": "0.1.0",
4
- "description": "Core UI components library wrapping Ant Design",
3
+ "version": "0.1.2",
4
+ "description": "Core UI components library designed and developed by OneHaul",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
7
7
  "files": [
8
- "dist"
8
+ "dist",
9
+ "README.md"
9
10
  ],
10
11
  "sideEffects": false,
11
12
  "scripts": {
12
13
  "build": "rollup -c",
13
14
  "dev": "rollup -c -w",
14
- "prepublishOnly": "npm run build"
15
+ "prepublishOnly": "npm run build",
16
+ "storybook": "storybook dev -p 6006",
17
+ "build-storybook": "storybook build"
15
18
  },
16
19
  "peerDependencies": {
17
20
  "antd": "^5.0.0",
@@ -19,7 +22,8 @@
19
22
  "react-dom": "^17.0.0 || ^18.0.0"
20
23
  },
21
24
  "publishConfig": {
22
- "access": "public"
25
+ "access": "public",
26
+ "registry": "https://registry.npmjs.org/"
23
27
  },
24
28
  "devDependencies": {
25
29
  "@babel/core": "^7.26.10",
@@ -28,12 +32,21 @@
28
32
  "@rollup/plugin-babel": "^6.0.4",
29
33
  "@rollup/plugin-commonjs": "^28.0.3",
30
34
  "@rollup/plugin-node-resolve": "^16.0.1",
35
+ "@storybook/addon-essentials": "^8.6.12",
36
+ "@storybook/addon-interactions": "^8.6.12",
37
+ "@storybook/addon-onboarding": "^8.6.12",
38
+ "@storybook/blocks": "^8.6.12",
39
+ "@storybook/react": "^8.6.12",
40
+ "@storybook/react-vite": "^8.6.12",
41
+ "@storybook/test": "^8.6.12",
31
42
  "antd": "^5.24.8",
43
+ "prop-types": "^15.8.1",
32
44
  "react": "^18.2.0",
33
45
  "react-dom": "^18.2.0",
34
46
  "rollup": "^2.79.2",
35
47
  "rollup-plugin-peer-deps-external": "^2.2.4",
36
48
  "rollup-plugin-postcss": "^4.0.2",
37
- "rollup-plugin-terser": "^7.0.2"
49
+ "rollup-plugin-terser": "^7.0.2",
50
+ "storybook": "^8.6.12"
38
51
  }
39
52
  }