@better-nds/react 0.0.16 → 0.0.17
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/input.cjs +1 -1
- package/dist/input.cjs.map +1 -1
- package/dist/input.d.ts +2 -3
- package/dist/input.d.ts.map +1 -1
- package/dist/input.js +1 -1
- package/dist/input.js.map +1 -1
- package/package.json +1 -1
package/dist/input.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("clsx"),r=require("./_cn.cjs"),a=t&&t.__esModule?t:{default:t};exports.Input=function({className:t,type:n,size:d="lg",dir:s,...i}){return e.jsx("div",{dir:s,className:r.cn("after:bg-nds-neutral-950 group has-aria-invalid:after:bg-nds-error-700 relative flex w-full justify-center overflow-hidden rounded-sm transition-shadow after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] after:duration-300 not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5 has-disabled:shadow-none has-disabled:after:w-0",{"h-10":"lg"===d,"h-8":"md"===d},t),children:e.jsx("input",{type:n,"data-slot":"input",className:a.default("bg-nds-white text-nds-neutral-700 hover:text-nds-black placeholder:text-nds-neutral-500 active:bg-nds-neutral-100 active:text-nds-neutral-700 border-nds-neutral-400 hover:border-nds-neutral-700 active:border-nds-neutral-400 aria-invalid:border-nds-error-700 relative w-full min-w-0 rounded-sm border ps-2 pe-4 text-base ring-0 transition-colors outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"),...i})})};
|
|
2
2
|
//# sourceMappingURL=input.cjs.map
|
package/dist/input.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.cjs","sources":["../src/components/input.tsx"],"sourcesContent":["import type { ComponentProps
|
|
1
|
+
{"version":3,"file":"input.cjs","sources":["../src/components/input.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\"\n\nimport clsx from \"clsx\"\n\nimport { cn } from \"../_cn\"\n\nfunction Input({\n className,\n type,\n size = \"lg\",\n dir,\n ...props\n}: Omit<ComponentProps<\"input\">, \"size\"> & {\n size?: \"lg\" | \"md\"\n}) {\n return (\n <div\n dir={dir}\n className={cn(\n \"after:bg-nds-neutral-950 group has-aria-invalid:after:bg-nds-error-700 relative flex w-full justify-center overflow-hidden rounded-sm transition-shadow after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] after:duration-300 not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5 has-disabled:shadow-none has-disabled:after:w-0\",\n {\n \"h-10\": size === \"lg\",\n \"h-8\": size === \"md\"\n },\n className\n )}\n >\n <input\n type={type}\n data-slot=\"input\"\n className={clsx(\n \"bg-nds-white text-nds-neutral-700 hover:text-nds-black placeholder:text-nds-neutral-500 active:bg-nds-neutral-100 active:text-nds-neutral-700 border-nds-neutral-400 hover:border-nds-neutral-700 active:border-nds-neutral-400 aria-invalid:border-nds-error-700 relative w-full min-w-0 rounded-sm border ps-2 pe-4 text-base ring-0 transition-colors outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\"\n )}\n {...props}\n />\n </div>\n )\n}\n\nexport { Input }\n"],"names":["className","type","size","dir","props","_jsx","div","cn","children","input","data-slot","clsx"],"mappings":"iLAMA,SAAe,CACbA,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,KAAAA,EAAO,IAAI,CACXC,IAAAA,CAAG,CACH,GAAGC,EAGJ,EACC,OACEC,EAAAA,GAAA,CAACC,MAAAA,CACCH,IAAKA,EACLH,UAAWO,EAAAA,GACT,yXACA,CACE,OAAQL,AAAS,OAATA,EACR,MAAOA,AAAS,OAATA,GAETF,GAGFQ,SAAAH,EAAAA,GAAA,CAACI,QAAAA,CACCR,KAAMA,EACNS,YAAU,QACVV,UAAWW,EAAAA,OAAAA,CACT,sbAED,GAAGP,CAAAA,IAIZ"}
|
package/dist/input.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ComponentProps
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
3
|
|
|
4
|
-
declare function Input({ className, type, size, dir,
|
|
5
|
-
addon?: ReactNode;
|
|
4
|
+
declare function Input({ className, type, size, dir, ...props }: Omit<ComponentProps<"input">, "size"> & {
|
|
6
5
|
size?: "lg" | "md";
|
|
7
6
|
}): react_jsx_runtime.JSX.Element;
|
|
8
7
|
|
package/dist/input.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sources":["../src/components/input.tsx"],"mappings":";;;AAEA,iBAAiB,KAAK,
|
|
1
|
+
{"version":3,"file":"input.d.ts","sources":["../src/components/input.tsx"],"mappings":";;;AAEA,iBAAiB,KAAK,2CAA2C,IAAI,CAAC,cAAc;AACpF;AACA,IAAI,iBAAiB,CAAC,GAAG,CAAC,OAAO;;;;","names":[]}
|
package/dist/input.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import t from"clsx";import{cn as r}from"./_cn.js";function a({className:n,type:d,size:i="lg",dir:o,...s}){return e("div",{dir:o,className:r("after:bg-nds-neutral-950 group has-aria-invalid:after:bg-nds-error-700 relative flex w-full justify-center overflow-hidden rounded-sm transition-shadow after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] after:duration-300 not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5 has-disabled:shadow-none has-disabled:after:w-0",{"h-10":"lg"===i,"h-8":"md"===i},n),children:e("input",{type:d,"data-slot":"input",className:t("bg-nds-white text-nds-neutral-700 hover:text-nds-black placeholder:text-nds-neutral-500 active:bg-nds-neutral-100 active:text-nds-neutral-700 border-nds-neutral-400 hover:border-nds-neutral-700 active:border-nds-neutral-400 aria-invalid:border-nds-error-700 relative w-full min-w-0 rounded-sm border ps-2 pe-4 text-base ring-0 transition-colors outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"),...s})})}export{a as Input};
|
|
2
2
|
//# sourceMappingURL=input.js.map
|
package/dist/input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sources":["../src/components/input.tsx"],"sourcesContent":["import type { ComponentProps
|
|
1
|
+
{"version":3,"file":"input.js","sources":["../src/components/input.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\"\n\nimport clsx from \"clsx\"\n\nimport { cn } from \"../_cn\"\n\nfunction Input({\n className,\n type,\n size = \"lg\",\n dir,\n ...props\n}: Omit<ComponentProps<\"input\">, \"size\"> & {\n size?: \"lg\" | \"md\"\n}) {\n return (\n <div\n dir={dir}\n className={cn(\n \"after:bg-nds-neutral-950 group has-aria-invalid:after:bg-nds-error-700 relative flex w-full justify-center overflow-hidden rounded-sm transition-shadow after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] after:duration-300 not-active:focus-within:shadow-md focus-within:after:w-full active:after:w-2/5 has-disabled:shadow-none has-disabled:after:w-0\",\n {\n \"h-10\": size === \"lg\",\n \"h-8\": size === \"md\"\n },\n className\n )}\n >\n <input\n type={type}\n data-slot=\"input\"\n className={clsx(\n \"bg-nds-white text-nds-neutral-700 hover:text-nds-black placeholder:text-nds-neutral-500 active:bg-nds-neutral-100 active:text-nds-neutral-700 border-nds-neutral-400 hover:border-nds-neutral-700 active:border-nds-neutral-400 aria-invalid:border-nds-error-700 relative w-full min-w-0 rounded-sm border ps-2 pe-4 text-base ring-0 transition-colors outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\"\n )}\n {...props}\n />\n </div>\n )\n}\n\nexport { Input }\n"],"names":["Input","className","type","size","dir","props","_jsx","div","cn","children","input","data-slot","clsx"],"mappings":"0FAMA,SAASA,EAAM,CACbC,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,KAAAA,EAAO,IAAI,CACXC,IAAAA,CAAG,CACH,GAAGC,EAGJ,EACC,OACEC,EAACC,MAAAA,CACCH,IAAKA,EACLH,UAAWO,EACT,yXACA,CACE,OAAQL,AAAS,OAATA,EACR,MAAOA,AAAS,OAATA,GAETF,GAGFQ,SAAAH,EAACI,QAAAA,CACCR,KAAMA,EACNS,YAAU,QACVV,UAAWW,EACT,sbAED,GAAGP,CAAAA,IAIZ"}
|