@wistia/vhs 2.11.0-beta.b8716af5.79f2db4 → 2.11.0-beta.d13fe706.8b4e6a7
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/index.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license VHS v2.11.0-beta.
|
|
3
|
+
* @license VHS v2.11.0-beta.d13fe706.8b4e6a7
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2021-2023, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -1733,7 +1733,9 @@
|
|
|
1733
1733
|
right: ${({theme:e})=>`calc(${e.spacing.space02} + 1px)`}; /* space + border width */
|
|
1734
1734
|
transition: color 0.1s ease;
|
|
1735
1735
|
${({disabled:e})=>e?xk:Ek}
|
|
1736
|
-
`,Sk=(0,Sn.default)(Le)
|
|
1736
|
+
`,Sk=(0,Sn.default)(Le)`
|
|
1737
|
+
${({disabled:e})=>e?"cursor: not-allowed;":"cursor: pointer;"}
|
|
1738
|
+
`,Tk=({onClick:e,disabled:t=!1})=>(0,mo.jsx)(wk,{"aria-disabled":t,"aria-label":"Click to Copy",disabled:t,noStyle:!0,onClick:e,children:(0,mo.jsx)(Sk,{disabled:t,size:"md",type:"copy"})}),Cv=({inputComponent:e,inputProps:t})=>{let r=no(),[n,o]=(0,Ku.useState)(0),{value:a,disabled:s}=t,u=s??!1;(0,Ku.useEffect)(()=>{if(n>0){let m=setTimeout(()=>o(n-1),1e3);return()=>clearTimeout(m)}return()=>{}},[n]);let l=()=>{(async()=>u||(await _o(a),r({message:"Copied to clipboard"}),o(5)))()},c=n>0&&{forceState:"focus"},d={...t,...c},h={onClick:l,disabled:u,"aria-disabled":u};return(0,mo.jsxs)(Dk,{disabled:u,onClick:l,children:[(0,mo.jsx)(e,{...d}),(0,mo.jsx)(Tk,{...h})]})};i();var Gu=60,Ak=e=>e.replace(/[^0-9:]/g,""),Bk=e=>e?Number.parseFloat(e):0,Fk=(e,t,r)=>{let n=M(r)&&Number(r)>0?`${r}:`:"";return n+=`${t}:${e}`,n},Mk=e=>{let t=e.split(":"),[r,n,o]=t.reverse().map(h=>Bk(h)),a=0,s=0,u=0;M(r)&&(s=Math.floor(r/Gu),M(n)&&(s+=n)),M(r)&&(a=r%Gu);let l=a.toString();l.length===1&&(a=l.padStart(2,"0"));let c=ee(o)?o:0;u=Math.floor(s/Gu)+c,s%=Gu;let d=s.toString();return u&&d.length===1&&(s=d.padStart(2,"0")),Fk(a,s,u)},Lp=e=>{if(se(e)||!dt(e))return"0:00";let t=Ak(e);return Mk(t)};var Ma=require("react/jsx-runtime"),Ok=new Set(["search"]),Pk=yv.default.div`
|
|
1737
1739
|
position: relative;
|
|
1738
1740
|
|
|
1739
1741
|
svg {
|