@better-nds/react 0.0.14 → 0.0.16

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 CHANGED
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("clsx"),t=r&&r.__esModule?r:{default:r};exports.Input=function({className:r,type:a,size:n="lg",dir:d,addon:o,...s}){return e.jsxs("div",{dir:d,role:"group",className:t.default("after:bg-nds-neutral-950 has-aria-invalid:after:bg-nds-error-700 relative flex w-fit justify-center overflow-hidden rounded-sm transition-shadow [--input-border:var(--color-nds-neutral-400)] after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] 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 has-aria-invalid:[--input-border:var(--color-nds-error-700)] has-[input:active]:[--input-border:var(--color-nds-neutral-400)] has-[input:hover]:[--input-border:var(--color-nds-neutral-700)]",{"h-10":"lg"===n,"h-8":"md"===n}),children:[e.jsx("input",{type:a,"data-slot":"input",className:t.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 relative min-w-0 rounded-s-sm border border-e-0 border-(--input-border) ps-2 pe-4 text-base ring-0 transition-colors outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",r),...s}),o&&e.jsx("div",{className:"bg-nds-neutral-100 text-nds-neutral-500 flex h-full items-center gap-1 rounded-e-sm border border-s-0 border-(--input-border) px-4 transition-colors",children:o})]})};
1
+ Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("clsx"),t=require("./_cn.cjs"),a=r&&r.__esModule?r:{default:r};exports.Input=function({className:r,type:n,size:d="lg",dir:o,addon:s,...i}){return e.jsxs("div",{dir:o,role:"group","data-has-addon":!!s,className:t.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 [--input-border:var(--color-nds-neutral-400)] after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] 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 has-aria-invalid:[--input-border:var(--color-nds-error-700)]! has-[input:active]:[--input-border:var(--color-nds-neutral-400)] has-[input:hover]:[--input-border:var(--color-nds-neutral-700)]",{"h-10":"lg"===d,"h-8":"md"===d},r),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 relative w-full min-w-0 rounded-sm border border-(--input-border) ps-2 pe-4 text-base ring-0 transition-colors outline-none group-data-[has-addon=true]:rounded-e-none group-data-[has-addon=true]:border-e-0 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"),...i}),s&&e.jsx("div",{className:"bg-nds-neutral-100 text-nds-neutral-500 flex h-full items-center gap-1 rounded-e-sm border border-s-0 border-(--input-border) px-4 transition-colors",children:s})]})};
2
2
  //# sourceMappingURL=input.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.cjs","sources":["../src/components/input.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } from \"react\"\n\nimport clsx from \"clsx\"\n\nfunction Input({\n className,\n type,\n size = \"lg\",\n dir,\n addon,\n ...props\n}: Omit<ComponentProps<\"input\">, \"size\"> & {\n addon?: ReactNode\n size?: \"lg\" | \"md\"\n}) {\n return (\n <div\n dir={dir}\n role=\"group\"\n className={clsx(\n \"after:bg-nds-neutral-950 has-aria-invalid:after:bg-nds-error-700 relative flex w-fit justify-center overflow-hidden rounded-sm transition-shadow [--input-border:var(--color-nds-neutral-400)] after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] 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 has-aria-invalid:[--input-border:var(--color-nds-error-700)] has-[input:active]:[--input-border:var(--color-nds-neutral-400)] has-[input:hover]:[--input-border:var(--color-nds-neutral-700)]\",\n {\n \"h-10\": size === \"lg\",\n \"h-8\": size === \"md\"\n }\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 relative min-w-0 rounded-s-sm border border-e-0 border-(--input-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 className\n )}\n {...props}\n />\n {addon && (\n <div className=\"bg-nds-neutral-100 text-nds-neutral-500 flex h-full items-center gap-1 rounded-e-sm border border-s-0 border-(--input-border) px-4 transition-colors\">\n {addon}\n </div>\n )}\n </div>\n )\n}\n\nexport { Input }\n"],"names":["className","type","size","dir","addon","props","_jsxs","div","role","clsx","_jsx","input","data-slot"],"mappings":"0JAIA,SAAe,CACbA,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,KAAAA,EAAO,IAAI,CACXC,IAAAA,CAAG,CACHC,MAAAA,CAAK,CACL,GAAGC,EAIJ,EACC,OACEC,EAAAA,IAAA,CAACC,MAAAA,CACCJ,IAAKA,EACLK,KAAK,QACLR,UAAWS,EAAAA,QACT,2kBACA,CACE,OAAQP,AAAS,OAATA,EACR,MAAOA,AAAS,OAATA,CACT,aAGFQ,EAAAA,GAAA,CAACC,QAAAA,CACCV,KAAMA,EACNW,YAAU,QACVZ,UAAWS,EAAAA,QACT,+VACAT,GAED,GAAGK,CAAAA,GAELD,GACCM,EAAAA,GAAA,CAACH,MAAAA,CAAIP,UAAU,uJACZI,SAAAA,MAKX"}
1
+ {"version":3,"file":"input.cjs","sources":["../src/components/input.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } 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 addon,\n ...props\n}: Omit<ComponentProps<\"input\">, \"size\"> & {\n addon?: ReactNode\n size?: \"lg\" | \"md\"\n}) {\n return (\n <div\n dir={dir}\n role=\"group\"\n data-has-addon={!!addon}\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 [--input-border:var(--color-nds-neutral-400)] after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] 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 has-aria-invalid:[--input-border:var(--color-nds-error-700)]! has-[input:active]:[--input-border:var(--color-nds-neutral-400)] has-[input:hover]:[--input-border:var(--color-nds-neutral-700)]\",\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 relative w-full min-w-0 rounded-sm border border-(--input-border) ps-2 pe-4 text-base ring-0 transition-colors outline-none group-data-[has-addon=true]:rounded-e-none group-data-[has-addon=true]:border-e-0 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\"\n )}\n {...props}\n />\n {addon && (\n <div className=\"bg-nds-neutral-100 text-nds-neutral-500 flex h-full items-center gap-1 rounded-e-sm border border-s-0 border-(--input-border) px-4 transition-colors\">\n {addon}\n </div>\n )}\n </div>\n )\n}\n\nexport { Input }\n"],"names":["className","type","size","dir","addon","props","_jsxs","div","role","data-has-addon","cn","_jsx","input","data-slot","clsx"],"mappings":"iLAMA,SAAe,CACbA,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,KAAAA,EAAO,IAAI,CACXC,IAAAA,CAAG,CACHC,MAAAA,CAAK,CACL,GAAGC,EAIJ,EACC,OACEC,EAAAA,IAAA,CAACC,MAAAA,CACCJ,IAAKA,EACLK,KAAK,QACLC,iBAAgB,CAAC,CAACL,EAClBJ,UAAWU,EAAAA,GACT,mlBACA,CACE,OAAQR,AAAS,OAATA,EACR,MAAOA,AAAS,OAATA,GAETF,aAGFW,EAAAA,GAAA,CAACC,QAAAA,CACCX,KAAMA,EACNY,YAAU,QACVb,UAAWc,EAAAA,OAAAA,CACT,4aAED,GAAGT,CAAAA,GAELD,GACCO,EAAAA,GAAA,CAACJ,MAAAA,CAAIP,UAAU,uJACZI,SAAAA,MAKX"}
package/dist/input.js CHANGED
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as r}from"react/jsx-runtime";import t from"clsx";function n({className:a,type:o,size:d="lg",dir:i,addon:s,...l}){return e("div",{dir:i,role:"group",className:t("after:bg-nds-neutral-950 has-aria-invalid:after:bg-nds-error-700 relative flex w-fit justify-center overflow-hidden rounded-sm transition-shadow [--input-border:var(--color-nds-neutral-400)] after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] 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 has-aria-invalid:[--input-border:var(--color-nds-error-700)] has-[input:active]:[--input-border:var(--color-nds-neutral-400)] has-[input:hover]:[--input-border:var(--color-nds-neutral-700)]",{"h-10":"lg"===d,"h-8":"md"===d}),children:[r("input",{type:o,"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 relative min-w-0 rounded-s-sm border border-e-0 border-(--input-border) ps-2 pe-4 text-base ring-0 transition-colors outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",a),...l}),s&&r("div",{className:"bg-nds-neutral-100 text-nds-neutral-500 flex h-full items-center gap-1 rounded-e-sm border border-s-0 border-(--input-border) px-4 transition-colors",children:s})]})}export{n as Input};
1
+ import{jsxs as r,jsx as e}from"react/jsx-runtime";import t from"clsx";import{cn as a}from"./_cn.js";function n({className:o,type:d,size:i="lg",dir:s,addon:l,...u}){return r("div",{dir:s,role:"group","data-has-addon":!!l,className:a("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 [--input-border:var(--color-nds-neutral-400)] after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] 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 has-aria-invalid:[--input-border:var(--color-nds-error-700)]! has-[input:active]:[--input-border:var(--color-nds-neutral-400)] has-[input:hover]:[--input-border:var(--color-nds-neutral-700)]",{"h-10":"lg"===i,"h-8":"md"===i},o),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 relative w-full min-w-0 rounded-sm border border-(--input-border) ps-2 pe-4 text-base ring-0 transition-colors outline-none group-data-[has-addon=true]:rounded-e-none group-data-[has-addon=true]:border-e-0 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"),...u}),l&&e("div",{className:"bg-nds-neutral-100 text-nds-neutral-500 flex h-full items-center gap-1 rounded-e-sm border border-s-0 border-(--input-border) px-4 transition-colors",children:l})]})}export{n 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, ReactNode } from \"react\"\n\nimport clsx from \"clsx\"\n\nfunction Input({\n className,\n type,\n size = \"lg\",\n dir,\n addon,\n ...props\n}: Omit<ComponentProps<\"input\">, \"size\"> & {\n addon?: ReactNode\n size?: \"lg\" | \"md\"\n}) {\n return (\n <div\n dir={dir}\n role=\"group\"\n className={clsx(\n \"after:bg-nds-neutral-950 has-aria-invalid:after:bg-nds-error-700 relative flex w-fit justify-center overflow-hidden rounded-sm transition-shadow [--input-border:var(--color-nds-neutral-400)] after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] 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 has-aria-invalid:[--input-border:var(--color-nds-error-700)] has-[input:active]:[--input-border:var(--color-nds-neutral-400)] has-[input:hover]:[--input-border:var(--color-nds-neutral-700)]\",\n {\n \"h-10\": size === \"lg\",\n \"h-8\": size === \"md\"\n }\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 relative min-w-0 rounded-s-sm border border-e-0 border-(--input-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 className\n )}\n {...props}\n />\n {addon && (\n <div className=\"bg-nds-neutral-100 text-nds-neutral-500 flex h-full items-center gap-1 rounded-e-sm border border-s-0 border-(--input-border) px-4 transition-colors\">\n {addon}\n </div>\n )}\n </div>\n )\n}\n\nexport { Input }\n"],"names":["Input","className","type","size","dir","addon","props","_jsxs","div","role","clsx","_jsx","input","data-slot"],"mappings":"sEAIA,SAASA,EAAM,CACbC,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,KAAAA,EAAO,IAAI,CACXC,IAAAA,CAAG,CACHC,MAAAA,CAAK,CACL,GAAGC,EAIJ,EACC,OACEC,EAACC,MAAAA,CACCJ,IAAKA,EACLK,KAAK,QACLR,UAAWS,EACT,2kBACA,CACE,OAAQP,AAAS,OAATA,EACR,MAAOA,AAAS,OAATA,CACT,aAGFQ,EAACC,QAAAA,CACCV,KAAMA,EACNW,YAAU,QACVZ,UAAWS,EACT,+VACAT,GAED,GAAGK,CAAAA,GAELD,GACCM,EAACH,MAAAA,CAAIP,UAAU,uJACZI,SAAAA,MAKX"}
1
+ {"version":3,"file":"input.js","sources":["../src/components/input.tsx"],"sourcesContent":["import type { ComponentProps, ReactNode } 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 addon,\n ...props\n}: Omit<ComponentProps<\"input\">, \"size\"> & {\n addon?: ReactNode\n size?: \"lg\" | \"md\"\n}) {\n return (\n <div\n dir={dir}\n role=\"group\"\n data-has-addon={!!addon}\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 [--input-border:var(--color-nds-neutral-400)] after:absolute after:bottom-0 after:h-0.5 after:w-0 after:transition-[width] 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 has-aria-invalid:[--input-border:var(--color-nds-error-700)]! has-[input:active]:[--input-border:var(--color-nds-neutral-400)] has-[input:hover]:[--input-border:var(--color-nds-neutral-700)]\",\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 relative w-full min-w-0 rounded-sm border border-(--input-border) ps-2 pe-4 text-base ring-0 transition-colors outline-none group-data-[has-addon=true]:rounded-e-none group-data-[has-addon=true]:border-e-0 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\"\n )}\n {...props}\n />\n {addon && (\n <div className=\"bg-nds-neutral-100 text-nds-neutral-500 flex h-full items-center gap-1 rounded-e-sm border border-s-0 border-(--input-border) px-4 transition-colors\">\n {addon}\n </div>\n )}\n </div>\n )\n}\n\nexport { Input }\n"],"names":["Input","className","type","size","dir","addon","props","_jsxs","div","role","data-has-addon","cn","_jsx","input","data-slot","clsx"],"mappings":"oGAMA,SAASA,EAAM,CACbC,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,KAAAA,EAAO,IAAI,CACXC,IAAAA,CAAG,CACHC,MAAAA,CAAK,CACL,GAAGC,EAIJ,EACC,OACEC,EAACC,MAAAA,CACCJ,IAAKA,EACLK,KAAK,QACLC,iBAAgB,CAAC,CAACL,EAClBJ,UAAWU,EACT,mlBACA,CACE,OAAQR,AAAS,OAATA,EACR,MAAOA,AAAS,OAATA,GAETF,aAGFW,EAACC,QAAAA,CACCX,KAAMA,EACNY,YAAU,QACVb,UAAWc,EACT,4aAED,GAAGT,CAAAA,GAELD,GACCO,EAACJ,MAAAA,CAAIP,UAAU,uJACZI,SAAAA,MAKX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-nds/react",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "description": "React component library for better-nds",
5
5
  "license": "MIT",
6
6
  "sideEffects": [