@gbmtech/aurora-ui 0.1.3 → 0.1.4
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.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,_)=>{for(var r in _)__webpack_require__.o(_,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:_[r]})},__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Input:()=>Input});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),utils_cjs_namespaceObject=require("../lib/utils.cjs"),external_spinner_cjs_namespaceObject=require("./spinner.cjs");function Input({className:e,type:_,disabled:r,prefix:t,suffix:n,inputClassName:a,loading:c,loaderPosition:
|
|
2
|
+
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,_)=>{for(var r in _)__webpack_require__.o(_,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:_[r]})},__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Input:()=>Input});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),utils_cjs_namespaceObject=require("../lib/utils.cjs"),external_spinner_cjs_namespaceObject=require("./spinner.cjs");function Input({className:e,type:_,disabled:r,prefix:t,suffix:n,inputClassName:a,loading:c,loaderPosition:i="prefix",spinner:s,...p}){return(0,jsx_runtime_namespaceObject.jsxs)("div",{className:(0,utils_cjs_namespaceObject.cn)("flex h-12 w-full items-center gap-4 rounded-md border border-zinc-200 bg-background px-4 ring-offset-background placeholder:text-zinc-400 focus-within:outline-none focus-within:ring-2 focus-within:ring-gbm-sky focus-within:ring-offset-2 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50",e),"data-disabled":r,children:[c&&"prefix"===i?s||(0,jsx_runtime_namespaceObject.jsx)(external_spinner_cjs_namespaceObject.Spinner,{}):t,(0,jsx_runtime_namespaceObject.jsx)("input",{className:(0,utils_cjs_namespaceObject.cn)("peer h-full w-full flex-1 overflow-hidden bg-transparent text-base outline-none placeholder:text-zinc-400",a),type:_,disabled:r,onKeyDown:e=>{"number"===_&&["e","E","+","-"].includes(e.key)&&e.preventDefault()},onFocus:e=>{"number"===_&&e.target.addEventListener("wheel",e=>{e.preventDefault()},{passive:!1})},...p}),c&&"suffix"===i?s||(0,jsx_runtime_namespaceObject.jsx)(external_spinner_cjs_namespaceObject.Spinner,{}):n]})}for(var __webpack_i__ in exports.Input=__webpack_exports__.Input,__webpack_exports__)-1===["Input"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
3
3
|
//# sourceMappingURL=input.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\input.cjs","sources":["webpack://@gbmtech/aurora-ui/./src/components/input.tsx"],"sourcesContent":["\r\n\r\nimport { ComponentProps, JSX, ReactNode } from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\nimport { Spinner } from './spinner'\r\n\r\nexport type InputProps = Omit<ComponentProps<'input'>, 'prefix'> & {\r\n prefix?: ReactNode\r\n suffix?: ReactNode\r\n inputClassName?: string\r\n loaderPosition?: 'prefix' | 'suffix'\r\n loading?: boolean\r\n spinner?: ReactNode\r\n}\r\n\r\nfunction Input({\r\n className,\r\n type,\r\n disabled,\r\n prefix,\r\n suffix,\r\n inputClassName,\r\n loading,\r\n loaderPosition = 'prefix',\r\n spinner,\r\n ...props\r\n}: InputProps): JSX.Element {\r\n return (\r\n <div\r\n className={cn(\r\n 'flex h-12 w-full items-center rounded-md border border-zinc-200 bg-background ring-offset-background placeholder:text-zinc-400 focus-within:outline-none focus-within:ring-2 focus-within:ring-gbm-sky focus-within:ring-offset-2 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',\r\n className\r\n )}\r\n data-disabled={disabled}\r\n >\r\n {loading && loaderPosition === 'prefix' ?
|
|
1
|
+
{"version":3,"file":"components\\input.cjs","sources":["webpack://@gbmtech/aurora-ui/./src/components/input.tsx"],"sourcesContent":["\r\n\r\nimport { ComponentProps, JSX, ReactNode } from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\nimport { Spinner } from './spinner'\r\n\r\nexport type InputProps = Omit<ComponentProps<'input'>, 'prefix'> & {\r\n prefix?: ReactNode\r\n suffix?: ReactNode\r\n inputClassName?: string\r\n loaderPosition?: 'prefix' | 'suffix'\r\n loading?: boolean\r\n spinner?: ReactNode\r\n}\r\n\r\nfunction Input({\r\n className,\r\n type,\r\n disabled,\r\n prefix,\r\n suffix,\r\n inputClassName,\r\n loading,\r\n loaderPosition = 'prefix',\r\n spinner,\r\n ...props\r\n}: InputProps): JSX.Element {\r\n return (\r\n <div\r\n className={cn(\r\n 'flex h-12 w-full items-center gap-4 rounded-md border border-zinc-200 bg-background px-4 ring-offset-background placeholder:text-zinc-400 focus-within:outline-none focus-within:ring-2 focus-within:ring-gbm-sky focus-within:ring-offset-2 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',\r\n className\r\n )}\r\n data-disabled={disabled}\r\n >\r\n {loading && loaderPosition === 'prefix' ? spinner || <Spinner /> : prefix}\r\n\r\n <input\r\n className={cn(\r\n 'peer h-full w-full flex-1 overflow-hidden bg-transparent text-base outline-none placeholder:text-zinc-400',\r\n inputClassName\r\n )}\r\n type={type}\r\n disabled={disabled}\r\n onKeyDown={e => {\r\n if (type === 'number' && ['e', 'E', '+', '-'].includes(e.key)) {\r\n e.preventDefault()\r\n }\r\n }}\r\n onFocus={e => {\r\n if (type === 'number') {\r\n e.target.addEventListener(\r\n 'wheel',\r\n e => {\r\n e.preventDefault()\r\n },\r\n { passive: false }\r\n )\r\n }\r\n }}\r\n {...props}\r\n />\r\n\r\n {loading && loaderPosition === 'suffix' ? spinner || <Spinner /> : suffix}\r\n </div>\r\n )\r\n}\r\n\r\nexport { Input }\r\n"],"names":["Input","className","type","disabled","prefix","suffix","inputClassName","loading","loaderPosition","spinner","props","cn","Spinner","e"],"mappings":";+8BAgBA,SAASA,MAAM,CACbC,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,SAAAA,CAAQ,CACRC,OAAAA,CAAM,CACNC,OAAAA,CAAM,CACNC,eAAAA,CAAc,CACdC,QAAAA,CAAO,CACPC,eAAAA,EAAiB,QAAQ,CACzBC,QAAAA,CAAO,CACP,GAAGC,EACQ,EACX,MACE,qCAAC,OACC,UAAWC,GAAAA,0BAAAA,EAAAA,EACT,uTACAV,GAEF,gBAAeE,E,UAEdI,GAAWC,WAAAA,EAA8BC,GAAW,oCAACG,qCAAAA,OAAOA,CAAAA,CAAAA,GAAMR,EAEnE,oCAAC,SACC,UAAWO,GAAAA,0BAAAA,EAAAA,EACT,4GACAL,GAEF,KAAMJ,EACN,SAAUC,EACV,UAAWU,IACLX,WAAAA,GAAqB,CAAC,IAAK,IAAK,IAAK,IAAI,CAAC,QAAQ,CAACW,EAAE,GAAG,GAC1DA,EAAE,cAAc,EAEpB,EACA,QAASA,IACHX,WAAAA,GACFW,EAAE,MAAM,CAAC,gBAAgB,CACvB,QACAA,IACEA,EAAE,cAAc,EAClB,EACA,CAAE,QAAS,EAAM,EAGvB,EACC,GAAGH,CAAK,GAGVH,GAAWC,WAAAA,EAA8BC,GAAW,oCAACG,qCAAAA,OAAOA,CAAAA,CAAAA,GAAMP,E,EAGzE,C"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
import*as e from"react/jsx-runtime";import*as n from"../lib/utils.js";import*as r from"./spinner.js";function
|
|
2
|
+
import*as e from"react/jsx-runtime";import*as n from"../lib/utils.js";import*as r from"./spinner.js";function t({className:t,type:i,disabled:s,prefix:o,suffix:a,inputClassName:l,loading:d,loaderPosition:u="prefix",spinner:f,...c}){return(0,e.jsxs)("div",{className:(0,n.cn)("flex h-12 w-full items-center gap-4 rounded-md border border-zinc-200 bg-background px-4 ring-offset-background placeholder:text-zinc-400 focus-within:outline-none focus-within:ring-2 focus-within:ring-gbm-sky focus-within:ring-offset-2 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50",t),"data-disabled":s,children:[d&&"prefix"===u?f||(0,e.jsx)(r.Spinner,{}):o,(0,e.jsx)("input",{className:(0,n.cn)("peer h-full w-full flex-1 overflow-hidden bg-transparent text-base outline-none placeholder:text-zinc-400",l),type:i,disabled:s,onKeyDown:e=>{"number"===i&&["e","E","+","-"].includes(e.key)&&e.preventDefault()},onFocus:e=>{"number"===i&&e.target.addEventListener("wheel",e=>{e.preventDefault()},{passive:!1})},...c}),d&&"suffix"===u?f||(0,e.jsx)(r.Spinner,{}):a]})}export{t as Input};
|
|
3
3
|
//# sourceMappingURL=input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\input.js","sources":["webpack://@gbmtech/aurora-ui/./src/components/input.tsx"],"sourcesContent":["\r\n\r\nimport { ComponentProps, JSX, ReactNode } from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\nimport { Spinner } from './spinner'\r\n\r\nexport type InputProps = Omit<ComponentProps<'input'>, 'prefix'> & {\r\n prefix?: ReactNode\r\n suffix?: ReactNode\r\n inputClassName?: string\r\n loaderPosition?: 'prefix' | 'suffix'\r\n loading?: boolean\r\n spinner?: ReactNode\r\n}\r\n\r\nfunction Input({\r\n className,\r\n type,\r\n disabled,\r\n prefix,\r\n suffix,\r\n inputClassName,\r\n loading,\r\n loaderPosition = 'prefix',\r\n spinner,\r\n ...props\r\n}: InputProps): JSX.Element {\r\n return (\r\n <div\r\n className={cn(\r\n 'flex h-12 w-full items-center rounded-md border border-zinc-200 bg-background ring-offset-background placeholder:text-zinc-400 focus-within:outline-none focus-within:ring-2 focus-within:ring-gbm-sky focus-within:ring-offset-2 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',\r\n className\r\n )}\r\n data-disabled={disabled}\r\n >\r\n {loading && loaderPosition === 'prefix' ?
|
|
1
|
+
{"version":3,"file":"components\\input.js","sources":["webpack://@gbmtech/aurora-ui/./src/components/input.tsx"],"sourcesContent":["\r\n\r\nimport { ComponentProps, JSX, ReactNode } from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\nimport { Spinner } from './spinner'\r\n\r\nexport type InputProps = Omit<ComponentProps<'input'>, 'prefix'> & {\r\n prefix?: ReactNode\r\n suffix?: ReactNode\r\n inputClassName?: string\r\n loaderPosition?: 'prefix' | 'suffix'\r\n loading?: boolean\r\n spinner?: ReactNode\r\n}\r\n\r\nfunction Input({\r\n className,\r\n type,\r\n disabled,\r\n prefix,\r\n suffix,\r\n inputClassName,\r\n loading,\r\n loaderPosition = 'prefix',\r\n spinner,\r\n ...props\r\n}: InputProps): JSX.Element {\r\n return (\r\n <div\r\n className={cn(\r\n 'flex h-12 w-full items-center gap-4 rounded-md border border-zinc-200 bg-background px-4 ring-offset-background placeholder:text-zinc-400 focus-within:outline-none focus-within:ring-2 focus-within:ring-gbm-sky focus-within:ring-offset-2 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',\r\n className\r\n )}\r\n data-disabled={disabled}\r\n >\r\n {loading && loaderPosition === 'prefix' ? spinner || <Spinner /> : prefix}\r\n\r\n <input\r\n className={cn(\r\n 'peer h-full w-full flex-1 overflow-hidden bg-transparent text-base outline-none placeholder:text-zinc-400',\r\n inputClassName\r\n )}\r\n type={type}\r\n disabled={disabled}\r\n onKeyDown={e => {\r\n if (type === 'number' && ['e', 'E', '+', '-'].includes(e.key)) {\r\n e.preventDefault()\r\n }\r\n }}\r\n onFocus={e => {\r\n if (type === 'number') {\r\n e.target.addEventListener(\r\n 'wheel',\r\n e => {\r\n e.preventDefault()\r\n },\r\n { passive: false }\r\n )\r\n }\r\n }}\r\n {...props}\r\n />\r\n\r\n {loading && loaderPosition === 'suffix' ? spinner || <Spinner /> : suffix}\r\n </div>\r\n )\r\n}\r\n\r\nexport { Input }\r\n"],"names":["Input","className","type","disabled","prefix","suffix","inputClassName","loading","loaderPosition","spinner","props","cn","Spinner","e"],"mappings":";qGAgBA,SAASA,EAAM,CACbC,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,SAAAA,CAAQ,CACRC,OAAAA,CAAM,CACNC,OAAAA,CAAM,CACNC,eAAAA,CAAc,CACdC,QAAAA,CAAO,CACPC,eAAAA,EAAiB,QAAQ,CACzBC,QAAAA,CAAO,CACP,GAAGC,EACQ,EACX,MACE,WAAC,OACC,UAAWC,GAAAA,EAAAA,EAAAA,EACT,uTACAV,GAEF,gBAAeE,E,UAEdI,GAAWC,WAAAA,EAA8BC,GAAW,UAACG,EAAAA,OAAOA,CAAAA,CAAAA,GAAMR,EAEnE,UAAC,SACC,UAAWO,GAAAA,EAAAA,EAAAA,EACT,4GACAL,GAEF,KAAMJ,EACN,SAAUC,EACV,UAAWU,IACLX,WAAAA,GAAqB,CAAC,IAAK,IAAK,IAAK,IAAI,CAAC,QAAQ,CAACW,EAAE,GAAG,GAC1DA,EAAE,cAAc,EAEpB,EACA,QAASA,IACHX,WAAAA,GACFW,EAAE,MAAM,CAAC,gBAAgB,CACvB,QACAA,IACEA,EAAE,cAAc,EAClB,EACA,CAAE,QAAS,EAAM,EAGvB,EACC,GAAGH,CAAK,GAGVH,GAAWC,WAAAA,EAA8BC,GAAW,UAACG,EAAAA,OAAOA,CAAAA,CAAAA,GAAMP,E,EAGzE,Q"}
|