@companycam/slab-web 1.31.6 → 1.31.7

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.
Files changed (3) hide show
  1. package/index.js +2 -2
  2. package/index.mjs +3 -3
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -1281,7 +1281,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gs]+=1);const Y0=G.span`
1281
1281
  background: var(--cc_color_background_1);
1282
1282
  border-width: var(--cc_size_border_width_s);
1283
1283
  border-style: dashed;
1284
- border-color: ${e=>e.$status==="normal"?"var(--cc_color_border_input_inactive)":It(e.$status).accentColor};
1284
+ border-color: ${e=>!e.$status||e.$status==="normal"?"var(--cc_color_border_input_inactive)":It(e.$status).accentColor};
1285
1285
  border-radius: var(--cc_size_border_radius_m);
1286
1286
  `,gR=G.div`
1287
1287
  position: relative;
@@ -1318,7 +1318,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Gs]+=1);const Y0=G.span`
1318
1318
  &:hover {
1319
1319
  background: var(--cc_color_button_background_primary_alpha_10);
1320
1320
  }
1321
- `;function _R({messages:e,id:n,status:t}){return P.jsx("div",{role:"region","aria-live":"assertive",children:P.jsx(hR,{id:n,children:e.map((r,i)=>P.jsx(pR,{children:P.jsxs(Vg,{$status:t,children:[P.jsx(Hg,{className:`mdi mdi-${It(t).icon}`,"aria-hidden":"true"}),P.jsx(Bg,{children:r})]})},i))})})}const yR=w.forwardRef(({onDrop:e,onDropAccepted:n,onDropRejected:t,accept:r,billboard:i,dropZoneStyle:o,fileUploadButtonLabel:a,multiple:c=!0,loading:u,messages:f,maxSize:p=1/0,...g},y)=>{const{className:_,message:b,status:x="normal",style:E,...T}=g,[z,L]=w.useState(!1),B=Z=>{const se=Z.target.files,ae=(r??"").split(",").map(ce=>ce.trim()),ue=[],fe=[];se&&Array.from(se).forEach(ce=>{ce.size<=p&&ae.includes(ce.type)?ue.push(ce):fe.push(ce)}),ue.length>0&&n&&n(ue),fe.length>0&&t&&t(fe),e(ue,fe,Z),L(!1)},X=Z=>{L(!0)},U=Z=>{L(!1)};return P.jsxs(gR,{onDragEnter:X,onDragLeave:U,$isDragOver:z,children:[P.jsx(mR,{ref:y,"aria-describedby":b?`${g.id}-message`:"","aria-disabled":u==null?void 0:u.isVisible,"aria-invalid":x==="error",type:"file",onChange:B,accept:r,multiple:c,$status:x,$isDragOver:z,...T}),P.jsxs(od,{htmlFor:g.id,$status:x,style:o,children:[u!=null&&u.isVisible?u.component:null,!(u!=null&&u.isVisible)&&i?P.jsx(Ig,{title:i.title,iconName:i.iconName,message:i.message,color:i.color,image:i.image}):null,!(u!=null&&u.isVisible)&&a?P.jsx(vR,{children:a}):null]}),f?P.jsx(_R,{id:b?`${g.id}-message`:"",messages:f,status:x},g.id):null]})}),bR=G.label`
1321
+ `;function _R({messages:e,id:n,status:t}){return P.jsx("div",{role:"region","aria-live":"assertive",children:P.jsx(hR,{id:n,children:e.map((r,i)=>P.jsx(pR,{children:P.jsxs(Vg,{$status:t,children:[P.jsx(Hg,{className:`mdi mdi-${It(t).icon}`,"aria-hidden":"true"}),P.jsx(Bg,{children:r})]})},i))})})}const yR=w.forwardRef(({onDrop:e,onDropAccepted:n,onDropRejected:t,accept:r,billboard:i,dropZoneStyle:o,fileUploadButtonLabel:a,multiple:c=!0,loading:u,messages:f,maxSize:p=1/0,...g},y)=>{const{className:_,message:b,status:x,style:E,...T}=g,[z,L]=w.useState(!1),B=Z=>{const se=Z.target.files,ae=(r??"").split(",").map(ce=>ce.trim()),ue=[],fe=[];se&&Array.from(se).forEach(ce=>{ce.size<=p&&ae.includes(ce.type)?ue.push(ce):fe.push(ce)}),ue.length>0&&n&&n(ue),fe.length>0&&t&&t(fe),e(ue,fe,Z),L(!1)},X=Z=>{L(!0)},U=Z=>{L(!1)};return P.jsxs(gR,{onDragEnter:X,onDragLeave:U,$isDragOver:z,children:[P.jsx(mR,{ref:y,"aria-describedby":b?`${g.id}-message`:"","aria-disabled":u==null?void 0:u.isVisible,"aria-invalid":x==="error"?!0:void 0,type:"file",onChange:B,accept:r,multiple:c,$status:x,$isDragOver:z,...T}),P.jsxs(od,{htmlFor:g.id,$status:x,style:o,children:[u!=null&&u.isVisible?u.component:null,!(u!=null&&u.isVisible)&&i?P.jsx(Ig,{title:i.title,iconName:i.iconName,message:i.message,color:i.color,image:i.image}):null,!(u!=null&&u.isVisible)&&a?P.jsx(vR,{children:a}):null]}),f?P.jsx(_R,{id:b?`${g.id}-message`:"",messages:f,status:x},g.id):null]})}),bR=G.label`
1322
1322
  all: initial;
1323
1323
  ${e=>e.$hideLabel?fr:pe`
1324
1324
  box-sizing: border-box;
package/index.mjs CHANGED
@@ -13478,7 +13478,7 @@ const bR = j.ul`
13478
13478
  background: var(--cc_color_background_1);
13479
13479
  border-width: var(--cc_size_border_width_s);
13480
13480
  border-style: dashed;
13481
- border-color: ${(e) => e.$status === "normal" ? "var(--cc_color_border_input_inactive)" : Vt(e.$status).accentColor};
13481
+ border-color: ${(e) => !e.$status || e.$status === "normal" ? "var(--cc_color_border_input_inactive)" : Vt(e.$status).accentColor};
13482
13482
  border-radius: var(--cc_size_border_radius_m);
13483
13483
  `, xR = j.div`
13484
13484
  position: relative;
@@ -13543,7 +13543,7 @@ const RN = Gt(
13543
13543
  maxSize: p = 1 / 0,
13544
13544
  ...g
13545
13545
  }, y) => {
13546
- const { className: _, message: b, status: w = "normal", style: C, ...P } = g, [N, F] = nt(!1), B = (Z) => {
13546
+ const { className: _, message: b, status: w, style: C, ...P } = g, [N, F] = nt(!1), B = (Z) => {
13547
13547
  const se = Z.target.files, ae = (r ?? "").split(",").map((ce) => ce.trim()), ue = [], fe = [];
13548
13548
  se && Array.from(se).forEach((ce) => {
13549
13549
  ce.size <= p && ae.includes(ce.type) ? ue.push(ce) : fe.push(ce);
@@ -13566,7 +13566,7 @@ const RN = Gt(
13566
13566
  ref: y,
13567
13567
  "aria-describedby": b ? `${g.id}-message` : "",
13568
13568
  "aria-disabled": u == null ? void 0 : u.isVisible,
13569
- "aria-invalid": w === "error",
13569
+ "aria-invalid": w === "error" ? !0 : void 0,
13570
13570
  type: "file",
13571
13571
  onChange: B,
13572
13572
  accept: r,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@companycam/slab-web",
3
- "version": "1.31.6",
3
+ "version": "1.31.7",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {