@stackshift-ui/input-file 6.0.3 → 6.0.4-beta.0
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/chunk-ALMEZKLK.mjs +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/input-file.js +1 -1
- package/dist/input-file.mjs +1 -1
- package/package.json +3 -3
- package/src/input-file.tsx +1 -1
- package/dist/chunk-QDTVWRJM.mjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DefaultComponent as x,useStackShiftUIComponents as C}from"@stackshift-ui/system";import F from"classnames";import{useState as N}from"react";import{jsx as r,jsxs as m}from"react/jsx-runtime";var e="InputFile",T=({required:d=!1,variant:c="primary",name:t,ariaLabel:n,children:I,className:u,as:S,...f})=>{var s;let{[e]:E=x}=C(),[y,o]=N(""),a="my-1 ml-auto cursor-pointer rounded px-4 py-3 text-xs font-semibold leading-none transition duration-200",i=`${a} bg-primary-foreground hover:bg-primary`,g=`${a} text-primary-foreground border border-solid border-primary-foreground hover:bg-slate-100`,h=(s={primary:i,outline:g}[c])!=null?s:i,b=v=>{var p;let l=(p=v.target.files)==null?void 0:p[0];o(l?l.name:"")};return m("div",{className:"relative rounded-global bg-white px-2 w-full","data-testid":e==null?void 0:e.toLowerCase(),children:[r("input",{"aria-label":n!=null?n:"Attach file",className:"absolute w-full h-full opacity-0 cursor-pointer",type:"file",name:t,required:d,id:t,onChange:b,...f}),m("div",{className:"flex",children:[r("span",{className:"px-2 py-4 text-xs font-semibold leading-none",children:y}),r("label",{htmlFor:t,className:F(h,u),children:t})]})]})};T.displayName=e;export{T as a};
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var S=Object.create;var s=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var H=(e,t)=>{for(var n in t)s(e,n,{get:t[n],enumerable:!0})},y=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of R(t))!w.call(e,a)&&a!==n&&s(e,a,{get:()=>t[a],enumerable:!(o=E(t,a))||o.enumerable});return e};var M=(e,t,n)=>(n=e!=null?S(V(e)):{},y(t||!e||!e.__esModule?s(n,"default",{value:e,enumerable:!0}):n,e)),P=e=>y(s({},"__esModule",{value:!0}),e);var k={};H(k,{InputFile:()=>x});module.exports=P(k);var l=require("@stackshift-ui/system"),g=M(require("classnames")),h=require("react"),r=require("react/jsx-runtime"),i="InputFile",x=({required:e=!1,variant:t="primary",name:n,ariaLabel:o,children:a,className:
|
|
2
|
+
"use strict";var S=Object.create;var s=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var H=(e,t)=>{for(var n in t)s(e,n,{get:t[n],enumerable:!0})},y=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of R(t))!w.call(e,a)&&a!==n&&s(e,a,{get:()=>t[a],enumerable:!(o=E(t,a))||o.enumerable});return e};var M=(e,t,n)=>(n=e!=null?S(V(e)):{},y(t||!e||!e.__esModule?s(n,"default",{value:e,enumerable:!0}):n,e)),P=e=>y(s({},"__esModule",{value:!0}),e);var k={};H(k,{InputFile:()=>x});module.exports=P(k);var l=require("@stackshift-ui/system"),g=M(require("classnames")),h=require("react"),r=require("react/jsx-runtime"),i="InputFile",x=({required:e=!1,variant:t="primary",name:n,ariaLabel:o,children:a,className:b,as:q,...v})=>{var d;let{[i]:L=l.DefaultComponent}=(0,l.useStackShiftUIComponents)(),[C,p]=(0,h.useState)(""),m="my-1 ml-auto cursor-pointer rounded px-4 py-3 text-xs font-semibold leading-none transition duration-200",c=`${m} bg-primary-foreground hover:bg-primary`,F=`${m} text-primary-foreground border border-solid border-primary-foreground hover:bg-slate-100`,N=(d={primary:c,outline:F}[t])!=null?d:c,T=I=>{var f;let u=(f=I.target.files)==null?void 0:f[0];p(u?u.name:"")};return(0,r.jsxs)("div",{className:"relative rounded-global bg-white px-2 w-full","data-testid":i==null?void 0:i.toLowerCase(),children:[(0,r.jsx)("input",{"aria-label":o!=null?o:"Attach file",className:"absolute w-full h-full opacity-0 cursor-pointer",type:"file",name:n,required:e,id:n,onChange:T,...v}),(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("span",{className:"px-2 py-4 text-xs font-semibold leading-none",children:C}),(0,r.jsx)("label",{htmlFor:n,className:(0,g.default)(N,b),children:n})]})]})};x.displayName=i;0&&(module.exports={InputFile});
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a as e}from"./chunk-
|
|
2
|
+
"use strict";import{a as e}from"./chunk-ALMEZKLK.mjs";export{e as InputFile};
|
package/dist/input-file.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var S=Object.create;var s=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var H=(e,t)=>{for(var n in t)s(e,n,{get:t[n],enumerable:!0})},y=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of R(t))!w.call(e,a)&&a!==n&&s(e,a,{get:()=>t[a],enumerable:!(o=E(t,a))||o.enumerable});return e};var M=(e,t,n)=>(n=e!=null?S(V(e)):{},y(t||!e||!e.__esModule?s(n,"default",{value:e,enumerable:!0}):n,e)),P=e=>y(s({},"__esModule",{value:!0}),e);var k={};H(k,{InputFile:()=>
|
|
1
|
+
"use strict";var S=Object.create;var s=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var H=(e,t)=>{for(var n in t)s(e,n,{get:t[n],enumerable:!0})},y=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of R(t))!w.call(e,a)&&a!==n&&s(e,a,{get:()=>t[a],enumerable:!(o=E(t,a))||o.enumerable});return e};var M=(e,t,n)=>(n=e!=null?S(V(e)):{},y(t||!e||!e.__esModule?s(n,"default",{value:e,enumerable:!0}):n,e)),P=e=>y(s({},"__esModule",{value:!0}),e);var k={};H(k,{InputFile:()=>b});module.exports=P(k);var l=require("@stackshift-ui/system"),g=M(require("classnames")),h=require("react"),r=require("react/jsx-runtime"),i="InputFile",b=({required:e=!1,variant:t="primary",name:n,ariaLabel:o,children:a,className:v,as:q,...x})=>{var c;let{[i]:L=l.DefaultComponent}=(0,l.useStackShiftUIComponents)(),[C,p]=(0,h.useState)(""),m="my-1 ml-auto cursor-pointer rounded px-4 py-3 text-xs font-semibold leading-none transition duration-200",d=`${m} bg-primary-foreground hover:bg-primary`,F=`${m} text-primary-foreground border border-solid border-primary-foreground hover:bg-slate-100`,N=(c={primary:d,outline:F}[t])!=null?c:d,T=I=>{var f;let u=(f=I.target.files)==null?void 0:f[0];p(u?u.name:"")};return(0,r.jsxs)("div",{className:"relative rounded-global bg-white px-2 w-full","data-testid":i==null?void 0:i.toLowerCase(),children:[(0,r.jsx)("input",{"aria-label":o!=null?o:"Attach file",className:"absolute w-full h-full opacity-0 cursor-pointer",type:"file",name:n,required:e,id:n,onChange:T,...x}),(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("span",{className:"px-2 py-4 text-xs font-semibold leading-none",children:C}),(0,r.jsx)("label",{htmlFor:n,className:(0,g.default)(N,v),children:n})]})]})};b.displayName=i;0&&(module.exports={InputFile});
|
package/dist/input-file.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-ALMEZKLK.mjs";export{a as InputFile};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/input-file",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.4-beta.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"classnames": "^2.5.1",
|
|
37
|
-
"@stackshift-ui/
|
|
38
|
-
"@stackshift-ui/
|
|
37
|
+
"@stackshift-ui/scripts": "6.0.2",
|
|
38
|
+
"@stackshift-ui/system": "6.0.3"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@types/react": "16.8 - 19",
|
package/src/input-file.tsx
CHANGED
|
@@ -56,7 +56,7 @@ export const InputFile: React.FC<InputFileProps> = ({
|
|
|
56
56
|
|
|
57
57
|
return (
|
|
58
58
|
<div
|
|
59
|
-
className={"relative rounded bg-white px-2 w-full"}
|
|
59
|
+
className={"relative rounded-global bg-white px-2 w-full"}
|
|
60
60
|
data-testid={displayName?.toLowerCase()}>
|
|
61
61
|
<input
|
|
62
62
|
aria-label={ariaLabel ?? "Attach file"}
|
package/dist/chunk-QDTVWRJM.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{DefaultComponent as b,useStackShiftUIComponents as C}from"@stackshift-ui/system";import F from"classnames";import{useState as N}from"react";import{jsx as r,jsxs as m}from"react/jsx-runtime";var e="InputFile",T=({required:d=!1,variant:c="primary",name:t,ariaLabel:n,children:I,className:u,as:S,...f})=>{var s;let{[e]:E=b}=C(),[y,o]=N(""),a="my-1 ml-auto cursor-pointer rounded px-4 py-3 text-xs font-semibold leading-none transition duration-200",i=`${a} bg-primary-foreground hover:bg-primary`,g=`${a} text-primary-foreground border border-solid border-primary-foreground hover:bg-slate-100`,h=(s={primary:i,outline:g}[c])!=null?s:i,v=x=>{var p;let l=(p=x.target.files)==null?void 0:p[0];o(l?l.name:"")};return m("div",{className:"relative rounded bg-white px-2 w-full","data-testid":e==null?void 0:e.toLowerCase(),children:[r("input",{"aria-label":n!=null?n:"Attach file",className:"absolute w-full h-full opacity-0 cursor-pointer",type:"file",name:t,required:d,id:t,onChange:v,...f}),m("div",{className:"flex",children:[r("span",{className:"px-2 py-4 text-xs font-semibold leading-none",children:y}),r("label",{htmlFor:t,className:F(h,u),children:t})]})]})};T.displayName=e;export{T as a};
|